1 2009-01-12 Mark Probst <mark.probst@gmail.com>
3 * method-to-ir.c: Don't stop sharing of generic methods with catch
4 clauses - we already handle those.
6 2009-01-12 Mark Probst <mark.probst@gmail.com>
8 * mini.c, mini.h: lookup_generic_method() is now
9 mono_domain_lookup_shared_generic() and uses the jit_code_hash,
10 making the shared_generics_hash obsolete.
12 2009-01-12 Mark Probst <mark.probst@gmail.com>
14 * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
15 use the red zone. Make room on the stack first and then use it,
16 not the other way around.
18 2009-01-12 Zoltan Varga <vargaz@gmail.com>
20 * mini.c (mini_init): Call mono_xdebug_init ().
22 * aot-compiler.c (mono_xdebug_init): Make this non-static.
24 2009-01-11 Zoltan Varga <vargaz@gmail.com>
26 * TestDriver.cs: Add an --iter argument to run tests multiple times.
28 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
31 * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
32 debug+unwind info for trampolines.
34 * mini.c (mono_create_unwind_op): New helper function.
36 * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
38 2009-01-10 Zoltan Varga <vargaz@gmail.com>
40 * aot-compiler.c: Fix the build.
42 2009-01-09 Zoltan Varga <vargaz@gmail.com>
44 * Makefile.am: Update dtrace-prelink.sh location.
46 2009-01-08 Zoltan Varga <vargaz@gmail.com>
48 * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr
49 optimization. Fixes #464520.
51 2009-01-07 Bill Holmes <billholmes54@gmail.com>
53 * mini-amd64.c : Adding code to save/restore non-volatile registers
56 * exceptions-amd64.c : Adding code to save/restore non-volatile
59 Contributed under MIT/X11 license.
61 2009-01-07 Zoltan Varga <vargaz@gmail.com>
63 * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
64 __GNUC_MINOR__ which can break when the major version changes.
66 2009-01-07 Rodrigo Kumpera <rkumpera@novell.com>
68 * basic-simd.cs: Add tests for usage of the sizeof opcode.
70 2009-01-07 Geoff Norton <gnorton@novell.com>
72 * helpers.c: Allow mono -v -v -v to work on darwin.
74 2009-01-05 Bill Holmes <billholmes54@gmail.com>
76 * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
79 Contributed under MIT/X11 license.
81 2009-01-05 Zoltan Varga <vargaz@gmail.com>
83 * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
84 instead of directly accessing type->data.klass. Fixes #462016.
85 (mono_allocate_stack_slots_full): Ditto.
87 * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio
88 <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
90 * aot-compiler.c (emit_plt): Fix ARM build.
92 2009-01-04 Zoltan Varga <vargaz@gmail.com>
94 * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
96 * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
99 * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
100 instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
103 * iltests.il.in: Add a regression test.
105 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
107 * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
109 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
111 * basic-simd.cs: Add a regression test for #462457.
113 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
115 * mini-ops.h: Add a definition of XPHI.
117 * mini.h (MONO_IS_PHI): Make is aware of simd instrincs.
119 * ssa.c (op_phi_to_move): Handle XPHI.
121 * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
125 2009-01-04 Rodrigo Kumpera <rkumpera@novell.com>
127 * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
129 2008-12-31 Geoff Norton <gnorton@novell.com>
131 * mini-ppc.c: The prolog size allocated can be too small for darwin
132 ppc32 under certain circumstances. Also fix a small logic bug.
134 2008-12-29 Zoltan Varga <vargaz@gmail.com>
136 * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
137 while loading AOT methods.
139 * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
140 since only the former is nulled out after a successful cast. This prevents
141 crashes with rethrown exceptions when using --debug=casts.
143 2008-12-24 Mark Probst <mark.probst@gmail.com>
145 * mini.h: New macro for checking whether a method is final,
146 i.e. whether the method or its class is marked final.
148 * method-to-ir.c: Use the new macro for all final-checks
149 consistently. Fixes the crash in the System.ServiceModel tests.
151 2008-12-23 Mark Probst <mark.probst@gmail.com>
153 * mini-exceptions.c (get_exception_catch_class): Corrected another
154 overly strict assertion.
156 2008-12-23 Mark Probst <mark.probst@gmail.com>
158 * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
159 Clobbering it is not allowed because the caller might use it as
160 the vtable register in the interface call.
162 2008-12-19 Mark Probst <mark.probst@gmail.com>
164 * mini-exceptions.c (get_exception_catch_class): Corrected an
165 overly strict assertion.
167 2008-12-18 Mark Mason <mmason@upwardaccess.com>
169 * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
171 * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
173 * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
175 * cpu-mips.md: correct lengths for certain long_ opcodes.
177 * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
179 * mini-mips.c: Add support for more long operations. Fix issues with stack frame layout for n32 (still not perfect yet). Add mips_emit_load_const().
181 2008-12-17 Mark Mason <mmason@upwardaccess.com>
183 * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
185 2008-12-17 Mark Mason <mmason@upwardaccess.com>
187 * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
189 2008-12-16 Rodrigo Kumpera <rkumpera@novell.com>
191 * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
194 2008-12-16 Mark Mason <mmason@upwardaccess.com>
196 * mini.h: Allow MonoInst 'p' field to alias with the low-order bits of the 'const_val' fields correctly on big-endian systems when SIZEOF_VOID_P < SIZEOF_REGISTER
198 * ir-emit.h: Change SIZEOF_VOID_P to SIZEOF_REGISTER, init instruction through inst_c* fields instead of inst_p* fields in case sizeof(inst_p) < sizeof(inst_c)
200 2008-12-15 Mark Mason <mmason@upwardaccess.com>
202 * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
204 2008-12-14 Zoltan Varga <vargaz@gmail.com>
206 * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
207 gshared code. Fixes #458947.
209 * generics.cs: Add a test.
211 2008-12-12 Mark Mason <mmason@upwardaccess.com>
213 * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
215 * mini-mips.c: first pass n32 code generation.
217 * mini-mips.h: datatypes and defines for n32 support.
219 * exceptions-mips.c: first pass n32 code generation.
221 * tramp-mips.c: first pass n32 code generation.
223 * cpu-mips.md: add long_ opcodes.
225 2008-12-12 Mark Mason <mmason@upwardaccess.com>
227 * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
229 * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
231 * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
233 * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
235 * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
237 * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
239 * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
241 * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
243 * helpers.c: for mips/n32, don't pass -mips32 to objdump
245 2008-12-12 Zoltan Varga <vargaz@gmail.com>
247 * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
249 2008-12-12 Andrés G. Aragoneses <aaragoneses@novell.com>
251 * driver.c: Sync --help-trace with man page (EXPR,EXPR).
253 2008-12-12 Mark Probst <mark.probst@gmail.com>
255 * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
256 descriptors for helper functions directly in front of the code.
258 2008-12-11 Mark Probst <mark.probst@gmail.com>
260 * method-to-ir.c: Removed an unnecessary assertion.
262 2008-12-10 Zoltan Varga <vargaz@gmail.com>
264 * method-to-ir.c: Merge SGEN changes from the old JIT.
266 2008-12-10 Zoltan Varga <vargaz@gmail.com>
268 * driver.c (compile_all_methods_thread_main): Handle failure of
271 2008-12-10 Mark Probst <mark.probst@gmail.com>
273 * mini-ppc.c: Merged with mini-ppc64.c.
275 * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
277 * Makefile.am: Use the same sources for PPC and PPC64.
279 * mini-ppc64.c: Removed.
281 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
283 * branch-opts.c (remove_block_if_useless): Extract fall through detection
284 code to mono_bb_is_fall_through.
286 * branch-opts.c (mono_remove_critical_edges): Same.
288 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
290 * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
291 expect that an OP_BR_REG will be there.
293 2008-12-09 Rodrigo Kumpera <rkumpera@novell.com>
295 * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
296 for the many branch ops. The original check miss OP_BR_REG.
300 2008-12-09 Mark Mason <mmason@upwardaccess.com>
302 * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
304 2008-12-09 Zoltan Varga <vargaz@gmail.com>
306 * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
307 while holding the aot lock.
309 2008-12-09 Mark Mason <mmason@upwardaccess.com>
311 * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
313 2008-12-09 Bill Holmes <billholmes54@gmail.com>
315 * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws
316 to release all runtime callable wrappers held by the runtime.
318 Contributed under MIT/X11 license.
320 2008-12-09 Bill Holmes <billholmes54@gmail.com>
322 * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
325 Contributed under MIT/X11 license.
327 2008-12-09 Zoltan Varga <vargaz@gmail.com>
329 * aot-runtime.c (decode_exception_debug_info): Acquire the domain
330 lock when calling mono_domain_alloc (). Hopefully fixes #415608.
332 2008-12-09 Mark Mason <mmason@upwardaccess.com>
334 * cpu-mips.md: fix ckfinite length
336 * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
337 (mono_arch_lowering_pass): cleanup, rearrange for clarity
338 (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
340 2008-12-08 Mark Mason <mmason@upwardaccess.com>
342 * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
344 2008-12-08 Geoff Norton <gnorton@novell.com>
346 * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
347 size by 8 bytes as well.
349 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
351 * basic-simd.cs: Fix method names for Vector16b.
353 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
355 * basic-simd.cs: Fix method names for Vector16sb.
357 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
359 * basic-simd.cs: Fix method names for Vector8us.
361 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
363 * basic-simd.cs: Fix method names for Vector8s.
365 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
367 * basic-simd.cs: Fix method names for Vector4ui.
369 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
371 * basic-simd.cs: Fix method names for Vector2l.
373 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
375 * basic-simd.cs: Fix method names for Vector2d.
377 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
379 * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
380 that are extension methods.
382 2008-12-08 Rodrigo Kumpera <rkumpera@novell.com>
384 * basic-simd.cs: Fix method names for Vector4f.
386 2008-12-08 Zoltan Varga <vargaz@gmail.com>
388 * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
389 as such. Fixes #456669.
391 2008-12-07 Mark Mason <mmason@upwardaccess.com>
393 * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
395 2008-12-07 Mark Mason <mmason@upwardaccess.com>
397 * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
398 (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
399 (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
400 (mips_adjust_stackframe): handle FP spills
402 * mini-ops.h: add mips_mtc1_s2
404 * cpu-mips.md: add mips_mtc1_s2
406 2008-12-07 Zoltan Varga <vargaz@gmail.com>
408 * unwind.c: New file, move the unwind info encoding functions here from
409 aot-compiler.c, so they could be used at runtime too.
411 2008-12-05 Mark Mason <mmason@upwardaccess.com>
413 * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
414 (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
416 2008-12-05 Mark Mason <mmason@upwardaccess.com>
418 * mini-mips.c: cleanup warnings
419 (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
420 (mips_adjust_stackframe): handle case of taking the address of stack locals
422 2008-12-05 Zoltan Varga <vargaz@gmail.com>
424 * aot-compiler.c: Implement a few functions missing from the asm writer.
425 (emit_method_code): Only write symbols for methods when using the bin
426 writer, since the assembler can't deal with the characters in our method
429 * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
431 * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
434 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
435 a bit to also restore %rax.
437 2008-12-05 Mark Probst <mark.probst@gmail.com>
439 * mini-ppc.c: Some simple merges from mini-ppc64.c.
441 2008-12-05 Zoltan Varga <vargaz@gmail.com>
443 * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
446 2008-12-05 Mark Probst <mark.probst@gmail.com>
448 * exceptions-ppc.c: Merged with exceptions-ppc64.c.
450 * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
451 MONO_ARCH_FRAME_ALIGNMENT. Struct for PPC64 function descriptors.
453 * exceptions-ppc64.c: Removed.
455 * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
457 2008-12-05 Mark Probst <mark.probst@gmail.com>
459 * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
462 * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
464 * tramp-ppc64.c: Removed.
466 2008-12-05 Zoltan Varga <vargaz@gmail.com>
468 * aot-compiler.c (add_generic_instances): Skip non-generic classes in
471 2008-12-05 Mark Probst <mark.probst@gmail.com>
473 * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
475 * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
476 mini-ppc.h instead of mini-ppc64.h.
478 * mini-ppc64.h: Removed.
480 2008-12-04 Mark Mason <mmason@upwardaccess.com>
482 * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
484 * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
486 2008-12-05 Mark Probst <mark.probst@gmail.com>
488 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
489 Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
492 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
494 * basic-simd.cs: Tests for operator == and != on Vector8us and Vector16b.
496 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
498 * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
500 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
502 * basic-simd.cs: Tests for operator == and != on Vector4f.
504 2008-12-05 Rodrigo Kumpera <rkumpera@novell.com>
506 * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
508 * simd-intrinsics.c: Kill useless enum.
510 2008-12-04 Mark Mason <mmason@upwardaccess.com>
512 * cpu-mips.md: add long_conv_to_ovf_i4_2
513 * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
515 2008-12-04 Mark Mason <mmason@upwardaccess.com>
517 * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
519 * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
521 2008-12-04 Mark Mason <mmason@upwardaccess.com>
523 * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
525 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
527 * basic-simd.cs: Add tests for new methods.
529 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
531 * simd-intrinsics.c: Add support for operator == and !=
534 * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
536 2008-12-04 Rodrigo Kumpera <rkumpera@novell.com>
538 * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
540 2008-12-04 Zoltan Varga <vargaz@gmail.com>
542 * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
544 * mini.c (mono_resolve_patch_target): Allow pinvoke methods in
545 MONO_PATCH_INFO_ICALL_ADDR.
547 * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
549 * aot-compiler.c: Resurrect full-aot support.
551 2008-12-04 Mark Mason <mmason@upwardaccess.com>
553 * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
555 2008-12-04 Mark Mason <mmason@upwardaccess.com>
557 * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
559 2008-12-03 Rodrigo Kumpera <rkumpera@novell.com>
561 * basic-simd.cs: Fix tests to work under ppc.
562 Remove tests for methods that will be removed.
564 2008-12-03 Mark Probst <mark.probst@gmail.com>
566 * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
567 generic type (via a typedef or typeref) correctly.
569 2008-12-03 Zoltan Varga <vargaz@gmail.com>
571 * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
572 diagnose an assertion failure.
574 2008-12-02 Mark Probst <mark.probst@gmail.com>
576 * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
579 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
580 conversion opcodes are implemented natively instead via emulation.
582 2008-12-01 Mark Mason <mmason@upwardaccess.com>
584 * cpu-mips.md: remove mips_xori
586 * mini-ops.h: remove mips_xori
588 * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
590 * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
592 * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
594 2008-12-01 Mark Mason <mmason@upwardaccess.com>
596 * cpu-mips.md: fix instruction lengths.
598 * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
600 * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
602 * mini-ops.h: fix slti / sltiu op profiles.
604 2008-12-02 Martin Baulig <martin@ximian.com>
606 * method-to-ir.c (mono_method_to_ir): Disable debugging
607 information for the init locals block to make the debugger stop
608 after all locals have been initalized.
610 2008-12-02 Martin Baulig <martin@ximian.com>
612 * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
613 running inside the debugger.
615 2008-12-01 Zoltan Varga <vargaz@gmail.com>
617 * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
620 * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the
621 alu->alu imm optimization which only shows if deadce is disabled.
623 * aot-compiler.c: Rename the function names for the binary and asm writers
624 so they can coexist in the same process. Rework the xdebug code to use the
625 asm writer. This avoids the need to call into the runtime to dump the
626 debugging info. Add more debugging info for types.
628 * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
630 * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
631 cpu description tables, they can't occur in cpu-<ARCH>.md.
633 * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
634 the stack in CEE_LDFLDA. Fixes #450542.
636 * generics.cs: Add a new test.
638 2008-12-01 Mark Mason <mmason@upwardaccess.com>
640 * mini-ops.h: updated MIPS opcodes
641 * mini-mips.c: decompose long opts
642 * mini-mips.h: decompose long opts
644 2008-11-29 Mark Mason <mmason@upwardaccess.com>
646 * cpu-mips.md: fix length on int_rem_un
647 * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
649 2008-11-29 Zoltan Varga <vargaz@gmail.com>
651 * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
653 * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
655 2008-11-29 Martin Baulig <martin@ximian.com>
657 * mini-exceptions.c (mono_handle_native_sigsegv): Check
658 mono_debug_using_mono_debugger() in addition to the
659 `no_gdb_backtrace' flag in the `MonoDebugOptions'.
661 2008-11-28 Mark Mason <mmason@upwardaccess.com>
663 * mini-ops.h: updated more MIPS opcodes
664 * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
665 * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
667 2008-11-28 Mark Probst <mark.probst@gmail.com>
669 * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
671 2008-11-28 Mark Mason <mmason@upwardaccess.com>
673 * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
674 * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
675 * mini-ops.h: correct selected mips opcode entries
677 2008-11-28 Mark Probst <mark.probst@gmail.com>
679 * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
682 2008-11-28 Mark Probst <mark.probst@gmail.com>
684 * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
686 2008-11-28 Mark Mason <mmason@upwardaccess.com>
688 * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
689 * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
690 * mini-mips.h: disable IMT
691 * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
693 2008-11-28 Mark Probst <mark.probst@gmail.com>
695 * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
697 2008-11-28 Mark Probst <mark.probst@gmail.com>
699 * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
701 2008-11-28 Zoltan Varga <vargaz@gmail.com>
703 * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
706 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
708 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
709 for Set/GetVector aligned versions.
711 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
713 * basic-simd.cs: Add tests for Get/SetVector.
715 2008-11-27 Mark Probst <mark.probst@gmail.com>
717 * mini.c: Removed g_slist_append_mempool(). Now in
720 2008-11-27 Rodrigo Kumpera <rkumpera@novell.com>
722 * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
723 size properly and make the bounds check optional.
725 * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
726 for SetVector and IsAligned.
728 2008-11-27 Zoltan Varga <vargaz@gmail.com>
730 * mini.c: Remove unused mono_normalize_opcodes () function.
732 2008-11-26 Mark Probst <mark.probst@gmail.com>
734 * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
735 using the new atomic add ops now.
737 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
740 2008-11-26 Mark Probst <mark.probst@gmail.com>
742 * mini-ppc64.c: Several fixes.
744 2008-11-25 Mark Mason <mmason@upwardaccess.com>
746 * cpu-mips.md: added jump_table
747 * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.
749 2008-11-25 Mark Mason <mmason@upwardaccess.com>
751 * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
753 2008-11-25 Mark Mason <mmason@upwardaccess.com>
755 * mini-ops.h: corrected a handful of MIPS opcodes.
757 2008-11-25 Mark Mason <mmason@upwardaccess.com>
759 * aot-compiler.c: MIPS to use ELF writer
761 2008-11-25 Mark Mason <mmason@upwardaccess.com>
763 * mini-codegen.c: remove MIPS specific assert.
765 2008-11-25 Mark Probst <mark.probst@gmail.com>
767 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
768 fixes. PPC64 now passes most of the runtime regressions.
770 2008-11-24 Zoltan Varga <vargaz@gmail.com>
772 * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
773 volatile intervals a bit.
775 2008-11-24 Mark Probst <mark.probst@gmail.com>
777 * basic-long.cs: New test case.
779 2008-11-23 Zoltan Varga <vargaz@gmail.com>
781 * mini.c (mini_method_compile): Disable globalra for large methods for
784 * regalloc2.c (order_moves): Add fp support.
786 * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
787 source bblock ends with an OP_BR_REG.
789 * ratests.cs: Add a new test.
791 2008-11-23 Mark Probst <mark.probst@gmail.com>
793 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
794 sharing. PPC64 now passes generics.exe.
796 2008-11-23 Mark Probst <mark.probst@gmail.com>
798 * mini-ppc64.c: Several fixes. PPC64 now runs iltests.exe.
800 2008-11-23 Zoltan Varga <vargaz@gmail.com>
802 * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
803 memory when mono_jit_info_table_find () can't find the method in the
806 * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
809 * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
812 2008-11-23 Mark Probst <mark.probst@gmail.com>
814 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
815 Several fixes. PPC64 now runs exceptions.exe and
816 devirtualization.exe.
818 2008-11-22 Mark Probst <mark.probst@gmail.com>
820 * mini-ppc64.c, tramp-ppc64.c: Small fixes. PPC64 now runs
821 arrays.exe and basic-math.exe.
823 2008-11-22 Mark Probst <mark.probst@gmail.com>
825 * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
826 cpu-ppc64.md: Several fixes. PPC64 now runs objects.exe.
828 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
830 * simd-intrinsics.c: Add support ArrayExtension intrinsics.
832 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
834 * method-to-ir.c: Move bounds checking macros to ir-emit.h
836 * ir-emit.h: Move macros from method-to-ir.c to here.
838 2008-11-21 Rodrigo Kumpera <rkumpera@novell.com>
840 * mini-ops.h: Correct the long simd ops to use LREG.
842 2008-11-21 Zoltan Varga <vargaz@gmail.com>
844 * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
846 * mini-ops.h: Correct the dreg type of a few long opcodes.
848 * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
851 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
853 * mini-ppc.c: remove negative stack references in epilog
854 for platforms that don't support the red zone.
856 2008-11-21 Mark Probst <mark.probst@gmail.com>
858 * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
859 point regs. Now PPC64 passes basic-calls.exe.
861 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
863 * basic-simd.cs: Add tests for accessors of Vector2l.
865 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
867 * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
869 * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
871 * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
873 2008-11-21 Mark Probst <mark.probst@gmail.com>
875 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes. Now
876 PPC64 passes basic-long.exe.
878 2008-11-20 Mark Probst <mark.probst@gmail.com>
880 * decompose.c: Decompose carry and overflow add on PPC64 like on
881 other 64 bit archs. Don't decompose sub at all on PPC64.
883 * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
884 Several fixes and new opcodes. Now PPC64 runs (but doesn't pass)
887 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
889 * basic-simd.cs: Add tests for accessors of Vector2d.
891 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
893 * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
897 * mini-x86.c (mono_arch_output_basic_block): Same.
899 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
901 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
903 * basic-simd.cs: Add tests for accessors of Vector4f.
905 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
907 * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
911 * mini-x86.c (mono_arch_output_basic_block): Same.
913 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
915 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
917 * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
919 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
921 * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
925 * mini-x86.c (mono_arch_output_basic_block): Same.
927 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
929 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
931 * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
933 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
935 * simd-intrinsics.c: Enable setters for Vector16sb.
937 2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
939 * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
943 * mini-x86.c (mono_arch_output_basic_block): Same.
945 * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
947 2008-11-19 Rodrigo Kumpera <rkumpera@novell.com>
949 * simd-intrinsics.c: Implement setter for Vector8us.
951 2008-11-19 Zoltan Varga <vargaz@gmail.com>
953 * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
956 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
958 * mini-ppc.c: remove references to the red zone in the prolog
959 (for systems that don't support it).
961 2008-11-19 Mark Probst <mark.probst@gmail.com>
963 * cpu-ppc64.md: Fixed a few instruction lengths.
965 * mini-ppc64.c: Don't emit SETLRET. PPC64 passes basic-float.exe,
968 2008-11-19 Mark Probst <mark.probst@gmail.com>
970 * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes. PPC64 passes
973 2008-11-19 Zoltan Varga <vargaz@gmail.com>
975 * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
977 2008-11-18 Rodrigo Kumpera <rkumpera@novell.com>
979 * mini-ops.h: Added OP_INSERT_I2.
983 * mini-x86.c (mono_arch_output_basic_block): Same.
985 * simd-intrinsics.c: Implement setter for Vector8s.
987 * simd-methods.h: Add the names of get setters of Vector8s.
989 2008-11-18 Zoltan Varga <vargaz@gmail.com>
991 * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
993 * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
996 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
998 2008-11-18 Mark Probst <mark.probst@gmail.com>
1000 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
1001 for PPC64. An empty program runs now.
1003 2008-11-18 Zoltan Varga <vargaz@gmail.com>
1005 * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1007 * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
1008 a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
1009 info for JITted code is emitted into a shared library, loadable into gdb.
1011 2008-11-18 Mark Probst <mark.probst@gmail.com>
1013 * Makefile.am: Changes to build PPC64.
1015 * mini-arch.h: Include mini-ppc64.h on PPC64.
1017 2008-11-18 Mark Probst <mark.probst@gmail.com>
1019 * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
1020 in PPC code up to r119147.
1022 2008-11-18 Mark Probst <mark.probst@gmail.com>
1024 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1025 cpu-ppc64.md: Changes for PPC64.
1027 Based on code submitted by andreas.faerber@web.de at
1028 https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
1031 2008-11-18 Mark Probst <mark.probst@gmail.com>
1033 * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1034 cpu-ppc64.md: Copied from the corresponding PPC files from
1037 2008-11-18 Scott Peterson <lunchtimemama@novell.com>
1039 * mini-ops.h: Added OP_ROUND.
1041 * cpu-x86.md: Added round.
1043 * mini-x86.c: Added support for intrinsicing Math.Round (double).
1045 * basic-math.cs: Added test_0_round to test rounding.
1047 Contributed under MIT/X11 license.
1049 2008-11-17 Bill Holmes <billholmes54@gmail.com>
1051 * aot-compiler.c : Fix the Winx64 build.
1053 Contributed under MIT/X11 license.
1055 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1057 * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
1058 in OP_EXTRACT_R8 to avoid possible stack corruption.
1060 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1062 * mini-ops.h: Added OP_EXTRACT_R8/I8.
1064 * cpu-x86.md: Added extract_r8.
1066 * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
1068 * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
1069 a couple of OP_EXTRACT_I4.
1071 * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
1073 * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
1075 2008-11-17 Rodrigo Kumpera <rkumpera@novell.com>
1077 * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
1080 2008-11-17 Zoltan Varga <vargaz@gmail.com>
1082 * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
1083 trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
1085 * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
1086 are not needed any more.
1088 * mini.h: Remove the unused INS_LIST macros.
1090 * mini.c (mini_method_compile): Remove a disable globalra case which is no
1093 * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
1096 * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
1097 mono_alloc_ireg () instead.
1099 * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
1102 * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
1105 * aot-runtime.c (load_aot_module): Disable AOT when running under
1108 * mini-amd64.h: Change the monitor fastpath defines to check for
1109 !PLATFORM_WIN32 so they work on *bsd too.
1111 * mini.h mini.c mini-hhpa.c: Remove more unused code.
1113 * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
1115 * mini.h (MonoCompile): Remove new_ir flag.
1117 * regalloc.h regalloc.c: Remove unused code.
1119 * cpu-*.md: Remove more unused opcodes.
1121 * simple-cee-ops.h simple-mini-ops.h: Removed.
1123 * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
1125 2008-11-17 Zoltan Varga <vargaz@gmail.com>
1127 * aliasing.h: Removed.
1129 * *.c: Remove references to aliasing.h and inssel.h.
1131 * mini.c: Remove additional unused functions.
1133 * mini-ops.h cpu-*.md: Remove unused opcodes.
1135 2008-11-16 Zoltan Varga <vargaz@gmail.com>
1137 Remove the old JIT code.
1139 * inssel*.brg: Removed.
1141 * ssa.c abcremoval.c aliasing.c: Removed.
1143 * ssa2.c: Renamed to ssa.c.
1145 * abcremoval2.c: Renamed to abcremoval.c.
1147 * *.c: Removed all !cfg->new_ir code.
1149 * mini-<ARCH>.c: Removed mono_arch_call_opcode (),
1150 mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
1152 * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
1154 2008-11-16 Zoltan Varga <vargaz@gmail.com>
1156 * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
1157 to simplify the code and cut back on the number of global symbols in the AOT
1160 * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
1162 2008-11-15 Zoltan Varga <vargaz@gmail.com>
1164 * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
1165 with the got/got_info tables.
1167 * mini.h: Bump AOT file format version.
1169 * unwind.h: New file, contains definitions for stack unwinding.
1171 * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
1174 * aot-compiler.c: Generalize the emitting of unwind information to use the
1175 information in cfg->unwind_ops.
1177 * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
1179 * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
1180 AOT method frames. Enable writing symbols for methods by default.
1182 2008-11-14 Rodrigo Kumpera <rkumpera@novell.com>
1184 * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
1185 and make it work with vectors of element sizes 1, 2 and 4.
1187 * simd-intrinsics.c: Enable getter for all vectors with element size
1190 * simd-methods.h: Add the names of other getters.
1192 * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
1198 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
1200 * mini-ppc.h: portability fix.
1202 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1204 * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
1205 buggy and will overwrite it.
1207 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1209 * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
1210 Use it to emit local symbols for all methods so AOTed methods show up with
1211 their full name in gdb/valgrind output.
1213 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1215 * mini-ppc.c: portability fixes.
1217 2008-11-14 Zoltan Varga <vargaz@gmail.com>
1219 * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
1220 entries out of the if (!generic_shared...) code so it is always done.
1221 (mono_class_init_trampoline): Do the patching when running under valgrind
1222 too, newer versions of valgrind have no problems with it.
1224 2008-11-13 Zoltan Varga <vargaz@gmail.com>
1226 * aot-compiler.c (emit_writeout): Rework this to make it easier to add
1229 2008-11-13 Mark Probst <mark.probst@gmail.com>
1231 * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
1234 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1236 * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui.
1238 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1240 * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
1246 * simd-intrinsics.c: Same.
1248 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1250 * simd-intrinsics.c: Enable constructor intrinsics for all types.
1252 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1254 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
1255 to work with more Vector types.
1257 2008-11-13 Rodrigo Kumpera <rkumpera@novell.com>
1259 * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
1260 store the elemens directly instead of using and intermediate.
1262 2008-11-13 Zoltan Varga <vargaz@gmail.com>
1264 * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
1266 * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
1267 to preserve %eax for aot plt trampolines.
1269 * aot-compiler.c (compile_method): Don't skip synchronized methods.
1270 (encode_method_ref): Flag synchronized methods so they won't go through
1273 * aot-compiler.c: Additional work to support AOTing synchronized methods/
1276 * cpu-ia64.md (jmp): Increase max length.
1278 2008-11-12 Zoltan Varga <vargaz@gmail.com>
1280 * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
1281 open generic classes.
1283 * aot-compiler.c: Enable the ELF writer on ELF platforms.
1285 * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
1286 box+brtrue optimization since it causes test failures on x86.
1288 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
1290 * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
1296 * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
1297 for simd ctor values.
1299 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
1300 instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
1302 2008-11-12 Rodrigo Kumpera <rkumpera@novell.com>
1304 * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
1307 * simd-instrincs.c: Same.
1309 * basic-simd.cs: Same.
1311 2008-11-12 Zoltan Varga <vargaz@gmail.com>
1313 * ratests.cs: Add more tests.
1315 * regalloc2.c (add_spill_code): Handle more corner cases.
1317 2008-11-11 Zoltan Varga <vargaz@gmail.com>
1319 * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
1320 (update_liveness): Avoid holes in the liveness ranges of hregs if they are
1321 both the source an destination of an instruction.
1323 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1325 * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
1326 wapihandles.c: more portability changes.
1328 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
1330 * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
1331 * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
1332 safe to execute in a signal handler and the kernel provides better
1333 the info in /proc/self/smaps. Avoid the assert on sigaction during
1336 2008-11-11 Zoltan Varga <vargaz@gmail.com>
1338 * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
1339 do the bblock linking hack if it is actually needed.
1341 * Makefile.am (patch-libtool): New helper target to patch libtool to speed
1344 * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
1345 crash problem is fixed.
1347 * branch-opts.c (mono_remove_critical_edges): Link up newly added
1350 * mini.c (mini_method_compile): Compute unreachable bblocks properly even
1352 (mini_method_compile): Set the starting value of next_vreg to
1353 MAX_IREGS + MAX_FREGS when using globalra.
1355 * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
1356 filter clauses with BB_EXCEPTION_HANDLER.
1358 * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
1360 2008-11-10 Mark Probst <mark.probst@gmail.com>
1362 * mini-x86.c (mono_arch_get_argument_info): Don't align argument
1363 space for stdcall. Fixes regressions on Win32.
1365 2008-11-10 Zoltan Varga <vargaz@gmail.com>
1367 * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
1369 (linear_scan): Remove an assert which doesn't seem to be needed.
1371 * local-propagation.c (mono_local_deadce): Avoid a call to
1372 MONO_DELETE_INS which would screw up the instruction linking.
1374 * mini.c (mono_decompose_op_imm): Make this work with globalra.
1376 * regalloc2.c: Upgrade to work the current JIT code.
1378 2008-11-09 Zoltan Varga <vargaz@gmail.com>
1380 * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
1383 * aot-runtime.c: Remove some dead code.
1385 * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
1387 (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
1389 * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
1390 trampolines using sscanf since atoi doesn't work on large unsigned values.
1392 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full):
1393 Initialize code_size.
1395 2008-11-08 Mark Probst <mark.probst@gmail.com>
1397 * method-to-ir.c (mini_emit_inst_for_method): Make
1398 Interlocked.CompareExchange work for Int arguments on 32 bit
1401 2008-11-07 Mark Probst <mark.probst@gmail.com>
1403 * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
1405 2008-11-06 Bill Holmes <billholmes54@gmail.com>
1407 * main.c Fix MSVC build.
1409 Contributed under MIT/X11 license.
1411 2008-11-06 Mark Probst <mark.probst@gmail.com>
1413 * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
1414 alignment larger than 8 bytes are aligned correctly, too.
1416 * mini.c: Honor the min_align field of MonoClass when laying out
1419 2008-11-06 Zoltan Varga <vargaz@gmail.com>
1421 * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
1423 * aot-compiler.c (emit_plt): Fix a warning.
1425 * aot-compiler.c: Implement ARM support in the binary writer.
1427 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1429 * basic-simd.cs: Add test for getter with byref arg.
1430 Fix the naming of a few tests.
1431 Add missing checks to a test.
1433 2008-11-05 Zoltan Varga <vargaz@gmail.com>
1435 * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
1437 * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
1438 most of the full-aot support for monitor enter/exit trampolines.
1440 * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
1441 enter/exit trampoline creation functions.
1443 * Makefile.am: Fix the generation of buildver.h so it is not invoked during
1446 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
1448 * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
1449 incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
1450 implement the needed functionality without adding crap to the runtime.
1452 2008-11-05 Zoltan Varga <vargaz@gmail.com>
1454 * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
1457 * mini.c (mono_build_date): New global version holding the build date in
1460 * Makefile.am (buildver.c): Generate a file containing the build date.
1462 * main.c: Set the build date from the generated file.
1464 * mini.c (mono_get_runtime_build_info): New helper function returning build
1465 information in a string format.
1467 * driver.c (mono_main): Print the build date in --version.
1469 * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
1470 file when the bind-to-runtime-version option is used.
1472 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1474 * simd-intrinsics.c: Fix bug when using getters and byref args.
1476 2008-11-05 Rodrigo Kumpera <rkumpera@novell.com>
1478 * simd-methods.h: Rename prefetch methods.
1480 * simd-intrinsics.c: Same.
1482 2008-11-05 Mark Probst <mark.probst@gmail.com>
1484 * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
1487 2008-11-04 Zoltan Varga <vargaz@gmail.com>
1489 * aot-compiler.c: Use the bundled elf header files instead of depending on
1492 * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
1495 * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
1498 2008-11-04 Rodrigo Kumpera <rkumpera@novell.com>
1500 * cpu-x86.md: Add store nta ops.
1506 * mini.h: Add an enum for simd prefetch modes.
1508 * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
1509 of store. Use the changed code to support store nta.
1511 * simd-intrinsics.c: Add prefetch ops for all vector types.
1513 2008-11-04 Zoltan Varga <vargaz@gmail.com>
1515 * aot-compiler.c: Add an option for JIT compiling the methods by multiple
1518 * aot-compiler.c: Use statically allocated buffers for constructing symbol
1521 * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
1524 2008-11-04 Mark Probst <mark.probst@gmail.com>
1526 * mini-x86.c: Fixed commit.
1528 2008-11-04 Zoltan Varga <vargaz@gmail.com>
1530 * aot-compiler.c (emit_plt): Align the plt section only on x86.
1532 2008-11-04 Mark Probst <mark.probst@gmail.com>
1534 * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
1535 and MONITOR_EXIT, for the ASM fastpaths.
1537 * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
1540 * mini.c, patch-info.h: Signature and patch infos for
1541 Monitor.Enter/Exit trampolines.
1543 * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
1545 * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
1546 Monitor.Enter/Exit ASM fastpath for Linux.
1548 2008-11-04 Zoltan Varga <vargaz@gmail.com>
1550 * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
1552 * objects.cs: Add a new test.
1554 * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
1556 * aot-runtime.c (load_method): Run class initialization in the PLT case even
1557 if MONO_LOG_LEVEL is set.
1559 * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
1561 * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
1563 * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
1565 * aot-compiler.c: Change the relocation code to use virtual addresses instead
1566 of file offsets. Align the sections belonging to the data segment to
1569 2008-11-03 Zoltan Varga <vargaz@gmail.com>
1571 * aot-compiler.c: Simplify the elf writer by depending on the definitions in
1572 elf.h. Port it to amd64.
1574 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
1576 * driver.c: Enable SIMD by default.
1578 2008-11-03 Rodrigo Kumpera <rkumpera@novell.com>
1580 * cpu-x86.md: Add prefetch op.
1586 * mini.h: Add an enum for simd prefetch modes.
1588 * simd-methods.h: Add prefetch function names.
1590 * simd-intrinsics.c: Add prefetch ops for all vector types.
1592 2008-11-03 Zoltan Varga <vargaz@gmail.com>
1594 * aot-compiler.c (emit_bytes): Speed this up a little.
1596 2008-11-02 Zoltan Varga <vargaz@gmail.com>
1598 * aot-compiler.c: Add JIT time etc. statistics.
1600 * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
1602 * mini.h (MonoCompile): Add 'got_offset' field.
1604 * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
1605 method_got_offsets array.
1607 * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
1610 * aot-compiler.c (compile_method): Add generic method instances referenced
1611 by the method to the list of methods to be compiled, this is required so if
1612 A<T> references B<T>, and another assembly references A<int>, then it will
1613 also get a copy of B<int>.
1615 * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
1616 when checking for monitor enter/exit.
1618 2008-10-30 Mark Probst <mark.probst@gmail.com>
1620 * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
1621 for Monitor.Enter and Monitor.Exit if enabled.
1623 * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
1626 2008-10-30 Zoltan Varga <vargaz@gmail.com>
1628 * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
1629 of an OP_MOVE. Fixes #440046.
1631 * basic-long.cs: Add a new test.
1633 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
1635 * mini.h: Add synchronization note for the managed counter-part.
1637 * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
1638 returns the simd caps of the current cpu.
1640 2008-10-29 Rodrigo Kumpera <rkumpera@novell.com>
1642 * basic-simd.cs: Remove Console.WriteLine.
1644 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1646 * basic-simd.cs: New tests for Vector2ul.
1648 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1650 * simd-intrinsics.c: Add new vector type Vector2ul.
1652 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1654 * basic-simd.cs: New tests for Vector2l.
1656 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1658 * cpu-x86.md: Add long version of most packed int ops.
1664 * simd-intrinsics.c: Add new vector type Vector2l.
1666 2008-10-28 Rodrigo Kumpera <rkumpera@novell.com>
1668 * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
1670 * simd-methods.h: Remove SN_op_BitwiseXor.
1672 2008-10-28 Zoltan Varga <vargaz@gmail.com>
1674 * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
1677 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
1679 * basic-simd.cs: Test for Vector2d.
1681 * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
1684 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
1686 * cpu-x86.md: Add double version of all packed float ops.
1692 * simd-intrinsics.c: Add new vector type Vector2d.
1694 * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
1696 * simd-methods.h: Add Duplicate.
1698 2008-10-27 Rodrigo Kumpera <rkumpera@novell.com>
1700 * basic-simd.cs: Test for packing with signed saturation.
1702 2008-10-28 Zoltan Varga <vargaz@gmail.com>
1704 * aot-compiler.c (add_generic_instances): Add all methods of generic instances
1705 found in the TYPESPEC table.
1707 2008-10-26 Zoltan Varga <vargaz@gmail.com>
1709 * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
1712 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1714 * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
1715 instead of the RVA, since the RVA can be changed by tools like the cil
1718 * method-to-ir.c (mono_method_to_ir2): Ditto.
1720 * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
1721 (deserialize_variable): Ditto.
1723 2008-10-25 Martin Baulig <martin@ximian.com>
1725 * debug-mini.c (write_variable): Use
1726 `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
1728 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1730 * cpu-x86.md: Add unsigned variants of packd and packw.
1734 * mini-x86.h: Emit the right instruction for packd and packw.
1735 Add unsigned variants of packd and packw.
1737 * simd-intrinsics.c: Packd and packw were used in place of their
1738 unsigned variants. Change that.
1739 Add intrinsics for (Signed)PackWithSignedSaturation.
1741 * simd-methods.h: Add (Signed)PackWithSignedSaturation.
1743 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1745 * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
1747 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1749 * mini-ops.h: Remove dword packed add/sub with saturation ops.
1751 * cpu-x86.md: Remove dword packed add/sub with saturation ops.
1753 * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
1756 * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
1758 2008-10-24 Mark Probst <mark.probst@gmail.com>
1760 * method-to-ir.c, mini.c: Special casing for the synchronized
1761 wrapper for the ldtoken+GetTypeFromHandle case.
1763 2008-10-24 Zoltan Varga <vargaz@gmail.com>
1765 * mini.c (mono_replace_ins): Move this to branch-opts.c.
1767 * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
1768 created/split bblocks.
1770 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1772 * mini-ops.h: Add packed signed mul high.
1776 * mini-x86.c (mono_arch_output_basic_block): Same.
1778 * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
1780 * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
1782 2008-10-24 Rodrigo Kumpera <rkumpera@novell.com>
1784 * basic-simd.cs: Tests for Vector16sb.
1786 2008-10-24 Zoltan Varga <vargaz@gmail.com>
1788 * inssel.brg (stmt): Fix OP_HARD_NOP rule.
1790 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
1792 * mini-ops.h: Add packed signed min, max and compare greater.
1796 * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
1799 * simd-methods.h: Add CompareGreaterThan.
1801 * simd-methods.h: Remove CompareEquals.
1803 * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
1805 * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
1807 * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
1810 2008-10-23 Rodrigo Kumpera <rkumpera@novell.com>
1812 * basic-simd.cs: Fix tests due to change in the API.
1814 2008-10-21 Zoltan Varga <vargaz@gmail.com>
1816 * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
1818 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
1820 * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
1822 * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
1823 inst_offset as this has invalid values for LDADDR.
1825 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
1827 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
1829 * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
1831 2008-10-21 Zoltan Varga <vargaz@gmail.com>
1833 * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
1834 for accessing field->data.
1836 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
1838 * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
1840 2008-10-21 Rodrigo Kumpera <rkumpera@novell.com>
1842 * simd-methods.h: Add SignedPackWithUnsignedSaturation.
1844 * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
1846 2008-10-21 Zoltan Varga <vargaz@gmail.com>
1848 * dominators.c (mono_compute_natural_loops): Allocate GList enties
1849 from the cfg mempool.
1851 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
1853 * basic-simd.cs: Tests for new methods in Vector8us.
1855 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
1857 * mini-ops.h: Add multiply and store high.
1861 * mini-x86.c (mono_arch_output_basic_block): Same.
1863 * simd-methods.h: Same.
1865 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
1868 2008-10-19 Zoltan Varga <vargaz@gmail.com>
1870 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
1871 mono_class_setup_vtable ().
1873 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
1874 mono_class_get_vtable_entry () for accessing klass->vtable.
1876 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
1878 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
1881 * method-to-ir.c (mono_save_token_info): Don't save references made from
1884 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
1885 of generic instances.
1887 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
1889 2008-10-19 Mark Probst <mark.probst@gmail.com>
1891 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
1892 OP_JMP depends on the method signature. Calculate it properly.
1894 2008-10-19 Zoltan Varga <vargaz@gmail.com>
1896 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
1899 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
1901 (emit_extra_methods): Add another table mapping method indexes to
1902 offsets in the extra_method_info table.
1904 * mini.h: Bump AOT file format version.
1906 * aot-runtime.c: Merge most of the code from mono_aot_get_method
1907 and mono_aot_get_method_from_token () into one function.
1909 2008-10-19 Mark Probst <mark.probst@gmail.com>
1911 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
1914 2008-10-18 Zoltan Varga <vargaz@gmail.com>
1916 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
1919 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
1922 * mini.c (mono_patch_info_equal): Compare the generic context as well.
1924 * mini.h: Bump aot file format version.
1926 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
1927 AOT file can contain native code for methods which are not in the METHOD
1928 table. Generate code for non-sharable generic instances of generic methods
1929 found in the METHODSPEC table.
1931 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
1932 encoding generic type handles.
1934 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
1935 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
1937 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
1938 macros + MONO_ADD_INS.
1940 * mini.c (mono_jump_info_token_new2): New function which takes a generic
1943 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
1945 * mini.h: Bump aot file format version.
1947 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
1949 2008-10-17 Mark Probst <mark.probst@gmail.com>
1951 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
1952 platforms, with definable stack alignment value. Set to 16 now
1955 * mini.c, mini.h, driver.c: Command line option for disabling
1958 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
1960 * basic-simd.cs: Tests for new methods in Vector4ui.
1962 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
1964 * mini-ops.h: Add packed int shuffle.
1968 * mini-x86.c (mono_arch_output_basic_block): Same.
1970 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
1971 extract mask, max, min, shuffle.
1973 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
1975 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
1977 * basic-simd.cs: Tests for new methods in Vector8us.
1979 2008-10-17 Mark Probst <mark.probst@gmail.com>
1981 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
1982 RuntimeTypeHandle, not a TypedReference.
1984 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
1986 * simd-intrinsics.c: remove relocations.
1988 2008-10-17 Zoltan Varga <vargaz@gmail.com>
1990 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
1991 optimizations from the x86 backend.
1993 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
1995 * simd-methods.h, simd-intrinsics.c: debloat method names and
1996 prepare for no relocations.
1998 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2000 * mini-ops.h: Add packed min/equal and sum of absolute differences.
2004 * mini-x86.c (mono_arch_output_basic_block): Same.
2006 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
2007 extract mask, max, min and sum of absolute differences.
2009 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
2012 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2014 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
2015 Renamed one test for consistency.
2017 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2019 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
2020 fix to the code that deal with other blocks.
2022 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2024 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
2026 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
2028 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
2029 that deals with vreg interference. Explicitly check for OP_LDADDR to be
2030 able to process the source reg.
2032 2008-10-16 Martin Baulig <martin@ximian.com>
2034 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
2036 * inssel.brg: Add `OP_HARD_NOP'.
2038 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
2040 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
2041 `OP_HARD_NOP' instruction when running inside the debugger.
2043 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
2044 `OP_HARD_NOP' instruction when running inside the debugger.
2046 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2048 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
2049 now works. The issue with the regalloc tripping up no longer
2052 * simd-intrinsics.c (load_simd_vreg): Same.
2054 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2056 * basic-simd.cs: Tests for new Vector8ui methods.
2058 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2060 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
2061 only for type. This fixes crashes where MonoInst::klass is checked
2062 for ops of type != VTYPE or OBJ.
2064 * simd-intrinsics.c (load_simd_vreg): Same.
2066 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
2068 * mini-ops.h: Add ops for packed shuffle/max/avg and
2073 * mini-x86.c (mono_arch_output_basic_block): Same.
2075 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
2078 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
2079 to emit extract mask op.
2081 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
2082 to emit word shuffles.
2084 2008-10-15 Mark Probst <mark.probst@gmail.com>
2086 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
2087 the largest alignment needed by a variable, but at least
2090 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2092 * basic-simd.cs: Tests for the fixes in the last commit.
2094 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2096 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
2097 no longer handles STACK_PTR input.
2099 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
2101 * simd-intrinsics.c (load_simd_vreg): New function that works like
2102 get_simd_vreg but handles STACK_PTR input.
2104 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
2105 as the input can be an arbitrary pointer.
2107 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
2108 LDADDR local optimization directly otherwise use a store op.
2110 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2112 * basic-simd.cs: Tests for dup low and dup high.
2114 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
2116 * mini-ops.h: Add dup low and dup high ops.
2120 * mini-x86.c (mono_arch_output_basic_block): Same.
2122 * simd-intrinsics.c (vector4f_intrinsics): Same.
2124 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2126 * basic-simd.cs: Tests for recently added functionality.
2128 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2130 * mini-ops.h: Add remaining sse1 fp ops.
2132 * cpu-x86.md: Add remaining sse1 fp ops.
2134 * mini-x86.c (mono_arch_output_basic_block): Same.
2136 * mini.h: Add enum for simd FP compare conditions.
2138 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
2140 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
2141 so the backed can generate the appropriate op.
2143 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
2144 This patch squeese one more byte from the SimdIntrinsc struct.
2146 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
2147 a a shift amount intead of simply or'ing it.
2149 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
2151 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
2152 byte so we can have an aditional flags field without increasing struct size.
2154 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
2155 against the simd_supported_versions bitmask.
2157 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
2159 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
2161 * mini.c: remove rawbuffer code (the only use here is unsafe because
2162 it takes locks during signal handling and the kernel now provides much
2163 better info in proc/pid/smaps these days).
2165 2008-10-13 Zoltan Varga <vargaz@gmail.com>
2167 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
2168 OP_X86_PUSH_OBJ. Fixes #434620.
2170 * objects.cs: Add a test.
2172 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
2174 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
2175 that the packuswb/packusdw don't work with unsigned numbers for what
2176 would be negative numbers in signed format.
2178 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
2179 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
2181 * mini-ops.h: Add doubleword forms of many ops and packing ones.
2183 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
2185 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
2187 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
2189 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
2192 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
2193 version as the enum in mini.h.
2195 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
2196 for sse3 ops, check the simd_version field if present. This way the code
2197 works with all versions of sse.
2199 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2201 * simd-intrinsics.c: Fixed intrinsic name typo.
2203 * mini.h: Added missing simd exported function.
2205 * basic-simd.cs: Added tests for Vector4ui.
2206 Fixed broken test for Vector16b.
2208 2008-10-10 Zoltan Varga <vargaz@gmail.com>
2210 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
2211 the max length to 64.
2213 2008-10-10 Mark Probst <mark.probst@gmail.com>
2215 * method-to-ir.c: Only do the fast virtual generic method call for
2216 non-wrapper methods.
2218 * mini.h, mini-trampolines.c: The new generic virtual remoting
2219 trampoline handles virtual method calls via the vtable (as done by
2220 the fast virtual generic method calls) to remoting proxies.
2222 * mini.c (mono_jit_create_remoting_trampoline): For generic
2223 methods reate a generic virtual remoting trampoline.
2225 * mini-amd64.h: Enable fast virtual generic method calls again.
2227 2008-10-10 Mark Probst <mark.probst@gmail.com>
2229 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
2230 restore registers when doing tail calls.
2232 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2234 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
2237 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2239 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
2241 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2243 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
2245 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2247 * basic-simd.cs: Retrofit for API changes.
2249 2008-10-10 Mark Probst <mark.probst@gmail.com>
2251 * mini-ppc.c: Handle integer stack arguments for tail calls.
2253 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
2255 * optflags-def.h: Removed sse3 optimization.
2259 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
2262 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
2264 * mini.h: Added enumeration with simd versions.
2266 * simd-intrinsics.c (emit_intrinsics): Use the new static var
2269 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
2271 * mini.c (mini_init): Call mono_simd_intrinsics_init.
2273 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2275 * basic-simd.cs: Added tests for Vector8u and Vector16u.
2277 * basic-simd.cs: Fixed test naming.
2279 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
2281 * mini-ops.h: Added ops for packed and saturated math, shifts
2282 and packing/unpacking.
2284 * cpu-x86.md: Added descriptors for the above ops.
2286 * mini-x86.c: Added code to emmit the above ops.
2288 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
2290 2008-10-08 Zoltan Varga <vargaz@gmail.com>
2292 * aot-compiler.c (compile_method): Enable AOT for generic code.
2294 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
2296 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
2298 * mini.c: add a workaround for a common screwup that ends up blamed
2299 to mono (other processes blocking signal delivery).
2301 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2303 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
2304 in the LDFLD/STFLD opcodes. Fixes #432673.
2306 * iltests.il.in: Add a new test.
2308 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
2310 * mini-arm.c: attach the thread in unmanaged->managed transitions
2311 using delegates (bug #433148).
2313 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
2315 * basic-simd.cs: Use new ShuffleSel constants.
2317 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
2319 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
2321 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
2322 only disable simd intrinsics if no sse2 is detected.
2324 * optflags-def.h: Added sse3.
2326 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
2329 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2331 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
2332 when adding delegate-invoke wrappers.
2334 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2336 * Makefile.am: Reenable the simd tests.
2338 2008-10-07 Bill Holmes <billholmes54@gmail.com>
2340 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
2341 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
2342 other vreg is allocated to that hreg.
2344 Contributed under MIT/X11 license.
2346 2008-10-07 Zoltan Varga <vargaz@gmail.com>
2348 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
2351 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
2353 * basic-simd.cs: New test suite for SIMD intrinsics.
2355 * Makefile.am: Added new tests.
2357 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
2359 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
2363 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
2365 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
2366 using SSE2 aware opcodes.
2368 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
2369 is enabled, this code path is only reachable if conversion ops are emmited after
2372 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
2374 This optimization saves 6 bytes per conversion against the old version.
2376 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2378 * aot-compiler.c (compile_method): Don't skip methods referencing
2379 generic methods without a corresponding entry in token_info_hash, since
2380 encode_method_ref () can handle all generic methods now.
2382 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
2383 generic context is set.
2385 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
2386 generic sharing of LDTOKEN.
2388 2008-10-06 Mark Probst <mark.probst@gmail.com>
2390 * mini-amd64.h: Temporarily disabled fast virtual generic method
2391 calls because it breaks the System.Runtime.Remoting tests.
2393 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2395 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
2397 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
2398 so inlining actually works.
2399 (check_inline_caller_method_name_limit): Ditto.
2401 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
2403 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
2404 64 bit safety (from Olaf Hering and Andreas Färber).
2406 2008-10-06 Zoltan Varga <vargaz@gmail.com>
2408 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
2409 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
2410 unused virtual call support code.
2412 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
2414 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
2415 which can't use aot trampolines.
2416 (decode_patch): Don't create aot trampolines for methods which can't use
2419 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
2420 use aot trampolines.
2422 * mini.h: Bump AOT image format version.
2424 2008-10-05 Zoltan Varga <vargaz@gmail.com>
2426 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
2427 to save_token_info () since cmethod is inflated for constrained calls.
2429 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
2431 2008-10-04 Andreas Färber <andreas.faerber@web.de>
2433 * Makefile.am: Add build rules for ppc64.
2434 This avoids the build failing at pedump with unresolved symbols
2435 due to lack of arch_sources. Instead it will now fail earlier
2436 due to lack of cpu-ppc64.md.
2438 Contributed under MIT/X11 license.
2440 2008-10-04 Mark Probst <mark.probst@gmail.com>
2442 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
2445 * iltests.il.in: Add test case for tail call with many arguments.
2447 2008-10-03 Zoltan Varga <vargaz@gmail.com>
2449 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
2450 to the fast virtual generic method code until the aot case is fixed.
2452 2008-10-03 Mark Probst <mark.probst@gmail.com>
2454 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
2456 2008-10-03 Mark Probst <mark.probst@gmail.com>
2458 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
2461 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
2463 * simd-intrinsics.c: Forgot to add this one.
2465 * mini-codegen.c: Fix macro in case SIMD is not supported.
2467 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
2469 This patch land initial JIT support for simd intrinsics.
2471 * mini-x86.h: Added new define to make --enable_minimal work on x86.
2473 * Makefile.am: Added simd-intrinsics.c
2475 * simd-intrinsics.c: New file with simd instrinsic related
2478 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
2480 * cpu-x86.md: Add simd related instructions.
2482 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
2484 * driver.c: Added two new --regression variants.
2486 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
2488 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
2490 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
2491 extract some complicated logic to helper functions.
2493 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
2495 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
2497 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
2498 the specialized simplification pass.
2500 * method-to-ir.c (mono_spill_global_vars): Use new macro.
2502 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
2504 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
2507 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
2508 if MONO_ARCH_NEED_SIMD_BANK is defined.
2510 * mini-ops.h: Added the new simd ops.
2512 * mini-x86.c: Added mono_arch_xregname.
2514 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
2516 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
2518 * mini-x86.h: Define simd related MONO_ARCH macros.
2520 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
2522 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
2524 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
2525 MONO_CLASS_IS_SIMD to deal with simd related IR.
2527 * mini.h (MonoInst): Added spill_var to the backend union.
2529 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
2531 * mini.h: Added forward declarations of the new simd fuctions.
2533 * optflags-def.h: Added new optimization names SIMD.
2535 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
2537 * regalloc.h: Added support for working with 3 register banks.
2539 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
2541 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
2543 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
2545 * mini-exceptions.c: remove 64 bit related ifdef clutter.
2547 2008-10-03 Zoltan Varga <vargaz@gmail.com>
2549 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
2550 instead of one on 64 bit systems.
2552 * method-to-ir.c: Remove unused includes.
2554 2008-10-02 Zoltan Varga <vargaz@gmail.com>
2556 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
2557 cfg->used_int_regs, since the two are different on arm.
2559 2008-10-02 Mark Probst <mark.probst@gmail.com>
2561 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
2562 mono_method_get_vtable_index() to get the vtable index.
2564 2008-10-02 Mark Probst <mark.probst@gmail.com>
2566 * method-to-ir.c (mono_method_to_ir2): Don't create native
2567 wrappers for array methods, because they're never called (and if
2568 they were called they wouldn't work).
2570 2008-10-02 Mark Probst <mark.probst@gmail.com>
2572 * method-to-ir.c (mono_method_to_ir2): Array methods are
2573 special-cased and must not be invoked indirectly via the (M)RGCTX
2574 when generic sharing is turned on. Fixes #431413.
2576 2008-10-01 Mark Probst <mark.probst@gmail.com>
2578 * method-to-ir.c: When generic sharing is active, call
2579 non-interface virtual generic methods via the standard trampoline.
2581 * mini-trampolines.c: Handle virtual generic shared methods.
2583 * mini.h, mini-x86.c, mini-x86.h: New argument for
2584 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
2585 method thunks and which is the trampoline to call if the lookup
2586 fails. Enable the virtual generic method thunk for x86.
2588 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
2589 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
2590 argument but assert that it's NULL, because these archs don't yet
2591 implement the virtual generic method thunk. Changes in the IMT
2592 thunk data structures.
2594 2008-10-01 Zoltan Varga <vargaz@gmail.com>
2596 * aot-compiler.c (emit_globals): Avoid invalid characters in
2597 the static linking symbol.
2599 * objects.cs: Add a test for the range check optimization. Fix warnings.
2601 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
2602 optimization from the current JIT.
2604 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
2605 later in decompose_array_access_opts () to allow more optimizations.
2607 * method-to-ir.c (mono_handle_soft_float): Rename this to
2608 mono_decompose_soft_float () for consistency.
2610 * mini-ops.h: Fix arguments of OP_STRLEN.
2612 * method-to-ir.c (save_cast_details): Extract the cast details saving code
2613 into a separate function.
2614 (reset_cast_details): Ditto.
2615 (handle_unbox): Save cast details. Fixes #431254.
2617 * method-to-ir.c: Remove some obsolete FIXMEs.
2619 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
2621 * ir-emit.h (alloc_dreg): Write a warning before crashing.
2623 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
2625 * mini-codegen.c: More work on macros to make them
2626 ready for multiple regbanks.
2628 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
2630 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
2632 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
2634 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
2636 * mini-codegen.c (mono_spillvar_offset): Proper support for
2639 2008-09-30 Zoltan Varga <vargaz@gmail.com>
2641 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
2642 the stack overflow changes.
2644 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
2646 * mini-codegen.c: Make all bank macros depend on reg_bank.
2648 * mini-codegen.c (mono_local_regalloc): Make free mask
2649 initialization regbank aware.
2651 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
2653 * mini-codegen.c (mono_local_regalloc): Extract callee
2654 mask selection to a function and make it regbank aware.
2656 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
2658 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
2659 code to deal with many regbanks.
2661 2008-09-30 Zoltan Varga <vargaz@gmail.com>
2663 * mini-codegen.c: More fp->regbank changes.
2665 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
2667 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
2668 of a hardcoded constant.
2670 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
2672 * method-to-ir.c (type_from_stack_type): Fix typo.
2674 2008-09-29 Zoltan Varga <vargaz@gmail.com>
2676 * mini-ia64.c (emit_move_return_value): Convert float return values to
2679 * objects.cs: Add a new test.
2681 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
2682 VARARG methods to fix an assert later.
2684 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
2685 end so it at least compiles.
2687 2008-09-28 Zoltan Varga <vargaz@gmail.com>
2689 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
2691 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
2693 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
2694 optimization to a new function (emit_optimized_ldloca_ir) and enable
2695 it for both ldloca and ldloca_s.
2697 2008-09-28 Zoltan Varga <vargaz@gmail.com>
2699 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
2700 gshared CASTCLASS code.
2702 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
2703 amd64, where the libc stack unwinder encounters stack frames referring to
2704 native code in unmapped memory.
2706 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
2709 * generics.cs: Add new test.
2711 2008-09-27 Zoltan Varga <vargaz@gmail.com>
2713 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
2714 add a check that one of the ARM_FPU_ constants is defined.
2716 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
2718 * mini-exceptions.c: Fix build on non-altstack platforms.
2720 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
2723 * ir-emit.h: Add a comment to NEW_PCONST.
2725 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
2727 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
2729 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
2730 after the changes to MonoJitDomainInfo.
2732 2008-09-27 Mark Probst <mark.probst@gmail.com>
2734 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
2736 2008-09-27 Mark Probst <mark.probst@gmail.com>
2738 * mini-ppc.c: Compiler warning fixes.
2740 2008-09-27 Mark Probst <mark.probst@gmail.com>
2742 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
2745 2008-09-27 Mark Probst <mark.probst@gmail.com>
2747 * exceptions-ppc.c, mini-ppc.h: Compile
2748 mono_arch_handle_altstack_exception() on Darwin, too.
2750 2008-09-27 Mark Probst <mark.probst@gmail.com>
2752 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
2753 work on archs which don't have generic sharing implemented, only
2754 without the vtable_arg.
2756 2008-09-26 Mark Probst <mark.probst@gmail.com>
2758 * mini.c: Added comment explaining why delegate ctor icall
2759 wrappers are compiled.
2761 2008-09-26 Mark Probst <mark.probst@gmail.com>
2763 * mini.c: Don't produce trampolines to delegate ctor icall
2764 wrappers but compile them upfront.
2766 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
2768 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
2769 runtime-set function when going back to managed code. Currently this
2770 is used to set back the protection on the soft ovf pages and/or to
2771 throw the stack overflow exception that happened in unmanaged code.
2773 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
2775 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
2776 runtime-set function when going back to managed code. Currently this
2777 is used to set back the protection on the soft ovf pages and/or to
2778 throw the stack overflow exception that happened in unmanaged code.
2780 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2782 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
2783 the support code for restoring stack protection after stack overflows
2784 that happen in unmanaged code. Don't set the exec permission on the
2787 2008-09-26 Zoltan Varga <vargaz@gmail.com>
2789 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
2790 delegate->method_ptr is set. Fixes #428054.
2792 2008-09-25 Zoltan Varga <vargaz@gmail.com>
2794 * tests.cs: Rename to ratests.cs.
2796 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
2797 emit_get_rgctx_... functions.
2799 2008-09-25 Mark Probst <mark.probst@gmail.com>
2801 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
2803 2008-09-25 Mark Probst <mark.probst@gmail.com>
2805 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
2806 before asserting that method is sharable.
2808 2008-09-25 Mark Probst <mark.probst@gmail.com>
2810 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
2811 whether method needs a static RGCTX wrapper used instead of
2814 * generic-sharing.c, mini.h: A few functions moved to
2815 metadata/generic-sharing.c.
2817 2008-09-25 Mark Probst <mark.probst@gmail.com>
2819 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
2820 Generic code sharing for value types, which essentially means
2821 treating value type methods like static methods. The RGCTX is
2822 passed in the same way.
2824 2008-09-25 Zoltan Varga <vargaz@gmail.com>
2826 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
2827 opcode when creating multi-dimensional arrays of open types.
2829 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
2832 * generics.cs: Add a test.
2834 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
2836 2008-09-24 Zoltan Varga <vargaz@gmail.com>
2838 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
2840 * mini.c (mini_method_compile): Set it when running under the debugger.
2842 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
2843 vreg optimization if the flag is set.
2845 * driver.c (mono_main): Add --attach= option to pass options to
2848 * mini.c (sigquit_signal_handler): Start the attach agent.
2850 * ssapre.c: Disable this to save space since it is not yet ported to
2853 * regalloc2.c: Disable this to save space.
2855 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
2857 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
2859 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
2860 the -v option useful again.
2862 2008-09-24 Zoltan Varga <vargaz@gmail.com>
2864 * mini-amd64.c (mono_arch_output_basic_block): Add support for
2867 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
2868 arrays of arrays. Fixes #428406.
2870 * method-to-ir.c (mini_emit_castclass): Ditto.
2872 * objects.cs: Add new test.
2874 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
2876 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
2877 was wrong at it choked against target_type_is_incompatible for byref types.
2879 2008-09-23 Zoltan Varga <vargaz@gmail.com>
2881 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
2884 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
2886 * mini-exceptions.c: update a few more exceptions-related counters.
2888 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
2890 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
2891 new functions to allocate from persistent mempools.
2893 2008-09-23 Zoltan Varga <vargaz@gmail.com>
2895 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
2896 multiple register banks in the future.
2898 * mini-codegen.c (mono_local_regalloc): Fix a warning.
2900 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
2902 * mini.c (type_to_eval_stack_type): Remove duplicated function.
2904 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
2906 * mini.h: Export type_to_eval_stack_type.
2908 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
2909 is only ins->klass of byref types.
2911 2008-09-22 Zoltan Varga <vargaz@gmail.com>
2913 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
2914 (mini_emit_memcpy2): Ditto.
2916 * mini-amd64.c: Fix a warning.
2918 2008-09-21 Mark Probst <mark.probst@gmail.com>
2920 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
2923 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
2925 * method-to-ir.c: Extract stloc micro-optimization to a
2926 function and apply it to all cases.
2928 2008-09-19 Mark Probst <mark.probst@gmail.com>
2930 * method-to-ir.c: Don't fail generic code sharing in cases we
2933 2008-09-18 Mark Probst <mark.probst@gmail.com>
2935 * mini-ppc.c: Handle structs in tailcalls on Darwin.
2937 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
2939 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
2942 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
2944 * trace.c: make tracing more useful and correct, with per-thread
2947 2008-09-15 Mark Probst <mark.probst@gmail.com>
2949 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
2950 doing a method call and the argument is an R4.
2952 2008-09-14 Zoltan Varga <vargaz@gmail.com>
2954 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
2957 2008-09-13 Mark Probst <mark.probst@gmail.com>
2959 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
2961 2008-09-12 Zoltan Varga <vargaz@gmail.com>
2963 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
2964 (MONO_JUMP_TABLE_FROM_INS): Ditto.
2966 2008-09-11 Zoltan Varga <vargaz@gmail.com>
2968 * driver.c: Add a --agent argument (not supported yet) to load managed
2969 agent assemblies before loading the main assembly, similarly to how the
2970 Java VM handles agents.
2972 2008-09-11 Mark Probst <mark.probst@gmail.com>
2974 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
2975 function to do stack layout of local variables.
2977 2008-09-11 Mark Probst <mark.probst@gmail.com>
2979 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
2982 2008-09-11 Zoltan Varga <vargaz@gmail.com>
2984 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
2985 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
2986 JIT if DISABLE_JIT is defined.
2988 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
2991 2008-09-10 Mark Probst <mark.probst@gmail.com>
2993 * iltests.il.in: Disable the fconv test on PPC (the result is
2994 undefined according to ECMA).
2996 2008-09-10 Mark Probst <mark.probst@gmail.com>
2998 * iltests.il.in: Enable tail call tests for PPC.
3000 * mini.h: Add variable for storing incoming valuetype argument
3001 addresses for tail calls.
3003 * mini-ppc.c: Implement valuetype arguments and return values for
3006 2008-09-09 Mark Probst <mark.probst@gmail.com>
3008 * mini-ppc.c: Partially implement tail calls (struct arguments and
3009 return values not supported).
3011 * method-to-ir.c: Enable tail calls on PPC.
3013 2008-09-08 Zoltan Varga <vargaz@gmail.com>
3015 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
3016 runtime-invoke wrappers to work around the problem of them getting
3017 assigned to a random class.
3019 * aot-runtime.c (mono_aot_get_method): Ditto.
3021 2008-09-07 Zoltan Varga <vargaz@gmail.com>
3023 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
3024 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
3026 2008-09-07 Mark Probst <mark.probst@gmail.com>
3028 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
3029 until they're implemented properly.
3031 * exceptions-ppc.c: Use arch-independent exception-handling code
3032 instead of custom one.
3034 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
3037 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
3039 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
3040 applies when __powerpc__ is defined.
3042 2008-09-06 Zoltan Varga <vargaz@gmail.com>
3044 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
3045 methods to their code to avoid computing the full name of wrappers and
3046 doing a lookup in a string hash table.
3048 2008-09-05 Zoltan Varga <vargaz@gmail.com>
3050 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
3051 we identify bblocks before method_to_ir () is ran.
3053 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
3054 Also avoid optimizing branches pointing to themselves.
3056 * mini.c (mini_method_compile): Ditto. Fixes #422947.
3058 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
3060 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
3062 2008-09-05 Zoltan Varga <vargaz@gmail.com>
3064 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
3065 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
3066 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
3069 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
3070 jumped to the same entry in plt_jump_table.
3072 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
3074 * method-to-ir.c (initialize_array_data): Handle field with RVA from
3077 2008-08-31 Zoltan Varga <vargaz@gmail.com>
3079 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
3080 other assignment can be if converted. Saves 1.5% on corlib size and fixes
3083 2008-08-29 Geoff Norton <gnorton@novell.com>
3085 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
3086 segment, and doesn't properly handle .space as .text. Fixes
3089 2008-08-29 Geoff Norton <gnorton@novell.com>
3091 * mini.c: Disable the mach exception handler when running on
3094 2008-08-29 Geoff Norton <gnorton@novell.com>
3096 * aot-compiler.c: Patch from Renaldas Zioma to properly register
3097 globals on Darwin/ARM
3099 2008-08-28 Zoltan Varga <vargaz@gmail.com>
3101 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
3102 since too many things depend on it. Instead, call
3103 mono_runtime_set_no_exec ().
3105 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
3108 * aot-compiler.c: Add an 'asm-only' AOT option.
3110 * mini.c: Avoid initializing the runtime when doing AOT compilation.
3112 * aot-compiler.c (compile_method): Disable gshared support for now as it
3115 2008-08-27 Bill Holmes <billholmes54@gmail.com>
3117 * mini-amd64.h : Fix a compiler warning.
3119 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
3120 Changed to use a callback function to retrieve the unwind info.
3121 This avoids problems observed when code blocks were removed by
3122 unloading an app domain.
3124 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
3125 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
3128 Contributed under MIT/X11 license.
3130 2008-08-27 Bill Holmes <billholmes54@gmail.com>
3132 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
3133 case to keep the stack aligned to 8.
3135 Contributed under MIT/X11 license.
3137 2008-08-26 Zoltan Varga <vargaz@gmail.com>
3139 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
3140 avoid repeated linear searches.
3142 2008-08-25 Zoltan Varga <vargaz@gmail.com>
3144 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
3145 methods it can't handle.
3147 * aot-compiler.c (add_method): Avoid adding a method twice.
3148 (add_wrappers): Add runtime invoke wrappers for all methods.
3150 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
3151 function to create an aot-compatible version of this trampoline.
3153 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
3155 2008-08-24 Zoltan Varga <vargaz@gmail.com>
3157 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
3159 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
3160 with a generic sharing failure.
3162 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
3164 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
3165 CEE_RETHROW. Fixes #419634.
3167 * mini.c (mono_method_to_ir): Ditto.
3169 * exceptions.cs: Add a new test.
3171 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
3172 to mono_type_stack_size_internal () since some callers might not pass in
3175 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
3176 instrument_prolog. Fixes #419878.
3178 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
3179 doubles in soft float mode volatile.
3181 2008-08-23 Zoltan Varga <vargaz@gmail.com>
3183 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
3185 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
3186 to handle soft float correctly.
3188 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
3191 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
3193 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
3194 to sp, since the generics catch code requires it.
3196 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
3199 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
3200 mono_arch_emit_imt_argument ().
3202 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
3204 * mini-arm.c tramp-arm.c: Generic sharing updates.
3206 2008-08-22 Zoltan Varga <vargaz@gmail.com>
3208 * mini-arm.c: Fix the arm build.
3210 * generic-sharing.c (mini_type_get_underlying_type): New helper function
3211 handling enums, generic instances and generic sharing.
3212 (mini_type_stack_size_full): Ditto.
3214 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
3216 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
3218 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
3220 * tramp-arm.c: Implement the rgctx fetch and the generic class init
3223 * mini-arm.c: Various small generic sharing changes.
3225 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
3227 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
3230 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
3231 helper function to return a generic class init trampoline.
3233 * method-to-ir.c mini.c: Use it.
3235 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
3236 arch-specfic function to return a generic class init trampoline.
3238 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
3239 the GENERIC_CLASS_INIT custom code.
3241 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
3242 a fatal error, not a sharing failure.
3244 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
3247 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
3248 trampoline argument from MONO_ARCH_VTABLE_REG.
3250 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3251 order of the arguments to the C trampoline: pass 'slot' as the trampoline
3252 argument, and pass the vtable in VTABLE_REG.
3254 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3255 order of the arguments to the C trampoline: pass 'slot' as the trampoline
3256 argument, and pass the vtable in VTABLE_REG.
3257 (mono_arch_create_trampoline_code_full): Remove some special casing for
3258 the rgctx fetch trampoline.
3260 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
3263 * iltests.il: Add a test for it.
3265 2008-08-21 Zoltan Varga <vargaz@gmail.com>
3267 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
3269 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
3272 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
3273 use mono_jit_info_table_find () to avoid recursion.
3274 (mono_delegate_trampoline): Add a sync wrapper here.
3276 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
3279 * mini.c (mono_method_to_ir): Ditto.
3281 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
3282 add_sync_wrapper argument. Don't add a sync wrapper here.
3283 (mono_create_jump_trampoline): Don't add a sync wrapper here.
3285 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
3287 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3289 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
3290 of nonvolatile registers back from MonoContext to CONTEXT.
3292 Contributed under MIT/X11 license.
3294 2008-08-20 Bill Holmes <billholmes54@gmail.com>
3296 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
3297 arguments on Winx64 there are only 4 argument registers. For this
3298 logic to work the last argument must be pulled from the stack.
3300 Contributed under MIT/X11 license.
3302 2008-08-20 Zoltan Varga <vargaz@gmail.com>
3304 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3306 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
3307 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
3308 encode/decode_method_ref ().
3310 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
3312 * aot-runtime.c (decode_patch): Ditto.
3314 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
3315 MONO_PATCH_INFO_METHOD.
3317 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
3320 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
3323 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
3325 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
3326 one from the caller.
3328 * aot-runtime.c (decode_generic_inst): New function to decode and
3329 return a interned generic inst.
3330 (decode_klass_ref): Use it.
3331 (decode_method_ref): Ditto.
3333 * aot-compiler.c (emit_exception_debug_info): Save
3334 jinfo->has_generic_jit_info too.
3336 2008-08-19 Zoltan Varga <vargaz@gmail.com>
3338 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
3340 * iltests.il.in: Add a test for fconv_to_i.
3342 * liveness.c: Disable the liveness2 pass for now to save space.
3344 * regalloc2.c: Include mempool-internals.h to fix warnings.
3346 * aot-compiler.c (encode_method_ref): Encode the context of generic
3349 * aot-runtime.c (decode_method_ref): Inflate generic methods using
3350 the context saved in the aot file.
3352 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
3354 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
3356 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
3357 volatile so they won't be optimized away.
3359 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
3365 * dominators.c: Remove duplicated functions that now are in
3366 mempool-internals.h.
3368 2008-08-19 Zoltan Varga <vargaz@gmail.com>
3370 * aot-compiler.c: Fix warnings.
3372 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
3374 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
3376 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
3379 * mini.c (mono_resolve_patch_target): Ditto.
3381 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
3382 (encode_klass_ref): Add support for encoding VARs/MVARs.
3384 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
3386 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
3387 the handling of the got entries into a separate 'decode_got_entry' function.
3388 Add support for RGCTX_FETCH.
3390 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
3391 clobbered by the trampoline code.
3393 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
3394 not clobbered by the indirect calling code.
3396 2008-08-18 Zoltan Varga <vargaz@gmail.com>
3398 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
3401 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
3403 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
3404 signature using the compilation mempool otherwise we would leak it.
3406 2008-08-18 Zoltan Varga <vargaz@gmail.com>
3408 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
3409 mono_emit_abs_call ().
3411 * patch-info.h: Add GENERIC_CLASS_INIT.
3413 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
3415 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
3416 as their target as a near call.
3418 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
3420 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
3422 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
3423 call to a runtime function described by a patch.
3425 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
3426 mono_emit_abs_call, this has the advantage that the ABS handling code in
3427 mono_codegen () can handle them both, and can handle other stuff in the
3428 future without additional code.
3430 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
3432 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
3435 * mini.h: Add missing bblock related prototypes.
3437 * mini.h (MonoCompile): Remove unused reverse_inst_list and
3438 reverse_inst_list_len fields.
3440 * mini.c: Refactor this file a bit by moving branch optimizations to
3443 * method-to-ir.c: Merge generic sharing changes missed earlier.
3445 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
3447 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
3448 shared patches. Process METHODCONST as a shared patch.
3450 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
3451 as it crashes on the 2.0 mscorlib.
3453 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
3456 * aot-compiler.c: Use is_plt_patch () in a few additional places.
3457 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
3460 * aot-compiler.c: Reorganize the got handling code to be a bit more
3463 2008-08-17 Zoltan Varga <vargaz@gmail.com>
3465 * aot-compiler.c: Make the patch_to_plt_offset hash table use
3466 mono_patch_info_equals/hash, and use it to massively simplify
3469 * mini.c (mono_patch_info_hash): Simplify this and add support for
3472 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
3474 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
3475 handling code, since an offset is not enough to identify a trampoline.
3477 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
3479 2008-08-17 Mark Probst <mark.probst@gmail.com>
3481 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
3483 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
3485 * mini-ops.h: Argument and result types for OVF_CARRY ops.
3487 * decompose.c: PPC decompositions for various ops.
3489 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
3491 2008-08-17 Zoltan Varga <vargaz@gmail.com>
3493 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
3494 call the generic trampoline code using a call, instead of a jump, to
3495 remove some special casing from the generic trampoline code.
3497 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
3498 (mono_codegen): Ditto.
3500 * aot-compiler.c aot-runtime.c: Ditto.
3502 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
3504 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
3505 helper function to find the offset corresponding to a lazy fetch trampoline.
3507 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
3508 when doing generic sharing.
3510 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
3513 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
3514 mini-trampolines.c to be with the other trampoline creation functions.
3516 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
3517 as it is equal to method->signature in most cases, add a
3518 mono_emit_method_call_full variant which takes a signature and an imt
3521 2008-08-16 Zoltan Varga <vargaz@gmail.com>
3523 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
3524 to this function, since it could be computed easily from the method
3526 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
3529 * method-to-ir.c mini.c: Remove references to
3530 compile_generic_method_wo_context.
3532 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
3533 generic method calls.
3535 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
3536 dimensional non-szarrays.
3538 * mini.c (mini_init): Register mono_array_new_1.
3540 * jit-icalls.c (mono_array_new_1): New jit icall.
3542 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
3543 pointing to the method.
3545 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
3546 method addresses belonging to METHOD_JUMP patches in the
3547 jump_target_got_slot_hash.
3548 (mono_aot_load_method): Ditto.
3550 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
3551 METHOD_JUMP patches.
3553 * mini.c (mini_create_jit_domain_info): New helper function which
3554 initializes/frees domain->runtime_info.
3555 (mini_free_jit_domain_info): Ditto.
3556 (mini_init): Install the domain hook functions with the runtime.
3558 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
3559 information maintained by the JIT.
3561 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
3562 insertion into jump_table_hash into mono_codegen (), also implement proper
3565 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
3566 tail calls, it is already done by the aot code.
3568 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
3571 * iltests.il.in: Make the jmp test a bit more complex.
3573 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
3574 generic instances which doesn't have a token.
3576 * aot-runtime.c (decode_method_ref): Ditto.
3578 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
3579 can handle this case now.
3580 (handle_box): Ditto.
3582 2008-08-15 Geoff Norton <gnorton@novell.com>
3584 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
3587 2008-08-15 Zoltan Varga <vargaz@gmail.com>
3589 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
3590 calling generic methods.
3592 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
3594 * aot-runtime.c (decode_patch_info): Ditto.
3596 * mini.c (mono_resolve_patch_target): Ditto.
3598 * patch-info.h: Add METHOD_RGCTX.
3600 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
3602 2008-08-14 Zoltan Varga <vargaz@gmail.com>
3604 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
3605 arguments in registers.
3607 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
3608 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
3610 * mini.c (mini_method_compile): Abort aot compilation for generic
3611 methods if generic sharing is disabled.
3613 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
3616 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
3617 requiring an mrgctx.
3619 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
3620 store instructions when converting a vcall to a normal call.
3622 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
3623 mono_arch_find_jit_info.
3625 2008-08-13 Zoltan Varga <vargaz@gmail.com>
3627 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
3628 avoid calling mono_method_full_name () for every method even if the
3630 (check_inline_caller_method_name_limit): Ditto.
3632 2008-08-12 Zoltan Varga <vargaz@gmail.com>
3634 * driver.c (main_thread_handler): Allow AOT compilation of multiple
3635 assemblies in one run.
3637 * aot-compiler.c (mono_compile_assembly): Only print out a count of
3638 skipped methods if it is not 0.
3640 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
3642 2008-08-12 Bill Holmes <billholmes54@gmail.com>
3644 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
3645 MONO_ARCH_HAVE_UNWIND_TABLE.
3647 Contributed under MIT/X11 license.
3649 2008-08-12 Bill Holmes <billholmes54@gmail.com>
3651 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
3652 from default optimizaton list on Winx64.
3654 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
3656 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
3657 the LMF from the MonoJitTlsData structure.
3659 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
3661 Contributed under MIT/X11 license.
3663 2008-08-12 Zoltan Varga <vargaz@gmail.com>
3665 * mini.c (sigsegv_signal_handler): Fix the build.
3667 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
3668 assembly->aot_module.
3670 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
3671 hash table. This simplifies and speeds up a lot of code, and fixes support
3674 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
3677 * mini-exceptions.c: Ditto.
3679 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
3680 'native_offset' argument, since these are computed in the
3681 mono_find_jit_info () function.
3683 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
3684 is used by exceptions-ppc.c.
3686 * exceptions-ppc.c: Call mono_find_jit_info () instead of
3687 mono_arch_find_jit_info ().
3689 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
3690 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
3691 generic code in mini-exceptions.c.
3693 2008-08-11 Zoltan Varga <vargaz@gmail.com>
3695 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
3697 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
3699 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
3700 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
3701 called while holding the loader lock. Fixes #415608.
3702 (mono_aot_get_method_from_token_inner): Ditto.
3704 2008-08-09 Zoltan Varga <vargaz@gmail.com>
3706 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
3707 to reduce differences between this and the generic implementation in
3709 (ves_icall_get_frame_info): Ditto.
3711 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
3713 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
3716 * exceptions-ppc.c (arch_get_call_filter): Rename this to
3717 mono_arch_get_call_filter () and make it non-static, for consistency with the
3718 other architectures.
3720 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
3723 * local-propagation.c:
3724 * mini-x86.c: Correct the name of arch defines.
3726 2008-08-09 Zoltan Varga <vargaz@gmail.com>
3728 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
3729 NO_EMULATE_LONG_SHIFT_OPS define.
3731 2008-08-08 Zoltan Varga <vargaz@gmail.com>
3733 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
3734 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
3736 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
3737 MACH fixes. Merged from the 2.0 branch.
3739 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
3741 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
3742 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
3744 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
3746 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
3747 mono_marshal_get_native_wrapper () signature changes.
3749 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
3751 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
3752 conversion bug under arm.
3754 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
3756 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
3758 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
3759 with overflow checking.
3761 2008-08-05 Marek Habersack <mhabersack@novell.com>
3763 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
3764 to the genmdesc.pl file
3766 2008-08-05 Zoltan Varga <vargaz@gmail.com>
3768 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
3769 arg_array in the soft-float versions of the LOAD/STORE macros.
3771 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
3774 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
3776 2008-08-02 Zoltan Varga <vargaz@gmail.com>
3778 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
3779 a float HFA. Fixes #413621.
3781 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
3783 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
3784 frame_size to args_size. Fixes build.
3786 2008-08-02 Zoltan Varga <vargaz@gmail.com>
3788 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
3789 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
3791 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
3792 the stack are not unaligned. Fixes #413247.
3794 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
3796 * mini.c: update jitted methods performance counters.
3798 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3800 * mini-exceptions.c: increase the exceptions thrown performance
3801 counter in mono_handle_exception ().
3803 2008-07-29 Zoltan Varga <vargaz@gmail.com>
3805 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
3806 can work with netmodules.
3808 2008-07-28 Geoff Norton <gnorton@novell.com>
3810 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
3813 2008-07-28 Zoltan Varga <vargaz@gmail.com>
3815 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
3818 2008-07-28 Bill Holmes <billholmes54@gmail.com>
3820 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
3821 The float param registers and other param registers must be the
3822 same index on Windows x64.
3824 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
3825 ArgValuetypeAddrInIReg argument case. Setting the argument
3826 op to OP_VTARG_ADDR (OP_REGOFFSET)).
3828 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
3829 variable computed above as the copy length for arguments of storage
3830 type ArgValuetypeAddrInIReg.
3832 * mini-amd64.c (mono_arch_emit_call) : Implementing the
3833 ArgValuetypeAddrInIReg argument case. This case will rely on
3834 mono_arch_emit_outarg_vt to emit the correct code later in the process.
3836 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
3837 a 32 byte stack allocation for all calls. We will omit the adjustment for
3838 jump and tail call instructoins as they do not follow the typical call behavior.
3840 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
3841 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
3842 local variable and pass the local variable by reference to the called method.
3844 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
3845 Implementing the ArgValuetypeAddrInIReg argument case. When the address
3846 of a struct is passed in a register it must be saved with the other
3847 volatile argument on the stack.
3849 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
3850 frame pointer the stack adjustment value must be saved to the unwind
3853 Contributed under MIT/X11 license.
3855 2008-07-28 Zoltan Varga <vargaz@gmail.com>
3857 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
3858 which got lost in the merge.
3860 2008-07-27 Zoltan Varga <vargaz@gmail.com>
3862 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
3865 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
3867 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
3868 icalls, since they won't be patched.
3870 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
3871 different code sequence when running under valgrind to prevent some valgrind
3874 * iltests.il.in: Add new regression test.
3876 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
3879 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
3880 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
3882 * iltests.il.in: Add new test.
3884 * aot-compiler.c: Fix some warnings.
3886 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
3889 2008-07-27 Zoltan Varga <vargaz@gmail.com>
3891 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
3892 (mini_usage_jitdeveloper): Add a missing --wapi option.
3894 2008-07-25 Zoltan Varga <vargaz@gmail.com>
3896 * mini-codegen.c: Simplify the is_fp macros.
3897 (free_up_ireg): Remove, use free_up_reg instead.
3898 (free_up_reg): Fix the fp case.
3900 2008-07-26 Zoltan Varga <vargaz@gmail.com>
3902 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
3905 * exceptions-x86.c: Merge some changes which seemed to have got lost
3906 in the linear-ir merge.
3908 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
3910 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
3911 long vreg volatile even if the variable was already created.
3913 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
3916 2008-07-26 Zoltan Varga <vargaz@gmail.com>
3918 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
3920 * mini.c (mono_jit_compile_method_inner): Add support for
3921 MONO_EXCEPTION_BAD_IMAGE.
3923 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
3924 mini_method_get_context () returns NULL. Fixes #356531.
3926 * mini.c (mono_method_to_ir): Ditto.
3928 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
3929 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
3931 2008-07-25 Zoltan Varga <vargaz@gmail.com>
3933 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
3934 in the LDFTN implementation.
3936 2008-07-25 Mark Probst <mark.probst@gmail.com>
3938 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
3939 code, patch calls to icalls, too, even if they're not in the
3940 shared generic code hash. Fixes #411962.
3942 2008-07-25 Zoltan Varga <vargaz@gmail.com>
3944 * cpu-x86.md: Increase the length of the fcall opcodes.
3946 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
3947 calls returning floats.
3949 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
3952 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
3955 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
3956 into the domain->method_code_hash.
3958 * aot-compiler.c: Fix win32 build.
3960 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
3962 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
3963 gshared NEWARR implementation.
3965 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
3967 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
3968 can be used outside of method_to_ir.
3970 * mini.h (MonoCompile): Add arg_types field.
3972 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
3974 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
3975 the values of the local arg_array and param_types array.
3977 2008-07-24 Zoltan Varga <vargaz@gmail.com>
3979 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
3980 got accesses might only get generated later when NEWOBJ is decomposed.
3982 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
3983 looking up the native code of the target method when a delegate is called
3986 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
3989 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
3991 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
3992 AOT work on platforms without a working dlsym implementation.
3994 * mini.h: Bump AOT image format version.
3996 2008-07-24 Mark Probst <mark.probst@gmail.com>
3998 * mini-exceptions.c: Free a MonoType with
3999 mono_metadata_free_type() instead of g_free().
4001 * aot-runtime.c: Free a MonoType.
4003 2008-07-24 Zoltan Varga <vargaz@gmail.com>
4005 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
4008 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
4011 2008-07-23 Massimiliano Mantione <massi@ximian.com>
4012 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
4015 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4017 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
4018 NEWOBJ calls on valuetypes.
4020 * iltests.il.in: Add new test.
4022 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
4024 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4026 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
4027 is no longer needed.
4029 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
4030 non register sized integer arguments.
4031 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
4032 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
4035 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
4038 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
4039 two a binop with different sized arguments is emitted.
4041 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
4042 instruction in the ins==NULL case.
4044 2008-07-23 Zoltan Varga <vargaz@gmail.com>
4046 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
4048 * mini-x86.c: Fix osx build.
4050 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
4053 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
4054 instruction for non int sized variables.
4056 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
4059 2008-07-23 Robert Jordan <robertj@gmx.net>
4061 * method-to-ir.c: Fix MSVC build.
4063 2008-07-22 Zoltan Varga <vargaz@gmail.com>
4065 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
4066 a non int sized type, widen it to an int since newer versions of gcc seem to
4067 generate code which needs this.
4069 * ssa2.c abcremoval2.c: Fix warnings.
4071 * *: Merge the Linear IR branch.
4073 The original branch is at trunk/branches/vargaz/mini-linear-il, and
4074 the ChangeLog file there describes all the changes done over the years.
4075 Further documentation can be found at www.mono-project.com/Linear_IL.
4077 2008-07-21 Bill Holmes <billholmes54@gmail.com>
4079 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4080 The float param registers and other param registers must be the
4081 same index on Windows x64.
4083 Contributed under MIT/X11 license.
4085 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
4087 * mini.c: Make the previous fix GC safe.
4089 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
4091 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
4093 2008-07-21 Bill Holmes <billholmes54@gmail.com>
4095 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
4096 on Winx64. This type will not be passed on the stack (ArgOnStack), but
4097 ArgValuetypeAddrInIReg instead.
4099 Contributed under MIT/X11 license.
4101 2008-07-21 Zoltan Varga <vargaz@gmail.com>
4103 * mini-codegen.c (get_register_spilling): Fix a warning.
4105 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
4107 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
4108 for types which the initialization fails. Raises the provided exception
4109 at the right stop after cleanup.
4111 2008-07-16 Zoltan Varga <vargaz@gmail.com>
4113 * aot-compiler.c: Free most of the memory allocated during compilation.
4115 * mini.c (mini_parse_debug_options): Fix a leak.
4117 * mini.c (mini_method_compile): Don't add the method to the jit info tables
4118 during aot compilation.
4120 2008-07-14 Zoltan Varga <vargaz@gmail.com>
4122 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
4123 it has too much register pressure.
4125 2008-07-13 Zoltan Varga <vargaz@gmail.com>
4127 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
4129 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4131 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4134 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4135 on amd64 similar to the way it is done on arm.
4137 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4139 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
4140 consistency, normalize error messages, avoid loading aot-only modules in
4143 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
4146 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
4148 2008-07-11 Martin Baulig <martin@ximian.com>
4151 (MonoDebuggerInfo): Add `interruption_request'.
4153 2008-07-12 Zoltan Varga <vargaz@gmail.com>
4155 * aot-compiler.c (emit_plt): Remove some dead code.
4157 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
4159 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
4160 return the plt info offset belonging to a given plt entry.
4162 * mini-trampolines.c (mono_aot_plt_trampoline): Use
4163 mono_aot_get_plt_info_offset.
4165 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
4166 similar to the amd64 code by makeing jumps through a separate jump table
4167 instead of embedding the jump addresses into the code.
4169 2008-07-11 Zoltan Varga <vargaz@gmail.com>
4171 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
4174 2008-07-10 Martin Baulig <martin@ximian.com>
4176 * mini.c (mini_method_compile): Disable generics sharing when
4177 running in the debugger.
4179 2008-07-10 Zoltan Varga <vargaz@gmail.com>
4181 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
4183 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
4184 the local register allocator from running out of registers on x86 when
4187 2008-07-10 Bill Holmes <billholmes54@gmail.com>
4189 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
4190 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
4193 Contributed under MIT/X11 license.
4195 2008-07-10 Zoltan Varga <vargaz@gmail.com>
4197 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
4198 speed up the assembler.
4200 2008-07-09 Zoltan Varga <vargaz@gmail.com>
4202 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
4205 * mini.c: Move the soft float handling macros a bit earlier, add
4206 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
4209 * mini.h: Add prototype for mono_arch_fixup_jinfo.
4211 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
4212 read-only to help catch code allocation requests.
4214 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
4215 and turn it off when using --aot-only or when compiling with --aot=full.
4217 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
4218 jump table for switches from the normal domain mempool, not the code
4221 * mini-trampolines.c (get_unbox_trampoline): New function to return an
4222 unbox trampoline which handles aot-only mode too.
4224 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
4225 an AOTed unbox trampoline.
4227 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
4229 2008-07-09 Bill Holmes <billholmes54@gmail.com>
4231 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
4234 Contributed under MIT/X11 license.
4236 2008-07-09 Bill Holmes <billholmes54@gmail.com>
4238 * mini.c (mono_codegen): Allocate space at the end of the code block and store
4239 the unwind information for the method at the end of the allocated block.
4241 * mini-amd64.h: Added declarations for the unwind routines and adding field to
4242 MonoCompileArch to hold the unwind info for SEH on Winx64
4244 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
4245 frame pointer info for the method being compiled.
4247 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
4248 the call to mono_exception_from_token.
4250 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
4251 storing the method prolog information in a format that the Winx64 SEH can understand. This
4252 information is stored a the end of the method block because it is all 32-bit offset based.
4254 Contributed under MIT/X11 license.
4256 2008-07-09 Zoltan Varga <vargaz@gmail.com>
4258 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
4260 * wapihandles.c: Fix warnings.
4262 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
4265 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
4266 mono_jit_compile_method in aot-only mode since that calls the type
4269 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
4270 get_delegate_invoke_impl in aot-only mode.
4272 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
4274 2008-07-08 Zoltan Varga <vargaz@gmail.com>
4276 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
4278 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
4281 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
4283 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
4284 init trampoline from the AOT file as well.
4286 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
4287 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
4290 * mini.c (mini_init): Move the call to mono_exceptions_init () after
4293 * exceptions-amd64.c: Add _full variants for the remaining exception code
4294 creation functions as well, allow emission of relocatable code, remove
4295 caching since that is now done by the caller.
4297 * mini-exceptions.c: Add _full variants for the remaining exception code
4298 creation functions as well, add aot-only support.
4300 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
4301 if we can determine a proper token for them.
4302 (add_wrappers): Add a few more wrappers.
4303 (emit_method_code): Remove some dead code.
4304 (emit_trampolines): Emit exception code too.
4306 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
4308 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
4309 mono_array_new_va which avoids varargs.
4311 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
4313 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
4314 mono_arch_create_specific_trampoline () in all places.
4316 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
4317 a bit so it can be used for other things as well.
4319 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
4322 * exceptions-amd64.c: Rename the caching from the exception code creation
4323 functions, it is done by the caller instead.
4325 * exceptions-amd64.c: Change the signature of the exception code creation
4326 functions to allow the creation of relocatable code later.
4328 * mini-exceptions.c: Add a set of functions to query the various
4329 runtime-generated exception functions.
4331 * mini.c mini-exceptions.c: Use the newly added functions instead of the
4332 mono_arch_.. () functions.
4334 2008-07-07 Zoltan Varga <vargaz@gmail.com>
4336 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
4338 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
4340 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
4341 (mini_get_vtable_trampoline): Ditto.
4343 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
4344 code in the AOT case by returning the code size and a list of relocations to
4347 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
4349 2008-07-07 Bill Holmes <billholmes54@gmail.com>
4351 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
4354 Contributed under MIT/X11 license.
4356 2008-07-07 Zoltan Varga <vargaz@gmail.com>
4358 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
4359 so the buffer size can be computed correctly. Fixes #404735.
4361 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
4362 normally as cfg->debug_info is already freed.
4364 2008-07-06 Zoltan Varga <vargaz@gmail.com>
4366 * mini-amd64.c: For calls returning vtypes in registers, don't store
4367 the return address on the stack, instead allocate a separate local for
4370 2008-07-05 Mark Probst <mark.probst@gmail.com>
4372 * mini-trampolines.c, mini.h: Add an argument to
4373 mono_create_jit_trampoline_in_domain() for turning off the adding
4374 of the sync wrapper.
4376 * mini.c: Use the JIT trampoline without sync instead of
4377 ldftn_nosync in static RGCTX invoke wrappers so that the call can
4380 2008-07-04 Mark Probst <mark.probst@gmail.com>
4382 * driver.c: Turn on GSHARED optimization by default.
4384 2008-07-04 Zoltan Varga <vargaz@gmail.com>
4386 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
4387 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
4389 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
4390 create a variant of the generic trampoline code callable from AOTed trampolines.
4392 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
4393 trampoline code callable from AOTed trampolines.
4395 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
4397 2008-07-04 Mark Probst <mark.probst@gmail.com>
4399 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
4400 pass-through manner.
4402 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
4403 and don't fail sharing for them anymore.
4405 * mini-exceptions.c: Handle exceptions in shared generic methods.
4407 * generic-sharing.c: When checking the context of a generic
4408 method, also check its class's context. Don't treat wrappers as
4411 * mini-trampolines.c: Some code factored out to
4412 metadata/generic-sharing.c. Handle the MRGCTX case.
4414 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
4415 we must deal with the method being of another instantiation of the
4416 class. Add static rgctx invoke wrappers to generic methods.
4418 2008-07-04 Mark Probst <mark.probst@gmail.com>
4420 * mini.c: Provide all jit infos of generic shared methods with a
4423 * mini-exceptions.c: Handle the new situation that a generic info
4424 might be available, but not info about the this/vtable/mrgctx
4427 2008-07-03 Mark Probst <mark.probst@gmail.com>
4429 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
4432 2008-07-03 Zoltan Varga <vargaz@gmail.com>
4434 * dominators.c (check_dominance_frontier): Fix a warning.
4436 * mini.h: Add some missing prototypes.
4438 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
4440 * driver.c (mono_jit_init_version): Correct the comments since the first
4441 argument should be the name of the root domain, not a filename.
4443 * aot-runtime.c (make_writable): Error out if this is called while running
4445 (load_aot_module): Ditto.
4447 * aot-compiler.c: Really fix the computation of method indexes.
4449 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
4450 optimizations as this is no longer called frequently.
4452 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
4453 method and the invoke impl code and pass it to the delegate trampoline instead of
4454 just the delegate class.
4456 2008-07-02 Zoltan Varga <vargaz@gmail.com>
4458 * aot-compiler.c: Fixup the computation of method indexes.
4459 (add_wrappers): Create the base methods of the runtime invoke wrappers using
4460 the method builder infrastructure.
4462 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
4465 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
4466 mode, load the method right away instead of creating a trampoline.
4468 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
4470 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
4473 2008-07-01 Zoltan Varga <vargaz@gmail.com>
4475 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
4476 (mono_aot_load_method): Use method_index instead of method->token.
4478 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
4479 can handle icalls etc. properly.
4481 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4483 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
4485 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
4486 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
4487 JIT_ICALL_ADDR patch type.
4489 * patch-info.h: Add JIT_ICALL_ADDR patch type.
4491 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
4493 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
4495 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
4497 2008-06-30 Zoltan Varga <vargaz@gmail.com>
4499 * mini.c: Use domain->jit_code_hash_lock for controlling access to
4500 domain->jit_code_hash.
4502 2008-06-29 Zoltan Varga <vargaz@gmail.com>
4504 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
4506 2008-06-27 Zoltan Varga <vargaz@gmail.com>
4508 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
4509 get_this_arg_from_call, let it compute it when needed.
4511 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
4512 gsctx from code only when needed.
4514 * mini-trampolines.c (get_generic_context): Rename this to
4515 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
4516 it can be called by the arch backends.
4518 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
4520 2008-06-26 Zoltan Varga <vargaz@gmail.com>
4522 * driver.c (mono_main): Add experimental --aot-only command line option.
4524 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
4527 2008-06-26 KornĂ©l PĂ¡l <kornelpal@gmail.com>
4529 * driver.c (DllMain): Remove mono_module_handle.
4531 Contributed under MIT/X11 license.
4533 2008-06-25 Zoltan Varga <vargaz@gmail.com>
4535 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
4536 for emitting methods which are not in the source assembly. Detect and report
4537 failure of assembling+linking.
4539 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
4541 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
4543 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
4545 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
4547 2008-06-24 Zoltan Varga <vargaz@gmail.com>
4549 * mini.h: Remove some obsolete prototypes.
4551 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
4553 2008-06-24 Mark Probst <mark.probst@gmail.com>
4555 * mini.c (get_object_generic_inst): Variable-sized arrays are not
4556 supported by Visual Studio, so use alloca().
4558 2008-06-23 Zoltan Varga <vargaz@gmail.com>
4560 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
4563 2008-06-23 Mark Probst <mark.probst@gmail.com>
4565 * mini.c: Fail sharing of a generic method if it contains an open
4566 catch clause (because we don't pass MRGCTXs yet).
4568 2008-06-23 Mark Probst <mark.probst@gmail.com>
4570 * mini.c: When compiling a method with generic sharing, insert the
4571 method instantiated with an all-Object generic context into the
4572 jit info table, instead of the context of the first instantiation
4573 of the method we happen to compile.
4575 2008-06-18 Martin Baulig <martin@ximian.com>
4577 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
4578 `major_version' and `minor_version'.
4580 2008-06-17 Mark Probst <mark.probst@gmail.com>
4582 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
4583 mono_method_is_generic_sharable_impl() takes an additional
4584 argument specifying whether to treat type variables as reference
4587 2008-06-17 Mark Probst <mark.probst@gmail.com>
4589 * mini.h: Removed obsolete prototypes.
4591 2008-06-17 Mark Probst <mark.probst@gmail.com>
4593 * mini.c: Don't fail generic sharing for initobj and sizeof - we
4594 already handle them.
4596 2008-06-17 Mark Probst <mark.probst@gmail.com>
4598 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
4599 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
4600 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
4601 tramp-x86.c: Added a MonoGenericContext* argument to
4602 mono_arch_get_unbox_trampoline() so that it can call other
4603 functions which require it.
4605 2008-06-17 Mark Probst <mark.probst@gmail.com>
4607 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
4608 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
4609 mono_arch_get_this_arg_from_call() takes a
4610 MonoGenericSharingContext* as well.
4612 2008-06-17 Mark Probst <mark.probst@gmail.com>
4614 * mini.c: Factor out code for emitting unbox into emit_unbox() and
4615 implement generic sharing of unbox.
4617 2008-06-17 Mark Probst <mark.probst@gmail.com>
4619 * mini.c: Don't compute the vtable to determine whether a field is
4620 special static, because it might not work for open types.
4622 2008-06-17 Mark Probst <mark.probst@gmail.com>
4624 * mini.c: Removed the unused token_type and token_source arguments
4625 from get_runtime_generic_context_ptr().
4627 2008-06-17 Marek Habersack <mhabersack@novell.com>
4629 * mini.c (ADD_BINOP): fix the build
4631 2008-06-16 Zoltan Varga <vargaz@gmail.com>
4633 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
4636 2008-06-16 Mark Probst <mark.probst@gmail.com>
4638 * mini.h: Removed class relations enum that's not used anymore.
4640 2008-06-16 Mark Probst <mark.probst@gmail.com>
4642 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
4644 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
4645 the lazy fetch trampoline access code.
4647 2008-06-15 Zoltan Varga <vargaz@gmail.com>
4649 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
4651 2008-06-14 Zoltan Varga <vargaz@gmail.com>
4653 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
4655 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
4657 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
4659 2008-06-13 Zoltan Varga <vargaz@gmail.com>
4661 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
4664 * mini-ops.h: Add MIN/MAX_UN opcodes.
4666 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
4669 * basic-math.cs: Add more min/max tests.
4671 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
4673 2008-06-13 Mark Probst <mark.probst@gmail.com>
4675 * mini.c: Small fix in the prologue of emit_castclass.
4677 2008-06-13 Zoltan Varga <vargaz@gmail.com>
4679 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
4681 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
4682 do not work even for unsigned types. Fixes #400014.
4684 * basic-math.cs: Add regression tests for unsigned Min/Max.
4686 2008-06-13 Mark Probst <mark.probst@gmail.com>
4688 * mini.c: Added additional context_used argument to several
4689 functions, which will be needed for sharing generic methods. Use
4690 GET_RGCTX macro wherever appropriate. Declare only one
4691 context_used in mono_method_to_ir().
4693 2008-06-13 Mark Probst <mark.probst@gmail.com>
4695 * mini.c, generic-sharing.c: Removed generic class relations.
4697 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
4698 functions due to MRGCTX changes.
4700 2008-06-13 Mark Probst <mark.probst@gmail.com>
4702 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
4703 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
4704 with calculated IMT.
4706 * mini.c: Generic sharing of calls via generic interfaces.
4708 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
4709 generic method with non-constant MonoGenericContext*. Instead,
4710 the context is taken out of the method itself.
4712 2008-06-13 Mark Probst <mark.probst@gmail.com>
4714 * mini.c: Generic sharing of ldvirtftn.
4716 2008-06-13 Mark Probst <mark.probst@gmail.com>
4718 * mini.c: Generic sharing of ldftn.
4720 2008-06-13 Mark Probst <mark.probst@gmail.com>
4722 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
4724 2008-06-13 Mark Probst <mark.probst@gmail.com>
4726 * mini.c: Generic sharing of the special case of ldtoken followed
4727 by a call to GetTypeFromHandle.
4729 2008-06-13 Mark Probst <mark.probst@gmail.com>
4731 * mini.c: Generic sharing of box for nullable types.
4733 2008-06-13 Zoltan Varga <vargaz@gmail.com>
4735 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
4736 are passed on the stack. Fixes #324807.
4738 2008-06-12 Bill Holmes <billholmes54@gmail.com>
4740 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
4741 for the ArgValuetypeAddrInIReg case.
4743 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
4744 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
4746 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
4747 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
4748 local variable and pass the local variable by reference to the called method.
4750 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
4751 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
4753 Contributed under MIT/X11 license.
4755 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
4757 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
4759 * debug-mini.c (mono_debug_print_vars): Release memory after printing
4762 2008-06-10 Martin Baulig <martin@ximian.com>
4765 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
4767 2008-06-09 KornĂ©l PĂ¡l <kornelpal@gmail.com>
4769 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
4770 possible error when no arguments are passed.
4772 Contributed under MIT/X11 license.
4774 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
4776 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
4777 where the file name is NULL.
4779 2008-06-09 Zoltan Varga <vargaz@gmail.com>
4781 * mini.c: Fix s390 build.
4783 2008-06-08 Zoltan Varga <vargaz@gmail.com>
4785 * trace.c (mono_trace_parse_options): Fix warnings.
4787 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
4789 2008-06-07 Zoltan Varga <vargaz@gmail.com>
4791 * mini.c (remove_block_if_useless): Avoid printing the method name.
4793 * mini.c: Remove needless setting of ins->cil_code which is now done by
4796 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
4799 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
4800 translated code after it has been patched.
4802 2008-06-06 Zoltan Varga <vargaz@gmail.com>
4804 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
4805 avoid problems during code patching on SMP systems.
4806 (emit_call): Avoid adding a patch info which is already added by
4808 (mono_arch_emit_exceptions): Ditto.
4810 2008-06-05 Zoltan Varga <vargaz@gmail.com>
4812 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
4813 MONO_TYPE_ISSTRUCT already checks for it.
4815 2008-06-05 Bill Holmes <billholmes54@gmail.com>
4817 * mini-amd64.c:merge_argument_class_from_type: When marshaling
4818 structs with floats on Winx64 the float registers are not used.
4819 The integer registers are always used..
4820 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
4821 only one register will be used and only if the size of the struct
4822 is 1,2,4, or 8 bytes.
4824 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
4827 Contributed under MIT/X11 license.
4829 2008-06-05 Martin Baulig <martin@ximian.com>
4831 * debug-debugger.c (debugger_lookup_class): Also call
4832 mono_class_setup_methods() here; we're only called from RTI.
4834 2008-06-05 Andreas Färber <andreas.faerber@web.de>
4836 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
4837 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
4838 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
4839 Post-process object files and add dtrace-generated object, if necessary.
4841 Contributed under MIT/X11 license.
4843 2008-06-04 Mark Probst <mark.probst@gmail.com>
4845 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
4848 * mini.c: Generic sharing for unbox.any and castclass.
4850 2008-06-04 Mark Probst <mark.probst@gmail.com>
4852 * mini.c: Ignore tailcall prefix in shared generic code and when
4853 doing calls which require a vtable/rgctx argument.
4855 2008-06-04 Mark Probst <mark.probst@gmail.com>
4857 * mini.c: Don't free the JIT info.
4859 * driver.c: Changes in the JIT info table testing code.
4861 2008-06-03 Zoltan Varga <vargaz@gmail.com>
4863 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
4864 interruption. Fix some warnings.
4866 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
4867 interruption_checkpoint.
4869 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
4871 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
4872 from embedding applications.
4874 2008-06-02 William Holmes <billholmes54@gmail.com>
4876 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
4877 reserving 32 bytes on the stack when making calls.
4879 Contributed under MIT/X11 license.
4881 2008-06-01 Zoltan Varga <vargaz@gmail.com>
4883 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
4884 the linear IL branch.
4886 * driver.c: Print out more information for --version on arm.
4888 2008-05-30 Zoltan Varga <vargaz@gmail.com>
4890 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
4891 bb_exit instead, since out of line bblocks might not actually be emitted
4894 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
4895 maximum epilog size for out of line bblocks if tracing is enabled.
4897 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
4899 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
4901 * arrays.cs: Regression tests for allocating arrays with negative sizes.
4903 2008-05-28 Zoltan Varga <vargaz@gmail.com>
4905 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
4906 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
4909 2008-05-27 Zoltan Varga <vargaz@gmail.com>
4911 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
4912 the 'value' to store is a constant.
4914 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
4916 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
4917 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
4919 2008-05-26 Zoltan Varga <vargaz@gmail.com>
4921 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
4922 for accessing method->generic_container.
4924 2008-05-24 Zoltan Varga <vargaz@gmail.com>
4926 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
4928 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
4930 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
4932 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
4935 2008-05-23 Zoltan Varga <vargaz@gmail.com>
4937 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
4939 * mini.c: Handle the case when mono_class_vtable () fails.
4941 2008-05-23 Massimiliano Mantione <massi@ximian.com>
4942 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
4945 2008-05-22 Mark Probst <mark.probst@gmail.com>
4947 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
4948 together with domain sharing.
4950 2008-05-22 Mark Probst <mark.probst@gmail.com>
4952 * mini.c: Treat callvirts to final methods like non-virtual calls
4953 when doing generic sharing, i.e. look them up in the runtime
4956 2008-05-22 Mark Probst <mark.probst@gmail.com>
4958 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
4959 with computed types (for generic sharing).
4961 * mini.c: Generic sharing for mkrefany and refanyval.
4963 2008-05-22 Zoltan Varga <vargaz@gmail.com>
4965 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
4968 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
4969 the generic sharing code.
4971 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
4974 2008-05-21 Zoltan Varga <vargaz@gmail.com>
4976 * mini.h: Remove the declaration of mono_aot_init_vtable ().
4978 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
4980 * driver.c: updated copyright date
4982 2008-05-21 Zoltan Varga <vargaz@gmail.com>
4984 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
4987 2008-05-19 Martin Baulig <martin@ximian.com>
4989 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
4990 pointing to the new `_mono_debug_using_mono_debugger' variable.
4993 (mono_main): Check mono_debug_using_mono_debugger() rather than
4994 the `MONO_INSIDE_MDB' environment variable to check whether we're
4995 inside the debugger.
4997 2008-05-19 Zoltan Varga <vargaz@gmail.com>
4999 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
5002 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
5004 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
5006 * mini.c: Added mini_assembly_can_skip_verification. This
5007 function checks if the assembly requested to skip verification.
5008 Fixes part of #387274.
5010 2008-05-07 Zoltan Varga <vargaz@gmail.com>
5012 * mini.c (mini_get_method): Disable the check for open generic classes when
5013 using generic sharing.
5015 * generics.cs: Add a test for #387034.
5017 * mini.c (mini_get_method): Check whenever the method class is an open generic
5018 type, and return NULL in that case, causing a verification error. Fixes
5021 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5023 * driver.c (mono_main): Revert r102623. The right
5024 thing to do is to enable the verifier under verifiable
5025 unless a --security flag was passed.
5027 We need this non-trivial behavior for --verify-all otherwise
5028 mcs-compileall won't be able to use it. As it needs everything to
5029 be verified under validil.
5031 2008-05-06 Martin Baulig <martin@ximian.com>
5035 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
5036 (mono_debugger_thread_cleanup): Likewise.
5037 (mono_debugger_extended_notification): Likewise.
5039 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5041 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
5042 against both inflated and non-inflated methods. We need to check against the
5043 generic definition for cases where the instantiated method is not visible.
5044 We need to check against the inflated types for cases where the instantiation
5045 changes any super type. This fixes #382986.
5047 Note that this doesn't need to be applied to other parts of mono_method_to_ir
5048 that check for visibiliy as generic params only appears as the type subject
5049 of tokens on call opcodes. Field manipulation and ldftn must always
5050 target an exact type.
5052 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
5054 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
5055 if no related --security flag is passed.
5057 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5059 * mini-arch.h: Prepare support for ppc64.
5061 Contributed under MIT/X11 license.
5063 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5065 * aot-runtime.c: Prepare support for ppc64.
5067 Contributed under MIT/X11 license.
5069 2008-05-05 Andreas Färber <andreas.faerber@web.de>
5071 * mini-ops.h: Prepare support for ppc64.
5073 Contributed under MIT/X11 license.
5075 2008-05-04 Andreas Färber <andreas.faerber@web.de>
5077 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
5079 Contributed under MIT/X11 license.
5081 2008-05-03 Zoltan Varga <vargaz@gmail.com>
5083 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
5084 assemblies, since aot_name is not a full path, causing us to load MS.NET
5085 assemblies on windows.
5087 2008-04-28 KornĂ©l PĂ¡l <kornelpal@gmail.com>
5089 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
5090 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
5091 * main.c: Use UTF-8 encoded command line instead of Windows default code
5092 page on Windows to support Unicode.
5093 * driver.c (DllMain): New function for mixed-mode assembly support.
5094 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
5095 export __stdcall functions without decoration.
5097 Contributed under MIT/X11 license.
5099 2008-04-28 Mark Probst <mark.probst@gmail.com>
5101 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
5102 saving it very early.
5104 2008-04-28 Mark Probst <mark.probst@gmail.com>
5106 * mini.h, mini.c: Lots of code for accessing the old RGCTX
5107 deleted. The only way to access the new RGCTX is via the
5110 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
5111 vtable instead of the RGCTX to static methods.
5113 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
5114 accessing the new RGCTX.
5116 * generic-sharing.c: There is no separation between self, type
5117 arguments and other types in the RGCTX anymore.
5119 2008-04-25 Jonathan Chambers <joncham@gmail.com>
5121 * mini-amd64.c (add_general): Remove previous stack adjustment.
5122 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
5123 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
5124 for 32 bytes of stack space reserved for all calls.
5126 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
5127 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
5130 Code contributed under MIT/X11 license.
5132 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
5134 * mini.c (mini_method_verify): Only verify non-inflated methods, check
5135 against the root definition, peeling out method and type instantiations.
5136 Cache verify success results, code that fails verification is still
5137 checked multiple times.
5139 2008-04-23 Zoltan Varga <vargaz@gmail.com>
5141 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
5143 2008-04-23 Jonathan Chambers <joncham@gmail.com>
5145 * mini-amd64.c (add_general): Always increment stack on Win64.
5146 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
5149 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
5150 stack based argument handling on Win64.
5152 Code contributed under MIT/X11 license.
5154 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
5156 * Makefile.am (version.h): Add support for git-svn.
5158 2008-04-22 Zoltan Varga <vargaz@gmail.com>
5160 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
5161 so instead of calling g_spawn_command_line_sync, we do everything by hand,
5162 avoiding allocations and libc functions which might deadlock.
5164 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
5165 'no-gdb-backtrace' option is set.
5167 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
5169 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
5171 2008-04-21 Martin Baulig <martin@ximian.com>
5173 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
5174 and `get_lmf_addr'; `notification_address' is no longer a pointer.
5176 2008-04-21 Martin Baulig <martin@ximian.com>
5178 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
5179 `thread_vtable', `event_handler_ptr' and `event_handler'.
5181 2008-04-21 Martin Baulig <martin@ximian.com>
5183 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
5184 allows delayed initialization of the `executable_code_buffer' when
5187 2008-04-21 Martin Baulig <martin@ximian.com>
5189 * mini.h (mono_debugger_create_notification_function): Removed.
5190 * tramp-*.c (mono_debugger_create_notification_function): Removed.
5192 * mdb-debug-info64.s
5193 (MONO_DEBUGGER__notification_function): Added this in the .text section.
5195 * mdb-debug-info32.s
5196 (MONO_DEBUGGER__notification_function): Added this in the .text section.
5198 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
5199 currently only works on x86 and x86_64, so don't create it on ppc.
5201 2008-04-21 Martin Baulig <martin@ximian.com>
5203 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
5206 (mini_method_compile): In the fp elimination check, check
5207 `debug_options.mdb_optimizations' in addition to
5208 mono_debug_using_mono_debugger().
5210 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
5211 disable some JIT optimizations which are only disabled when
5212 running inside the debugger.
5213 Added `--help-debug' option to describe the debugging options.
5214 (parse_debug_options): New static function to parse the `--debug'
5215 options, so we can easily add more stuff in future.
5217 2008-04-20 Zoltan Varga <vargaz@gmail.com>
5219 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
5220 the method has no body.
5222 2008-04-19 Jonathan Chambers <joncham@gmail.com>
5224 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
5225 assembly is not allowed in MSVC 64-bit compiler.
5226 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
5227 as we get floating point exceptions everywhere.
5229 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
5230 correctly align arguments for call to throw_exception.
5231 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
5233 Code contributed under MIT/X11 license.
5235 2008-04-19 Zoltan Varga <vargaz@gmail.com>
5237 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
5239 2008-04-17 Zoltan Varga <vargaz@gmail.com>
5241 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
5243 * mini-amd64.c (NEW_INS): Set cil_code.
5245 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
5246 from mini-amd64.c so all debugger related logic is in one place.
5248 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
5249 later won't have a random ip assigned to them.
5251 2008-04-16 Zoltan Varga <vargaz@gmail.com>
5253 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
5254 the arch specific function initializes code_size.
5255 (mono_create_delegate_trampoline): Ditto.
5257 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
5258 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
5261 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
5262 running under the debugger.
5264 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
5267 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
5268 debugger. Also move the disabling of optimizations here from driver.c.
5269 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
5272 * mini.h (MonoCompile): Add a few new flags.
5274 2008-04-15 Zoltan Varga <vargaz@gmail.com>
5276 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
5277 so the cil_code field of created MonoInst's is properly set.
5278 (mini_select_instructions): Ditto.
5280 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
5281 (MONO_INST_NEW_CALL): Ditto.
5283 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
5284 in many places so the ins->cil_code field is properly initialized.
5286 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
5289 2008-04-14 Zoltan Varga <vargaz@gmail.com>
5291 * mini.c (mini_method_compile): Print a different message when compiling a
5294 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
5297 2008-04-11 Zoltan Varga <vargaz@gmail.com>
5299 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
5302 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
5304 2008-04-11 Zoltan Varga <vargaz@gmail.com>
5306 * mini.c (handle_stack_args): Make this return void since its return value was
5307 never used. Also set cfg->unverifiable for invalid IL instead of calling
5310 2008-04-10 Mark Probst <mark.probst@gmail.com>
5312 * mini.c: Make sure "this" is live in catch clauses with type
5313 variables in shared generic code.
5315 2008-04-08 Mark Probst <mark.probst@gmail.com>
5317 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
5318 generic_class_is_reference_type() to ensure the proper behaviour
5319 when sharing generic code and the type in question is a type
5322 2008-04-08 Zoltan Varga <vargaz@gmail.com>
5324 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
5325 race conditions when printing thread dumps. Fixes #377738.
5327 2008-04-08 Massimiliano Mantione <massi@ximian.com>
5329 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
5330 shows up when both MonoInst arguments can cause aliasig.
5331 There is likely no way in the current JIT to trigger this problem, but
5332 it showed up in the development of generics sharing, when in a new
5333 opcode both args of an OP_GROUP can be aliases (addresses of a local).
5334 When the generics sharing code will be committed, its tests will be
5335 valid also for this bug.
5337 2008-04-08 Zoltan Varga <vargaz@gmail.com>
5339 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
5342 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
5345 2008-04-07 Zoltan Varga <vargaz@gmail.com>
5347 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
5348 use a more detailed exception message for InvalidCastException.
5350 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
5352 * driver.c (mono_main): Add --debug=casts option to turn on better
5353 InvalidCastException message details.
5355 * mini.c (mini_get_debug_options): New helper function to return the address of
5356 the debug_options variable.
5358 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
5359 the jit_tls TLS variable.
5361 * mini.c (mono_jit_tls): New TLS variable.
5363 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
5366 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
5368 * mini.h: Removed verifer related stuff. This code was moved to verify.c
5370 * mini.c: Removed verifer related stuff, code moved to verify.c.
5372 * driver.c: Using code from verify.c instead of mini.c.
5374 2008-04-05 Zoltan Varga <vargaz@gmail.com>
5376 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
5379 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
5381 * mini.c (check_for_method_verify): Enabling verification of
5382 corlib if mono_verify_all is set. Bugs in the verifier preventing that
5385 2008-04-04 Zoltan Varga <vargaz@gmail.com>
5387 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
5388 caller saved registers as well.
5390 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
5391 saved registers as well.
5393 2008-03-30 Zoltan Varga <vargaz@gmail.com>
5395 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
5397 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
5400 2008-03-27 Zoltan Varga <vargaz@gmail.com>
5402 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
5404 (get_call_info): Take a gsctx argument instead of 'cfg'.
5406 2008-03-26 Zoltan Varga <vargaz@gmail.com>
5408 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
5409 mono_verify_all is set.
5411 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
5413 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
5415 2008-03-25 Zoltan Varga <vargaz@gmail.com>
5417 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
5420 * driver.c mini.c mini.h: Add a --verify-all development option to test the
5421 verifier and the code generated by the compiler.
5423 2008-03-25 Mark Probst <mark.probst@gmail.com>
5425 * mini.c: Generic sharing of the non-nullable case of the box
5428 2008-03-24 Zoltan Varga <vargaz@gmail.com>
5430 * inssel.brg: Fix the build.
5432 * iltests.il.in: Add a test for lconv.ovf.u8.un.
5434 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
5436 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
5437 Array:Address. Fixes #372410.
5439 * iltests.il.in: New tests for readonly prefix.
5441 2008-03-23 Zoltan Varga <vargaz@gmail.com>
5443 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
5446 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
5449 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
5451 * mini.c (mono_decompose_op_imm): New helper function.
5453 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
5454 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5457 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
5458 mono_arch_output_basic_block. Fix warnings.
5460 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
5463 2008-03-22 Zoltan Varga <vargaz@gmail.com>
5465 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
5466 since the extra frame is now detected automatically inside the loop.
5468 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
5469 opts which are now in mono_peephole_ins ().
5471 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
5473 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
5474 frames and skip duplicate managed-to-native frames. Fixes #367665.
5476 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5477 opts which are now in mono_peephole_ins ().
5478 (mono_arch_peephole_pass_2): Ditto.
5480 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
5482 * mini-codegen.c (mono_peephole_ins): New helper function containing the
5483 arch independent peephole optimizations.
5485 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
5486 opts which are now in mono_peephole_ins ().
5488 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
5490 * mini-s390.c (mono_arch_output_basic_block): Fix build.
5492 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
5495 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
5496 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
5499 2008-03-21 Zoltan Varga <vargaz@gmail.com>
5501 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
5502 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
5505 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
5506 mono_arch_output_basic_block. Fix warnings.
5508 2008-03-20 Zoltan Varga <vargaz@gmail.com>
5510 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
5513 2008-03-20 Zoltan Varga <vargaz@gmail.com>
5515 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
5518 * iltests.il: Add new tests.
5520 2008-03-20 KornĂ©l PĂ¡l <kornelpal@gmail.com>
5522 * mini.c: Removed Windows version macros.
5524 2008-03-20 Mark Probst <mark.probst@gmail.com>
5526 * generic-sharing.c: Put reflection types in the extensible part
5527 of the runtime generic context.
5529 * mini.c: Generic sharing of the GetTypeHandle special case of the
5530 ldtoken instruction.
5532 2008-03-20 Zoltan Varga <vargaz@gmail.com>
5534 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
5536 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
5538 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
5539 consistency with the other version on the linear IR branch.
5541 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
5543 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
5545 * iltests.il.in: Add new tests.
5547 2008-03-19 Zoltan Varga <vargaz@gmail.com>
5549 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
5551 * iltests.il.in: Add new tests.
5553 2008-03-19 Mark Probst <mark.probst@gmail.com>
5555 * mini.c: Two variables with the same name were declared in
5556 nesting contexts and one wasn't initialized. Fixed.
5558 2008-03-19 Mark Probst <mark.probst@gmail.com>
5560 * mini.c: Generic sharing of the initobj instruction.
5562 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
5564 * mini.c: make the test to optimize ldtoken from typeof() more
5567 2008-03-18 Mark Probst <mark.probst@gmail.com>
5569 * mini.c: Generic sharing of the initobj instruction for reference
5572 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
5574 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
5575 the mono_breakpoint_clean_code() code to perform bound checks.
5577 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
5579 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
5580 mono_arch_patch_callsite() to include the start of the managed method
5581 to be able to perform bound checks.
5583 2008-03-17 Mark Probst <mark.probst@gmail.com>
5585 * mini.c: Generic sharing for the isinst instruction.
5587 2008-03-17 Mark Probst <mark.probst@gmail.com>
5589 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
5590 inssel-long32-mips.brg: Added opcodes for doing indirect calls
5591 with the runtime generic context argument.
5593 * mini.c: Share calls to several types of unsharable methods by
5594 putting the address of the method code in the runtime generic
5595 context and doing an indirect call.
5597 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
5600 2008-03-16 Mark Probst <mark.probst@gmail.com>
5602 * generic-sharing.c: Change due to a change in the runtime genric
5605 2008-03-15 Martin Baulig <martin@ximian.com>
5608 (mono_arch_nullify_class_init_trampoline): Add call to
5609 mono_breakpoint_clean_code() to make things work when running
5610 inside the debugger.
5613 (mono_arch_nullify_class_init_trampoline): Add call to
5614 mono_breakpoint_clean_code() to make things work when running
5615 inside the debugger.
5617 2008-03-14 Zoltan Varga <vargaz@gmail.com>
5619 * inssel-long.brg (reg): Fix 64 bit build.
5621 2008-03-14 Mark Probst <mark.probst@gmail.com>
5623 * mini.c, mini.h: Share static generic code by passing it an
5624 implicit argument pointing to the runtime generic context.
5626 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
5627 inssel-long32-mips.brg: New opcodes for calling shared static,
5628 which need to be passed the runtime generic context.
5630 * mini-amd64.c, mini-x86.c: Save the runtime generic context
5631 argument on the stack in the prologue if needed. New function for
5632 finding the runtime generic context argument from the registers
5633 saved by the trampoline.
5635 * mini-amd64.h, mini-x86.h: Specify which register to use for the
5636 runtime generic context argument.
5638 * tramp-amd64.c: Also restore the register used for the runtime
5639 generic context argument.
5641 * mini-trampoline.c: Resolve shared static calls by consulting the
5642 runtime generic context via the new argument.
5644 * generic-sharing.c: Add an argument to sharability-checking
5645 functions that specifies whether type variables should be treated
5646 as sharable type arguments.
5648 * inssel-x86.brg: Removed a superfluous, buggy rule.
5650 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
5653 2008-03-14 Martin Baulig <martin@ximian.com>
5655 * debug-debugger.c (main_thread_handler): Call
5656 mono_runtime_run_main() without sending any notifications.
5658 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
5660 2008-03-14 Zoltan Varga <vargaz@gmail.com>
5662 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
5664 2008-03-14 Mark Probst <mark.probst@gmail.com>
5666 * tramp-x86.c: Fixed register restore offsets in the trampoline
5667 code for ECX and EDX.
5669 2008-03-12 Geoff Norton <gnorton@novell.com>
5671 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
5672 different ucontext_t implementations.
5673 * exceptions-arm.c: Use the above defines to get exceptions working on
5674 iPhone (based on a patch by Luke Howard lukeh@padl.com)
5675 * mini-arm.c: Implement iPhone icache support (based on a patch by
5676 Luke Howard lukeh@padl.com)
5678 2008-03-12 Mark Probst <mark.probst@gmail.com>
5680 * mini.c: Enable generic sharing of calls to non-static
5681 non-interface non-generic non-value-type methods.
5683 * mini-trampolines.c: Resolve calls from shared generic code.
5685 2008-03-11 Zoltan Varga <vargaz@gmail.com>
5687 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
5689 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
5691 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
5693 * mini.c: some fixes for the AOT compiler.
5695 2008-03-07 Zoltan Varga <vargaz@gmail.com>
5697 * cpu-amd64.md: Add clob:1 to some float opcodes.
5699 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
5701 * mini.h: Added MiniVerifierMode enumeration.
5703 * mini.c: Added mini_verifier_set_mode to control
5704 the usage of the new verifier.
5706 * mini.c (mono_method): Integrated the new verifier.
5708 * driver.c: Extended --security option with validil and
5709 verifiable options to activate the new verifier.
5711 2008-03-07 Zoltan Varga <vargaz@gmail.com>
5713 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
5714 optimization to ctors taking 0 or 2 arguments too.
5716 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
5719 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
5721 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
5723 2008-03-06 Zoltan Varga <vargaz@gmail.com>
5725 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
5726 non-aot case as well.
5728 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
5730 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
5733 * aot-compiler.c (encode_patch): Ditto.
5735 * mini.h (G_MININT32): Fix the definition of this.
5737 2008-03-05 Zoltan Varga <vargaz@gmail.com>
5739 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
5741 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
5743 2008-03-04 Zoltan Varga <vargaz@gmail.com>
5745 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
5746 methods returning vtypes in registers.
5747 (mono_arch_allocate_vars): Ditto.
5749 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
5751 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
5753 * generics.cs: Add a test from the linear IR branch.
5755 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
5757 * mini.c (inline_method): Cache failed inline attempts.
5759 2008-03-04 Mark Probst <mark.probst@gmail.com>
5761 * mini.c: For shared methods of generic classes put the location
5762 of "this" into the MonoGenericJitInfo.
5764 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
5765 register out of a MonoContext by register number. Add the generic
5766 sharing context as an argument to mono_arch_find_this_argument().
5768 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
5769 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
5770 for new arch function.
5772 * mini-exception.c: Handle open exception clauses in shared
5775 * mini-trampolines.c: Supply additional argument to
5776 mono_arch_find_this_argument().
5778 2008-03-04 Zoltan Varga <vargaz@gmail.com>
5780 * Makefile.am (regtests): Run the bench.exe tests last.
5782 2008-03-03 Zoltan Varga <vargaz@gmail.com>
5784 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
5787 2008-03-02 Zoltan Varga <vargaz@gmail.com>
5789 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
5792 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
5794 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
5796 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
5797 whose class has no cctor.
5799 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
5801 2008-03-01 Zoltan Varga <vargaz@gmail.com>
5803 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
5806 2008-02-29 Zoltan Varga <vargaz@gmail.com>
5808 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
5809 to be in sync with the code on the linear IR branch.
5811 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
5813 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
5815 2008-02-27 Zoltan Varga <vargaz@gmail.com>
5817 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
5819 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
5821 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
5823 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
5825 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
5827 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
5830 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
5832 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
5833 OP_LOADR4_MEMBASE emission.
5835 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
5836 (mono_spillvar_offset_float): Ditto.
5838 * mini-mips.c (mono_arch_emit_prolog): Ditto.
5840 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
5843 * basic-long.cs: Add regression tests for them.
5845 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
5847 (mono_arch_allocate_vars): Fix representation of single-precision float
5849 (mono_arch_output_basic_block): Ditto.
5851 * inssel-mips.brg: Ditto, remove duplicate items.
5853 * mini-mips.c (emit_load_volatile_arguments): New function to handle
5854 arguments of tail calls as on other platforms.
5855 (mono_arch_output_basic_block): Handle tail calls.
5857 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
5860 * objects.cs (test_5_pass_static_struct): Add test for it.
5862 Contributed under MIT/X11 license.
5864 2008-02-26 Zoltan Varga <vargaz@gmail.com>
5866 * Makefile.am: Use gmcs for compiling the regression tests.
5868 * *.2.cs *.2.il: Rename to *.cs and *.il.
5870 2008-02-24 Zoltan Varga <vargaz@gmail.com>
5872 * regalloc.h: Make the vassign array smaller.
5874 * mini.c (mini_method_compile): Remove an unused field in cfg.
5876 * mini-codegen.c: Add a bunch of micro optimizations.
5878 2008-02-23 Zoltan Varga <vargaz@gmail.com>
5880 * regalloc.h: Remove some unused fields.
5882 2008-02-22 Zoltan Varga <vargaz@gmail.com>
5884 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
5886 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
5888 2008-02-22 Mark Probst <mark.probst@gmail.com>
5890 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
5892 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
5893 trampoline: Fetch an entry from the runtime generic context. If
5894 it's NULL, jump to the actual trampoline to fill the runtime
5895 generic context. Otherwise, return it.
5897 * mini.c: Call the lazy fetch trampoline to get entries out of the
5898 runtime generic context.
5900 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
5901 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
5902 tramp-sparc.c: Stubs for the lazy fetch trampoline.
5904 2008-02-21 Mark Probst <mark.probst@gmail.com>
5906 * mini.c: Fetch data out of the extensible part of the runtime
5907 generic context instead of calling a helper function.
5909 * generic-sharing.c: Some functions moved into
5910 metadata/generic-sharing.c. Helper function for fetching other
5911 types now checks and asserts against extensible rgctx (just for
5912 debugging purposes - the helper function isn't called anymore
5913 unless for debugging).
5915 2008-02-21 Zoltan Varga <vargaz@gmail.com>
5917 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
5918 for tail calls up to the point that the tests in iltests.exe run. Also add a
5919 dummy CKFINITE implementation.
5920 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
5921 needed for trampoline LMF frames.
5923 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
5924 trampoline LMF frames.
5926 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
5928 * mini.c (inline_method): clean any pending loader error when inlining fail.
5929 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
5931 2008-02-21 Zoltan Varga <vargaz@gmail.com>
5933 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
5935 * aot-runtime.c (decode_patch_info): Ditto.
5937 * mini.c (mono_resolve_patch_target): Ditto.
5939 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
5942 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
5944 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
5945 if it references an icall address.
5947 2008-02-20 Zoltan Varga <vargaz@gmail.com>
5949 * cpu-s390x.md: Remove some more unused opcodes.
5951 * cpu-s390x.md: Remove some unused opcodes.
5953 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
5954 mono_op_imm_to_op ().
5956 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
5957 instead of a switch statement.
5959 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
5960 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
5962 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
5964 * mini-codegen.c: Remove unused mono_regstate2_... functions.
5966 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
5969 2008-02-19 Zoltan Varga <vargaz@gmail.com>
5971 * driver.c (mono_main): Improve error reporting when an assembly cannot be
5972 opened. Fixes #362607.
5974 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
5976 * iltests.il.in: Add a test for static methods in interfaces.
5978 2008-02-18 Zoltan Varga <vargaz@gmail.com>
5980 * genmdesc.c (build_table): Fix a crash on older glib versions.
5982 * cpu-sparc.md: Remove some unused opcodes.
5984 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
5985 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
5987 * cpu-amd64.md: Remove some unused opcodes.
5989 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
5990 like the other opcodes.
5992 2008-02-17 Zoltan Varga <vargaz@gmail.com>
5994 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
5996 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
5998 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
5999 variables 'cfg' instead of 'm' for consistency.
6001 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
6003 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
6004 argument holding the vtype return address, to avoid the ambigious use of
6005 cfg->ret for this purpose.
6007 * mini.c (NEW_RETLOADA): Use vret_addr if set.
6009 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
6011 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
6012 new mono_print_ins () function which only takes one argument.
6014 2008-02-15 Zoltan Varga <vargaz@gmail.com>
6016 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
6019 2008-02-14 Zoltan Varga <vargaz@gmail.com>
6021 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
6023 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
6025 * mini-x86.c: Sync with the version on the linear IR branch by adding new
6026 opcodes and other small changes.
6028 * mini-ops.h: Add some new opcodes from the linear IR branch.
6030 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
6032 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
6033 opcodes, use the REG_MEMBASE opcodes instead.
6035 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
6036 opcodes, use the REG_MEMBASE opcodes instead.
6038 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
6041 * mini.c (mono_op_imm_to_op): New helper function.
6043 * mini-ops.h: Add some opcodes from linear IR branch.
6045 2008-02-13 Zoltan Varga <vargaz@gmail.com>
6047 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
6050 2008-02-12 Zoltan Varga <vargaz@gmail.com>
6052 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
6055 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
6057 2008-02-09 Zoltan Varga <vargaz@gmail.com>
6059 * aot-compiler.c (emit_method_code): Add an assert.
6061 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
6062 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
6065 2008-02-08 Zoltan Varga <vargaz@gmail.com>
6067 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
6068 some load/store opcodes so they are consistent.
6069 (mono_arch_emit_prolog): Simplify some code.
6071 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
6073 * objects.cs: Add tests for large argument offsets on ARM.
6075 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
6076 stack offsets. Fixes #359651.
6078 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
6080 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
6082 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
6084 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
6086 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
6088 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
6089 rid of CEE_CONV_R_UN.
6091 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
6093 2008-02-07 Zoltan Varga <vargaz@gmail.com>
6095 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
6097 * mini.c (mono_normalize_opcodes): Add some more opcodes.
6099 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
6101 * cpu-amd64.md: Remove some unused opcodes.
6103 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
6105 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
6107 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
6108 arch specific functions for its parts. Call the peephole pass after local
6109 regalloc so the prolog can compute a more accurate max_offset.
6111 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
6112 the corresponding OP_I/OP_L opcodes.
6114 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
6116 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
6118 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6120 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
6121 as they are handled in mini.c.
6123 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
6125 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
6126 case since it is handled in mini.c.
6128 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
6130 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
6132 * *.c: Use the new opcodes in the IR and back end code.
6134 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
6136 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
6138 2008-02-06 Mark Probst <mark.probst@gmail.com>
6140 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
6141 an assert because it has a race condition.
6143 2008-02-06 Zoltan Varga <vargaz@gmail.com>
6145 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
6147 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
6149 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
6151 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
6152 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
6154 2008-02-05 Zoltan Varga <vargaz@gmail.com>
6156 * cpu-amd64.md (move): Correct the maximum size of move.
6158 2008-02-05 Mark Probst <mark.probst@gmail.com>
6160 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
6161 the generic class init trampoline to return quickly if the class
6164 2008-02-04 Zoltan Varga <vargaz@gmail.com>
6166 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
6167 issues where an 32 bit callsite cannot be patched by a 64 bit address.
6169 2008-02-03 Zoltan Varga <vargaz@gmail.com>
6171 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
6174 2008-01-31 Zoltan Varga <vargaz@gmail.com>
6176 * objects.cs: Add some soft-float tests.
6178 * mini.c: Fix a couple more soft-float issues.
6180 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
6182 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
6185 2008-01-30 Zoltan Varga <vargaz@gmail.com>
6187 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
6188 exception happens while compiling a virtual method.
6190 2008-01-29 Zoltan Varga <vargaz@gmail.com>
6192 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
6194 * mini-sparc.c: Fix build.
6196 * mini-sparc.c (get_call_info): Add support for generic sharing.
6198 * mini-exceptions.c: Add a FIXME.
6200 2008-01-27 Zoltan Varga <vargaz@gmail.com>
6202 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
6203 altstack handling code.
6205 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
6207 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
6209 * mini-s390.c: Add support for generic sharing.
6211 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
6213 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6215 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
6217 * mini-s390x.c: Add support for generic sharing.
6219 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
6221 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6223 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
6224 can be used since it takes a 16 bit signed immediate.
6226 * inssel-s390x.brg: Fix OP_SETRET.
6228 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
6230 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
6232 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
6234 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
6236 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
6239 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
6242 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
6243 of the unused mono_arch_patch_delegate_trampoline stuff.
6245 2008-01-26 Zoltan Varga <vargaz@gmail.com>
6247 * basic-long.cs: Move the fp related tests to basic-float.cs.
6249 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
6251 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
6253 * basic-calls.cs: Add a test for proper float argument passing.
6255 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
6256 if the context corresponds to an exception received through a signal.
6258 * exceptions.cs: Add a test for nullref handling at the start of a try
6261 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
6263 * jit-icalls.c (mono_break): New JIT icall.
6265 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
6267 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
6269 2008-01-25 Zoltan Varga <vargaz@gmail.com>
6271 * cpu-*.md: Get rid of unused opcodes.
6273 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
6275 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
6278 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
6281 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
6282 the arch independent trampoline code in mini-trampolines.c.
6284 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
6286 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
6288 * mini-s390.h: Remove an unused define.
6290 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
6291 the arch independent trampoline code in mini-trampolines.c.
6293 * mini-arm.c (mono_arch_emit_prolog): Fix build.
6295 2008-01-24 Zoltan Varga <vargaz@gmail.com>
6297 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
6299 * mini-s390.c (mono_arch_emit_prolog): Fix build.
6301 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
6303 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
6305 * cpu-amd64.md: Use smaller sizes for int opcodes.
6307 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
6309 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
6312 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
6315 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
6316 instead of though a pointer to save an indirection when accessing elements of
6319 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
6321 (NOT_IMPLEMENTED): New helper macro.
6322 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
6325 * *.c: Use the new helper macro.
6327 2008-01-21 Zoltan Varga <vargaz@gmail.com>
6329 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
6331 2008-01-20 Zoltan Varga <vargaz@gmail.com>
6333 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
6336 2008-01-18 Zoltan Varga <vargaz@gmail.com>
6338 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
6339 profiling is enabled.
6341 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
6343 (mono_arch_emit_prolog): Add more first bblock optimizations.
6345 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
6346 in order if possible.
6347 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
6348 bblock, since the arguments are still in their original registers.
6350 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
6352 2008-01-17 Zoltan Varga <vargaz@gmail.com>
6354 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
6357 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
6360 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
6362 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
6363 process async exceptions received while in unmanaged code.
6365 * mini.c (mini_init): Install a callback with the runtime which will be called
6366 when a thread receives an async exception while in unmanaged code.
6368 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
6370 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
6372 2008-01-16 Wade Berrier <wberrier@novell.com>
6379 2008-01-16 Zoltan Varga <vargaz@gmail.com>
6381 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
6382 compilation with sun cc.
6384 * cpu-*.md: Fix the build.
6386 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
6388 * mini-amd64.h: Add some comments to the MonoLMF structure.
6390 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
6392 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
6393 in the LMF structure if possible. This saves two instructions in the
6394 managed->native wrappers.
6396 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
6398 2008-01-16 Mark Probst <mark.probst@gmail.com>
6400 * generic-sharing.c: New type argument lookup code which uses the
6401 runtime generic context template.
6403 2008-01-15 Zoltan Varga <vargaz@gmail.com>
6405 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
6407 * mini-arm.c (add_general): Fix arm eabi parameter passing.
6408 (mono_arch_output_basic_block): Fix localloc implementation.
6410 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
6412 * mini-ia64.c (peephole_pass): Fix ia64 build.
6414 * mini-amd64.c (peephole_pass): Fix a warning.
6416 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
6417 at a constant offset from sp/fp.
6419 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
6420 instead of obtaining it from *lmf in the managed method case.
6422 2008-01-14 Zoltan Varga <vargaz@gmail.com>
6424 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
6426 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
6428 * mini.h (MonoInstList): New type.
6429 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
6430 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
6431 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
6432 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
6433 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
6434 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
6435 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
6436 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
6437 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
6438 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
6439 MONO_INST_LIST_FOR_EACH_ENTRY,
6440 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
6441 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
6442 mono_inst_list_first, mono_inst_list_last,
6443 mono_inst_list_next, mono_inst_list_prev): New instruction
6444 list handling interfaces.
6445 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
6446 list head 'ins_list'.
6447 (MonoInst): Replace next pointer with list head 'node'.
6448 (MonoCallInst): Make 'out_args' a MonoInstList.
6449 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
6450 (MonoCompile): Delete reverse_inst_list and
6451 reverse_inst_list_len.
6452 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
6453 mono_arch_lowering_pass, mono_arch_local_regalloc,
6454 mono_arch_output_basic_block, mono_arch_emit_prolog):
6455 Convert to new instruction lists.
6456 (insert_after_ins): Delete.
6457 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
6459 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
6460 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
6461 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
6462 mono_emulate_opcode, mono_emit_load_got_addr,
6463 inline_method, mono_method_to_ir, mono_print_bb_code,
6464 print_dfn, decompose_pass, nullify_basic_block,
6465 replace_out_block_in_code, remove_block_if_useless,
6466 merge_basic_blocks, move_basic_block_to_end,
6467 try_unsigned_compare, optimize_branches, mono_print_code,
6468 mini_select_instructions, remove_critical_edges): Likewise.
6469 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
6470 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
6471 mono_arch_output_basic_block, mono_arch_emit_prolog):
6473 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
6474 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6475 mono_arch_output_basic_block): Likewise.
6476 (inst_list_prepend, insert_after_ins): Delete.
6477 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
6478 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
6480 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
6481 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
6482 mono_arch_emit_prolog): Likewise.
6483 * cfold.c (mono_constant_fold): Likewise.
6484 * liveness.c (visit_bb, mono_analyze_liveness,
6485 optimize_initlocals): Likewise.
6486 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
6487 * graph.c (mono_draw_code_cfg): Likewise.
6488 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
6489 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
6490 mono_ssa_cprop): Likewise.
6491 * abcremoval (get_relations_from_previous_bb, process_block):
6493 * local-propagation (mono_cprop_invalidate_values,
6494 mono_local_cprop_bb): Likewise.
6495 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
6496 peephole_pass, mono_arch_output_basic_block,
6497 mono_arch_emit_prolog): Likewise.
6498 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
6499 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6500 mono_arch_emit_prolog): Likewise.
6501 (insert_after_ins): Delete.
6502 * aliasing.c (print_code_with_aliasing_information,
6503 mono_build_aliasing_information, mono_aliasing_deadce):
6504 Convert to new instruction lists.
6505 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
6506 peephole_pass, NEW_INS, mono_arch_lowering_pass,
6507 mono_arch_local_regalloc, mono_arch_output_basic_block):
6509 (insert_after_ins): Delete.
6510 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
6511 peephole_pass, mono_arch_output_basic_block): Convert to
6512 new instruction lists.
6513 * mini-codegen (InstList, inst_list_prepend,
6514 insert_after_ins): Delete.
6515 (insert_before_ins, get_register_force_spilling,
6516 get_register_spilling, free_up_ireg, free_up_reg,
6517 create_copy_ins, create_spilled_store, alloc_int_reg,
6518 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
6519 to new instruction lists.
6520 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
6521 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
6522 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
6523 (insert_after_ins): Delete.
6524 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
6525 mono_arch_local_regalloc, mono_arch_output_basic_block,
6526 mono_arch_call_opcode): Convert to new instruction lists.
6527 (insert_after_ins): Delete.
6528 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
6529 peephole_pass, mono_arch_output_basic_block,
6530 mono_arch_emit_prolog): Convert to new instruction lists.
6532 2008-01-11 Zoltan Varga <vargaz@gmail.com>
6534 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
6536 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
6539 * Makefile.am (version.h): Make this work with non-bash shells.
6541 2008-01-10 Zoltan Varga <vargaz@gmail.com>
6543 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
6545 2008-01-08 Zoltan Varga <vargaz@gmail.com>
6547 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
6548 the InitializeArray optimization.
6550 2008-01-06 Zoltan Varga <vargaz@gmail.com>
6552 * mini.c driver.c: Don't include os/gc_wrapper.h.
6554 2008-01-05 Zoltan Varga <vargaz@gmail.com>
6556 * mini.c (print_jit_stats): Print GC statistics if available.
6558 2008-01-04 Zoltan Varga <vargaz@gmail.com>
6560 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
6562 2007-12-29 Zoltan Varga <vargaz@gmail.com>
6564 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
6566 2007-12-26 Zoltan Varga <vargaz@gmail.com>
6568 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
6570 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
6572 * driver.c (mono_main): Ditto.
6574 2007-12-23 Zoltan Varga <vargaz@gmail.com>
6576 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
6578 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
6579 in the vtable can't be encoded.
6580 (compile_method): Ditto.
6582 2007-12-21 Zoltan Varga <vargaz@gmail.com>
6584 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
6587 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
6590 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
6591 the top LMF entry belongs to the current method.
6593 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
6595 2007-12-20 Zoltan Varga <vargaz@gmail.com>
6597 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
6599 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
6601 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
6603 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
6605 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
6607 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
6610 * basic-float.cs: Add an ulong->double cast test.
6612 2007-12-15 Zoltan Varga <vargaz@gmail.com>
6614 * mini.c (mono_method_to_ir): Fix a warning.
6616 2007-12-14 Zoltan Varga <vargaz@gmail.com>
6618 * mini-ops.h: Add OP_SWITCH.
6620 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
6621 CEE_SWITCH in back-end code, use OP_SWITCH instead.
6623 2007-12-11 Geoff Norton <gnorton@novell.com>
6625 * mini-s390x.c: Minor change to the MAX() define to allow
6626 it to compile with other gcc versions.
6628 2007-12-11 Geoff Norton <gnorton@novell.com>
6631 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
6633 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
6635 exceptions-arm.c (mono_arch_get_restore_context): Restore
6638 exceptions-arm.c (throw_exception): Save the frame pointer.
6639 This is a partial fix for #323747. Only the client side is
6642 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
6644 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
6645 was using an unrelated variable to log the class which
6646 needed the cctor to be called. This was crashing on arm.
6648 2007-12-09 Robert Jordan <robertj@gmx.net>
6650 * mini-x86.c (mono_arch_emit_epilog):
6651 Consider all kinds of 64-bit types. Fixes #323114.
6653 2007-12-08 Zoltan Varga <vargaz@gmail.com>
6655 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
6657 2007-12-07 Zoltan Varga <vargaz@gmail.com>
6659 * mini-amd64.c (peephole_pass): Add a missing instruction check.
6661 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6663 * mini.c: run type ctor before allocating an object, not only
6664 when running it's constructor method (fixes at least part of bug #342507).
6666 2007-12-07 Zoltan Varga <vargaz@gmail.com>
6668 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
6670 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
6671 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
6674 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
6675 mono_generic_class_init_trampoline () the same as it is done with the other
6678 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
6679 aot-runtime.c aot-compiler.c: Implement AOT support.
6681 2007-12-07 Mark Probst <mark.probst@gmail.com>
6683 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
6684 build for archs which don't have the vtable trampoline defined
6687 2007-12-07 Zoltan Varga <vargaz@gmail.com>
6689 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
6691 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
6693 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
6695 * tramp-<ARCH>.c: Use the new helper function.
6697 2007-12-07 Mark Probst <mark.probst@gmail.com>
6699 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
6700 trampoline call, which takes a vtable argument.
6702 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
6703 OP_TRAMPCALL_VTABLEs like other calls.
6705 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
6706 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
6707 call. Implemented a support function which fetches the vtable
6708 from a register set.
6710 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
6711 Implemented a generic class init trampoline, using the
6712 OP_TRAMPCALL_VTABLE opcode.
6714 * mini.c: Implemented static field access when sharing generic
6715 code. This implies initing the class using the new
6716 OP_TRAMPCALL_VTABLE call.
6718 2007-12-07 Mark Probst <mark.probst@gmail.com>
6720 * mini.c: Don't compile methods with sharing enabled if their
6721 classes are disabled for sharing.
6723 2007-12-06 Zoltan Varga <vargaz@gmail.com>
6725 * inssel.brg: Add a missing sign extension to the GETCHR and array access
6726 opcodes. Fixes #346563.
6728 * objects.cs: Add a new test.
6730 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
6732 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
6733 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
6735 2007-12-06 Zoltan Varga <vargaz@gmail.com>
6737 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
6739 2007-12-03 Zoltan Varga <vargaz@gmail.com>
6741 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
6744 2007-12-02 Zoltan Varga <vargaz@gmail.com>
6746 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
6748 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
6749 optimization in the AOT case.
6751 2007-11-30 Zoltan Varga <vargaz@gmail.com>
6753 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
6755 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
6757 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
6759 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
6761 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
6762 is created by the inlined delegate ctor.
6764 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
6766 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
6768 2007-11-29 Zoltan Varga <vargaz@gmail.com>
6770 * cpu-x86.md: Fix the length of ckfinite.
6772 2007-11-28 Zoltan Varga <vargaz@gmail.com>
6774 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
6776 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
6777 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
6779 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
6781 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
6782 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
6784 2007-11-28 Martin Baulig <martin@ximian.com>
6787 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
6788 after creating the trampoline.
6790 2007-11-27 Zoltan Varga <vargaz@gmail.com>
6792 * aot-runtime.c (load_aot_module): Check runtime version if needed.
6794 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
6797 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
6798 instead of the calling method to help AOT.
6800 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
6802 2007-11-26 Zoltan Varga <vargaz@gmail.com>
6804 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
6807 2007-11-23 Zoltan Varga <vargaz@gmail.com>
6809 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
6811 * aot-compiler.c (compile_method): Correct check for generic method definitions.
6812 (encode_method_ref): No need to handle generic method definitions specially.
6814 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
6816 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
6819 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
6821 (compile_method): Enable generic sharing.
6823 2007-11-22 Zoltan Varga <vargaz@gmail.com>
6825 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
6826 (mini_method_compile): Add preliminary support for AOTing shared generic code.
6828 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
6831 * mini-trampolines.c: Fix a warning.
6833 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
6835 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
6836 (generic_class_is_reference_type): Remove unused function.
6838 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
6839 in the generic vtable trampoline case.
6841 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
6843 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
6844 return an AOT method based on a vtable slot.
6846 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
6848 * mini.c (mini_get_vtable_trampoline): Export this.
6850 2007-11-22 Martin Baulig <martin@ximian.com>
6853 (MonoDebuggerInfo): Move `debugger_version' up.
6855 2007-11-22 Martin Baulig <martin@ximian.com>
6858 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
6860 * mini-trampolines.c
6861 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
6862 after compiling the method.
6864 2007-11-20 Martin Baulig <martin@ximian.com>
6867 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
6868 (mono_debugger_remove_breakpoint): Likewise.
6869 (mono_debugger_check_breakpoints): Likewise.
6871 * debug-debugger.c: Implement the new breakpoint interface here.
6873 2007-11-18 Zoltan Varga <vargaz@gmail.com>
6875 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
6876 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
6878 * mini-x86.c (mono_arch_output_basic_block): Ditto.
6880 2007-11-17 Zoltan Varga <vargaz@gmail.com>
6882 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
6884 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
6887 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
6890 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
6891 returning a vtype in a register.
6893 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
6894 here from the arch specific code.
6896 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
6899 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
6900 (mono_arch_emit_prolog): Increment maximum prolog size.
6902 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
6903 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
6905 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
6906 MonoGenericSharingContext.
6908 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
6909 MonoGenericSharingContext. Allocate memory from the cfg mempool.
6911 2007-11-15 Mark Probst <mark.probst@gmail.com>
6913 * mini.c, mini.h, generic-sharing.c: Functions for producing code
6914 which extract fields out of the runtime generic context. Full
6915 sharing of the NEWARR opcode.
6917 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6919 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
6920 --enable-minimal=ssa.
6922 2007-11-13 Zoltan Varga <vargaz@gmail.com>
6924 * mini-trampolines.c (mono_delegate_trampoline): Update after
6925 mono_marshal_get_delegate_invoke () signature change.
6927 2007-11-13 Mark Probst <mark.probst@gmail.com>
6929 * mini.c: Removed the shared context in favor of the generic
6930 sharing context. Allocate the MonoJitInfo structure with room for
6931 the generic sharing context if it's needed.
6933 * mini.h: Remove MonoGenericSharingContext declaration. It's in
6934 domain-internals.h now.
6936 * mini-x86.c: Pass the generic sharing context to get_call_info ().
6938 * generic-sharing.c: Several changes for working without a shared
6939 context and instead operating on open types instead.
6941 2007-11-12 David S. Miller <davem@davemloft.net>
6943 * inssel-sparc.brg: Fix double instruction emit.
6945 2007-11-12 Zoltan Varga <vargaz@gmail.com>
6947 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
6948 Get/Set/Address methods.
6950 * mini.c debug-debugger.c mini-trampolines.c: Update after
6951 mono_marshal_get_delegate_invoke signature change.
6953 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
6955 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
6956 This can happens with dynamic methods. Fixes the other bug in #322722.
6958 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
6960 * tramp-arm.c (mono_arch_patch_callsite): Support patching
6963 * mini-arm.c (arm_patch): Implement patching of BX call
6964 sequence. Fixes one of the bugs in #322722.
6966 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
6968 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
6969 under Linux. We only need to flush every 32-byte cache line.
6971 2007-11-07 Massimiliano Mantione <massi@ximian.com>
6974 move_basic_block_to_end: Add branches when needed, eventually creating
6976 optimize_branches: added a parameter that tells if it's ok to create
6977 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
6978 and avoid calling move_basic_block_to_end when it's not ok.
6981 2007-11-07 Mark Probst <mark.probst@gmail.com>
6983 * mini.c: Abort inlining call to InitializeArray if something
6984 looks wrong. Let the icall handle it, which now has proper safety
6987 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
6989 * mini.c (mono_spill_call): add support for soft-float.
6991 * mini.c (mono_method_to_ir): add support for soft-float
6992 to inlined functions that return float.
6994 * mini.c (mono_method_to_ir): add support for soft-float
6995 to cee_stsfld opcode on float fields.
6997 2007-11-05 Geoff Norton <gnorton@novell.com>
6999 * mini-x86.h: Fix the structure access for X86 Leopard.
7002 2007-11-05 Martin Baulig <martin@ximian.com>
7004 * mini-trampolines.c
7005 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
7006 after compiling the method to notify the debugger.
7008 2007-11-05 Martin Baulig <martin@ximian.com>
7010 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
7012 2007-11-02 Zoltan Varga <vargaz@gmail.com>
7014 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
7015 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
7017 2007-11-01 Zoltan Varga <vargaz@gmail.com>
7019 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
7020 native-to-managed wrappers.
7022 2007-11-01 Geoff Norton <gnorton@novell.com>
7024 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
7027 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7029 * mini.c, mini-x86.c: when getting back from unmanaged code
7030 to managed via a marshaled delegate we also need to set the
7033 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7035 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
7038 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7040 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
7041 let the debugger or other external agents to tell the JIT when
7042 a sw breakpoint has been inserted in the code that the JIT needs
7043 to be able to inspect.
7045 2007-10-31 Martin Baulig <martin@ximian.com>
7048 (MonoDebuggerInfo): Remove `runtime_class_init'.
7050 2007-10-30 Martin Baulig <martin@ximian.com>
7053 (mono_debugger_thread_created): Added `MonoThread *' argument.
7054 (mono_debugger_extended_notification): New public method.
7055 (mono_debugger_trampoline_compiled): New public method.
7058 (MonoDebuggerThreadInfo): Added `thread' and
7059 `extended_notifications' fields.
7062 (debugger_executable_code_buffer): New static variable.
7065 (MonoDebuggerInfo): Added `executable_code_buffer',
7066 `executable_code_buffer_size', `breakpoint_info_area',
7067 `breakpoint_table' and `breakpoint_table_size'.
7069 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
7071 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
7072 that IP either is an unused value or the vtable pointer. IMT
7073 calls use vtable + offset now. Reduced by almost half the size
7076 2007-10-26 Jonathan Chambers <joncham@gmail.com>
7078 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
7079 defines to access param registers. Replace long usage with
7080 gsize as sizeof(long) != sizeof(void*) on Win64.
7082 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
7083 on Win64. Fix intrinsic, use _AddressOfReturnAddress
7084 instead of non-existant _GetAddressOfReturnAddress.
7086 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
7087 param registers. Save/restore %rdi and %rsi in MonoLMF.
7089 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
7090 param registers. Modify (throw_exception) signature to take
7091 %rdi and %rsi on Win64.
7093 Code is contributed under MIT/X11 license.
7095 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7097 * helpers.c: unlink debugging output files.
7099 2007-10-25 Zoltan Varga <vargaz@gmail.com>
7101 * mini.c: Move mono_create_ftnptr () to object.c.
7103 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
7105 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
7106 optional. This function can now be used to disassemble code generated
7107 outside the JIT such as trampolines and IMT thunks.
7109 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
7111 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
7112 vtable pointer from a ldr instruction.
7114 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
7115 new IMT call sequence.
7117 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
7118 call sequence for interface invocations.
7120 * mini-arm.c (mono_arch_emit_imt_argument): added, required
7121 for imt support. This function is empty since IMT on ARM requires no
7122 special handling on the IR side.
7124 * mini-arm.c (mono_arch_find_imt_method): added, required for
7127 * mini-arm.c (mono_arch_find_this_argument): added, required
7130 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
7131 a ldr instruction to load a value stored in the code stream.
7133 * mini-arm.c (mono_arch_build_imt_thunk):added, required
7137 2007-10-23 Zoltan Varga <vargaz@gmail.com>
7139 * mini.c (mini_init): Install the jump trampoline callback.
7141 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7143 * mini-trampolines.c: handle synchronized methods with the common
7144 vtable trampoline (bug #335601).
7146 2007-10-17 Zoltan Varga <vargaz@gmail.com>
7148 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
7150 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
7153 * mini-ia64.h mini-ia64.c: Add support for IMT.
7155 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
7156 prolog. Fixes #331958.
7158 2007-10-15 Zoltan Varga <vargaz@gmail.com>
7160 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
7162 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7164 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
7167 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7169 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
7172 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
7174 * mini-x86.c, mini-x86.h: x86 support for the common vtable
7177 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7179 * mini-trampolines.c: changed the magic rampoline to understand
7180 the common vtable trampoline method: the method to invoke is
7181 determined by the vtable displacement of the call.
7183 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7185 * mini.c, mini.h: register the common vtable trampoline if the
7186 architecture supports it.
7188 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7190 * cpu-amd64.md: use the correct max length for tls_get.
7192 2007-10-14 Zoltan Varga <vargaz@gmail.com>
7194 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
7195 CEE_STELEM_ANY. Fixes #333696.
7197 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7199 * exceptions-x86.c: provide more graceful handling of the case where
7200 we followed a bogus function pointer from managed code (bug #332866).
7202 2007-10-11 Mark Probst <mark.probst@gmail.com>
7204 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
7205 replaces the generic_shared flag and will carry more information
7208 * generic-sharing.c: Added mini_type_stack_size() which allows
7209 allows open types if given a generic sharing context.
7210 mini_get_basic_type_from_generic() takes a
7211 MonoGenericSharingContext* instead of a MonoCompile* now.
7213 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
7214 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
7215 mini-sparc.c, mini-x86.c: Trivial changes required by the two
7216 changes above. Just passing arguments through to the right
7219 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7221 * mini-arm.c: unify the call emission to emit_code_seq().
7223 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
7225 * tramp-arm.c: reduced the trampoline size.
7227 2007-10-10 Mark Probst <mark.probst@gmail.com>
7229 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
7230 variable handling out of arch-specific code.
7232 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7234 * mini-arm.c: implemented fast delegate dispatch.
7236 2007-10-09 Zoltan Varga <vargaz@gmail.com>
7238 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
7239 that fp elimination is turned off if the space required by locals is too
7242 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7244 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
7245 ARM to the new style trampoline.
7247 2007-10-09 Zoltan Varga <vargaz@gmail.com>
7249 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
7251 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
7253 2007-10-09 Martin Baulig <martin@ximian.com>
7256 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
7257 `field_info_offset_offset'.
7259 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7261 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
7262 removed more internal usage of the r11 register and made it available
7263 to the register allocator.
7265 2007-10-08 Mark Probst <mark.probst@gmail.com>
7267 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
7268 when sharing generics and treat type variables as references.
7270 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7272 * mini-ppc.c: started removing the internal uses of register r11
7273 to eventually allow the register allocator to manage it as an
7274 additional available register.
7276 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7278 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
7280 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7282 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
7283 specific trampolines as they are not performance critical as a jump
7284 target (maybe align as before only for AOT code?). This saves about
7285 200 KB of native code on x86 for monodevelop startup.
7287 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7289 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
7290 monodevelop startup.
7292 2007-10-06 Zoltan Varga <vargaz@gmail.com>
7294 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
7296 * mini-sparc.h mini-sparc.c: Implement IMT support.
7298 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
7299 its smaller and doesn't clobber sparc_g1.
7301 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
7303 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
7305 * mini-ppc.c: optimized the size of the IMT thunks a bit.
7307 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7309 * mini-ppc.c: implemented fast delegate invocation.
7311 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
7313 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
7315 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7317 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
7318 code to the new style trampoline in preparation for IMT support.
7320 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
7322 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
7323 systems already. This also reduces the specific trampiline sizes and
7324 prepares for the use of r12 as the IMT identifier register.
7326 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7328 * mini-mips.h: endianess fix (simplified from a patch by
7329 Thomas Kunze <thommy@tabao.de>, bug #323737).
7331 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
7333 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
7334 to access ucontext fields and enable netbsd support
7335 (partially from Magnus Henoch <mange@freemail.hu>).
7337 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7339 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
7340 use the preprocessor from the CPP env var if it is set.
7342 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7344 * mini-trampolines.c: fixed an assertion and moved it earlier in the
7345 code, before interface_offset gets used.
7347 2007-10-02 Zoltan Varga <vargaz@gmail.com>
7349 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
7350 mono_class_setup_vtable () before accessing klass->vtable.
7352 2007-10-01 Zoltan Varga <vargaz@gmail.com>
7354 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
7357 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7359 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
7360 IMT slots (this saves hundreds of KB of memory in programs like
7361 IronPython and Monodevelop).
7363 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7365 * mini.c: print the delegate counter.
7367 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
7369 * mini-x86.c: make it easier to enable the debugging code for IMT
7372 2007-09-28 Martin Baulig <martin@ximian.com>
7375 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
7376 `mono_method_klass_offset' and `mono_method_token_offset'.
7378 2007-09-20 Mark Probst <mark.probst@gmail.com>
7380 * mini.c: First generics sharing implementation. Can only share
7381 in very simple cases. If sharing doesn't work it falls back to
7382 dedicated compilation.
7384 * mini.h: Flag in MonoCompile to specify whether generic
7385 compilation is shared. Flags enum for marking which generic inst
7386 of a context is used. Prototypes for helper functions.
7388 * generic-sharing.c: Helper functions for generic method sharing.
7390 * optflags-def.h: Optimization flag (gshared) for enabling generic
7391 method sharing added.
7393 * Makefile.am: generic-sharing.c added.
7395 2007-09-19 Daniel Nauck <dna@mono-project.de>
7397 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
7399 2007-09-19 Massimiliano Mantione <massi@ximian.com>
7400 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
7403 2007-09-19 Martin Baulig <martin@ximian.com>
7405 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
7406 mono_debug_cleanup() is now part of mono_cleanup().
7408 2007-09-18 Zoltan Varga <vargaz@gmail.com>
7410 * driver.c (mono_main): Fix a warning.
7412 2007-09-17 Zoltan Varga <vargaz@gmail.com>
7414 * aot-compiler.c: Optimize various parts when processing large assemblies.
7417 * mini.c (mono_patch_info_hash): Improve hash function.
7419 2007-09-14 Jonathan Chambers <joncham@gmail.com>
7421 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
7423 Code is contributed under MIT/X11 license.
7425 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7427 * mini.c (mini_init): Fix a leak.
7429 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
7431 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7433 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
7435 2007-09-14 Zoltan Varga <vargaz@gmail.com>
7437 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
7439 2007-09-13 Zoltan Varga <vargaz@gmail.com>
7441 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
7444 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
7446 * mini.c (handle_alloc): Enable managed allocators in AOT code.
7448 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
7450 * aot-runtime.c (decode_patch_info): Ditto.
7452 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7454 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
7455 static case. Cache delegates in architecture specific code,
7456 based on number of parameters.
7458 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
7459 in architecture specific code, based on number of parameters.
7461 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
7462 caching happen in architecture specific code now.
7464 Code is contributed under MIT/X11 license.
7466 2007-09-12 Jonathan Chambers <joncham@gmail.com>
7468 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
7469 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
7470 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
7472 Code is contributed under MIT/X11 license.
7474 2007-05-15 Massimiliano Mantione <massi@ximian.com>
7475 * mini.c: (mono_thread_abort) Fixed bug #82416.
7477 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7479 * mini.: hook the new managed GC allocation feature into the JIT.
7481 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7483 * mini.c: implementation for the new runtime tls opcode.
7485 2007-09-11 Martin Baulig <martin@ximian.com>
7488 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
7489 `mono_method_inflated_offset'.
7491 2007-09-07 Zoltan Varga <vargaz@gmail.com>
7493 * driver.c mini.h mini.c: Add a new devel command line option for injecting
7494 async exceptions into a method.
7496 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
7497 purpose of testing whenever the unwinder works at every instruction.
7499 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
7501 * mini.c: check accessibility of method used in ldftn (fixes
7504 2007-09-04 Zoltan Varga <vargaz@gmail.com>
7506 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
7508 * inssel.brg: Fix a warning.
7510 2007-09-03 Martin Baulig <martin@ximian.com>
7512 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
7513 now takes the `main_method' as argument.
7515 2007-09-02 Zoltan Varga <vargaz@gmail.com>
7517 * cpu-sparc.md (endfilter): Add missing src1:i argument.
7519 2007-08-30 Jonathan Chambers <joncham@gmail.com>
7521 * driver.c: include the cil-coff.h header on Windows.
7523 Code is contributed under MIT/X11 license.
7525 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
7527 * mini.c, driver.c: don't include the cil-coff.h header.
7529 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
7531 * mini.c: flag places that needs fixes fo soft-float support.
7533 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
7535 * mini.h, inssel-float.brg: fix soft-float constant loads on big
7536 endian systems (partially from Dean Jenkins, bug #81924).
7538 2007-08-28 Mark Probst <mark.probst@gmail.com>
7540 * mini.c (check_linkdemand): Remove embedded reference object in
7541 call to LinkDemandSecurityException.
7542 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
7543 with an IntPtr instead of a reference object.
7545 2007-08-28 Zoltan Varga <vargaz@gmail.com>
7547 * mini.c (handle_initobj): Handle alignment properly.
7549 * inssel.brg (mini_emit_memset): Ditto.
7551 * inssel.brg (mini_emit_memcpy): Ditto.
7553 * inssel-sparc.brg: Ditto.
7555 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
7557 2007-08-26 Zoltan Varga <vargaz@gmail.com>
7559 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
7560 exceptions raised in unmanaged code. Fixes part of #82594.
7562 2007-08-24 Mark Probst <mark.probst@gmail.com>
7564 * mini.c (mono_method_to_ir), declsec.c
7565 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
7567 2007-08-22 Martin Baulig <martin@ximian.com>
7570 (MonoDebuggerThreadInfo): New typedef.
7571 (mono_debugger_thread_table): New global variable.
7572 (mono_debugger_thread_created): New public function.
7573 (mono_debugger_thread_cleanup): New public function.
7577 - removed `get_current_thread' and `lookup_assembly'.
7578 - removed `data_table'.
7579 - added `thread_table'.
7582 (mono_thread_start_cb): Call mono_debugger_thread_created().
7583 (mono_thread_attach_cb): Likewise.
7584 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
7585 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
7588 * driver.c (mono_main): Move mono_debug_init() up, before calling
7589 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
7591 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7593 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
7594 together when passing several arguments of type double (gives a small
7595 speedup and saves a few bytes of generated code).
7597 2007-08-20 Jb Evain <jbevain@novell.com>
7599 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
7601 2007-08-20 Jb Evain <jbevain@novell.com>
7603 * mini.c (mono_method_to_ir): throw MethodAccessException
7604 and FieldAccessException instead of InvalidProgramException.
7606 2007-08-20 Mark Probst <mark.probst@gmail.com>
7608 * mini.c: CoreCLR security checks.
7610 * mini.h: Removed MonoSecurityMode (moved to
7611 metadata/security-manager.h) and mono_security_mode global var
7612 (replaced by set/get functions in security-manager.h).
7614 * driver.c: Added "core-clr-test" security mode for testing. Used
7615 set-function for setting security mode.
7617 2007-08-17 Mark Probst <mark.probst@gmail.com>
7619 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
7620 the new jit_info_table.
7622 * driver.c: Test code for the new jit_info_table (enabled by the
7623 define MONO_JIT_INFO_TABLE_TEST).
7625 2007-08-14 Zoltan Varga <vargaz@gmail.com>
7627 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
7628 detection of call <REG> instruction sequence. Fixes build on freebsd.
7630 2007-08-13 Zoltan Varga <vargaz@gmail.com>
7632 * mini-exceptions.c: Fix a warning.
7634 2007-08-11 Zoltan Varga <vargaz@gmail.com>
7636 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
7637 stack overflow handling code on amd64 too.
7639 * mini-exceptions.c (mono_setup_altstack): Make this use
7640 mono_thread_get_stack_bounds ().
7642 * mini-x86.h: Disable sigaltstack on solaris x86.
7644 2007-08-10 Zoltan Varga <vargaz@gmail.com>
7646 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
7648 2007-08-10 Geoff Norton <gnorton@customerdna.com>
7650 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
7652 2007-08-08 Zoltan Varga <vargaz@gmail.com>
7654 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
7656 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
7658 2007-08-03 Neale Ferguson <neale@sinenomine.net>
7660 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
7663 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
7665 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
7666 to be emitted (bug #82281).
7668 2007-08-01 Martin Baulig <martin@ximian.com>
7670 Merged the `debugger-dublin' branch.
7672 * debug-debugger.h (MonoDebuggerInfo):
7673 Removed the `old_*' compatibility entries.
7674 Added `debugger_version' and `data_table'.
7675 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
7676 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
7679 (MiniDebugMethodBreakpointInfo): Add `address_list'.
7680 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
7681 instead of a `gconstpointer'.
7682 (mono_debugger_insert_method_breakpoint): Return a
7683 `MonoDebugMethodAddressList *'.
7685 2007-06-28 Martin Baulig <martin@ximian.com>
7687 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
7689 2007-08-01 Zoltan Varga <vargaz@gmail.com>
7691 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
7692 __builtin_frame_address () since it is broken on older gcc versions.
7694 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7696 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
7697 on the stack overflow handling and made the managed stack overflows
7698 catchable in most cases using soft guard pages.
7699 * exceptions-x86.c: added code to restore the protection in the soft
7700 guard pages at the end of exception handling.
7702 2007-07-31 Zoltan Varga <vargaz@gmail.com>
7704 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
7706 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7708 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
7711 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
7713 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
7714 signal handling support until it has been ported to the new mechanism.
7715 * mini.c: fixed stack overflow detection and use the new
7716 architecture code to handle signals on the altstack.
7718 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
7720 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
7721 stack overflows on the alt stack.
7723 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
7725 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
7726 stack overflows on the alt stack.
7728 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
7730 * exceptions-ppc.c: cleanup preparing for altstack support.
7732 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
7734 * exceptions-arm.c: cleanup preparing for altstack support.
7736 2007-07-27 Mark Probst <mark.probst@gmail.com>
7738 * mini.c (print_jit_stats): Output hazard pointer stats.
7740 2007-07-26 Mark Probst <mark.probst@gmail.com>
7742 * driver.c, mini.c: Replaced security mode flags with a single
7745 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7747 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
7749 2007-07-25 Mark Probst <mark.probst@gmail.com>
7751 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
7752 (which doesn't do anything yet) for activating Core CLR
7753 (Silverlight) security.
7755 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
7757 * mini-codegen.c: work around a possible gcc bug on arm.
7759 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
7761 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
7762 message for platforms that don't support AOT compilation.
7764 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7766 * mini.h, mini.c, driver.c: temporary smcs hack.
7768 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
7770 * mini-arm.h, mini-arm.c: arm EABI fixes.
7772 2007-07-22 Zoltan Varga <vargaz@gmail.com>
7774 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
7777 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
7778 trampolines taking a method argument.
7780 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
7782 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
7783 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
7785 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
7786 JIT compilation throws an exception. Fixes #82050.
7788 2007-07-19 Mark Probst <mark.probst@gmail.com>
7790 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
7791 with the MONO_EXCEPTION_ defines.
7793 2007-07-17 Zoltan Varga <vargaz@gmail.com>
7795 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
7798 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
7799 the cause of an assertion.
7801 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
7803 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
7806 2007-07-15 Zoltan Varga <vargaz@gmail.com>
7808 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
7809 assert. Should fix #82103.
7811 2007-07-14 Zoltan Varga <vargaz@gmail.com>
7813 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
7814 here too. Fixes #82095.
7816 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
7819 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
7821 * mini-amd64.h: Enable IMT for amd64.
7823 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
7825 2007-07-12 Zoltan Varga <vargaz@gmail.com>
7827 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
7829 2007-07-12 Mark Probst <mark.probst@gmail.com>
7831 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
7832 as soon as check_linkdemand sets an exception_type.
7834 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
7836 * mini-x86.c: fixed offsets for IMT call sequence.
7837 * mini-x86.h: enable IMT again.
7839 2007-07-11 Zoltan Varga <vargaz@gmail.com>
7841 * trace.c (mono_trace_enter_method): Decode MonoType too.
7843 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
7845 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
7847 * mini-amd64.c: Add preliminary IMT implementation.
7849 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7851 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
7852 understand the new IMT-base interface invocation (thanks to
7853 Daniel Nauck for the report and the remote debugging session).
7855 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7857 * mini-x86.c: size and speed optimizations for the IMT bsearch.
7859 2007-07-11 Zoltan Varga <vargaz@gmail.com>
7861 * Makefile.am (aotcheck): Make this actually use the AOTed code.
7863 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
7865 * mini-trampolines.c: implement AOT IMT support.
7866 * mini-x86.h: enable IMT support for wider testing.
7868 2007-07-10 Zoltan Varga <vargaz@gmail.com>
7870 * inssel.brg (emit_imt_argument): Add aot support here.
7872 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
7874 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7876 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
7877 of the IMT implementation, partially from massi, with my
7878 implementation of the bsearch sequence. Disabled by default until
7879 the AOT code is implemented.
7881 2007-07-10 Zoltan Varga <vargaz@gmail.com>
7883 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
7885 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
7887 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7889 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
7890 arch-independent IMT JIT code from Massimiliano
7891 Mantione (massi@ximian.com) with small cleanups from me.
7893 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
7895 * Makefile.am: fix svn invocation to get the svn revision to be
7896 independent of the local language (build fix).
7898 2007-07-09 Mark Probst <mark.probst@gmail.com>
7900 * mini.c (inline_method): Reset cfg->exception_type if the
7901 inlining is aborted. Fixes: 82049.
7903 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
7905 * mini.c: remove assert from exception handling code when exception_ptr
7908 2007-07-05 Zoltan Varga <vargaz@gmail.com>
7910 * mini.c (mono_codegen): Add an assert.
7912 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
7913 enter and leave code.
7914 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
7916 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7918 * mini-ppc.c: fixed memory corruption for localloc(0)
7921 2007-07-05 Zoltan Varga <vargaz@gmail.com>
7923 * mini.c: Fix warnings.
7925 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
7927 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
7928 to emit better double->int conversions.
7930 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7932 * mini.c: the provided Min/Max optimizations are valid for unisgned
7935 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
7937 * 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
7939 2007-06-28 Miguel de Icaza <miguel@novell.com>
7941 * mini.c (mono_running_on_valgrind): Add support for reporting the
7942 method and its boundaries to valgrind.
7944 2007-06-28 Martin Baulig <martin@ximian.com>
7946 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
7948 2007-06-25 Zoltan Varga <vargaz@gmail.com>
7950 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
7952 * generic.2.cs: Add new test case.
7954 2007-06-25 Martin Baulig <martin@ximian.com>
7956 Merged the `debugger-dublin' branch.
7959 (mono_debugger_insert_method_breakpoint): New public method.
7960 (mono_debugger_remove_method_breakpoint): Likewise.
7961 (mono_debugger_check_breakpoints): New static method.
7962 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
7964 * debug-debugger.h (MonoDebuggerInfo):
7965 Renamed (to keep backward compatibility in the vtable):
7966 `insert_breakpoint' -> `old_insert_breakpoint'.
7967 `remove_breakpoint' -> `old_remove_breakpoint'.
7968 `create_string' -> `old_create_string'.
7969 `lookup_class' -> `old_lookup_class'.
7970 `lookup_type' -> removed; changed into a dummy field.
7971 `lookup_assembly' -> `old_lookup_assembly'.
7972 Added (same functionality, but different signature):
7973 `create_string', `lookup_class', `lookup_assembly'
7975 `get_method_addr_or_bpt', `remove_method_breakpoint',
7976 `runtime_class_init'.
7978 * debug-debugger.c: Merged the `debugger-dublin' branch.
7980 2007-06-23 Zoltan Varga <vargaz@gmail.com>
7982 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
7984 (peephole_pass): Likewise.
7986 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
7988 * driver.c: hopefully make setaffinity work also for ancient
7991 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
7993 * driver.c : win32 build fix.
7995 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7997 * driver.c: check for the MONO_NO_SMP env var and bind to a single
7998 processor if it is set.
8000 2007-06-21 Martin Baulig <martin@ximian.com>
8002 * debug-mini.h: New file.
8005 (mono_debugger_insert_breakpoint_full): Moved here from
8006 ../metadata/mono-debug-debugger.c.
8007 (mono_debugger_remove_breakpoint): Likewise.
8008 (mono_debugger_breakpoint_callback): Likewise.
8010 2007-06-15 Raja R Harinath <rharinath@novell.com>
8012 * jit-icalls.c (mono_helper_compile_generic_method): Update to
8013 changes in MonoGenericClass.
8015 2007-06-14 Zoltan Varga <vargaz@gmail.com>
8017 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
8019 2007-06-14 Raja R Harinath <rharinath@novell.com>
8021 * jit-icalls.c (mono_helper_compile_generic_method): Update to
8022 removal of MonoGenericMethod.
8024 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8026 * mini-exceptions.c: hooks for the exception events profiling API.
8028 2007-06-14 Randolph Chung <tausq@debian.org>
8030 * Makefile.ma: Add hppa target.
8031 * mini-arch.h: Include mini-hppa.h
8032 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
8033 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
8034 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8036 2007-06-14 Randolph Chung <tausq@debian.org>
8038 * inssel.brg: Add rules for "chained" compare-branch operations so that
8039 a single compare op can affect multiple branches. Adjust cost for
8040 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
8041 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
8042 cost for some rules so that they can more easily be overridden by
8043 per-arch rules (with fixes from lupus).
8044 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8046 2007-06-13 Randolph Chung <tausq@debian.org>
8048 * mini-ops.h: Reorder branch ops so that they match the order of the
8049 corresponding CEE_* ops. The code expects them this way.
8050 Add new ops for HPPA target.
8051 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8053 2007-06-13 Randolph Chung <tausq@debian.org>
8055 * mini-exceptions.c: Handle cases where the stack grows towards
8057 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8059 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8061 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
8063 * driver.c: explain where a non-matching corlib is found.
8065 2007-06-13 Mark Probst <mark.probst@gmail.com>
8067 * mini.c (print_jit_stats): Output dynamic code allocation stats.
8069 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
8071 * mini-exceptions.c: Generate a method profile leave event during
8072 an exception to ensure that the profiler gets notified.
8074 2007-06-07 Zoltan Varga <vargaz@gmail.com>
8076 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
8079 * cpu-amd64.md: Add long_and/or/xor opcodes.
8081 2007-06-06 Wade Berrier <wberrier@novell.com>
8083 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
8084 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
8085 length of instruction shr_imm (expected 8, got 10)
8087 2007-06-06 Zoltan Varga <vargaz@gmail.com>
8089 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
8091 2007-06-06 Mark Probst <mark.probst@gmail.com>
8093 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8094 MonoInternalHashTable again (fixed bug in the internal hash table
8097 2007-06-06 Mark Probst <mark.probst@gmail.com>
8099 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
8100 Have to figure out what makes it crash the SWF regression.
8102 2007-06-05 Zoltan Varga <vargaz@gmail.com>
8104 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
8106 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8108 * mini.c: optimize out the type check when storing null in a
8111 2007-06-04 Mark Probst <mark.probst@gmail.com>
8113 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8114 MonoInternalHashTable.
8116 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8118 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
8119 signed integer methods.
8121 2007-06-02 Zoltan Varga <vargaz@gmail.com>
8123 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
8124 permanently since the current approach doesn't work.
8126 2007-06-02 Zoltan Varga <vargaz@gmail.com>
8128 * inssel.brg (stmt): Only call delegate->invoke_impl if
8129 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
8131 2007-06-01 Zoltan Varga <vargaz@gmail.com>
8133 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
8134 the sreg2==rdx case.
8136 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
8137 account if it contains a rex prefix.
8138 (peephole_pass): Handle OP_FMOVE as well.
8140 2007-06-01 Zoltan Varga <vargaz@gmail.com>
8142 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
8143 as it causes regressions.
8145 2007-05-31 Zoltan Varga <vargaz@gmail.com>
8147 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
8148 static case as well.
8150 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
8152 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8153 (mono_arch_get_this_arg_from_call): Ditto.
8155 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
8157 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
8160 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8161 (mono_arch_get_this_arg_from_call): Ditto.
8163 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
8165 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
8166 try to create optimized invoke code and use that for further invocations.
8167 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
8169 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
8171 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
8173 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
8174 sealed classes or methods.
8175 *devirtualization.cs: tests for the new optimization
8177 2007-05-29 Zoltan Varga <vargaz@gmail.com>
8179 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
8180 by the update_volatile () function.
8182 2007-05-27 Zoltan Varga <vargaz@gmail.com>
8184 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
8187 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
8189 2007-05-24 Jonathan Chambers <joncham@gmail.com>
8191 * mini.c: Add configure checks for header files.
8192 * mini-x86.c: Add configure checks for header files.
8193 * trace.c: Add configure checks for header files.
8194 * aot-runtime.c: Add configure checks for header files.
8195 * aot-compiler.c: Add configure checks for header files.
8196 * driver.c: Add configure checks for header files.
8197 * mini-codegen.c: Add configure checks for header files.
8199 Code is contributed under MIT/X11 license.
8201 2007-05-22 Zoltan Varga <vargaz@gmail.com>
8203 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
8204 icompare_imm -128 + op_iclt. Fixes #81703.
8206 2007-05-19 Zoltan Varga <vargaz@gmail.com>
8208 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
8210 2007-05-15 Massimiliano Mantione <massi@ximian.com>
8212 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
8213 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
8214 so that all isinst checks now use "interface_bitmap".
8216 2007-05-15 Zoltan Varga <vargaz@gmail.com>
8218 * cpu-amd64.md (jmp): Fix a warning.
8220 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
8222 * basic.cs: Add new regression test.
8224 * basic.cs: Remove test which is now in basic-long.cs.
8226 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
8228 * basic-long.cs: Add new test.
8230 2007-05-13 Zoltan Varga <vargaz@gmail.com>
8232 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
8234 2007-05-12 Zoltan Varga <vargaz@gmail.com>
8236 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
8238 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
8241 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
8242 throwing code a bit.
8244 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
8245 the exception throwing code a bit.
8247 * mini-x86.c (get_call_info): Allocate result from a mempool.
8249 2007-05-11 Zoltan Varga <vargaz@gmail.com>
8251 * aot-compiler.c (find_typespec_for_class): Fix the assert.
8253 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8255 * mini.h (MonoCompile): Add 'token_info_hash' field.
8257 * mini.c: Save token->method associations during compilation so the AOT
8258 compiler can use it.
8260 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
8261 which reference generic classes and methods.
8263 2007-05-10 Zoltan Varga <vargaz@gmail.com>
8265 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
8267 * aot-compiler.c (compile_method): Fix a typo in a comment.
8269 * aot-runtime.c (decode_cached_class_info): Skip generic types.
8271 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
8274 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
8276 2007-05-09 Zoltan Varga <vargaz@gmail.com>
8278 * mini.h (MonoCompile): Add 'args' field.
8280 * mini.c (mono_compile_create_vars): Store variables representing the arguments
8283 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
8285 2007-05-08 Zoltan Varga <vargaz@gmail.com>
8287 * mini.c (mono_compile_get_interface_var): Remove this unused function.
8289 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
8291 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
8292 opcodes for some opcodes.
8294 * mini.h *.brg *.c: Use the new opcodes.
8296 2007-05-08 Massimiliano Mantione <massi@ximian.com>
8298 * mini.h: Bumped aot revision.
8300 * inssel.brg: modified code generation of type checks for interfaces
8301 to use the new "MonoClass.interface_bitmap" instead of the old
8302 "MonoClass.interface_offsets".
8304 2007-04-30 Zoltan Varga <vargaz@gmail.com>
8306 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
8308 2007-04-29 Zoltan Varga <vargaz@gmail.com>
8310 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
8313 2007-04-27 Neale Ferguson <neale@sinenomine.net>
8315 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
8317 2007-04-27 Wade Berrier <wberrier@novell.com>
8319 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
8320 mini.h) to fix build.
8322 2007-04-26 Zoltan Varga <vargaz@gmail.com>
8324 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
8326 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
8327 causes the corlib unit tests to fail.
8329 2007-04-25 Zoltan Varga <vargaz@gmail.com>
8331 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
8333 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
8335 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
8336 opcodes to the comparison relations.
8338 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
8339 opcodes to their types.
8341 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
8343 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
8344 it in cfg->arch.cinfo.
8346 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
8348 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
8349 cfg->cil_offset_to_bb.
8351 2007-04-24 Zoltan Varga <vargaz@gmail.com>
8353 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
8354 created becase of initlocals.
8356 2007-04-23 Zoltan Varga <vargaz@gmail.com>
8358 * mini-alpha.c cpu-alpha.md: More alpha port work from
8359 Sergey Tikhonov <tsv@solvo.ru>.
8361 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
8363 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
8365 2007-04-19 Zoltan Varga <vargaz@gmail.com>
8367 * cpu-s390.md (break): Correct the length of break instruction.
8369 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8371 * mini.c: fix a couple of soft-float issues and comments.
8373 2007-04-15 Miguel de Icaza <miguel@novell.com>
8375 * trace.c (is_filenamechar): - is also a filename char.
8377 2007-04-15 Neale Ferguson <neale@sinenomine.net>
8379 * mini-s390.c: Correct checking for enum type in return value processing.
8381 2007-04-14 Raja R Harinath <rharinath@novell.com>
8383 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
8384 (version.h): Makefile is in the build directory.
8386 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
8388 * mini-amd64.h: fix for assertion failure on Solaris/amd64
8390 2007-04-11 Martin Baulig <martin@ximian.com>
8392 * mini.c (can_access_member): Fix handling of generic classes;
8395 2007-04-10 Zoltan Varga <vargaz@gmail.com>
8397 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
8399 2007-04-05 Zoltan Varga <vargaz@gmail.com>
8401 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
8403 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8405 * mini-codegen.c: make sure the right spill amount is
8406 used for fp or integer registers (fixes the float_sub_spill() on ppc).
8408 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
8410 * mini-ppc.c: fixes for the fp_branch_nan test.
8412 2007-03-23 Zoltan Varga <vargaz@gmail.com>
8414 * basic.cs: Comment out new test which still fails on ia64.
8416 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
8418 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
8420 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8422 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
8424 2007-03-22 Zoltan Varga <vargaz@gmail.com>
8426 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
8427 on 64 bit machines. Fixes part of #80738.
8429 * basic.cs: Add regression test.
8431 2007-03-17 Zoltan Varga <vargaz@gmail.com>
8433 * inssel.brg basic.cs: Revert previous change to fix build.
8435 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
8438 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
8440 * basic.cs: Add new regression test.
8442 2007-03-17 Zoltan Varga <vargaz@gmail.com>
8444 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
8447 2007-03-16 Neale Ferguson <neale@sinenomine.net>
8449 * cpu-s390x.md: Correct length of break instruction.
8451 2007-03-16 Neale Ferguson <neale@sinenomine.net>
8453 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
8454 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
8456 2007-03-15 Jonathan Chambers <joncham@gmail.com>
8458 * *.c: Begin WIN64 port.
8459 * mini.c: Use correct register in profiler.
8460 * mini-amd64.c: No inline assembly on Win64.
8461 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
8462 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
8463 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
8464 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
8465 mono_arch_ip_from_context for Win64.
8467 Contributed under MIT/X11 license.
8469 2007-03-15 Zoltan Varga <vargaz@gmail.com>
8471 * exceptions-amd64.c (seh_handler): Ditto.
8473 * exceptions-x86.c (seh_handler): Fix a memory leak.
8475 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
8477 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
8478 mini-s390x.c: fixed peephole optimizations to deal
8479 correctly with 1 and 2 byte reload avoidance.
8481 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
8483 * cpu-s390.md, cpu-s390x.md: update localloc length.
8485 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
8487 * cpu-g4.md: added missing descriptions.
8489 2007-03-14 Miguel de Icaza <miguel@novell.com>
8491 * Makefile.am: Add support so the tail tests are not executed on
8492 PowerPC as that is a known limitation of the PowerPC port.
8494 2007-03-13 Jonathan Chambers <joncham@gmail.com>
8496 * runmdesc.bat: Move to msvc directory.
8498 2007-03-13 Jonathan Chambers <joncham@gmail.com>
8500 * runmdesc.bat: Run executable that was produced by the current
8501 target and sent via an argument.
8503 2007-03-11 Zoltan Varga <vargaz@gmail.com>
8505 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
8508 * generics.2.cs: Add regression test.
8510 2007-03-09 Wade berrier <wberrier@novell.com>
8512 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
8514 2007-03-09 Zoltan Varga <vargaz@gmail.com>
8516 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
8517 AOT code depends on this.
8519 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
8521 * mini.c: more precise tracking of types in the eval stack
8522 (part of fix for bug #81044).
8524 2007-03-07 Zoltan Varga <vargaz@gmail.com>
8526 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
8528 * aot-compiler.c (encode_patch): Remove an obsolete comment.
8530 2007-03-06 Zoltan Varga <vargaz@gmail.com>
8532 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
8534 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
8536 2007-02-22 Zoltan Varga <vargaz@gmail.com>
8538 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
8539 a pointer on 64 bit systems. Fixes #80190.
8541 * iltests.il: Add new regression test.
8543 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8545 * mini.c: inline a constant for Environment.IsRunningOnWindows.
8547 2007-02-19 Geoff Norton <gnorton@customerdna.com>
8549 * trace.c: Remove an erroneous alignemnt check when tracing.
8550 Fixes --trace on OSX86.
8552 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
8554 * mini-$(arch).h: initialize SP in context for all the archs.
8556 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
8558 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
8559 regressions in the thread tests.
8561 2007-02-14 Zoltan Varga <vargaz@gmail.com>
8563 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
8564 - fixed implementation of LOCALLOC opcode
8565 - implemented non-un compare for floats
8567 - implementation of FDIV and CKFINITE opcodes
8568 - fixes for latest mono updates
8569 - additional arch opcodes
8571 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
8573 * Makefile.am: simplify and merge rules for cross-compilation.
8575 2007-02-07 Massimiliano Mantione <massi@ximian.com>
8577 * local-propagation.c: Actually *apply* the fix for bug 80591...
8579 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
8581 * mini-exceptions.c: backuot part of the last change
8582 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
8584 2007-02-06 Massimiliano Mantione <massi@ximian.com>
8585 * inssel.brg: Fix bug 59286.
8588 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
8590 * mini-exceptions.c: patch from Zoltan to correctly check for
8591 stack boundaries (using the stack register, not the frame register),
8592 fixes bugs #80724, #79717.
8594 2007-02-03 Zoltan Varga <vargaz@gmail.com>
8596 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
8597 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
8599 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
8600 presence of frame pointer elimination.
8602 2007-02-01 Geoff Norton <gnorton@customerdna.com>
8604 * mini-x86.h: NetBSD UCONTEX_REG defines.
8606 2007-02-01 Zoltan Varga <vargaz@gmail.com>
8608 * inssel-amd64.brg: Fix amd64 build.
8610 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
8612 * mini.h: remove extern to workaround what looks likes gcc bug 26905
8615 2007-01-31 Zoltan Varga <vargaz@gmail.com>
8617 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
8620 * mini-<ARCH>.c: Use mono_is_regsize_var ().
8622 2007-01-30 Mark Mason <mason@broadcom.com>
8624 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
8625 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
8626 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
8627 beginning support for CEE_JMP [not quite working yet]
8628 * tramp-mips.c: LMF handling now works
8630 2007-01-30 Zoltan Varga <vargaz@gmail.com>
8632 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
8634 * mini.h (NULLIFY_INS): New macro.
8636 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
8638 * mini.c: statistical profiler fix for windows, patch
8639 from Tor Lillqvist (tml@novell.com).
8641 2007-01-30 Massimiliano Mantione <massi@ximian.com>
8642 * local-propagation.c: Fix bug 80591.
8644 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
8646 * Makefile.am: put back the --export-dynamic option as with
8647 the previous gmodule flags (thanks to Robert Jordan).
8649 2007-01-28 Zoltan Varga <vargaz@gmail.com>
8651 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
8653 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
8654 simplify and speed up the local register allocator. Also rename some fields
8655 like iassign->vassign.
8657 * regalloc.c: Remove some functions which are no longer used since their
8658 inlined version is in mini-codegen.c.
8660 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
8662 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
8664 2007-01-27 Zoltan Varga <vargaz@gmail.com>
8666 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
8667 narrowing. Fixes #80622.
8669 * iltests.il: Add new regresssion test.
8671 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
8673 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
8674 debug-debugger.c, debug-debugger.h: warning fixes.
8675 * driver.c: updated copyright year and made it fit in one line.
8677 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
8679 * aot-runtime.c: updated to use mono-dl instead of gmodule.
8681 2007-01-25 Zoltan Varga <vargaz@gmail.com>
8683 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
8685 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
8687 * iltests.il: Add new test for bug #80507.
8689 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
8691 * mini-arm.h: use soft-float also on vfp for now.
8693 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
8695 * mini.c: fix some more soft-float issues.
8697 2007-01-24 Zoltan Varga <vargaz@gmail.com>
8699 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
8701 2007-01-24 Massimiliano Mantione <massi@ximian.com>
8702 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
8703 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
8704 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
8706 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
8708 * mini-arm.c: typo fix.
8710 2007-01-23 Neale Ferguson <neale@sinenomine.net>
8712 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
8714 2007-01-21 Zoltan Varga <vargaz@gmail.com>
8716 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
8717 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
8719 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
8721 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
8723 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
8725 * inssel.brg: Fix a warning.
8727 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
8729 * abcremoval.c ssa.c ssapre.c: Update after this change.
8731 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
8733 * dominators.c (df_set): Use mono_bitset_union_fast.
8735 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
8737 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
8738 mini-codegen.c: reduce relocations and memory usage for the cpu
8741 2007-01-20 Zoltan Varga <vargaz@gmail.com>
8743 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
8745 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
8746 to reduce their size.
8748 2007-01-19 Mark Mason <mason@broadcom.com>
8750 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
8751 * mini-mips.c: more configuration macros, support long conditional branches, additional
8752 asserts, fix epilog instrumentation.
8753 * mini-mips.h: use standard stack walk
8754 * cpu-mips.md: increase size of div, rem and conditional branches
8756 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
8758 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
8761 2007-01-19 Zoltan Varga <vargaz@gmail.com>
8763 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
8764 (compile_method): Ditto.
8766 * aot-runtime.c (decode_klass_info): Ditto.
8768 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
8769 needed by the code generated by inssel.brg. Also fix a warning.
8771 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
8773 * mini.c: deal with enums that become genericinsts by
8774 being nested in a generic class (bug #79956).
8776 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
8778 * mini.c: match the generic definition to check for
8779 private access with generic types (bug #78431).
8781 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
8783 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
8784 to make life easier for people cross-compiling that insist on not
8787 2007-01-17 Mark Mason <mason@broadcom.com>
8789 * inssel-long.brg: patch to deal with mips missing flags
8790 * inssel-long32-mips.brg: implement overflow checks
8791 * insset-mips.brg: implement overflow checks
8792 * mini-mips.h: implement conditional exception handling
8793 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
8794 Remove unused code, minor cleanups.
8795 * exceptions-mips.c: minor cleanups
8796 * mini-ops.h: add mips conditional exception ops
8797 * cpu-mips.md: add mips conditional exception ops
8800 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
8802 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
8803 to deal with mips missing of flags.
8805 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
8807 * exceptions-ppc.c: execute fault handlers.
8809 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
8811 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
8813 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
8815 * mini.c: handle also floating point values in initialize_array.
8817 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
8819 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
8820 array initialization and make it conditional on the intrins option.
8822 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
8824 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
8825 relocations and put the patch info names close to the enum definition.
8827 2007-01-15 Mark Mason <mason@broadcom.com>
8829 * basic.cs, exceptions.cs: break up large tests to increase debugability.
8831 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
8833 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
8835 2007-01-12 Raja R Harinath <rharinath@novell.com>
8837 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
8839 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
8841 * Makefile.am: distribute the mips sources.
8843 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
8845 * mini-codegen.h: handle bug #80489 here, by excluding ecx
8848 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
8850 * cpu-x86.md: back out for now as this triggers other regressions.
8852 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
8854 * cpu-x86.md: force src1 and dest regpair for long shift instructions
8855 to eax:edx, so ecx can't get allocated to them (bug #80489).
8857 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
8859 * mini.c, mini-exceptions.c: enabled running fault handlers
8862 2007-01-03 Miguel de Icaza <miguel@novell.com>
8864 * driver.c: If nothing fail, do not use the string "failed",
8865 because it makes it very annoying to view test result logs on the
8868 2006-12-30 Miguel de Icaza <miguel@novell.com>
8870 * debug-debugger.c (mono_debugger_main): Rename "main" to
8871 "main_method" to prevent a warning.
8873 Remove a warning for unused field.
8875 2006-12-28 Martin Baulig <martin@ximian.com>
8878 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
8880 2006-12-22 Martin Baulig <martin@ximian.com>
8882 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
8883 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
8884 seperate `.mdb_debug_info' section, so we can access it from the
8885 debugger even if the binary is stripped.
8887 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
8888 from the `.mdb_debug_info' here to prevent the linker from
8889 removing that section.
8891 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
8894 2006-12-19 Robert Jordan <robertj@gmx.net>
8896 * mini-x86: enable the code to return small structures in
8897 registers for FreeBSD as well. Fixes bug #80278.
8898 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
8900 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8902 * mini-x86.c: align the stack when calling the profiler
8903 function instrumenting the prolog (on OSX).
8905 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
8907 * mini.c: emit a break opcode where Debugger.Break () is called.
8909 2006-12-13 Miguel de Icaza <miguel@novell.com>
8911 * mini.c (mono_method_to_ir): Provide useful information on this
8912 assert, to prevent others from debugging like I did.
8914 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8916 * mini.c: enable code which was incorrectly commented
8919 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
8921 * mini-x86.c: enable on OSX, too, the code to return small
8922 structures in registers.
8924 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8926 * mini-x86.c: remove the use of the dynamic code manager here, too.
8928 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8930 * mini.h, debug-debugger.c, tramp-*.c: fixed
8931 mono_debugger_create_notification_function() to use
8932 mono_global_codeman_reserve () instead of a dynamic code manager.
8934 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
8936 * mini.c, jit-icalls.h, jit-icalls.c: remove the
8937 ves_array_element_address() jit icall and use a generated
8938 managed method instead (which is about 4 times faster for a rank 3
8941 2006-11-29 Mark Mason <mason@broadcom.com>
8943 * basic-calls.cs: additional tests for passing
8944 structures as function arguments.
8946 2006-11-29 Mark Mason <mason@broadcom.com>
8948 * mini-mips.h: disable custom exception handling
8949 * mini-mips.c: throw/rethrow should use jalr to call
8950 exception stubs. Fixed bug with passing structures
8951 by value. More support for tracing floating point
8954 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8956 * mini.c: fixed typo in the soft-float ldind.r4 handling
8959 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8961 * mini.c, mini.h, driver.c: added --runtime command line
8962 option to select a different runtime than the autodetected one.
8963 * jit.h: added API for embedders to initialize with a specific
8966 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8968 * mini.c: handle also boxing of r4 values (bug #80024).
8970 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8972 * mini-ppc.c: force indirect calls until we reserve
8973 enough address space for all the generated code.
8975 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
8977 * exceptions-arm.c: workaround bugs in the libc definition
8980 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8982 * inssel.brg: fixes from me and Mark Mason.
8984 2006-11-23 Dick Porter <dick@ximian.com>
8986 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
8987 semaphore display now we've fixed the initial value
8989 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8991 * inssel.brg: partially revert the last change to fix the build.
8993 2006-11-21 Mark Mason <mason@broadcom.com>
8995 * inssel.brg: Add and use compare-and-branch macros to support
8996 architectures that do not have condition code registers (ie. MIPS).
8997 * *-mips.{c,brg,md}: Fix copyright statements
8999 2006-11-20 Mark Mason <mason@broadcom.com>
9001 * Makefile.am: remove mini-codegen.c from list of MIPS sources
9002 * mini.c: Allow GET_CONTEXT to be specified by the arch port
9003 * mini.h: Added declaration for mono_print_ins()
9004 * mini-codegen.c: added ins_spec initializer for MIPS
9005 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
9006 vreg to be virtual and hreg to be non-virtual.
9007 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
9008 is not yet working/implemented correctly.
9009 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
9010 non-static, fixup calls to print_ins() from other parts in the file.
9012 2006-11-20 Mark Mason <mason@broadcom.com>
9014 * basic-calls.cs: added tests for passing structures as arguments
9017 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9019 * inssel-long32.brg: optimize signed division by power of two.
9021 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9023 * mini-arm.c: added support for interworking with thumb code
9024 (mono must be still be built using the ARM instruction encoding).
9026 2006-11-19 Miguel de Icaza <miguel@novell.com>
9028 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
9029 verifier has different rules for it. Fixes a few verifier issues
9032 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
9033 at the end, so people know what happened.
9035 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9037 * brach-opts.c: in optimize_exception_target() make sure we
9038 are in a catch clause (fixes bug #79871).
9040 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9042 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
9043 more soft-float support fixes.
9045 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
9047 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
9048 that are passed half on the stack and half in registers.
9050 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
9052 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
9053 more mips integration work from Mark E Mason
9054 <mark.e.mason@broadcom.com>.
9056 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9058 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
9059 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
9060 tramp-mips.c: added sources for the mips port, not
9061 integrated in the build yet. Contributed by
9062 Mark E Mason <mark.e.mason@broadcom.com>.
9064 2006-11-14 Neale Ferguson <neale@sinenomine.net>
9066 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
9068 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9070 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
9071 put the soft-float rules in its own file since it seems to
9072 break s390 compilation.
9074 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9076 * mini-arm.c: fixed wrnings.
9078 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
9080 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
9081 inssel-arm.brg: ARM support for soft-float.
9083 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9085 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
9086 loads and stores of 32 bit fp values.
9088 2006-11-10 Zoltan Varga <vargaz@gmail.com>
9090 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
9092 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
9093 works. Fixes #79852 and #79463.
9095 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9097 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
9098 more soft-float support WIP and fixes.
9100 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
9102 * mini-arm.c: some VFP updates.
9104 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9106 * mini-exceptions.c: 0 is a valid local var offset in some
9107 architectures, don't assert (bug #78508).
9109 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
9111 * exceptions-arm.c: fixed off by one error in stack walk code.
9113 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9115 * mini.h, mini.c: more precise tracking of type load exceptions.
9117 2006-11-03 Robert Jordan <robertj@gmx.net>
9119 * Makefile.am: [WIN32] Add monow.exe target.
9120 * driver.c: [WIN32] Don't detach the console when debugging.
9123 2006-10-30 Miguel de Icaza <miguel@novell.com>
9125 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
9127 2006-10-23 Zoltan Varga <vargaz@gmail.com>
9129 * aot-compiler.c (emit_method_info): Add a case missed earlier.
9131 * driver.c (mini_regression): Fix --regression with AOT.
9133 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
9135 2006-10-17 Zoltan Varga <vargaz@gmail.com>
9137 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
9139 * mini-sparc.h: Don't use sigaction on sparc/linux.
9141 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
9143 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
9145 * mini-exceptions.c: Add proper include files for getpid ().
9147 2006-10-16 Zoltan Varga <vargaz@gmail.com>
9149 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
9150 address instead of a MonoJitInfo* to avoid decoding the exception info for the
9153 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
9154 name cache to reduce its size.
9156 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9158 2006-10-15 Zoltan Varga <vargaz@gmail.com>
9160 * mini-x86.c: Save/restore the current LMF structure more efficiently using
9161 the mono_lmf TLS variable.
9163 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
9164 trampoline lmf frames.
9166 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
9168 2006-10-14 Zoltan Varga <vargaz@gmail.com>
9170 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
9171 the mono_lmf TLS variable.
9173 * mini-exceptions.c: Access the LMF structure through accessors.
9175 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
9176 variable instead of in jit_tls->lmf.
9178 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
9180 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
9181 trampoline lmf frames.
9183 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
9185 2006-10-12 Zoltan Varga <vargaz@gmail.com>
9187 * mini.c trace.c mini-x86.c: Revert these too.
9189 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
9192 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
9194 * genmdesc.c: removed now dead code.
9196 2006-10-09 Robert Jordan <robertj@gmx.net>
9198 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
9200 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9202 * mini.h: do not leave gaps in the opcode values.
9204 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
9206 * jit-icalls.h: flag functions as internal here, too.
9208 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
9210 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
9211 functions with the internal attribute.
9213 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
9215 * aot-compiler.c: fclose the file descriptor in the profile read loop.
9217 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9219 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
9222 2006-10-05 Zoltan Varga <vargaz@gmail.com>
9224 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
9225 tail calls as on other platforms.
9227 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
9229 * iltests.il: Add a few tailcall tests.
9231 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9233 * driver.c: fix loop for old compilers (bug #79521).
9235 2006-10-02 Zoltan Varga <vargaz@gmail.com>
9237 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
9239 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
9241 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
9242 metadata without any code.
9244 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
9245 more precise debugging information using gdb.
9247 2006-09-30 Zoltan Varga <vargaz@gmail.com>
9249 * inssel-ia64.brg: Make the helper methods static.
9251 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9253 * inssel-x86.brg: make the helper methods static.
9255 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
9257 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
9259 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9261 * mini.c: updates for monoburg changes.
9262 * inssel.brg: make a few helper functions static as they should.
9264 2006-09-27 Zoltan Varga <vargaz@gmail.com>
9266 * Makefile.am: Move mini-codegen.c to common_sources.
9268 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9270 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
9272 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
9273 mini-ppc.h: port to use the common local register allocator.
9275 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9277 * mini.h: Remove the comment too then.
9279 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
9281 * mini.h: put back backend.data which is to be used shortly and
9282 doesn't increase the size of MonoInst. If any 64 bit arch aligned
9283 pointers on 4 byte boundaries it'd have much bigger issues running
9284 and you can ifdef it out anyway.
9286 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9288 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
9289 MonoInst size by 4 bytes on 64 bit machines.
9291 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9293 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
9294 replacement with more meaningful field names. Arch maintainers, please
9295 check the assigned names are good enough for your arch.
9297 2006-09-26 Zoltan Varga <vargaz@gmail.com>
9299 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
9300 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
9302 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
9304 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
9305 relocations and memory requirements, put the optimization flags
9306 definitions in their own file.
9308 2006-09-24 Zoltan Varga <vargaz@gmail.com>
9310 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
9312 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
9314 2006-09-22 Zoltan Varga <vargaz@gmail.com>
9316 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
9318 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
9320 * inssel.brg: use the correct function to get the size of an item
9321 in an array, given an element class.
9322 * aot-compiler.c: do not access class->class_size directly.
9324 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
9326 * mini.h, debug-mini.c: added a debugging function to print
9327 info about local variables and arguments in a jitted method.
9329 2006-09-20 Zoltan Varga <vargaz@gmail.com>
9331 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9333 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
9335 2006-09-19 Zoltan Varga <vargaz@gmail.com>
9337 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
9338 inner and outer loops when passing vtypes.
9340 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
9342 * mini-ppc.c: take into account the cpu errata for cache flushing
9343 which caused some random errors (bug #79381).
9345 2006-09-19 Zoltan Varga <vargaz@gmail.com>
9347 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
9348 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
9350 2006-09-17 Zoltan Varga <vargaz@gmail.com>
9352 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
9355 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
9358 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
9359 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
9361 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
9364 2006-09-13 Zoltan Varga <vargaz@gmail.com>
9366 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
9368 2006-09-12 Zoltan Varga <vargaz@gmail.com>
9370 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
9371 macro does not have to be changed during debugging.
9373 * 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>.
9375 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
9377 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
9379 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
9380 MONO_ARCH_NO_EMULATE_MUL is defined.
9382 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
9384 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
9386 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
9388 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
9390 2006-09-11 Zoltan Varga <vargaz@gmail.com>
9392 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
9393 stuff to mini-exceptions.c where it is used.
9395 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
9396 setup code, the real one is in mini-exceptions.c.
9398 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
9399 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
9400 some changes from the freebsd ports tree.
9402 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
9405 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
9407 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
9409 * mini.c: on Linux, check for /proc to be mounted
9410 (bug# 79351, novell bug#201204).
9412 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
9414 * mini.c: handle cases where pthread_attr_getstack() behaves
9415 incorrectly (bug #78096).
9417 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
9419 * mini-arm.c: support larger stack frames (bug #79272).
9421 2006-09-08 Zoltan Varga <vargaz@gmail.com>
9423 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
9425 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
9428 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
9429 mono_class_from_name () to find a class from its name.
9431 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
9433 2006-09-07 Zoltan Varga <vargaz@gmail.com>
9435 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
9437 2006-09-05 KornĂ©l PĂ¡l <kornelpal@gmail.com>
9439 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
9441 2006-09-04 Zoltan Varga <vargaz@gmail.com>
9443 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
9444 callinfo->trampoline.
9446 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
9448 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
9451 2006-09-03 Zoltan Varga <vargaz@gmail.com>
9453 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
9455 2006-09-02 Zoltan Varga <vargaz@gmail.com>
9457 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
9458 stats.method_trampolines, it is already done by the generic trampoline code.
9460 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
9462 2006-09-01 Zoltan Varga <vargaz@gmail.com>
9464 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
9466 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
9468 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
9470 * mini.c (print_jit_stats): Print mscorlib mempool size too.
9472 * mini.c (print_jit_stats): Print new stats.
9474 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
9476 2006-08-31 Zoltan Varga <vargaz@gmail.com>
9478 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
9479 Address on two dimensional arrays. Fixes #78729.
9481 * mini.h (MonoCompile): Add a 'skip_visibility' field.
9483 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
9486 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
9488 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
9491 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
9493 (mini_get_ldelema_ins): Ditto.
9495 2006-08-30 Zoltan Varga <vargaz@gmail.com>
9497 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
9498 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
9501 2006-08-29 Neale Ferguson <neale@sinenomine.net>
9503 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
9504 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
9506 * exceptions-s390x.c: Cosmetic change.
9508 * tramp-s390.c: Fix warning.
9510 * cpu-s390.md: Correct length of mul_imm.
9512 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
9514 * aot-compiler.c: added binary writer with ELF backend
9515 implementation (only on Linux/x86 for now).
9517 2006-08-18 Zoltan Varga <vargaz@gmail.com>
9519 * Makefile.am: Don't run net 2.0 AOT tests.
9521 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
9522 (mono_compile_assembly): Skip net 2.0 assemblies as well.
9524 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
9526 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
9528 * aot-compiler.c: simplified and refactored the asm-writing code
9529 to allow different backends.
9531 2006-08-18 Zoltan Varga <vargaz@gmail.com>
9533 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
9535 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
9536 little. Share patches of type TYPE_FROM_HANDLE as well.
9538 * mini.c (mono_patch_info_equal): New helper function.
9539 (mono_patch_info_hash): Ditto.
9541 * aot-compiler.c (emit_method_code): Fix s390 build.
9543 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
9544 is not handled because it is stored as a flag and not as a type ctor. Fixes
9547 2006-08-17 Zoltan Varga <vargaz@gmail.com>
9549 * aot-compiler.c: Fix computation of GOT slot statistics.
9551 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
9552 Also remove support for not PIC AOT.
9554 * mini.h: Bump AOT file format version.
9556 * objects.cs: Add a test for #78990.
9558 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
9559 (peter.dettman@iinet.net.au). Fixes #79087.
9561 * basic-long.cs: Add a test for the above.
9563 2006-08-16 Zoltan Varga <vargaz@gmail.com>
9565 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
9567 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
9570 2006-08-15 Zoltan Varga <vargaz@gmail.com>
9572 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
9575 2006-08-10 Jonathan Chambers <joncham@gmail.com>
9577 * mini.c: Don't verify COM proxy invoke calls
9580 2006-08-10 Dick Porter <dick@ximian.com>
9582 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
9583 which process is holding semaphores locked.
9585 2006-08-08 Zoltan Varga <vargaz@gmail.com>
9587 * mini-ia64.c mini-amd64.c: Fix #79027.
9589 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
9591 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
9593 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
9594 implicit arguments in a vararg call. Fixes #79027.
9596 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
9598 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
9599 (mono_get_array_new_va_signature): Ditto.
9601 2006-08-05 Zoltan Varga <vargaz@gmail.com>
9603 * aot-runtime.c: Call init_plt lazily.
9605 * inssel-long.brg: Fix unsigned long->int conversion.
9607 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
9609 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
9610 that most data is now in the .rss/.data section.
9612 2006-08-04 Zoltan Varga <vargaz@gmail.com>
9614 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
9616 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
9618 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
9620 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
9622 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
9623 virtual call. Fixes #79010.
9625 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
9626 and use the result as the this argument in the real call.
9628 * generics.2.cs: Add a new test for #79010.
9630 2006-08-03 Zoltan Varga <vargaz@gmail.com>
9632 * mini-x86.c: Fix a warning.
9634 * aot-compiler.c: Add a bunch of statistics.
9636 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
9638 2006-08-02 Zoltan Varga <vargaz@gmail.com>
9640 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
9642 2006-08-01 Zoltan Varga <vargaz@gmail.com>
9644 * 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>.
9646 2006-07-13 Miguel de Icaza <miguel@novell.com>
9648 * mini.c (mono_method_to_ir): Obtain the original method in the
9649 CIL stream and use this to perform validation.
9653 2006-07-19 Zoltan Varga <vargaz@gmail.com>
9655 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
9656 (mono_arch_call_opcode): Ditto.
9658 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
9661 * mini.c (mono_patch_info_dup_mp): New helper function.
9663 * aot-compiler.c (compile_method): Fix some of the memory allocated during
9664 compilation. Fixes #78827.
9666 2006-07-18 KornĂ©l PĂ¡l <kornelpal@gmail.com>
9668 * declsec.c: Use original security informations for
9669 MONO_WRAPPER_MANAGED_TO_MANAGED.
9671 2006-07-15 Jonathan Chambers <joncham@gmail.com>
9673 * mini.c: Allow Com Interop methods/classes and
9674 don't verify COM wrapper calls
9677 2006-07-13 Zoltan Varga <vargaz@gmail.com>
9679 * inssel-long32.brg: Fix long->i4 checked conversion.
9681 * exceptions.cs: Add a test for the above.
9683 2006-07-08 Zoltan Varga <vargaz@gmail.com>
9685 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
9687 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
9690 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
9693 2006-07-03 Zoltan Varga <vargaz@gmail.com>
9695 * mini.c: Fix solaris/x86 exception handling.
9697 * Makefile.am: Get rid of $(ICU_LIBS).
9699 2006-07-02 Zoltan Varga <vargaz@gmail.com>
9701 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
9702 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
9703 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
9705 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
9707 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
9708 this function causes a SIGSEGV.
9710 2006-06-22 Zoltan Varga <vargaz@gmail.com>
9712 * mini.c: Remove unused solaris/x86 includes.
9714 2006-06-21 Zoltan Varga <vargaz@gmail.com>
9716 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
9718 2006-06-20 Jb Evain <jbevain@gmail.com>
9720 * cpu-g4.md: fix max length of start_handler instruction.
9722 2006-06-20 Massimiliano Mantione <massi@ximian.com>
9723 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
9725 2006-06-16 Massimiliano Mantione <massi@ximian.com>
9726 * ssa.c: Fixed bug 78653 for SSA based deadce.
9727 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
9728 MonoInst.flags, used in SSA based deadce.
9729 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
9730 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
9732 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
9734 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
9735 it can end up using non executable memory on ppc64 systems
9736 running ppc32 userspace (fix from Johannes Berg).
9738 2006-06-14 Dick Porter <dick@ximian.com>
9740 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
9743 2006-06-13 Massimiliano Mantione <massi@ximian.com>
9744 * mini.c: Made so that inline is locally disabled if it would
9745 trigger a .cctor, because too many apps depend on this behavior
9746 (which seems to be also the one of the MS CLR).
9748 2006-06-13 Zoltan Varga <vargaz@gmail.com>
9750 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
9751 No idea why this worked before.
9753 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
9754 which branch to outer exception clauses since they could skip the
9755 inner finally clauses. Fixes #78633.
9757 * exceptions.cs: Add a test for the above.
9759 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
9762 * iltests.il: Add a test for the above.
9764 2006-06-12 Zoltan Varga <vargaz@gmail.com>
9766 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
9767 after the end of a try bblock, to prevent asserts in mini_method_compile ().
9769 * iltests.il: Add a test for the above.
9771 2006-06-10 Zoltan Varga <vargaz@gmail.com>
9773 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
9775 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
9776 methods as instrinsics.
9778 2006-06-09 Wade Berrier <wberrier@novell.com>
9780 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
9781 (simple-cee-ops.h ssapre-mini-ops.h)
9783 2006-06-09 Neale Ferguson <neale@sinenomine.net>
9785 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
9786 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
9788 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
9789 * cpu-s390x.md: Fix max. length values for a couple of instructions.
9791 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
9793 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
9795 2006-06-08 Massimiliano Mantione <massi@ximian.com>
9797 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
9798 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
9799 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
9800 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
9801 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
9802 of opcodes, so that bug 78549 should not happen again.
9803 * ssapre.c: Updated to use the renamed files.
9805 2006-06-08 Zoltan Varga <vargaz@gmail.com>
9807 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
9808 in OP_ATOMIC_EXCHANGE_I4.
9810 2006-06-07 Wade Berrier <wberrier@novell.com>
9812 * tramp-s390.c: Fix s390 build (add missing pointer declarations
9813 in mono_debugger_create_notification_function)
9815 2006-06-06 Zoltan Varga <vargaz@gmail.com>
9817 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
9819 * mini.c (type_from_stack_type): Disable some changes which do not
9822 * driver.c: Reenable opts.
9824 * mini.h (MonoStackSlot): New structure to keep track of the verification state
9825 of the evaluation stack.
9827 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
9828 evaluation stack trace at entry to the bblock.
9830 * mini.c (merge_stacks): New function to perform verification of stack merges.
9831 Turned off by default.
9833 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
9836 2006-06-06 Massimiliano Mantione <massi@ximian.com>
9838 * local-propagation.c: Fixed bug 78549.
9840 2006-06-04 Zoltan Varga <vargaz@gmail.com>
9842 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
9844 2006-06-02 Miguel de Icaza <miguel@novell.com>
9846 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
9847 tramp-arm.c, tramp-ia64.c
9848 (mono_debugger_create_notification_function): Update signature to
9849 new signature and use new protocol for creating the notification
9852 Should fix the build.
9854 2006-06-02 Geoff Norton <gnorton@customerdna.com>
9856 * exceptions-ppc.c (mono_jit_walk_stack)
9857 (ves_icall_get_frame_info): Fix the build
9859 2006-06-02 Zoltan Varga <vargaz@gmail.com>
9861 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
9863 2006-05-31 Raja R Harinath <rharinath@novell.com>
9865 * il2tests.2.il: New file for generics CIL tests. Add test for
9867 * Makefile.am: Update.
9870 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
9873 2006-05-30 Massimiliano Mantione <massi@ximian.com>
9875 * aliasing.c: Fixed bug 78311.
9877 2006-05-29 Martin Baulig <martin@ximian.com>
9879 * mini-exceptions.c (mono_find_jit_info): When computing the
9880 native offset, check whether we're actually inside the method's
9881 code; call mono_debug_print_stack_frame() to format the frame.
9882 (ves_icall_System_Exception_get_trace): Call
9883 mono_debug_print_stack_frame() to format the stack frame.
9884 (ves_icall_get_trace): Update to the new debugging API.
9885 (mono_jit_walk_stack_from_ctx): Likewise.
9886 (ves_icall_get_frame_info): Likewise.
9888 * mini.c (get_method_from_ip): Use the new debugging API.
9889 (mono_print_method_from_ip): Likewise.
9892 (mono_jit_walk_stack): Use the new debugging API.
9893 (ves_icall_get_frame_info): Likewise.
9895 2006-05-27 Zoltan Varga <vargaz@gmail.com>
9897 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
9899 2006-05-25 Massimiliano Mantione <massi@ximian.com>
9901 * mini.c: Added "limitator" to inline for debugging.
9903 2006-05-24 Martin Baulig <martin@ximian.com>
9905 * debug-debugger.c (mono_debugger_init): Create a private,
9906 malloc()-based code manager for the notification function and
9907 intentionally leak it on exit. This fixes the crash-on-exit race
9911 (mono_debugger_create_notification_function): Added
9912 `MonoCodeManager *' argument.
9915 (mono_debugger_create_notification_function): Added
9916 `MonoCodeManager *' argument.
9918 2006-05-23 Massimiliano Mantione <massi@ximian.com>
9920 * aliasing.c: Fixed 64 bit issue.
9921 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
9922 default since all known bugs are fixed (one more time!).
9924 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
9926 * mini.c: write barrier support.
9928 2006-05-23 Martin Baulig <martin@ximian.com>
9930 * debug-debugger.c: Revert Paolo's change. Add comment and #error
9931 check at the top of the file.
9933 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
9935 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
9936 reverting changes without reason and without changelog entries.
9938 2006-05-18 Zoltan Varga <vargaz@gmail.com>
9940 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
9941 to a few opcodes. Fixes #78439.
9943 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
9944 consistency with other archs.
9946 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
9948 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9950 * debug-debugger.c: fix the build.
9952 2006-05-17 Martin Baulig <martin@ximian.com>
9955 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
9956 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
9957 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
9958 (debugger_attach): Call GC_mono_debugger_add_all_threads().
9960 2006-05-11 Zoltan Varga <vargaz@gmail.com>
9962 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
9964 2006-05-10 Zoltan Varga <vargaz@gmail.com>
9966 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
9967 MONO_TYPE_GENERICINST.
9969 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
9970 MONO_TYPE_GENERICINST.
9972 2006-05-09 Zoltan Varga <vargaz@gmail.com>
9974 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
9977 2006-05-08 Zoltan Varga <vargaz@gmail.com>
9979 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
9981 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
9983 2006-05-06 Zoltan Varga <vargaz@gmail.com>
9985 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
9986 mono_trace_cleanup ().
9988 * iltests.il: Fix problem with the newly added test.
9990 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
9991 due to register constraints, free up the previous hreg. Fixes #78314.
9993 * iltests.il: Add new test for #78314.
9995 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
9996 Interlocked.Add. Fixes #78312.
9998 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
10000 2006-05-05 Zoltan Varga <vargaz@gmail.com>
10002 * inssel.brg (mini_emit_virtual_call): Fix a warning.
10004 2006-05-05 Martin Baulig <martin@ximian.com>
10006 * debug-mini.c (mono_debug_open_block): New method.
10009 (mono_arch_output_basic_block): Call mono_debug_open_block() at
10010 the beginning of each basic block.
10013 (mono_arch_output_basic_block): Call mono_debug_open_block() at
10014 the beginning of each basic block.
10016 2006-05-04 Massimiliano Mantione <massi@ximian.com>
10018 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10019 default until I understand why they break the build on amd64.
10021 2006-05-04 Zoltan Varga <vargaz@gmail.com>
10023 * mini.c (mini_cleanup): Call mono_cleanup ().
10025 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
10028 2006-05-04 Massimiliano Mantione <massi@ximian.com>
10030 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
10031 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10032 default since all known bugs are fixed, and I cannot reproduce bug
10033 77944... I'm asking Matt Hargett to test again after this commit.
10035 2006-04-28 Massimiliano Mantione <massi@ximian.com>
10037 * mini-codegen.c: Fixed typo that thrashed inline.
10039 2006-04-28 Zoltan Varga <vargaz@gmail.com>
10041 * dominators.c (compute_dominators): Avoid using a worklist since
10042 it is not correct in some cases. Instead, iterate over all bblocks as
10043 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
10045 2006-04-28 Miguel de Icaza <miguel@novell.com>
10047 * mini.c (mono_jit_compile_method_inner): Use
10048 mono_prepare_exception_from_error that resets the value
10051 2006-04-27 Miguel de Icaza <miguel@novell.com>
10053 * mini.c: Move the mini_loader_error_to_exception to metadata.
10055 2006-04-27 Massimiliano Mantione <massi@ximian.com>
10057 * aliasing.c: Fixed bug 78210.
10059 2006-04-27 Massimiliano Mantione <massi@ximian.com>
10061 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10062 default until all their problems (or the ones they trigger) are fixed.
10064 2006-04-26 Zoltan Varga <vargaz@gmail.com>
10066 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
10068 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
10069 as loaded only after resolving patches since that could invoke the same method.
10071 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
10073 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
10076 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
10079 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
10082 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
10083 made from AOT code through the PLT table.
10085 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
10086 holding the plt offset when a call is made to the aot plt trampoline.
10088 2006-04-25 Zoltan Varga <vargaz@gmail.com>
10090 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
10093 * Makefile.am (common_sources): Fix build breakage.
10095 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
10096 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
10097 intra-assembly calls if possible.
10099 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
10101 * mini-trampolines.c: Handle PLT entries.
10103 * mini.c: Avoid creating a GOT var for calls.
10105 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
10106 from mscorlib code.
10108 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
10109 from mscorlib code.
10111 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
10114 * mini.h: Bump AOT file format version.
10116 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
10119 2006-04-25 Martin Baulig <martin@ximian.com>
10121 * driver.c: Disable copyprop, consprop and inline when running
10122 inside the debugger.
10124 2006-04-25 Martin Baulig <martin@ximian.com>
10126 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
10127 with `get_current_thread' and added `detach'.
10128 (MonoDebuggerMetadataInfo): Added `thread_size',
10129 `thread_tid_offset', `thread_stack_ptr_offset' and
10130 `thread_end_stack_offset'.
10132 2006-04-25 Zoltan Varga <vargaz@gmail.com>
10134 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
10137 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
10138 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
10140 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
10142 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
10144 * aot.c: Add support for ADJUSTED_IID.
10146 2006-04-24 Zoltan Varga <vargaz@gmail.com>
10148 * aot.c (emit_method_order): Don't align method_order_end.
10150 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
10151 the interface ID changes.
10153 2006-04-21 Dick Porter <dick@ximian.com>
10155 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
10156 cleaning up a thread. Fixes the new part of bug 77470.
10158 2006-04-20 Geoff Norton <gnorton@customerdna.com>
10160 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
10161 to managed wrapper.
10163 2006-04-19 Zoltan Varga <vargaz@gmail.com>
10165 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
10167 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
10168 SIGSEGV. Fixes #78072.
10170 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
10171 unregister our SIGABRT handler.
10173 2006-04-19 Massimiliano Mantione <massi@ximian.com>
10175 * mini.c: Disabled inline where it can alter the call stack in a
10176 way visible from managed code.
10177 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
10180 2006-04-16 Zoltan Varga <vargaz@gmail.com>
10182 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
10183 on other platforms. Fixes #78089.
10185 2006-04-13 Martin Baulig <martin@ximian.com>
10187 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
10188 determine whether we're inside the debugger.
10191 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
10193 2006-04-12 Zoltan Varga <vargaz@gmail.com>
10195 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
10196 handler clauses. Fixes #78024.
10198 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
10199 in the CALL_MEMBASE opcodes. Fixes #78088.
10200 (mono_arch_get_vcall_slot_addr): Ditto.
10202 2006-04-10 Martin Baulig <martin@ximian.com>
10204 * debug-debugger.c: The thread handling code has now been moved
10205 into ../metadata/threads.c.
10207 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10209 * driver.c (mono_main): Fix --with-gc=none build.
10211 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
10212 (mono_spillvar_offset_float): Ditto.
10213 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
10214 hreg, not when its !global, since on ia64, there is a third category: stacked
10217 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
10219 * mini.c: set MonoInst->klass for load field address and a few other
10222 2006-04-10 Zoltan Varga <vargaz@gmail.com>
10224 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
10226 2006-04-07 Zoltan Varga <vargaz@gmail.com>
10228 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
10229 the branch opt changes.
10231 2006-04-06 Dick Porter <dick@ximian.com>
10233 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
10235 * wapihandles.c (mini_wapi_seminfo):
10236 * driver.c (mono_main): Add semaphore info option
10238 2006-04-05 Zoltan Varga <vargaz@gmail.com>
10240 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
10241 branch optimization changes. Fixes #78009.
10243 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10245 * mini.c: ignore accessibility of methods in managed->native wrappers.
10247 2006-04-04 Zoltan Varga <vargaz@gmail.com>
10249 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
10251 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
10253 2006-04-03 Zoltan Varga <vargaz@gmail.com>
10255 * mini.c: Modify the branch optimizations to preserve the invariant that
10256 the entries inside the in_bb and out_bb arrays are unique.
10257 (mono_unlink_bblock): Avoid creation of new arrays.
10259 2006-04-02 Zoltan Varga <vargaz@gmail.com>
10261 * mini.c (mono_unlink_bblock): Fix regression caused by previous
10264 2006-04-01 Zoltan Varga <vargaz@gmail.com>
10266 * mini.c (optimize_branches): Remove the "optimizations" in
10267 the cbranch1/cbranch2 -> branch cases which were causing several
10268 problems in the past. Fixes #77986.
10270 2006-03-31 Chris Toshok <toshok@ximian.com>
10272 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
10273 default optimizations :(
10275 2006-03-31 Zoltan Varga <vargaz@gmail.com>
10277 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
10280 2006-03-31 Massimiliano Mantione <massi@ximian.com>
10282 * local-propagation.c: Added comments to structs and removed
10283 "Mono" prefixes from local tree mover types.
10285 2006-03-30 Zoltan Varga <vargaz@gmail.com>
10287 * Makefile.am (arch_sources): Define this for each architecture so
10288 libmono_la_SOURCES is defined in one place.
10290 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10292 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
10295 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
10297 * driver.c: print the GC name supplied by configure.
10299 2006-03-29 Massimiliano Mantione <massi@ximian.com>
10301 * local-propagation.c: Added tree mover, and moved here all the
10302 local propagation code from mini.c
10303 * mini.c: Added support for treeprop, and moved all the local
10304 propagation code to local-propagation.c
10305 * mini.h: Added support for treeprop
10306 * driver.c: Added support for treeprop, enabled consprop, copyprop,
10307 treeprop, inline and deadce by default
10308 * Makefile.am: Added local-propagation.c
10310 2006-03-25 Zoltan Varga <vargaz@gmail.com>
10312 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
10314 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
10316 * debug-debugger.c: make it compile without the Boehm GC.
10318 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
10320 * mini.c: fixed issue with mismatch when an icall is registered
10321 with multiple names but same address.
10323 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10325 * declsec.c, mini-exceptions.c: use write barrier to set reference
10326 fields of managed objects.
10328 2006-03-19 Zoltan Varga <vargaz@gmail.com>
10330 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
10331 (can_access_internals): Fix a warning.
10333 * mini.c (print_method_from_ip): Rename this to
10334 mono_print_method_from_ip so it gets exported.
10336 * trace.c: Deal with strings inside StringBuilder's containing garbage
10337 and fix memory leaks. Fixes #77848.
10339 2006-03-19 Zoltan Varga <vargaz@gmail.com>
10341 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
10344 2006-03-16 Neale Ferguson <neale@sinenomine.net>
10346 * mini-s390.c: Remove OP_X86_TEST_NULL.
10348 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
10350 * mini.c: use the correct GetHashCode() for the moving collector.
10352 2006-03-16 Massimiliano Mantione <massi@ximian.com>
10354 * liveness.c: Regalloc spill cost tuning.
10356 2006-03-15 Neale Ferguson <neale@sinenomine.net>
10358 * mini-s390x.h: Correct S390_LONG macro.
10360 * mini-s390x.c: Cleanup unused code.
10362 2006-03-15 Zoltan Varga <vargaz@gmail.com>
10364 * jit-icalls.h: New file.
10366 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
10367 icalls and include that instead of including jit-icalls.c.
10369 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
10372 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
10374 * mini.c: when checking for member accessibility, also check for
10375 friend assemblies and for explicit interface implementations.
10377 2006-03-14 Zoltan Varga <vargaz@gmail.com>
10379 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
10381 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
10383 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10384 common cases are done first.
10386 * mini-ops.h: Only define platform specific opcodes on the given platform.
10388 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
10391 2006-03-14 Martin Baulig <martin@ximian.com>
10393 Revert Paolo's change from r57348:
10395 * mini.h: don't use gboolean for bitfields.
10396 * mini.c: verifier changes for fields and methods accessibility.
10398 2006-03-13 Neale Ferguson <neale@sinenomine.net>
10400 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
10402 * mini-s390x.c: Fix conv_r_un.
10404 * cpu-s390, cpu-s390x.md: Fix lengths.
10406 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
10408 * mini.c: nested types have access to all the nesting
10409 levels, not just the enclosing types.
10411 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
10413 * mini.c: added a few more verification checks.
10415 2006-03-12 Zoltan Varga <vargaz@gmail.com>
10417 * liveness.c: Merge optimizations from the linear-il branch.
10419 2006-03-11 Zoltan Varga <vargaz@gmail.com>
10421 * mini-ia64.c (emit_call): Add a comment.
10423 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
10425 * tramp-ia64.c: Fix some warnings.
10427 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
10429 * mini.h: don't use gboolean for bitfields.
10430 * mini.c: verifier changes for fields and methods accessibility.
10432 2006-03-11 Zoltan Varga <vargaz@gmail.com>
10434 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
10435 lazy icall wrapper changes.
10437 * dominators.c: Replace all the dominator algorithms with faster
10438 ones from the linear-il branch.
10440 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
10443 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
10444 common cases are done first.
10446 * mini-amd64.c: Fix some warnings.
10448 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
10451 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
10454 * mini.h: Add a missing prototype.
10456 2006-03-10 Zoltan Varga <vargaz@gmail.com>
10458 * mini.c: Compile icall wrappers lazily.
10460 * mini-codegen.c: Use printf instead of g_print since its much faster.
10462 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
10465 * mini.c (optimize_branches): Cache the negative result from
10466 remove_block_if_useless ().
10468 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
10469 Also fix some bblock linking issues.
10471 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
10474 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
10476 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
10477 accessed fields first, for better cache behavior.
10479 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
10481 * mini.c: speedup IList<T> array accesses.
10483 2006-03-09 Zoltan Varga <vargaz@gmail.com>
10485 * mini.c (mono_method_to_ir): Handle large methods overflowing the
10486 inline_costs counter. Fixes #77190.
10488 2006-03-06 Zoltan Varga <vargaz@gmail.com>
10490 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
10491 trace messages. Fixes #77706.
10493 2006-03-04 Martin Baulig <martin@ximian.com>
10495 * tramp-amd64.c, tramp-x86.c
10496 (mono_debugger_create_notification_function): Use
10497 mono_global_codeman_reserve() to allocate a buffer at runtime and
10500 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
10502 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
10503 notification function at runtime and then call `initialize' in the
10504 `MONO_DEBUGGER__debugger_info' vtable.
10506 2006-03-04 Zoltan Varga <vargaz@gmail.com>
10508 * iltests.il: Fix a visibility problem.
10510 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
10512 * driver.c, mini.c: add hooks for the counters API.
10514 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
10516 * driver.c: show disabled options.
10518 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
10520 * linear-scan.c: always use cost-driven selection.
10522 2006-02-28 Raja R Harinath <rharinath@novell.com>
10524 * jit-icalls.c (helper_compile_generic_method): Revert change from
10527 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
10529 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
10531 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
10533 * inssel.brg: style fixes, mostly to force the updated monoburg
10534 to run for people using svn.
10536 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
10538 * mini.c: match monoburg changes.
10540 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
10542 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
10543 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
10544 declaration in the header file.
10546 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
10548 * helpers.c: reduce relocations and mem usage.
10550 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
10552 * mini.h, mini-codegen.c: disable logging features if
10553 requested by configure.
10555 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
10557 * mini.c: tiny verifier changes.
10559 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
10561 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
10562 cpu-pentium.md: stack alignment changes for osx/x86,
10563 partially from Geoff Norton <gnorton@customerdna.com>.
10565 2006-02-24 Raja R Harinath <harinath@gmail.com>
10567 * jit-icalls.c (helper_compile_generic_method): Update to changes
10568 in metadata/class.c.
10570 2006-02-24 Zoltan Varga <vargaz@gmail.com>
10572 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
10574 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
10575 interface calls with large offsets.
10577 2006-02-23 Raja R Harinath <rharinath@novell.com>
10579 * jit-icalls.c (helper_compile_generic_method): Document the
10580 special-case we depend on so that we can inflate the method twice
10581 with the same context with no bad side-effects.
10583 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
10585 * mini-x86.c, mini-amd64.c: fix for case when xen support
10588 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
10590 * mini-x86.c, mini-amd64.c: generate code to access tls items
10591 in a faster way for Xen systems.
10593 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
10595 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
10596 updates and compilation fixes for the OSX/x86 port, mostly from
10597 Geoff Norton <gnorton@customerdna.com>.
10599 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
10601 * inssel.brg: faster interface call implementation
10602 to sync with the interface_offsets MonoVTable changes.
10604 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
10606 * mini.c: more verification checks.
10608 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
10610 * mini.c: added a few more verification checks.
10612 2006-02-17 Neale Ferguson <neale@sinenomine.net>
10614 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
10615 facility on the processor and use it if available.
10617 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
10619 * driver.c, aot.c, mini.c: throw exception if the IL code is
10620 invalid or unverifiable.
10622 2006-02-17 Raja R Harinath <rharinath@novell.com>
10624 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
10627 2006-02-16 Zoltan Varga <vargaz@gmail.com>
10629 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
10631 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10633 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
10634 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
10635 handling of instantiated generic valuetypes.
10637 2006-02-11 Zoltan Varga <vargaz@gmail.com>
10639 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
10640 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
10643 * generics.2.cs: Revert the nullable reftypes tests.
10645 2006-02-10 Zoltan Varga <vargaz@gmail.com>
10647 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
10648 using __builtin_frame_address (1) as it doesn't work in the presence
10649 of optimizations. Hopefully fixes #77273.
10651 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
10652 -> generics.cs change as it doesn't work with some automake versions.
10654 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
10656 * mini.c: handle systems that sue a different way to
10657 retrieve the stack address of the current thread.
10659 2006-02-09 Zoltan Varga <vargaz@gmail.com>
10661 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
10662 it specially in the makefile.
10664 * generics.2.cs: Add tests for nullable reference types.
10666 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
10668 * mini.c: always handle the case when mono_jit_init()
10669 is called in a thread different from the main thread,
10670 confusing libgc (bug #77309).
10672 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
10674 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
10676 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
10678 * mini.c: change optimize_branches () to use a single loop
10679 and introduce a new optimization to simplify some range checks.
10681 2006-02-03 Martin Baulig <martin@ximian.com>
10683 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
10684 and merged with debugger_thread_manager_add_thread().
10685 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
10686 inform the debugger about the main thread.
10688 2006-02-03 Zoltan Varga <vargaz@gmail.com>
10690 * basic.cs: Add test for div.un/rem.un constant folding.
10692 2006-02-03 Neale Ferguson <neale@sinenomine.net>
10694 * cpu-s390x.md: correct int_xor_imm length
10696 2006-02-03 Zoltan Varga <vargaz@gmail.com>
10698 * generics.2.cs: New test for #77442.
10700 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
10703 2006-02-02 Martin Baulig <martin@ximian.com>
10705 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
10706 <mono/metadata/mono-debug-debugger.h>
10708 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
10710 2006-02-02 Martin Baulig <martin@ximian.com>
10712 * debug-debugger.h: New header file for debug-debugger.c.
10714 * debug-debugger.c: Big API cleanup; don't run the managed Main()
10715 function is a separate thread anymore; add support for attaching.
10717 2006-02-01 Zoltan Varga <vargaz@gmail.com>
10719 * tramp-x86.c: Fix a warning.
10721 2006-01-31 Zoltan Varga <vargaz@gmail.com>
10723 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
10724 on very large methods.
10726 * aot.c (load_patch_info): Fix a warning.
10728 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
10730 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
10731 mini-ops.h: alu membase optimizations.
10733 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
10735 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
10736 to speedup StringBuilder.
10738 2006-01-27 Zoltan Varga <vargaz@gmail.com>
10740 * dominators.c (mono_compute_natural_loops): Fix detection of
10741 loop body start blocks.
10743 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
10745 2006-01-26 Zoltan Varga <vargaz@gmail.com>
10747 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
10750 2006-01-25 Massimiliano Mantione <massi@ximian.com>
10752 * aliasing.c: Fixed aliasing issue on 64 bit archs.
10754 2006-01-25 Martin Baulig <martin@ximian.com>
10756 * debug-debugger.c: Moved the `MonoDebuggerManager' and
10757 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
10758 started to cleanup this file a little bit.
10760 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
10762 * mini.c: optimize a codepath frequently happening in generics code.
10764 2006-01-23 Martin Baulig <martin@ximian.com>
10766 * Makefile.am: Only compile debug-debugger.c on supported platforms.
10768 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
10769 functions directly.
10771 * driver.c: debug-debugger.c is only available if
10772 `MONO_DEBUGGER_SUPPORTED' is defined.
10774 2006-01-23 Martin Baulig <martin@ximian.com>
10776 * debug-debugger.c: Only enable this on platforms where the Mono
10777 Debugger is working (x86 and x86_64).
10779 2006-01-21 Martin Baulig <martin@ximian.com>
10781 The Mono Debugger is now using the normal `mono' instead of the
10782 `mono-debugger-mini-wrapper' when executing managed code.
10784 * debug-debugger.c: New file; previously known as
10785 debugger/wrapper/wrapper.c.
10787 * debug-mini.c (mono_init_debugger): Removed.
10789 * driver.c (mono_main): Added new `--inside-mdb' command line
10790 argument which is used when running inside the debugger.
10792 2006-01-20 Zoltan Varga <vargaz@gmail.com>
10794 * liveness.c (mono_analyze_liveness): Remove some unused data
10797 2006-01-17 Zoltan Varga <vargaz@gmail.com>
10799 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
10801 2006-01-16 Zoltan Varga <vargaz@gmail.com>
10803 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
10804 depends on implementation details of monobitset.
10806 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
10809 2006-01-15 Zoltan Varga <vargaz@gmail.com>
10811 * liveness.c: Update after monobitset changes.
10813 2006-01-14 Zoltan Varga <vargaz@gmail.com>
10815 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
10817 2006-01-11 Neale Ferguson <neale@sinenomine.net>
10819 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
10821 * mini-s390x.c: Remove warning messages.
10823 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
10825 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
10827 2006-01-10 Zoltan Varga <vargaz@gmail.com>
10829 * generics.2.cs: Add ldelem/stelem_any test.
10831 2006-01-10 Neale Ferguson <neale@sinenomine.net>
10833 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
10835 2006-01-07 Zoltan Varga <vargaz@gmail.com>
10837 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
10839 2006-01-06 Zoltan Varga <vargaz@gmail.com>
10841 * generics.2.cs: Reenable vtype tests.
10843 * inssel-x86.brg: Remove an icorrect valuetype rule.
10845 2006-01-06 Neale Ferguson <neale@sinenomine.net>
10847 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
10848 initial support for OP_ABS.
10850 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10852 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
10854 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10856 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
10857 conversion and implement LADD/LSUB.
10859 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
10862 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10864 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
10866 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
10869 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10871 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
10872 localloc is encountered. Fixes crash in test-183.cs when using gmcs
10873 (stack walk problem).
10875 2006-01-04 Zoltan Varga <vargaz@gmail.com>
10877 * aot.c (mono_aot_load_method): Fix a warning.
10879 2006-01-03 Neale Ferguson <neale@sinenomine.net>
10881 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
10883 2006-01-03 Zoltan Varga <vargaz@gmail.com>
10885 * iltests.il: Add test for #77148.
10887 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
10890 2006-01-03 Neale Ferguson <neale@sinenomine.net>
10892 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
10894 2006-01-03 Neale Ferguson <neale@sinenomine.net>
10896 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
10897 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
10899 * basic-long.cs: Add lconv-to-r4/r8 tests.
10901 2006-01-03 Zoltan Varga <vargaz@gmail.com>
10903 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
10905 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
10906 here as on other archs.
10908 2005-12-29 Neale Ferguson <neale@sinenomine.net>
10910 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
10912 2005-12-29 Neale Ferguson <neale@sinenomine.net>
10914 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
10916 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
10918 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
10919 instrument_prolog; Add memory_barrier instruction.
10921 2005-12-26 Zoltan Varga <vargaz@gmail.com>
10923 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
10925 2005-12-23 Zoltan Varga <vargaz@gmail.com>
10927 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
10929 * aliasing.c inssel.brg: Fix warnings.
10931 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
10932 could skip initialization of some parts of memory.
10934 * mini.c mini-ia64.c: Fix warnings.
10936 * inssel-sparc.brg: Add an implementation of lneg which actually works.
10938 2005-12-22 Zoltan Varga <vargaz@gmail.com>
10940 * aliasing.c (mono_build_aliasing_information): Add a workaround for
10941 a crash seen on sparc.
10943 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
10945 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
10947 2005-12-21 Neale Ferguson <neale@sinenomine.net>
10949 * mini-ops.h: Add s390_backchain instruction
10951 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
10953 * cpu-s390.md: Add s390_backchain instruction
10955 * mini-s390.c: Significant ABI changes
10957 * mini-s390.h: Cater for zero length structures
10959 2005-12-20 Neale Ferguson <neale@sinenomine.net>
10961 * mini-s390.c: ABI fixes
10963 * inssel-s390.brg: Remove debug statements
10965 * cpu-s390.md: Fix length of ATOMIC_xx operations
10967 2005-12-19 Zoltan Varga <vargaz@gmail.com>
10969 * basic-float.cs: Add float<->long conversion tests.
10971 2005-12-16 Neale Ferguson <neale@sinenomine.net>
10973 * mini-s390.c: Fix LOCALLOC processing.
10975 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
10977 2005-12-15 Zoltan Varga <vargaz@gmail.com>
10979 * iltests.il: Add tests for some opcodes not covered by the other
10982 2005-12-15 Neale Ferguson <neale@sinenomine.net>
10984 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
10985 register loading for Tail processing; Correct trace output.
10987 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
10989 * cpu-s390.md: Correct size of jmp instruction.
10991 2005-12-13 Neale Ferguson <neale@sinenomine.net>
10993 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
10995 2005-12-13 Neale Ferguson <neale@sinenomine.net>
10997 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
10998 Bring s390 up to current level.
11000 2005-12-12 Zltan Varga <vargaz@gmail.com>
11002 * generics.2.cs: Disable the newly added tests as they do not work yet.
11004 * generics.2.cs: Add valuetype tests.
11006 2005-12-09 Zoltan Varga <vargaz@gmail.com>
11008 * basic-long.cs: Add i4->u8 test.
11010 * objects.cs: Add tests for JIT intrinsic.
11012 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
11013 optimizations lost by a mistake.
11015 2005-12-07 Zoltan Varga <vargaz@gmail.com>
11017 * basic-long.cs: Remove a test moved to objects.cs.
11019 * arrays.cs: Add more array tests.
11021 2005-12-06 Zoltan Varga <vargaz@gmail.com>
11023 * arrays.cs: Add new tests for multi-dimensional arrays.
11025 2005-12-06 Raja R Harinath <rharinath@novell.com>
11027 * Makefile.am (test_sources2): Add generics.2.cs.
11028 (EXTRA_DIST): Add test_sources2.
11030 2005-12-05 Ben Maurer <bmaurer@ximian.com>
11032 Support for boxing and unboxing nullable types as well as the
11033 isinst operation on nullables, per the CLI ammendment.
11035 * inssel.brg (CEE_ISINST): Special case for nullable
11037 * mini.c (handle_unbox_nullable): new method
11038 (handle_box): Special case for nullable types
11039 (mono_method_to_ir): Call handle_unbox_nullable in correct
11042 * generics.2.cs: New test suite
11044 * Makefile.am: Support for regression tests with generics.
11046 2005-12-03 Zoltan Varga <vargaz@gmail.com>
11048 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
11049 allocated to registers. Fixes #76800.
11051 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
11053 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
11055 2005-11-30 Zoltan Varga <vargaz@gmail.com>
11057 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
11060 2005-11-29 Zoltan Varga <vargaz@gmail.com>
11062 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
11065 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
11067 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
11068 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
11070 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
11071 single precision before storing to a single precision location.
11073 2005-11-28 Raja R Harinath <rharinath@novell.com>
11075 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
11077 2005-11-27 Zoltan Varga <vargaz@gmail.com>
11079 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
11082 * basic.cs: Remove test_0_byte_compares test which was moved to
11083 objects.cs a long time ago.
11085 2005-11-22 Massimiliano Mantione <massi@ximian.com>
11087 * aliasing.c: Fixed aliasing issue on 64 bit archs.
11089 2005-11-20 Zoltan Varga <vargaz@gmail.com>
11091 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
11092 handlers are called.
11094 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
11097 * mini-ia64.c: Add support for the throw->branch exception
11100 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
11102 2005-11-18 Massimiliano Mantione <massi@ximian.com>
11104 * mini.c: Enabled "fastpath" deadce :-)
11106 2005-11-18 Massimiliano Mantione <massi@ximian.com>
11108 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
11109 alias analysis pass to support it.
11110 * mini.h: Likewise.
11112 * liveness.c: Likewise (liveness computation can use aliasing
11113 information to be more accurate).
11114 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
11115 moreover made so that "--compile-all" uses the given optimization
11116 flags and not the default ones.
11117 * aliasing.c: Alias analysis (new file).
11118 * aliasing.h: Likewise.
11119 * Makefile.am: added "aliasing.c" and "aliasing.h".
11121 2005-11-17 Zoltan Varga <vargaz@gmail.com>
11123 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
11126 2005-11-13 Zoltan Varga <vargaz@gmail.com>
11128 * mini-exceptions.c (mono_handle_exception_internal): Remove the
11129 fp >= end_of_stack exit condition, as it is not needed, and it might
11130 become true for fp eliminated frames.
11132 2005-11-11 Zoltan Varga <vargaz@gmail.com>
11134 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
11137 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
11139 * mini-arm.c: fixed alignment of doubles/longs to match
11140 the C ABI (bug #76635).
11142 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
11144 * aot.c: fix compilation with --enable-minimal=aot.
11146 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
11148 * mini-arm.c: fixed compatibility with the new
11149 floating point emulator package for compares.
11151 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
11153 * mini.c : reverted sig->pinvoke changes (r51396-51397).
11155 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
11157 * mini-exceptions.c (print_stack_frame): Output to stderr.
11158 (mono_handle_native_sigsegv): Ditto.
11160 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11162 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
11163 OP_LCONV_TO_OVF_I implementation.
11165 * mini-amd64.c: Add support for the throw->branch exception
11168 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
11169 when the catch clause catches a more general exception, i.e. Object.
11171 2005-10-30 Zoltan Varga <vargaz@gmail.com>
11173 * cpu-ia64.md: Remove unused opcodes.
11175 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
11176 specific defines for architectures defining USE_SIGACTION.
11178 * mini-ia64.c: Fix some warnings.
11180 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
11181 version seemed to skip a frame.
11183 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
11185 * mini.c: Clean up the usage of sig->pinvoke flag. Now
11186 only calls which are made to native code use this flag.
11188 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
11190 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
11191 varargs methods as well.
11193 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
11194 which have save_lmf set. Reorganize methods prologs a bit.
11196 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
11197 debugger to the proper place.
11199 2005-10-29 Martin Baulig <martin@ximian.com>
11201 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
11202 when running inside the debugger until the debugger has support
11205 2005-10-26 Zoltan Varga <vargaz@gmail.com>
11207 * mini.h: Fix a warning.
11209 2005-10-24 Miguel de Icaza <miguel@novell.com>
11211 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
11212 we expose publicly, this returns the string.
11214 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
11216 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
11217 with fp elimination.
11219 2005-10-21 Zoltan Varga <vargaz@gmail.com>
11221 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
11222 native stacktrace using the glibc 'backtrace' function if available.
11224 2005-10-20 Zoltan Varga <vargaz@gmail.com>
11226 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
11228 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
11229 handle SIGSEGVs received while in native code.
11231 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
11232 code, call mono_handle_native_sigsegv which will abort the runtime
11233 after printing some diagnostics, instead of converting it into a
11234 confusing NullReferenceException.
11236 2005-10-18 Zoltan Varga <vargaz@gmail.com>
11238 * cpu-pentium.md: Remove unused opcodes.
11240 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
11242 * mini-amd64.h (MonoLMF): Add rsp field.
11244 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
11247 2005-10-17 Zoltan Varga <vargaz@gmail.com>
11249 * mini-codegen.c (get_register_spilling): Fix some warnings.
11251 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
11253 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
11254 elimination during exception handling. Enable fp elimination by
11257 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
11260 2005-10-16 Martin Baulig <martin@ximian.com>
11262 * mini-exceptions.c
11263 (mono_debugger_run_finally): New public method for the debugger.
11265 2005-10-10 Zoltan Varga <vargaz@gmail.com>
11267 * debug-mini.c (mono_debug_init_method): Fix warning.
11269 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
11270 the 'exname' parameter const to fix some warnings.
11272 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
11274 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
11275 introduced by the previous patch.
11277 2005-10-08 Zoltan Varga <vargaz@gmail.com>
11279 * basic-float.cs: Add test for precision of float arithmetic.
11281 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
11282 when loading/storing single values from/to memory.
11284 * mini.c (mono_jit_compile_method_with_opt): Create the function
11285 pointers in the correct domain.
11287 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
11289 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
11290 introduced by previous patch.
11292 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
11293 when out_filter_idx is NULL.
11295 * mini-exceptions.c: Don't run filter clauses twice during exception
11296 handling. Fixes #75755.
11298 2005-10-07 Zoltan Varga <vargaz@gmail.com>
11300 * aot.c: Add support for ldflda wrappers.
11302 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
11305 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
11307 * mini.c, mini.h: do not consider exception handlers blocks when
11308 setting up interface variables.
11310 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
11312 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
11314 2005-10-03 Zoltan Varga <vargaz@gmail.com>
11316 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
11317 causes a regression.
11319 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
11321 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
11323 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
11324 of the OP_P definitions.
11326 * TODO: Add a proposal for dealing with the CEE/OP mess.
11328 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
11329 optimizations from the x86 port.
11331 * cpu-amd64.md: Ditto.
11333 * basic.cs basic-long.cs: Add tests.
11335 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
11337 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
11338 Patrik Torstensson's implementation of my exception-handling
11339 optimization idea, when the exception object is not used
11342 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
11344 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
11345 of the mul_imm optimizations from the old jit.
11347 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
11349 * mini.c, liveness.c: patch by Patrik Torstensson and
11350 Zoltan Varga to improve performance in methods with
11353 2005-09-30 Zoltan Varga <vargaz@gmail.com>
11355 * driver.c: Remove 'Globalization' entry from --version.
11357 2005-09-28 Zoltan Varga <vargaz@gmail.com>
11359 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
11360 there is a profiler interested in JIT events.
11362 * aot.c: Load profile files produced by the AOT profiling module, and
11363 reorder methods based on the profiling info. Add a 'method_order' table
11364 to the AOT file to make mono_aot_find_jit_info work with the reordered
11367 * mini.h: Bump AOT file version info.
11369 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
11371 * mini-arm.h: work around what looks like a gcc bug when optimizations
11374 2005-09-28 Raja R Harinath <rharinath@novell.com>
11376 * Makefile.am (AM_CFLAGS): Don't use += to append inside
11377 conditionals. Use ...
11378 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
11380 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
11382 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
11383 to determine the amount of memory to copy when passing valuetypes.
11385 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
11386 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
11388 2005-09-27 Zoltan Varga <vargaz@gmail.com>
11390 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
11391 information about aot.
11393 2005-09-27 Ben Maurer <bmaurer@ximian.com>
11395 * *.c: Replace the use of {Enter,Leave}CriticalSection with
11396 macros. This will allow a deadlock debugger to easily be plugged
11399 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
11401 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
11403 2005-09-27 Raja R Harinath <rharinath@novell.com>
11405 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
11406 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
11407 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
11408 ($(arch_built)) [CROSS_COMPILING]: Error out.
11410 2005-09-26 Zoltan Varga <vargaz@gmail.com>
11412 * aot.c: Add support for the no_special_static flag for classes.
11414 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
11416 * Reapply reverted patches.
11418 * *: Revert r50174 as well.
11420 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
11422 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
11424 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
11426 2005-09-23 Miguel de Icaza <miguel@novell.com>
11428 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
11429 part of the SIG_HANDLER_SIGNATURE.
11431 2005-09-23 Zoltan Varga <vargaz@gmail.com>
11433 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
11436 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
11437 introduced by previous patch.
11439 2005-09-21 Zoltan Varga <vargaz@gmail.com>
11441 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
11442 saved registers too.
11444 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
11445 upon the information returned by get_call_info ().
11447 * mini-x86.c (add_float): Fix stack size calculation.
11448 (mono_arch_call_opcode): Rewrite this so it works based up the
11449 information returned by get_call_info ().
11450 (mono_arch_get_this_vret_args): Ditto.
11452 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
11454 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
11455 in cinfo to determine the registers which need to be used.
11457 2005-09-20 Miguel de Icaza <miguel@novell.com>
11459 * driver.c (mono_main): Add --server and --desktop flags.
11461 2005-09-16 Zoltan Varga <vargaz@gmail.com>
11463 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
11464 registers as global registers.
11466 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
11467 longer needed with the new register allocator.
11469 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
11471 * cpu-ia64.md: Remove unused opcodes.
11473 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
11475 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
11477 * cpu-amd64.md: Remove unused opcodes.
11479 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
11480 needed with the new register allocator.
11482 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
11485 2005-09-16 Raja R Harinath <rharinath@novell.com>
11487 * Makefile.am (check-local): Don't invoke semdel-wrapper.
11489 2005-09-16 Martin Baulig <martin@ximian.com>
11491 * exceptions-amd64.c
11492 (throw_exception): Don't call mono_debugger_throw_exception() if
11493 we're a rethrow - see the FIXME in the code.
11495 2005-09-15 Geoff Norton <gnorton@customerdna.com>
11497 * mini.c (mono_init_exceptions): This only works on some architectures.
11499 2005-09-15 Zoltan Varga <vargaz@gmail.com>
11501 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
11504 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
11506 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
11507 now in mini-exceptions.c.
11509 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
11511 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
11512 now in mini-exceptions.c.
11514 2005-09-15 Zoltan Varga <vargaz@gmail.com>
11516 * exceptions-x86.c: Applied patch from Patrik Torstensson
11517 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
11519 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
11520 code into mini-exceptions.c. Add some assertions to it.
11522 2005-09-12 Zoltan Varga <vargaz@gmail.com>
11524 * aot.c (emit_section_change): Applied patch from "The Software Team"
11525 (<software@solmersa.com>). Fix as errors on windows.
11527 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
11529 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
11530 method info into the LMF.
11532 2005-09-11 Zoltan Varga <vargaz@gmail.com>
11534 * mini-ia64.c: Add proper unwind info for method epilogs.
11536 * exceptions-ia64.c: Add some code to help debugging.
11538 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
11540 * mini-exceptions.c: Fix warning.
11542 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
11544 * mini.c: Really fix build.
11546 * mini-x86.c mini-amd64.c: Fix build.
11548 2005-09-11 Zoltan Varga <vargaz@gmail.com>
11550 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
11552 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
11553 some Interlocked methods as intrinsics.
11555 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
11556 for Thread methods as well.
11558 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
11560 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
11562 * mini-ia64.c mini-x86.c mini-amd64.c
11563 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
11566 * mini.c (mono_init_exceptions): Fix build breakage.
11568 2005-09-10 Zoltan Varga <vargaz@gmail.com>
11570 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
11571 of instructions. Use the new ia64_unw_op macros for emitting unwind
11574 * mini.c (mono_init_exceptions): Initialize exception handling
11575 related trampolines at startup.
11577 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
11579 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
11581 2005-09-09 Zoltan Varga <vargaz@gmail.com>
11583 * mini.c: Handle type loading errors gracefully during compilation and
11584 throw the appropriate exception.
11586 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
11588 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
11589 for the mono binary.
11591 2005-09-09 Martin Baulig <martin@ximian.com>
11593 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
11596 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
11598 * mini-arm.h: use emulation for conv.r.un for the release.
11600 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
11602 * mini-arm.c, objects.cs: more fixes and tests for them.
11604 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
11606 * mini-arm.c: align structures to at least 4 bytes to be able
11607 to keep our current optimized memcpy.
11609 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
11611 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
11613 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11615 * mini.c: ignore SIGPIPE.
11617 2005-09-04 Zoltan Varga <vargaz@gmail.com>
11619 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
11621 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
11623 2005-09-02 Zoltan Varga <vargaz@gmail.com>
11625 * mini.h: Add prototype for mono_allocate_stack_slots_full.
11627 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
11629 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
11630 exception handling support.
11631 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
11632 patch by Brian Koropoff <briank@marakicorp.com>).
11634 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
11636 * mini.c: revert another 'optimization' which breaks when
11637 items on the eval stack need to be saved at a basic block end
11640 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11642 * jit-icalls.c: for arrays, ensure we always provide
11645 2005-08-30 Zoltan Varga <vargaz@gmail.com>
11647 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
11649 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
11651 2005-08-29 Zoltan Varga <vargaz@gmail.com>
11653 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
11654 arguments in their original register.
11656 2005-08-28 Zoltan Varga <vargaz@gmail.com>
11658 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
11661 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
11662 when ssapre is enabled.
11664 * inssel-long.brg: Fix bug in previous patch.
11666 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
11667 multiplication by a constant.
11669 2005-08-27 Zoltan Varga <vargaz@gmail.com>
11671 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
11674 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
11677 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
11679 * inssel-arm.brg: apply changes tested by Brian Koropoff
11680 <briank@marakicorp.com>.
11682 2005-08-25 Zoltan Varga <vargaz@gmail.com>
11684 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
11686 2005-08-24 Zoltan Varga <vargaz@gmail.com>
11688 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
11689 to the same register if dreg is just a base register.
11690 (print_ins): Improve printing of membase opcodes.
11692 * inssel-x86.brg: Add optimized ldind(reg) rules.
11694 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
11696 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
11698 * mini.c: when running under valgrind, set the stack bottom for
11699 the GC at the actual approximate stack for the app (fixes running
11700 mono with valgrind).
11702 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
11704 * mini.c: do no break at the first valuetype to init found
11705 (fixes bug #75791).
11707 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
11709 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
11711 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
11713 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
11715 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
11717 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
11719 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
11721 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
11723 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
11726 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
11729 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
11732 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
11734 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
11736 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
11738 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
11739 in the tail recursion optimization.
11741 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
11742 debug info into the assembly file.
11744 * iltests.il: Add test for filter regions.
11746 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
11747 initial stack of filter regions. Fixes #75755.
11749 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
11751 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
11752 stack requirements.
11754 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
11756 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
11757 the check for an already compiled method on non-ia64 platforms.
11758 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
11761 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
11763 * inssel-x86.brg: Add some optimized call rules.
11765 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
11767 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
11770 * mini.h mini-trampolines.c: Pass the trampoline argument to
11771 mono_arch_patch_delegate_trampoline.
11773 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
11775 * mini-trampolines.c: Fix build.
11777 * mini-amd64.h: Add delegate trampolines.
11779 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
11781 * inssel-amd64.brg: Add optimized call rules.
11783 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
11785 * inssel-ia64.brg: Add optimized ldind(reg) rules.
11787 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
11789 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
11792 * mini-ia64.c: Remove LMF fixmes.
11794 * mini-ia64.h: Remove most fields from LMF.
11796 * inssel-ia64.brg (stmt): Fix unaligned access errors.
11798 * mini-trampolines.c: Add support for IA64 function descriptors.
11800 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
11801 for IA64 function descriptors.
11803 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
11805 * tramp-arm.c: patch the vtable for virtual calls. Added
11806 support code to register/unregister the LMF.
11807 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
11810 2005-08-19 Dick Porter <dick@ximian.com>
11812 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
11813 bit value if needed.
11815 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
11817 * mini.c (mini_get_method): Move handling of wrapper data here.
11819 * mini.c (mono_method_to_ir): Add support for dynamic methods.
11821 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
11824 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
11825 bblock->code does not remain empty.
11827 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
11829 * arrays.cs: Add regression test for #75832.
11831 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
11832 rules. Fixes #75832.
11834 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
11835 instruction scheduling.
11837 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
11839 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
11841 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
11843 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
11845 * mini-codegen.c: Fix VC build.
11847 * cpu-pentium.md: Increase length of atomic_exhange_i4.
11849 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11851 * mini.h: fix signature for mono_register_opcode_emulation.
11853 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
11855 * mini.c: Get rid of most of the helper_sig_... constants using
11856 mono_create_icall_signature ().
11858 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
11860 * jit-icalls.c (helper_ldstr): New helper function.
11862 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
11864 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
11865 throw, load the string using a helper call instead of creating a string object.
11867 * aot.c: Update after LDSTR changes.
11869 * mini.h: Bump AOT file version.
11871 * aot.c: Save class size info into the AOT file. Print more statistics during
11874 * mini.h: Bump AOT file version.
11876 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
11877 ordering of disasm cases. Fixes #74957.
11879 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
11881 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
11882 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
11883 the generic code needed for the ARM port.
11885 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
11887 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
11888 inssel-arm.brg: more ARM features and fixes.
11890 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
11892 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
11893 ARM port work in progress.
11895 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
11897 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
11899 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
11901 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
11903 * inssel.brg (mini_emit_memset): Add support for unaligned access.
11905 * *-ia64.*: Ongoing IA64 work.
11907 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
11909 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
11911 * TODO: Remove out-of-data todo stuff.
11913 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
11916 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
11918 * mini.h: Bump corlib version.
11920 2005-07-27 Martin Baulig <martin@ximian.com>
11923 (create_copy_ins): Added `const unsigned char *ip' argument; set
11924 `copy->cil_code' from it.
11926 2005-07-27 Martin Baulig <martin@ximian.com>
11928 * mini-exceptions.c (mono_handle_exception): Don't call
11929 mono_debugger_handle_exception() for filters.
11931 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
11933 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
11936 2005-07-26 Martin Baulig <martin@ximian.com>
11938 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
11940 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
11941 helper_compile_generic_method() if the method is actually virtual
11944 2005-07-26 Martin Baulig <martin@ximian.com>
11947 (trampoline_code): Renamed to `mono_trampoline_code' and made it
11948 public; this is now accessed directly by the debugger.
11949 (mono_generic_trampoline_code): Removed.
11952 (mono_debug_init_method): Also add interncalls and wrappers.
11954 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
11956 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
11958 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
11960 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
11962 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
11964 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
11966 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
11968 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
11969 getting TLS offsets on AMD64 too.
11971 2005-07-20 KornĂ©l PĂ¡l <kornelpal@hotmail.com>
11973 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
11975 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
11977 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
11978 inssel-arm.brg, mini-arm.h: ARM port work in progress.
11980 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
11982 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
11984 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
11987 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
11988 mono_sparc_is_virtual_call ().
11990 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
11992 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
11993 trampoline parameters.
11995 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
11997 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
11998 to mono_arch_get_vcall_slot_addr.
12000 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
12003 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
12005 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
12007 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
12009 2005-07-19 Martin Baulig <martin@ximian.com>
12011 * exceptions-amd64.c (throw_exception): Call
12012 mono_debugger_throw_exception() here like we're doing it on i386.
12014 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
12016 * mini-ia64.c: Add optimized TLS access support.
12018 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
12020 * mini-exceptions.c: Ongoing IA64 work.
12022 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
12024 * mini.c: Use the default optimization set when embedding. Fixes
12027 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
12029 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
12030 of trampolines to a separate file.
12032 * mini-trampolines.c: New file.
12034 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
12037 * tramp-x86.c: Reorganize the trampoline code to be similar to the
12040 * mini-codegen.c: Fix cygwin build.
12042 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
12044 * mini.c: Add some minor changes needed by the IA64 port.
12046 * *-ia64.*: Ongoing IA64 work.
12048 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
12050 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
12051 trampolines into arch-independent and arch-dependent parts.
12053 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
12055 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
12057 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
12059 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
12060 the xp-regalloc-branch for amd64.
12062 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
12063 xp-regalloc-branch for x86.
12065 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
12067 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
12069 2005-07-06 Martin Baulig <martin@ximian.com>
12072 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
12073 (mono_jit_runtime_invoke): Likewise.
12075 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
12077 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
12080 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
12081 without loading their metadata. Reorganize the file format so exception handling+
12082 debug info is kept separate from normal method info. Create MonoJitInfo
12083 structures for methods lazily.
12085 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
12087 (x86_class_init_trampoline): Patch AOT class init trampolines too.
12089 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
12091 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
12094 * mini.h: Bump AOT file version.
12096 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
12098 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12100 2005-07-01 Raja R Harinath <rharinath@novell.com>
12102 * Makefile.am (check-local): Call semdel-wrapper.
12104 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
12106 * mini-x86.c: Revert the last change as it seems to break the build..
12108 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
12110 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12112 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
12114 2005-06-27 Ben Maurer <bmaurer@ximian.com>
12116 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
12117 outside of the macro, so strange stuff doesn't happen with gcc4
12118 (NEW_AOTCONST_TOKEN): Likewise.
12120 2005-06-28 Martin Baulig <martin@ximian.com>
12122 * mini.c (mini_class_is_system_array): New static method; use this
12123 instead of `klass->parent == mono_defaults.array_class' everywhere
12124 since this also works for the new generic array class.
12126 2005-06-26 Ben Maurer <bmaurer@ximian.com>
12128 * inssel.brg: Remove warnings.
12130 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
12132 * mini-ia64.c: Ongoing IA64 work.
12134 * basic-float.cs: Add float->i1 conversion test.
12136 * iltests.il: Add conv.u4 test.
12138 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
12140 * inssel-long.brg: Fix bug caused by last change.
12142 2005-06-23 Geoff Norton <gnorton@customerdna.com>
12144 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
12145 BSDs. Allows the x86 JIT to work on OSX86
12147 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
12149 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
12152 * mini-ia64.c: Ongoing IA64 work.
12154 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
12156 * mini-ia64.c: Ongoing IA64 work.
12158 * driver.c: Clean up jit_code_hash as well when using --regression.
12160 * inssel-long.brg: Fix long->i4/u4 conversion rules.
12162 * basic-long.cs: Add tests for long->u4 conversion.
12164 2005-06-18 Ben Maurer <bmaurer@ximian.com>
12166 * mini.c: Take mono_get_domainvar out of macros. This makes sure
12167 that we do not depend on undefined C behavior: the order stuff
12168 gets evaluated within an expression. Fixes mono when compiled on
12171 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
12173 * *-ia64.*: Ongoing IA64 work.
12175 * aot.c: Lower memory usage while loading AOT methods.
12177 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
12179 * mini.h: Bump AOT file format version.
12181 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
12183 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
12185 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
12187 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
12188 not on callee assembly). Fixed some comments.
12190 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
12192 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
12193 it gets proper disassembly.
12194 (emit_method_info): Remove some dead code.
12196 * mini.c (mini_method_compile): Allways allocate the GOT var in
12197 mono_method_to_ir for emulating opcodes.
12199 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
12201 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
12202 before freeing the code memory. Fixes #74990.
12204 * objects.cs: Add regression test for #74992.
12206 * liveness.c: Extend live ranges of arguments to the beginning of the
12207 method. Fixes #74992.
12209 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
12210 so it points into the faulting instruction.
12212 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
12214 * jit-icalls.c (mono_imul_ovf): Add exception handling.
12216 * *-ia64.*: Ongoing IA64 work.
12218 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
12220 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
12222 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
12224 * *-ia64.*: Ongoing IA64 work.
12226 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
12228 * basic-long.cs: Add tests for add/sub.ovf.
12230 * basic.cs: Add tests for sub.ovf.
12232 * *-ia64.*: Ongoing IA64 work.
12234 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
12236 * *-ia64.*: Ongoing IA64 work.
12238 * basic.cs: Add conv.ovf.i4.un test.
12240 2005-06-09 Massimiliano Mantione <massi@ximian.com>
12242 * mini.c: (remove_block_if_useless) Fixed bug 75061.
12244 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12246 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
12248 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
12250 * *-ia64.*: Ongoing IA64 work.
12252 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12255 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
12257 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
12259 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
12261 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
12263 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
12265 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
12266 of a call is callable by a near call.
12268 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
12270 * mini-ia64.c: Ongoing IA64 work.
12272 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
12274 * genmdesc.c: Make the generated array non-static.
12276 * inssel-long.brg: Fix LSHR_IMM rule.
12278 * *-ia64.*: Ongoing IA64 work.
12280 * *-ia64.*: Ongoing IA64 work.
12282 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
12284 * *-ia64.*: Ongoing IA64 work.
12286 * *-ia64.*: Ongoing IA64 work.
12288 * mini-ia64.c: Ongoing IA64 work.
12290 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
12292 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
12294 * objects.cs basic-calls.cs: Move some tests to objects.cs.
12296 * objects.cs basic-long.cs: Move some tests to objects.cs.
12298 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
12300 * *-ia64.*: Ongoing IA64 work.
12302 * iltests.il: Add a new test.
12304 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
12305 newobj. Fixes #75042.
12307 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
12309 * *-ia64.*: Ongoing IA64 work.
12311 * *-ia64.*: Ongoing IA64 work.
12313 * *-ia64.*: Ongoing IA64 work.
12315 * basic.cs objects.cs: Move tests accessing static variables as well.
12317 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
12319 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
12321 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
12323 * driver.c: Always print failed tests.
12325 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
12328 * *ia64*: Ongoing IA64 work.
12330 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
12332 * basic.cs: Add tests for add.ovf. Fix warnings.
12334 2005-05-18 Miguel de Icaza <miguel@novell.com>
12336 * driver.c (mono_main): Avoid crash if no argument is passed to
12337 --break; Do not use g_error, but f_printf. And fix all other
12338 ocurrences of the same crash.
12340 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
12342 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
12343 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
12346 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
12348 * *-ia64.*: Add beginnings of IA64 backend.
12350 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
12352 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
12354 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
12357 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
12359 * mini-amd64.c: Fix a warning.
12361 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
12363 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
12364 in float_neg. Fixes #74897.
12366 * mini-amd64.c (emit_call): Fix another near call bug.
12368 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
12370 * declsec.c: Keep the appdomain information in the structure. Added a
12371 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
12372 value gets overwritten).
12373 * declsec.h: Set the default MonoArray for the the stack to 6. Added
12374 an MonoAppDomain member to MonoSecurityFrame.
12375 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
12376 used in the stack walk. Now use a MonoArray which grow (double) when
12379 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
12381 * mini.c: Re-enabled runtime cleanup, since running threads should
12382 now properly stop when exiting.
12384 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
12386 * mini-codegen.c: New file contaning the arch-independent local
12387 register allocator. Not used by any architectures yet.
12389 * mini.h linear-scan.c: Merge some changes from the
12390 mini-xp-local-regalloc branch.
12392 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
12394 * mini-amd64.c (emit_call): Fix calls to native functions when the
12395 runtime is compiled as a shared library. Fixes #74756.
12397 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
12398 on a literal field. Fixes #74751.
12400 2005-04-25 Raja R Harinath <rharinath@novell.com>
12402 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
12404 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
12406 * objects.cs: Add missing null casting test.
12408 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
12410 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
12411 in wrapper methods. Also rename 'address' variable to 'offset'.
12413 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
12415 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
12418 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
12420 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
12423 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12425 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
12427 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
12429 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
12430 just the last bytes.
12432 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
12434 * aot.c (mono_compile_assembly): Fix warning.
12436 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
12437 by the _MSC_VER stuff.
12439 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
12441 * inssel-long.brg: Fix #74588.
12443 * cpu-amd64.md: Fix #74591.
12445 * iltests.il: Add new regression tests.
12447 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
12449 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
12452 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
12454 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
12456 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
12457 from Bill Middleton <flashdict@gmail.com>.
12459 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
12461 * arrays.cs: Add new regression test. Fix warnings.
12463 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
12465 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
12466 and leakage in CKFINITE.
12468 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
12469 this to a null op since it is called on amd64 too.
12471 * exceptions-amd64.c (get_throw_trampoline): Align stack.
12473 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
12474 body since this is not used on amd64.
12476 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
12478 * mini-amd64.c: Remove obsolete fixmes.
12480 * mini.c (print_method_from_ip): Fix debugging support.
12482 2005-2-1 Massimiliano Mantione <massi@ximian.com>
12484 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
12485 so that expressions that don't give much gain are not reduced.
12486 * ssapre.h: Likewise.
12488 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
12490 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
12492 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
12494 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
12496 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
12498 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
12500 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
12502 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
12504 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
12507 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
12509 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
12511 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
12513 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
12514 MONO_ARCH_USE_SIGACTION. Fixes #74252.
12516 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
12518 * mini-x86.c: Fix up stack overflow handling.
12520 * exceptions.cs: Add new regression test.
12522 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
12524 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
12525 mono_jit_thread_attach.
12527 * mini.c (mono_method_to_ir): Verify called method is not abstract.
12529 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
12531 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
12532 avoid calling constructors using callvirt.
12534 * inssel.brg: Fix #74073.
12536 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
12538 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
12539 compilation with non-GCC compilers.
12540 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
12541 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
12543 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
12545 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
12546 klass->interface_offsets (will likely fix bug#74073).
12548 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
12550 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
12552 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
12554 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
12555 to amd64_div_reg_size ().
12557 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
12559 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
12561 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
12563 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
12565 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
12567 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
12569 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
12571 * mini.c (mono_precompile_assembly): Load and precompile referenced
12572 assemblies as well. Fixes #74015.
12574 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
12576 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
12578 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
12580 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
12581 a lot of checks and (anyway) permissions cannot work until corlib is
12584 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
12586 * mini-ppc.c: fixed ABI issue on sysv/ppc.
12588 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
12590 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
12591 calls (fixes bug#72824).
12593 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12595 * mini.c: fix tail recursion elimination (see test in bug#73936).
12597 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
12599 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
12600 some fp functions in sse2 mode.
12602 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
12604 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
12606 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
12608 * mini.h mini.c: Add mono_get_jit_tls_key ().
12610 * mini-x86.c: Enable fast TLS support on windows.
12612 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
12614 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
12615 * mini.c: Check for p/invoke method when generating code. If a
12616 p/invoke method, or it's class, isn't decorated with [Suppress
12617 UnmanagedCodeSecurity] then generate code to call System.Security.
12618 UnmanagedDemand (only if the security manager is active).
12620 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
12622 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
12623 last change as it seems to cause strange crashes.
12625 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12627 * *.c: handle unsafe function pointers where needed.
12629 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
12631 * mini.c (mono_jit_free_method): Remove the fixme too.
12633 2005-03-15 Miguel de Icaza <miguel@novell.com>
12635 * mini.c: As discussed, make the code actually free the delegate
12636 thunk now, to enable the debugging of delegate problems, use
12637 MONO_DEBUG=1 when running Mono.
12639 This takes also care of parts of the leaks as seen by Joe.
12641 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
12643 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
12644 thread_tls_offset calculation.
12646 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
12648 * declsec.c: Reworked linkdemand checks for icall. The previous code
12649 was using the declaration code (untrusted) and didn't work as expected
12650 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
12653 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
12655 * iltests.il: Add new localloc test.
12657 * mini-amd64.c: Handle large stack allocations the same way as on
12658 windows if stack overflow handling is working.
12660 * mini-amd64.c: Allocate the signal stack using mmap.
12662 * mini.c (sigsegv_signal_handler): Fix reading of context.
12664 * mini-exceptions.c: Fix up stack overflow handling.
12666 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
12668 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
12670 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
12672 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
12674 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
12675 tramp_init functions as they are no longer needed.
12677 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
12679 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
12681 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
12683 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
12685 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
12688 * mini-ops.h: Add OP_LMUL_IMM.
12690 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
12691 long mul/div opcodes as intrinsic.
12693 * mini-amd64.c (emit_call): Handle the case when the callee might be
12696 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
12698 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
12701 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
12703 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
12705 2005-03-09 Ben Maurer <bmaurer@ximian.com>
12707 * mini.c (mono_codegen): Don't leak here, to help people running
12710 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
12712 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
12713 conversions in sse2 mode.
12715 * basic-float.cs: Add regression test.
12717 * mini-amd64.c: Reenable sse2.
12719 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
12721 * mini-amd64.c: Disable sse2 until some regressions are fixed.
12723 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
12725 * driver.c: Copyright text should include 2005.
12727 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
12729 * cpu-amd64.md (load_membase): Fix more max lengths.
12731 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
12733 * cpu-amd64.md (load_membase): Fix max length.
12735 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
12737 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
12739 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
12740 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
12742 * basic-float.cs: Add rounding regression test.
12744 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
12746 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
12748 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
12749 structures in registers for pinvoke wrappers.
12751 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
12753 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
12755 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
12757 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
12758 wrapper to mono_jit_thread_attach.
12760 * mini.c (mini_jit_thread_attach): New jit icall.
12762 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
12763 native->managed wrappers.
12765 * exceptions.cs: Add new regression test.
12767 * mini.c (optimize_branches): Check regions in the cbranch to throw
12768 block case as well. Fixes #73242.
12770 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
12772 * mini.c: thread safety fixes.
12774 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
12776 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
12777 patching stuff, since delegates use jump trampolines so there is
12780 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
12783 * tramp-amd64.c: Fix build.
12785 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
12786 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
12788 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
12789 Rename this to mono_arch....
12790 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
12792 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
12794 * mini-amd64.c (emit_call): If both the caller and the callee is
12795 guaranteed to have 32 bit addresses, emit a normal call.
12797 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
12799 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
12800 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
12801 method_ptr inside delegates.
12803 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
12805 * mini.c (mono_jit_free_method): Free the method info even if the native code is
12806 invalidated. Fixes #73001.
12808 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
12810 * mini-x86.c: Only use stdcall for pinvokes on windows.
12812 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
12814 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
12815 * mini-x86.c: remove unreliable __thread var offset detection,
12816 use the correct accessors and enable by default.
12818 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
12820 * mini.c (mono_jit_free_method): Fix memory leak.
12822 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
12824 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
12826 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
12828 * cpu-amd64.md: Fix lengths of atomic opcodes.
12830 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
12832 * driver.c: try to not imply using ICU is any good.
12834 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
12836 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
12837 functions as inline ops.
12839 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
12840 some Interlocked functions as inline ops.
12842 * mini.c (move_basic_block_to_end): Fix bug in last patch.
12844 * mini.h (MonoBasicBlock): Reorganize fields a bit.
12846 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
12848 * mini.c: Add support for OP_NOT_TAKEN.
12850 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
12851 structures in registers for pinvoke wrappers.
12853 * mini-amd64.c: Fix warnings.
12855 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
12857 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
12859 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
12861 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
12862 address instead of loading the address from it.
12864 * mini-x86.c: Add support for returning small structs in registers
12865 on Win32. Fixes part of #70864.
12867 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
12869 * trace.c (get_token): Improve error checking.
12871 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
12873 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
12875 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
12877 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
12878 it can be reused for MonoClass.
12879 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
12882 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
12884 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
12885 instead of a MonoReflectionMethod. The method information wasn't used
12886 when displaying SecurityException details (but will be now).
12888 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
12890 * Makefile.am : windows build fix.
12892 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
12894 * iltests.il: Add new regression test.
12896 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
12899 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
12901 * mini.c: Moved linkdemand check into helper function check_linkdemand
12902 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
12905 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
12907 * declsec.c: Added statistics counter for different kinds of
12909 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
12910 (and commented) declaration.
12911 * mini.c: Added statistics counter for security Demand code
12912 generation. Added display of security statistics.
12914 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
12916 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
12917 Fix compilation errors under gcc-2.95.
12919 2005-02-12 Ben Maurer <bmaurer@ximian.com>
12921 * mini.c, driver.c: Use the new jit trampoline hashtable
12923 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12925 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
12927 2005-02-11 Martin Baulig <martin@ximian.com>
12929 * debug-mini.c (mono_debug_close_method): Free the line number array.
12931 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
12933 * aot.c: Break up large methods into smaller ones. Share GOT slots for
12936 * mini.h: Bump AOT file format version.
12938 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
12940 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
12942 * declsec.h: Added macros to get/set lazyly initialized security
12943 informations about assemblies. Added new enum for different type of
12944 possible LinkDemand violation. Added function to check LinkDemands.
12945 * mini.h: Added a field to MonoCompile to hold any security violation
12946 detected when JITting a method (so it can be thrown later).
12947 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
12948 and CEE_CALLVIRT. Added code to throw exception at the end of
12949 mini_method_compile (note: the exception is unhandled right now).
12951 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
12953 * mini.c, jit-icalls.c: use the managed implementation of
12954 memset for initobj and memset, to avoid managed <-> unmanaged
12957 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
12959 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
12960 optimization if it would need a GOT var.
12962 * basic.cs: Add tests for constant propagation and switch statements.
12964 * ssa.c: Fix out-of-range constant propagation and switch statements.
12966 2005-02-09 <vargaz@freemail.hu>
12968 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
12970 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
12972 * cpu-amd64.md (load_membase): Fix max length of load_membase.
12974 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12976 * mini.c: update to new signature of mono_class_get_allocation_ftn().
12978 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
12980 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
12981 arithmetic operations.
12983 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
12985 * mini-ppc.c: add a workaround for broken user code that
12986 DllImports vararg functions with non-vararg signatures.
12988 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
12990 * mini.c (mono_jit_compile_method_inner): Add detection and a
12991 meaningfull error message for assemblies written in Managed C++.
12993 * tramp-amd64.c mini-amd64.h: Add support for
12994 create_trampoline_from_token ().
12996 * aot.c mini-x86.c abcremoval.c: Applied patch from
12997 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
12999 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
13001 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
13002 which takes a MonoImage/token as parameter instead of a MonoMethod.
13004 * aot.c: Use the new trampoline for initializing vtables.
13006 * aot.c: Add support for ldfld/stfld_remote wrappers.
13008 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
13009 rules for compare <MEM>, IMM.
13011 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
13013 * aot.c: Handle inherited finalizers correctly.
13015 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
13017 * inssel.brg (stmt): Add a missing _setup_... ().
13019 * aot.c: Save some parts of the class state to the AOT file and use it
13020 to recompute that state when a class is initialized.
13022 * mini.c: Install AOT hooks into the runtime.
13024 * mini.h: Bump AOT file format version.
13026 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
13029 * iltests.il: Add new test.
13031 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
13033 * mini.c: fix typo.
13035 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
13037 * mini.c: setup the statistical profiler in the thread attach
13038 callback to cope with the new single thread code.
13040 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
13042 * mini-ppc.c: ensure we have enough room for the profiler
13043 calls (fixed bug#72084).
13045 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
13047 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
13050 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13052 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
13054 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13056 * ssapre.c: Fixed an issue with down safety (this allows IronPython
13057 to succesfully execute parrotbench).
13058 * ssapre.h: Likewise.
13060 2005-2-1 Massimiliano Mantione <massi@ximian.com>
13062 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
13063 variable for stores to method arguments (fixes a SSAPRE issue).
13065 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13067 * mini.c: handle value types in dup, fixes gen-112.cs.
13069 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
13071 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
13072 sequence for calls in dynamic methods to avoid thunks.
13074 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13076 * mini.c: correctly remove dynamic methods from the hashtable.
13078 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13080 * driver.c: Disabled SSAPRE until fix the bug that appears
13081 in IronPython's parrotbench.
13083 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
13085 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
13087 * mini.c (mono_method_to_ir): Revert the previous change.
13089 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
13090 when AOT compiling.
13092 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
13093 mono_jit_info_table_find () etc. when running under valgrind.
13095 * inssel.brg: Fix warnings.
13097 * mini-exceptions.c: Fix warnings.
13099 2005-01-31 Martin Baulig <martin@ximian.com>
13101 * driver.c (compile_all_methods_thread_main): Don't try to compile
13102 generic methods or anything which has type parameters.
13104 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
13106 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
13108 * TestDriver.cs: Add --verbose flags.
13110 * graph.c ssa.c: Fix 64 bit warnings.
13112 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
13113 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
13114 Fix 64 bit warnings.
13116 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
13117 variable not spotted by gcc.
13119 * mini-amd64.c inssel-amd64.brg: Applied patch from
13120 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
13121 X86_COMPARE_MEMBASE opcodes.
13123 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
13125 2005-01-29 Ben Maurer <bmaurer@ximian.com>
13127 * *: MonoMethod->signature might be NULL now. You *MUST* use
13128 mono_method_signature.
13130 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13132 * driver.c (compile_all_methods_thread_main): Compile the methods
13133 without invoking cctors.
13135 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13137 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
13138 * basic-calls.cs: test for the above.
13140 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
13142 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
13143 MonoJitInfo changes.
13145 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
13147 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
13148 eagerly if it contains dynamic methods.
13150 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
13152 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
13153 trace, it is now computed by an icall from trace_ips.
13155 * mini-exceptions.c: Fix a warning.
13157 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
13159 * mini-exceptions.c: don't bother getting stack trace info if
13160 it's not going to be used.
13162 2005-01-27 Raja R Harinath <rharinath@novell.com>
13164 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
13167 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
13169 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
13171 * aot.c: Avoid calling mono_method_get_header () if not needed.
13173 * mini.h: Bump AOT file format version.
13175 * mini.c (mono_emit_native_call): Allocate a GOT var here.
13177 * mini.c (mono_print_tree): Print more info for calls.
13179 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
13181 * declsec.h: Remove warning by adding missing include for marshal.h
13183 2005-01-26 Martin Baulig <martin@ximian.com>
13185 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
13188 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
13190 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
13193 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
13195 * aot.c (mono_compile_assembly): Fix a warning.
13197 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
13199 * declsec.c: Look for security attributes on the original MonoMethod
13200 (and not the wrapped one). This fix permissions on icalls.
13202 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
13204 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13206 * mini.c (mono_allocate_stack_slots): Add a fixme.
13208 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13210 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13212 * inssel.brg: optimize casts of sealed types (more
13213 optimizations waiting for fixes in remoting).
13215 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
13217 * inssel.brg (stmt): Add another dummy rule.
13219 * driver.c: Fix warnings.
13221 * driver.c (mono_main): If running under valgrind, instruct glib to use
13222 the system allocation functions so valgrind can track the memory
13223 allocated by the g_... functions.
13225 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
13227 * mini-ops.h: Add OP_DUMMY_STORE opcode.
13229 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
13231 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
13232 variables in try regions.
13234 * mini.c (mini_method_compile): Don't disable optimizations on large
13235 methods when AOT compiling.
13237 * mini.c (mono_allocate_stack_slots): New arch independent method to
13238 allocate stack slots. Not yet used.
13240 2005-01-22 Ben Maurer <bmaurer@ximian.com>
13242 * debug-mini.c (mono_debug_close_method): Plug some leaks.
13244 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
13246 * mini-ppc.c: make the branch info relative as the code
13247 buffer can be reallocated.
13249 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
13251 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
13252 * driver.c: Removed the AOT/security restriction. Now initialize the
13253 security manager (in metadata) if --security is used.
13254 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
13255 rather than the pointer to declarative security, when AOT is used.
13257 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
13259 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
13260 basic blocks, reduced intrinsic exception throwing code size.
13262 2005-01-22 Miguel de Icaza <miguel@ximian.com>
13264 * driver.c (mini_usage): Reorder the usage screen.
13266 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
13268 * mini.c (mono_resolve_patch_target): Fix warning.
13270 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
13272 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
13275 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
13277 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
13278 breaks the amd64 build.
13280 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
13281 register allocation. Fixes #71454.
13283 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
13285 * arrays.cs: Add new regression test.
13287 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13289 * ssapre.c: Turned usage of snprintf to GString.
13290 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
13291 (I left it on by mistake in my previous commit).
13293 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
13295 * mini.c, cfold.c, basic-calls.cs: preserve side effects
13296 on cond branch optimization (fixes bug# 71515).
13298 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13300 * abcremoval.c: Fixed bug 71062.
13301 * abcremoval.h: Likewise.
13303 2005-1-20 Massimiliano Mantione <massi@ximian.com>
13305 * mini.c: Added a new functionality to optimize_branches, the removal
13306 of useless basic blocks, and fixed some problem in the removal of
13307 critical edges; some utility functions added for both purposes.
13308 * ssapre.c: Added complex expression support, and fixed bug 70637.
13309 * ssapre.h: Likewise.
13310 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
13312 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
13313 * driver.c: Re-enabled SSAPRE.
13315 2005-01-19 Martin Baulig <martin@ximian.com>
13317 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
13318 the result of mono_get_method_constrained().
13320 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
13322 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
13325 2005-01-18 Geoff Norton <gnorton@customerdna.com>
13327 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
13328 be detected. Fixes #59296.
13330 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
13332 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
13333 which can happen. Fixes #71361.
13335 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
13337 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
13340 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
13342 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
13343 appdomain-unload.exe to fail.
13345 * mini.c: Fix some memory leaks.
13347 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
13349 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
13350 Fixed bug and sped up some codepaths.
13352 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
13354 * mini.c: Fix some memory leaks.
13356 * exceptions.cs basic-long.cs: Add test for checked ulong->int
13359 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
13361 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
13364 * iltests.il: Add regression test for #71320.
13366 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
13368 * mini.c (mono_codegen): Fix installation of profiler hooks.
13370 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
13372 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
13374 * mini.h, mini.c, cfold.c: optimize access to enum
13375 readonly fields, too. Eval conditional branches if possible
13376 to perform unreachable code removal in more cases.
13378 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
13380 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
13382 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
13385 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
13386 WinXP DEP. Fixes #71244.
13388 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
13390 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
13392 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
13394 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
13396 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
13398 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
13401 * mini.h: Bump AOT version.
13403 * mini.h (MonoCompile): Change exvar to a hash table.
13405 * mini.c: Allocate a separate exvar for each handler block.
13407 * mini.c: Get rid of the computation of filter_lengths, its not needed.
13409 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
13410 ex var with the pending exception and only throw if the two are equal.
13413 * exceptions.cs: Add tests for rethrow and nested catch clauses.
13415 * mini-x86.c: Fix warnings.
13417 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
13418 used by all the ports now.
13420 * aot.c: Add write-symbols and save-temps options.
13422 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
13424 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
13426 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
13428 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
13431 * tramp-s390.c: Check vtable slot belongs to the domain.
13433 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
13434 as per other platforms.
13436 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
13438 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
13440 * driver.c: we don't run the Main() code in a subthread anymore.
13442 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
13444 * mini.c: added experimental rtc support in the statistical
13445 profiler: if the user has the permission, more accurate statistics
13446 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
13447 The MONO_RTC value must be restricted to what the linux rtc allows:
13448 power of two from 64 to 8192 Hz.
13450 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
13452 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
13454 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
13456 * mini-ppc.c: better icache flush for smp.
13458 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
13460 * mini-amd64.c (emit_move_return_value): Fix memory leak.
13462 * mini-x86.c (get_call_info): Add the get_call_info () code from the
13463 amd64 port, not yet used.
13465 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
13467 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
13470 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
13472 * driver.c: Added --security option to activate the security manager.
13473 Right now this will allow code generation for declarative demands and
13474 is disabled when AOT is specified.
13475 * mini.c: Add code generation for declarative security demands.
13476 * mini.h: Add mono_use_security_manager as an extern gboolean.
13478 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
13480 * aot.c (mono_compile_assembly): Speed up compilation a bit by
13481 emitting more dense assembly code.
13483 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
13484 exception throwing stuff.
13486 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
13488 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
13491 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
13492 left in by mistake.
13494 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
13497 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
13499 * tramp-*.c: Only patch vtable slots if the object is in the current
13500 domain. Fixes appdomain-unload.exe.
13502 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
13504 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
13507 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
13509 * mini.c (reverse_branch_op): New helper function.
13511 * mini.c (optimize_branches): Run the new optimization only on
13512 platforms which support it. Also reverse all kinds of branches.
13514 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
13516 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
13519 * mini.c (optimize_branches): Reverse not-equals branches if the false
13520 bblock is a throw. This happens a lot of time with argument checking in
13523 * mini.c (mono_codegen): Add support for placing basic blocks after
13524 the function epilogue.
13526 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
13529 2005-01-05 Miguel de Icaza <miguel@ximian.com>
13531 * mini.c (setup_stat_profiler): Only set this up if the platform
13532 supports ITIMER_PROF.
13534 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
13536 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
13539 * inssel.brg: Fix a warning.
13541 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
13543 * mini.c: added support for statistical profiler
13544 (run with: --profile=default:stat).
13546 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
13548 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
13550 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
13552 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
13553 related to global registers from the amd64 port.
13555 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
13557 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
13559 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
13560 with global registers.
13561 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
13563 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
13565 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
13567 * debug-mini.c (encode_value): Fix off-by-one.
13569 * aot.c (encode_value): Likewise.
13571 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
13573 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
13575 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
13578 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
13580 * aot.c (emit_method_info): Increase size of temp buffer.
13582 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
13585 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
13587 * aot.c (emit_method_info): Fix build.
13589 * aot.c: Further rework of the AOT file format to reduce the size of
13590 the method info data.
13592 * mini.h: Bump AOT file format version.
13594 2004-12-27 Martin Baulig <martin@ximian.com>
13596 * mini.c (mini_get_method): New static method; call
13597 mono_get_method_full() and mono_get_inflated_method().
13598 (mono_method_to_ir): Use mini_get_method() instead of
13599 mono_get_method_full().
13601 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
13603 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
13605 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
13607 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
13609 * inssel-amd64.brg: Add some optimization rules.
13611 2004-12-24 Ben Maurer <bmaurer@ximian.com>
13613 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
13614 standard not GC'd stuff is fine.
13616 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
13618 * aot.c: Rework the AOT file format to get rid of most of the global
13619 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
13621 * mini.h: Bump AOT file format version.
13623 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
13625 * mini.h: Bump AOT file format version.
13627 * aot.c (mono_aot_is_got_entry): New function to determine if an
13628 address is inside a GOT.
13630 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
13632 * cpu-pentium.md: Increase the maximum size of some instructions which
13633 might involve a got access.
13635 * mini.c (get_method_from_ip): Another debug helper function.
13637 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
13638 when got var accesses are created during the decompose phase.
13640 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
13642 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
13643 argument mini_compile_method and to MonoCompile, and use this to
13644 determine whenever a given method is compiled for AOT. This allows the
13645 other methods compiled during AOT compilation to be free of AOT stuff,
13646 so the backends does not need to add special support for them by
13647 creating a fake GOT etc.
13649 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
13652 2004-12-21 Ben Maurer <bmaurer@ximian.com>
13654 * mini.c (mono_method_to_ir): It turns out that some of the
13655 x-appdomain wrappers are lax with types, so just ignore this for
13658 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
13659 at the vtable->klass. If it is non-shared code we can just use the
13662 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
13664 * mini-ppc.c: access MonoDomain from tls, too.
13666 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
13668 * declsec.c: Removed unused variable (and related warning ;-)
13670 2004-12-21 Ben Maurer <bmaurer@ximian.com>
13672 * iltests.il: New test for LDELEMA on an array of ref types.
13674 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
13675 all ldelema's on reftypes.
13676 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
13677 it was the wrong place to put it.
13679 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
13680 register to pop to make this cleaner, at the request of Paolo.
13682 2004-12-20 Ben Maurer <bmaurer@ximian.com>
13684 * mini-ops.h (OP_GETHASHCODE): New op.
13686 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
13688 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
13691 For a microbenchmark, this reduces the cost of Hashtable.get_Item
13694 * mini-x86.c (mono_arch_output_basic_block): Rather than
13702 The first is 3 bytes while the second is 1. This saves 36 kb on
13703 mscorlib, quite a big saving. When bootstraping mcs, I was able to
13704 see a small boost because of icache locality.
13706 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
13708 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
13710 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
13711 started code sharing with the generic code.
13713 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
13715 * mini-ppc.c, cpu-g4.md: added code for direct access to
13718 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
13720 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
13721 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
13724 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
13726 * declsec.c|h: Added functions to cache the declarative stack modifiers
13727 in MonoJitInfo and to create a security frame from a MonoJitInfo
13729 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
13730 created. Register internal calls for System.Security.SecurityFrame::
13731 _GetSecurityFrame and _GetSecurityStack.
13732 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
13733 the definitions for the new stack walk/callback mechanism.
13734 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
13735 first security frame for LinkDemands and InheritanceDemands) and
13736 GetSecurityStack for Demands. Both use the new mono_walk_stack code
13738 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
13739 walk initialization (lupus).
13741 2004-12-20 Ben Maurer <bmaurer@ximian.com>
13743 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
13745 (handle_loaded_temps): Do not create a temporary variable for
13746 things that we know are temps. They will never be modified.
13747 (mono_spill_call): Set MONO_INST_IS_TEMP
13748 (mono_emulate_opcode): ditto
13750 (mono_method_to_ir.CEE_DUP): ditto
13752 2004-12-19 Ben Maurer <bmaurer@ximian.com>
13754 * mini.c (type_to_eval_stack_type): Make this handle the void type
13755 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
13756 (emit_tree): use ip_in_bb to special case some common idioms
13757 Update all callers to pass in the IP.
13758 (mono_method_to_ir): Make CEE_CALL* do the above as well.
13760 This gives us a nice 2% speedup in mcs bootstrap.
13762 * mini-x86.c (peephole_pass): Peephole pass to make
13771 * mini.c (ip_in_bb): new method.
13772 (mono_method_to_ir): use this method rather than doing the hash
13775 * linear-scan.c (mono_linear_scan): When expiring actives, you
13776 don't need to keep around variables that expire on this
13777 instruction. This makes it so that:
13780 store (ebx add (ebx, 1))
13784 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
13786 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
13787 combination to avoid doing two copies. Fix up problems with previous
13790 * mini.c: Fix 64 bit warnings.
13792 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
13794 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
13796 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
13797 changes from the x86 code.
13799 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
13801 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
13803 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
13804 throwing code to reduce its size, unify the AOT and non-aot code and
13805 get rid of relocations in the AOT case.
13807 * mini-x86.h mini.c exceptions-x86.c
13808 (mono_arch_get_throw_corlib_exception): New arch specific function to
13809 raise corlib exceptions which doesn't require relocations in the
13812 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
13814 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
13816 * mini.c (mono_emit_method_call): Only allocate the got var when it is
13819 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
13822 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
13824 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
13825 with add function when used from Inc/dec atomic
13826 functions. Re-enabled optimization on x86.
13827 * mini-ops.h: renamed atomic_add functions to
13828 allow _add to match the Interlocked::Add and
13829 _add_next to match Interlocked::Inc/Dec.
13831 2004-12-15 Massimiliano Mantione <massi@ximian.com>
13833 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
13834 linking of BBs to the end BB, and enabled SSAPRE also with
13835 consprop and copyprop (which was prevented by that bug).
13837 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
13839 * mini-x86.c: disabling the Interlocked optimizing code.
13841 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
13843 * aot.c (load_aot_module): Move reading of got_addr after the AOT
13844 file version check.
13846 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
13848 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
13849 interlocked optimization due lack of support on x86, rewrote
13850 exchange to take into account that base may be in eax.
13852 xsp works again; activated Interlocked optimizing code.
13854 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
13856 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
13858 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
13860 * mini-ops.h: Add new opcodes.
13862 * mini.h: Add new patch types. Add got_var to MonoCompile.
13864 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
13865 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
13866 make it work with all kinds of patchable code.
13868 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
13869 address of the GOT, and referencing entries in the GOT.
13871 * mini.c: Add code to load the GOT address if needed by an opcode.
13873 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
13874 independent AOT code on the x86 using an elf-style Global Offset Table.
13876 2004-12-14 Raja R Harinath <rharinath@novell.com>
13878 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
13880 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13882 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
13885 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
13887 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
13888 of Interlocked:Increment/Decrement/Add as inline ops.
13889 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
13891 2004-12-12 Geoff Norton <gnorton@customerdna.com>
13893 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
13894 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
13896 2004-12-12 Duncan Mak <duncan@ximian.com>
13898 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
13899 again. `patch_info->table_size' is no longer valid after Zoltan's
13902 2004-12-12 Martin Baulig <martin@ximian.com>
13904 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
13905 if we are the "real" method, ie. not an inlined method inside it.
13907 2004-12-11 Ben Maurer <bmaurer@ximian.com>
13909 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
13910 before we look in the special fields table. This fixes
13911 ../tests/thread-static-init.cs.
13913 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13915 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
13916 for Array get_Rank and get_Length. Fixes bug #70465.
13918 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
13920 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
13921 separate structure to reduce the size of MonoJumpInfo.
13923 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
13925 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
13927 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
13929 * mini.c (mini_get_inst_for_method): Changed to allow ports
13930 to return a MonoInst instead of opcode
13931 (renamed mini_get_opcode_for_method to better reflect the new functionality)
13933 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
13934 Allow ports to return a created MonoInst instead of op-code, will enable
13936 (renamed mini_get_opcode_for_method to better reflected the functionality)
13938 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
13940 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
13942 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
13944 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
13947 2004-12-08 Martin Baulig <martin@ximian.com>
13949 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
13950 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
13952 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
13954 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
13957 * exceptions.cs: Disable some tests which depend on properties of x86 fp
13960 2004-12-08 Raja R Harinath <rharinath@novell.com>
13962 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
13964 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
13966 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
13967 bug introduced by the previous patch.
13969 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
13971 * mini-ppc.c, objectc.cs: handle large structs passed by value
13972 (fixes bug #69972).
13974 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
13976 * mini-ppc.c: OP_ARGLIST implementation from
13977 Geoff Norton <gnorton@customerdna.com>.
13979 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13981 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
13982 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
13984 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
13986 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
13988 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13990 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
13993 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
13995 * mini-sparc.c: Zero out localled-ed memory.
13997 * iltests.il: Add tests for zeroing out localloc-ed memory.
13999 2004-12-04 Martin Baulig <martin@ximian.com>
14001 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
14002 mono_method_get_signature_full().
14004 2004-12-03 Massimiliano Mantione <massi@ximian.com>
14006 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
14007 and some utility functions (always for SSAPRE), integrated SSAPRE.
14008 * mini.h: Likewise.
14009 * driver.c: Added ssapre option.
14010 * ssa.c: Small fix on OP_ARG handling.
14011 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
14012 * Makefile.am: Likewise.
14014 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
14016 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14017 now in the xp code.
14019 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
14022 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14024 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
14026 * cpu-s390.md : Increase instruction length of oparglist.
14028 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
14030 2004-11-30 Martin Baulig <martin@ximian.com>
14032 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
14033 virtual generic methods. We call a special helper_compile_generic_method()
14034 icall to retrieve the method from the vtable, inflate and compile
14035 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
14037 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
14039 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
14041 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
14043 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
14045 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
14048 2004-11-27 Ben Maurer <bmaurer@ximian.com>
14050 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
14051 platforms with PIC aot.
14053 2004-11-28 Martin Baulig <martin@ximian.com>
14055 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
14058 2004-11-28 Martin Baulig <martin@ximian.com>
14060 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
14061 the result of mono_type_get_underlying_type() to check whether
14064 2004-11-26 Martin Baulig <martin@ximian.com>
14067 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
14070 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
14072 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
14073 the same way as the other arguments so they won't get clobbered.
14075 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
14076 calls through R11 since it is clobbered by the trampoline code.
14078 2004-11-26 Raja R Harinath <rharinath@novell.com>
14080 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
14081 pick up in-tree mscorlib.dll.
14083 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
14085 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
14087 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
14088 runtime data/code are now stored in a table similar to the GOT in ELF.
14089 This allows the code itself to be position independent.
14091 * aot.c: Fix loading of referenced assemblies after the lazy assembly
14094 * aot.c: Attach ELF type (object/function) directives to all global
14097 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
14099 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
14101 * mini-amd64.h: Turn on PIC AOT code.
14103 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
14104 returning the offset within an OP_AOTCONST instruction where the GOT
14105 offset needs to be added.
14107 * mini.h: Bump AOT file format version.
14109 2004-11-25 Martin Baulig <martin@ximian.com>
14111 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
14112 uninflated generic methods.
14114 2004-11-25 Martin Baulig <martin@ximian.com>
14116 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
14118 2004-11-24 Martin Baulig <martin@ximian.com>
14120 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
14121 original klass (this only applies for generic instances).
14123 2004-11-24 Martin Baulig <martin@ximian.com>
14125 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
14126 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
14129 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
14131 * mini.c (mono_method_to_ir): Disable inlining for methods containing
14132 localloc. Fixes #69678.
14134 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
14136 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
14138 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
14139 used SSE registers on pinvoke calls. Fixes #69774.
14141 2004-11-23 Geoff Norton <gnorton@customerdna.com>
14143 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
14144 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
14146 2004-11-23 Raja R Harinath <rharinath@novell.com>
14148 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
14149 Refer directly to the mcs/ tree.
14151 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14153 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
14154 Check if a trampoline for a synchronized method is required.
14156 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
14158 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
14159 with localloc if needed. Throe arithmetric exception in
14160 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
14161 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
14163 2004-11-19 Geoff Norton <gnorton@customerdna.com>
14165 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
14166 types before switching on type. Fixes #69622.
14168 2004-11-19 Raja R Harinath <rharinath@novell.com>
14170 * Makefile.am (check-local): New. Integrate into 'make check'.
14171 (MCS,RUNTIME): Define using in-tree mono and mcs.
14173 (%.exe): Use $(ILASM).
14175 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
14177 * mini-ppc.c: adjust initial prolog size (bug #69691).
14179 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
14181 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
14184 2004-11-17 Raja R Harinath <rharinath@novell.com>
14186 * Makefile.am (clean-local): Rename from 'clean'.
14188 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14190 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
14191 to mono_arch_is_int_overflow.
14192 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
14195 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
14197 * declsec.c|h: New files to support declarative security attributes.
14198 Added function to check if a method has (applicable) security.
14199 * mini.c|h: Add check for declarative security attributes in
14200 mono_method_check_inlining.
14201 * Makefile.am: Added declsec.c and declsec.h to the build.
14203 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
14205 * mini.c, mini.h: update to keep dynamic code info per-domain.
14207 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
14209 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
14210 (mini_init): Get rid of it from here too.
14212 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14214 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
14215 implemented OP_RETHROW (patch by Geoff Norton
14216 <gnorton@customerdna.com>).
14218 2004-11-10 Geoff Norton <gnorton@customerdna.com>
14220 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
14221 between appdomains. Fixes appdomain-unload on PPC.
14223 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
14225 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14226 mini-exceptions.c: handle the new wrapper types.
14227 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
14228 token value as a MonoClass* when compiling a wrapper.
14229 mono_jit_create_remoting_trampoline now takes an additional
14230 MonoRemotingTarget parameter.
14232 2004-11-10 Martin Baulig <martin@localhost>
14234 * mini.c (mono_method_to_ir): Use `generic_container->context'
14235 rather than creating a new one.
14237 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14239 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
14241 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
14243 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
14245 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
14246 the experimental aot cache stuff.
14248 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14250 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14251 mini-exceptions.c: update to exception clause structure changes.
14253 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14255 * exceptions-x86.c (throw_exception): Fix warnings.
14257 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
14260 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
14262 * exceptions-sparc.c (get_throw_exception): Really fix this.
14264 2004-11-07 Ben Maurer <bmaurer@ximian.com>
14266 * tramp-*.c: we no longer support icalls without wrappers, so
14267 a bit of code can be removed here
14269 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
14271 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
14274 * cpu-sparc.md: Add op_rethrow.
14276 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
14278 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
14280 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
14281 * mini-ops.h: Add OP_RETHROW.
14283 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
14285 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
14287 2004-11-05 Geoff Norton <gnorton@customerdna.com>
14289 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
14290 Makes the output much easier to read
14292 2004-11-05 Ben Maurer <bmaurer@ximian.com>
14294 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
14295 prevents another huge leak when compiling with ssa. Secondly, the
14296 performance of doing this rather than freeing the lists is much
14297 better. GList does a lock every time you allocate a list link,
14298 so that it can use a memory pool. So, it is better to just use
14299 a memory pool of our own.
14301 * ssa.c, linear-scan.c: replace g_list_remove_link with
14302 g_list_delete. The remove one does not free the GList, so we were
14303 leaking memory. On -O=all --compile-all with corlib, this cut down
14304 3 MB of allocations.
14306 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
14308 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
14310 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
14312 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
14313 into a new function mono_create_jit_trampoline ().
14315 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
14317 * trace.c (get_spec): Allow tracing of classes without a namespace.
14319 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
14321 * mini.c: Fix pointer overwrite in mini_method_compile.
14323 2004-11-2 Geoff Norton <gnorton@customerdna.com>
14325 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
14326 The darwin ABI needs some special handling for 1 and 2 byte structs
14327 Lets use lbz/lhz instead of lwz everywhere.
14328 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
14329 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
14330 Use stb/sth for the former, and put the latter always on stack instead of in
14331 argument registers.
14333 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
14335 * trace.c (is_filenamechar): Add '_'.
14337 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14339 * mini-s390.c: Fix prolog length to allow for large trace requirements.
14341 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
14343 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
14345 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
14346 depends on libmonogc. Fixes #68805.
14348 2004-10-26 Miguel de Icaza <miguel@ximian.com>
14350 * mini.c (mono_jit_free_method): Provide extra information for
14351 this error. Currently this leaks, but will be turned into a
14352 developer option in the future.
14354 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
14356 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
14358 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
14360 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
14361 boundary. Fixes reading of PATCH_INFO_R4 and R8.
14362 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
14364 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
14366 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
14367 trampolines for AOT code.
14369 2004-10-22 <vargaz@freemail.hu>
14371 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
14372 constructed types. Fixes #68136.
14374 2004-10-21 Martin Baulig <martin@ximian.com>
14376 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
14377 if it returns true, unwind the stack to the call instruction.
14379 2004-10-21 <vargaz@freemail.hu>
14381 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
14383 * mini.h: Bump AOT version number.
14385 * objects.cs: Add another test for unbox trampolines.
14387 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
14390 2004-10-20 <vargaz@freemail.hu>
14392 * driver.c: Add SHARED to the set of optimizations tested.
14394 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
14396 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
14397 used by CEE_NEWARR.
14399 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
14401 2004-10-20 Martin Baulig <martin@ximian.com>
14403 * mini-exceptions.c (mono_handle_exception): Call
14404 mono_debugger_handle_exception() to tell the debugger about
14405 catch/finally clauses.
14407 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
14409 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
14411 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
14414 2004-10-15 Geoff Norton <gnorton@customerdna.com>
14416 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
14417 methods as their native size, fixed bug #57543, #57545.
14418 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
14419 This saves a temporary register and mullw call down into 1 (minor perf
14420 increase for cases like sum = sum * 5; This use to translate into:
14423 It now translates to
14426 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
14428 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
14431 2004-10-11 Martin Baulig <martin@ximian.com>
14433 * mini.c (mono_method_to_ir): If we're a generic method, get the
14434 MonoGenericContainer from our MonoMethodNormal and create a
14435 MonoGenericContext from it.
14437 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
14439 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
14441 * basic-long.cs: Add test for checked i8->i2 cast.
14443 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14445 * inssel-ppc.brg: added a couple of speedup rules.
14447 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
14449 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
14450 to speed up rebuilds.
14452 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14454 * mini-s390.c: Minor fix to OP_OR_IMM.
14456 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
14458 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
14459 better. Fixes appdomain-unload.exe on sparc.
14461 2004-10-02 Massimiliano Mantione <massi@ximian.com>
14463 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
14464 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
14467 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
14469 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
14471 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
14473 * mini.c: Always generate a field read/write wrapper for members
14474 of the class MarshalByRefObject since the actual instance could
14477 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
14479 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
14481 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
14483 * driver.c mini.h trace.c: Move the setting of the main assembly into
14484 a separate function called mono_trace_set_assembly () and call it after
14485 actually loading the main assembly. Fixes #66872.
14487 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
14489 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
14490 using the code manager.
14492 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
14494 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
14496 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
14498 * cpu-amd64.md: Fix bug in previous patch.
14500 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
14503 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
14505 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14506 mini-exceptions.c: updates for changed stack walk interface.
14508 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14510 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
14512 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
14514 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
14516 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
14518 * driver.c (mini_regression_list): Do not call mono_assembly_close
14519 since assemblies can't be unloaded.
14521 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
14523 * cpu-amd64.md: Fix more instruction lengths.
14525 * cpu-amd64.md: Fix lengths of some instructions.
14527 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
14529 * inssel.brg: Make the array ldelema check aot friendly.
14531 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
14533 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
14535 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
14537 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
14539 * mini-x86.c: Fix build.
14541 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
14542 mono_type_get_underlying_type () helper function to simplify code.
14544 2004-09-09 Martin Baulig <martin@ximian.com>
14546 * mini-amd64.c: Don't access `type->data.klass' directly, call
14547 mono_class_from_mono_type() instead since the type may be a
14550 2004-09-09 Martin Baulig <martin@ximian.com>
14552 * mini-amd64.c (get_call_info): Fix support for generic instances.
14553 (add_valuetype): Use mono_class_from_mono_type() to get the class
14554 since we can be a generic instance.
14556 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
14558 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
14560 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
14562 * liveness.c: reset spill costs on each scan: bug 62107
14564 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
14566 * exceptions-sparc.c (mono_arch_find_jit_info): remove
14567 unnecessary line that doesn't compile
14569 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
14571 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
14572 trampolines, make them call an error function so people can fix their
14575 2004-09-06 Martin Baulig <martin@ximian.com>
14577 * mini.c (mono_method_to_ir): When initializing locals, handle a
14578 generic instances like a valuetype if it's a valuetype and like a
14579 class if it's a class.
14581 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
14583 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
14584 stack. Fixes #64674.
14586 * exceptions.cs: Add test for unwinding of call arguments.
14588 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
14590 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
14591 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
14592 set the carry/borrow flag). The sparc and s390 implementations
14593 can now use optimized versions (and simplify the code). ppc bugfixes.
14595 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
14597 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
14599 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
14601 * inssel-amd64.brg: Remove leftover 32 bit rule.
14603 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
14605 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
14607 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
14608 mono_arch_find_jit_info functions into a new function. Fix a memory
14611 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
14614 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
14616 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
14619 * exceptions.cs: Add array size tests.
14621 * mini.c: Allocate a separate icall wrapper for each arity of
14622 mono_array_new_va. Fixes #59509.
14624 * exceptions.cs: Add testcase for 64578.
14626 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
14628 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
14630 2004-09-02 Martin Baulig <martin@ximian.com>
14632 * mini.c (mono_method_to_ir): When initializing the locals, call
14633 handle_initobj() on the generic instance itself, not its
14636 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
14638 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
14639 MonoJitInfo for dynamic methods.
14641 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
14643 * mini.c: Add support for freeing JIT data for dynamic methods.
14645 2004-09-01 Martin Baulig <martin@ximian.com>
14647 * mini-x86.c (is_regsize_var): Added support for generic
14649 (mono_arch_emit_prolog): Make this compile again, use
14650 `x86_push_imm_template (code)'.
14652 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
14654 * mini-x86.c: make all push_imm instructions that get
14655 patched always emit the long form
14657 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
14659 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
14660 in a per-domain hash.
14662 * mini-amd64.c (merge_argument_class_from_type): Handle generic
14665 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
14667 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
14670 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
14673 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
14674 Beginnings of SSE2 support.
14676 * exceptions.cs: Add more tests for checked int<->uint casts.
14678 2004-08-28 Martin Baulig <martin@ximian.com>
14680 * mini-x86.c (mono_arch_instrument_epilog): Added support for
14684 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
14685 Handle generic instances recursively.
14687 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
14689 * iltests.il: test for conv.u8 on a constant
14691 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
14693 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
14694 LCONV_x4 (shrun_32 (membase)).
14696 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
14698 * inssel-x86.brg: c&p rules for push/setret of long
14700 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
14702 * inssel-x86.brg: c&p rules for compare (base, regvar) and
14703 compare (regvar, base)
14705 * inssel-x86.brg: more burg love
14707 * inssel.brg: more cleanup
14709 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
14711 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
14713 * basic-long.cs, basic-calls.cs: new tests for optimization.
14715 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
14717 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
14720 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
14722 * mini-amd64.c (read_tls_offset_from_method): Add another case.
14724 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
14726 * inssel.brg (mini_emit_memcpy): use
14727 NO_UNALIGNED_ACCESS to disable memcpy optimization
14729 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
14731 * mini-amd64.c: Handle generic types in various places.
14733 * mini.c (mono_method_to_ir): Handle generic types in init locals.
14735 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
14737 * mini.c (handle_box): Fix warning.
14739 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
14741 * mini-amd64.h: Enable the emit_state optimization.
14743 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
14745 * mini-amd64.c: Add some new 64 bit peephole opts.
14747 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
14749 * cpu-amd64.md: sreg1 of div instructions must be %rax.
14751 * mini-amd64.c: Register allocator fixes.
14753 * mini.c: Add an optimization to emit_state to avoid allocation of new
14754 registers on some platforms.
14756 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
14758 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
14760 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
14761 allocation. Fixes #63085.
14763 * basic-long.cs: Add new regression test.
14765 * mini-amd64.c: Register allocator improvements.
14767 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
14769 * mini-amd64.c (read_tls_offset_from_method): Add another code
14772 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
14773 instruction sequence for nullifying class init trampolines.
14775 * objects.cs: Add new regalloc test.
14777 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
14779 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
14781 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
14783 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
14786 * driver.c: Fix profiling after TLS changes.
14788 * driver.c (mono_main): Set mono_stats.enabled if needed.
14790 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
14793 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
14795 * mini-x86.c: use a 1 op rather than a 2 op tls access
14796 instruction -> faster.
14798 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
14800 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
14803 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
14805 * exceptions-sparc.c (throw_exception): fix typo
14807 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
14809 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
14810 set tree->dreg correctly with tls. Allow any
14811 register to be used.
14813 * mini-x86.c (read_tls_offset_from_method): add new code
14814 generation pattern seen with GCC.
14817 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14819 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
14820 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14821 exceptions-sparc.c: fix some performance issues in exception
14822 handling and setting of the stack trace for exceptions that were
14825 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
14827 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
14830 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
14833 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
14835 This patch inlines tls access, when possible.
14837 * mini.h: new arch functions for TLS intrinsics.
14838 All platforms updated with a stub.
14840 * mini.c: use the new intrinsics
14842 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
14843 arch specific intrinsic for tls variables
14845 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
14847 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
14850 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
14852 * mini.c: thread local allocation
14854 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
14856 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
14858 * Makefile.am: Link against the static version of libmonogc.
14860 * Makefile.am: Link the static versions of the convenience libraries
14861 into the mono executable.
14863 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
14865 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
14867 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
14868 on integer overflow.
14870 * mini-amd64.c: Reorganize function call code.
14872 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
14874 2004-08-14 Ben Maurer <bmaurer@ximian.com>
14876 * inssel-x86.brg: use xor eax,eax.
14878 * basic.cs: new tests
14880 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
14882 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
14883 in exception throwing code.
14885 2004-08-14 Ben Maurer <bmaurer@ximian.com>
14887 * inssel-x86.brg: use xor esi,esi.
14889 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
14891 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
14892 can trace methods compiled during mini_init () too.
14894 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
14897 2004-08-14 Ben Maurer <bmaurer@ximian.com>
14899 * Makefile.am: static link on x86 (r=zoltan)
14901 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
14903 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
14904 code since it causes some programs to fail.
14906 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
14908 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
14910 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
14912 * mini.c: ovfops_op_map - add STACK_OBJ case for
14914 * basic.cs: add test_0_pin_string as test
14917 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
14919 * Makefile.am: build C# if srcdir != builddir
14921 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14923 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
14924 fall-through blocks.
14926 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14928 * driver.c: enable loop by default again and include abcrem in -O=all.
14930 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
14932 * iltests.il: Add some localloc tests.
14934 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
14936 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
14939 * inssel-amd64.brg: Add some optimizations.
14941 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
14944 * Makefile.am: Statically link mono against libmono on AMD64.
14946 * mini-amd64.c inssel-amd64.brg: Optimizations.
14948 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
14950 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
14952 * tramp-amd64.c: Patch calling code in trampolines.
14954 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
14956 * mini-amd64.c: pinvoke struct passing fixes.
14958 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
14960 * mini-sparc.c: redo change, make mono_arch_cpu_init call
14961 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
14963 2004-08-05 Duncan Mak <duncan@ximian.com>
14965 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
14968 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
14970 * mini-amd64.c (emit_move_return_value): Move return value for normal
14973 2004-08-05 Martin Baulig <martin@ximian.com>
14975 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
14976 `type->type'; just modify `type' itself when dealing with enums
14977 and generic instances.
14978 (check_call_signature): Make `simple_type' a `MonoType *'.
14980 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
14982 * mini.c: Use OP_PADD to add offsets to addresses.
14984 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
14986 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
14988 * mini-sparc.c (mono_arch_emit_epilog): fix check
14989 for folding last op into restore instruction
14991 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
14993 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
14994 helper methods using the code manager.
14996 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
14998 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
15000 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15002 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
15003 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
15005 * mini-s390.c: fix tail processing
15007 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
15009 * mini-ppc.c: mul.ovf.un exception name fix.
15011 2004-08-03 Martin Baulig <martin@ximian.com>
15013 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
15014 instances; before jumping to `handle_enum', also modify `ptype'.
15016 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
15018 * cpu-sparc.md: fcall maximal length too small.
15020 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
15022 * mini-amd64.c mini.h: Add initial support for passing/returning
15023 structures to/from pinvoked methods.
15025 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
15027 * mini-ppc.c: reg allocator fix.
15029 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
15031 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
15033 * inssel.brg: Optimize memset on 64 bit machines.
15035 * mini-amd64.c: Fix some vararg cases.
15037 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15039 * mini-s390.c: Corrected macro in emit_float_to_int
15041 * s390-abi.cs: Tests to exercise the s390 ABI
15043 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15045 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
15048 * basic.cs: Add a test for add.ovf.un.
15050 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
15052 * mini-sparc.c: add case for OP_IDIV_UN
15054 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15056 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
15058 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
15060 2004-07-30 Ben Maurer <bmaurer@ximian.com>
15062 * basic.cs: regression tests.
15064 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
15067 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
15069 * basic.cs: Add a new test.
15071 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
15072 and AOT. Various fixes and optimizations.
15074 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
15076 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15078 * mini-ppc.c: make sure temp regs are not used for global reg
15081 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
15083 * cpu-sparc.md: conv_i8 fix for 64bits
15085 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
15087 2004-07-29 Ben Maurer <bmaurer@ximian.com>
15089 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
15090 add opcode for cmp BYTE PTR [eax], imm.
15092 * inssel.brg: Make memcpy and memset takes bases.
15094 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
15096 * *-amd64.*: More AMD64 work.
15098 2004-07-28 Ben Maurer <bmaurer@ximian.com>
15100 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
15101 add a compare-not-equal opcode.
15103 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
15105 * mini.c: Use mono_init_from_assembly instead of mono_init.
15107 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
15109 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
15111 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
15113 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
15115 * inssel.brg: 64 bit fixes.
15117 * mini.h (MonoCallInst): Add some AMD64 specific data.
15119 * mini.h: Add some OP_P opcodes.
15121 2004-07-28 Ben Maurer <bmaurer@ximian.com>
15123 * basic.cs: tests for 61797 and 61740
15125 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15127 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
15128 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
15130 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
15132 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
15134 * *-amd64*.*: Ongoing AMD64 work.
15136 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
15138 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
15140 * *-amd64*: Ongoing AMD64 work.
15142 * mini-arch.h: Add AMD64 support.
15144 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
15146 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
15148 * mini-ops.h: Add new opcodes.
15150 * Makefile.am: Add AMD64 support.
15152 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
15153 rules into the inssel-long*.brg files.
15155 * *-amd64.*: Add beginnings of AMD64 backend.
15157 2004-07-22 Ben Maurer <bmaurer@ximian.com>
15159 * mini.c (print_dfn): commenting out the code that prints
15160 the cil. With -O=deadce, this makes -v -v crash.
15162 * cpu-pentium.md: make checkthis have a length of 2
15164 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
15166 * mini-sparc.h: fix implementations of __builtin
15167 functions for Sun compiler for V9.
15169 2004-07-16 Ben Maurer <bmaurer@ximain.com>
15171 * mini.c: use the new stelem.ref wrapper
15172 * exceptions.cs, arrays.cs: new stelem.ref tests
15174 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15176 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
15177 new XSP should work with these changes).
15179 2004-07-14 Ben Maurer <bmaurer@ximain.com>
15181 * inssel-{long32,x86,}.brg: trivial optimizations.
15183 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15185 * mini.c: load value when emitting box operation in
15188 2004-07-12 Ben Maurer <bmaurer@ximian.com>
15190 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
15191 is one byte shorter than cmp DWORD PTR [eax], 0.
15193 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15195 * inssel-ppc.brg: arguments on the stack are always
15196 relative to the stack pointer (spotted by Neale Ferguson).
15198 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15200 * exceptions-x86.c: delay appending the method name to the trace until
15201 after mono_jit_info_table_find is called, as this gets the real
15204 2004-07-09 Ben Maurer <bmaurer@ximian.com>
15206 * aot.c: register roots
15208 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15210 * aot.c : I could just use PLATFORM_WIN32 flag.
15212 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15214 * aot.c : Reverting the previous fix. This time it broke linux build.
15216 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
15218 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
15220 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
15222 * mini.c (handle_stack_args): Remove some more debugging code.
15224 * mini.c (handle_stack_args): Remove debug output left in by mistake.
15226 * driver.c mini.h aot.c: Allow additional options to be specified with
15227 --aot and pass them to mono_compile_assembly.
15229 * aot.c: Add experimental code to AOT compile all loaded assemblies
15230 on demand and save the code into a cache in the filesystem.
15232 * aot.c: Add support for more wrapper methods.
15234 * mini.c (handle_stack_args): Handle some corner cases. Fixes
15237 * cpu-*.md: Remove removed opcodes.
15239 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
15240 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
15241 related icalls to marshal.c.
15243 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
15245 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
15247 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
15249 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
15251 2004-07-06 Ben Maurer <bmaurer@ximian.com>
15252 * liveness.c: If liveness is recomputated we need to reset the information
15253 for each variable. This way, if the liveness range has been narrowed
15254 by optimizations that happened after the last computation, we can return
15257 For example, if you have
15262 // Tons of code that does not affect i
15268 i = 0 is dead code and will be removed by SSA. However, when
15269 linear scan gets to the code, i will still appear to be live
15270 throughout the entire block. This prevents good register allocation.
15272 2004-07-06 Martin Baulig <martin@ximian.com>
15274 * debug-mini.c (mono_debug_init_method): Allow
15275 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
15276 (mono_debug_add_icall_wrapper): New method.
15278 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
15280 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
15282 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
15285 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
15287 * aot.c (mono_aot_load_method): Fix loading of debug info.
15289 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15291 * aot.c: Add logging support.
15293 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
15295 * mini.h: Add prototype for mono_print_method_from_ip.
15297 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
15299 * inssel.brg: 64 bit fixes.
15301 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
15304 * Makefile.am: Add SPARC64 support.
15306 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
15308 * aot.c: Fix alignment problems on 32 bit platforms.
15310 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
15312 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
15315 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
15318 * mini.h: Bump AOT file version. Some 64 bit fixes.
15320 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15322 * inssel-sparc.brg: Add new rule to avoid register moves.
15324 * inssel.brg: Add ldind_to_load_membase helper function.
15326 2004-06-30 Ben Maurer <bmaurer@ximian.com>
15328 * mini.c: OffsetToStringData intrinsic.
15330 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
15332 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
15334 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
15337 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
15338 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15340 * mini.c: reinstated mono_compile_get_interface_var()
15341 on x86, too, since the change breaks the Gtk# build there as well.
15343 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15345 * driver.c: remove loop from the default optimizations: it seems to
15346 interact badly with some of the other options (see bug #60613).
15348 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
15350 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
15351 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
15353 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
15355 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
15356 vararg-using methods.
15358 2004-06-21 Martin Baulig <martin@ximian.com>
15360 * mini/mini-exceptions.c
15361 (mono_handle_exception): Added `gpointer original_ip' argument.
15362 After calling mono_unhandled_exception(), call
15363 mono_debugger_unhandled_exception() and if that returns true,
15364 restore the context and return.
15366 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
15368 * mini-ppc.c: prefer the use of relative branches so
15369 they won't need to be patched in aot code (patch from Patrick Beard).
15371 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
15373 * aot.c: patch from Patrick Beard to make the output assembly
15374 more correct for the MacOSX assembler. Small tweak to
15375 generate sane images on Linux/PPC, too.
15377 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15379 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
15380 case until bug #59509 is fixed (shows up in #60332).
15382 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15384 * mini.c: make sure the needed wrappers are compiled, too, with
15387 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
15389 * driver.c: remove NPTL reference in --version output.
15391 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15393 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
15394 generate valid assembly for the Mach-O assembler.
15396 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
15398 * driver.c: don't include abcrem in the all optimization specifier
15399 since it slows down jit compilation too much for now.
15401 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
15403 * mini.c: use BIGMUL only if both operands have the same signage.
15404 * iltests.il: Test for bug 60056. (errors related to signage in
15409 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
15411 * mini.c, aot.c: memory leak fixes.
15413 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15415 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
15417 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
15419 * Makefile.am: remove the -static hack completely, it links in
15420 statically glib as well.
15422 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
15424 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
15425 * exceptions.cs: make it compile with new mcs/csc.
15427 2004-06-03 Massimiliano Mantione <massi@ximian.com>
15428 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
15429 and added relevant test case.
15431 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
15433 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
15434 regressions in gtk-sharp.
15436 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
15438 * exceptions.cs: New regression tests.
15440 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
15442 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
15444 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
15446 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
15448 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
15450 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
15452 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
15454 * mini.c (mono_jit_runtime_invoke): Init class in this
15455 method instead of trusting mono_jit_compile_method to
15456 do the work (because wrappers can be in object class)
15458 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
15460 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
15462 * basic-long.cs: New regression test.
15464 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
15466 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
15467 and div/rem checks.
15469 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
15471 * Makefile.am: fix miguel's change to build mono statically against
15472 libmono (track build dependencies).
15474 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
15476 * cfold.c: Some glib versions do not have G_MININT32.
15478 2004-05-26 Massimiliano Mantione <massi@ximian.com>
15480 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
15481 with precision of tan, atan, sin and cos, and implemented related
15482 regressions tests (fixes bug 54467, but one new problem appeared and
15485 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
15487 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
15489 * exceptions.cs: Add test for constant folding && division by zero.
15491 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
15492 since driver.c is in libmono too, so the optimization was useless.
15494 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
15495 variable to driver.c so the compiler can emit more efficient code to
15498 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15500 * Makefile.am: don't distribute generated inssel.[ch] files.
15502 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
15504 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
15505 into the default appdomain. Fixes #58707.
15507 * jit-icalls.c: Remove the broken approximation for truncl, doing
15508 no conversion is better.
15510 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
15513 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
15515 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
15516 of the mcrxr instruction which is not available on some processors
15517 even if it's documented to be. Implement add and sub overflow correctly
15518 (still not complete for long unsigned). Speed up icalls a bit.
15520 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
15522 * mini.c (mono_jit_compile_method_with_opt): Make sure that
15523 we run .cctor in the current domain instead of target_domain.
15525 Fixes bug #58558, .cctor not being called in -O=shared.
15527 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
15529 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
15531 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
15533 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
15534 which can be done with an imm8, do it that way.
15535 (mono_arch_output_basic_block): ditto for a jmp
15536 (mono_arch_emit_prolog): Computate maximum offset of a label.
15538 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
15540 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
15541 now tries to allocate prefered physical reg's for virtual
15542 regs. This reduces the number of emited spills/loads with
15543 20-30% on our core assemblies.
15545 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15547 * jit-icalls.c: truncl() is not needed and trunc() is
15548 the correct thing to do anyway (bug #58287).
15550 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
15552 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
15555 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
15557 * driver.c: enable loop optimizations by default.
15559 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
15561 * mini-x86.c: fix calc of max loop size when aligning loops start.
15563 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
15565 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
15568 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
15570 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
15573 * basic-long.cs: Add tests for add/subtract of immediates with carry.
15575 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
15577 * mini.c (inline_method): Allways inline some wrappers even if the cost
15578 is too large. Fixes #58785.
15580 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
15582 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
15584 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
15585 (crichton@gimp.org). Beginning of support for sparc/linux.
15587 * mini-sparc.c: Optimize retrieval of LMF address.
15589 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
15591 * exceptions-ppc.c: handle alloca in methods with clauses.
15593 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
15595 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
15597 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
15599 * mini.c: Delegate most of the abort signal work to
15600 mono_thread_request_interruption, which also handles Stop and Suspend
15603 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
15605 * mini.c mini.h: Allow inlining of icall wrappers if the backend
15606 supports the save/restore lmf opcodes.
15608 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
15610 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
15611 by gcc-3.4 as well.
15613 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
15615 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
15617 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
15618 methods which contain array accesses.
15620 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
15621 boundaries. Fixes #58537.
15623 * iltests.il: Add regression test for #58537.
15625 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
15627 * mini-x86.c (mono_arch_local_regalloc): Last part of
15628 fix for bug #58633 (releasing register to early).
15630 2004-05-18 Miguel de Icaza <miguel@ximian.com>
15632 * basic-long.cs: Add new regression test.
15634 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
15636 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
15637 register too early on the chain.
15639 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
15641 * mini.c (create_helper_signature): Use a helper function to reduce
15642 the code which needs to be written. Also set the calling convention of
15643 icalls on windows. Fixes #57840.
15645 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
15647 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
15648 exceptions-ppc.c: added helper function to get the instruction address
15649 from a signal handler context.
15651 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
15653 * helpers.c: use g_get_tmp_dir. Invokes happyness
15656 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
15658 * helpers.c: Add new env variable to pass args to objdump.
15659 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
15661 2004-05-17 Radek Doulik <rodo@ximian.com>
15663 * Makefile.am (common_sources): added abcremoval.h so it get
15664 disted and daily mono packages on go-mono.com will build again
15666 2004-05-17 Massimiliano Mantione <massi@ximian.com>
15668 * abcremoval.c: Fixed coding style, added copyright header.
15670 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
15672 * mini.h: Added prototype for abc removal main function.
15674 * build_relations_propagation_table.pl: Added copyright header.
15676 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
15678 * basic-long.cs: reg test for complex ceq_long bug.
15680 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
15682 * mini-x86.c (mono_arch_local_regalloc): Correctly free
15683 reg in long and clob case (bug #58343). Fixed/added comments.
15685 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
15687 * mini.c (mono_jit_runtime_invoke): Follow new convention
15688 of calling the invoke method with an function pointer.
15690 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
15692 * ChangeLog: Fix author of memory leak patch.
15694 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
15696 * Makefile.am: fix make dist as well...
15699 2004-05-14 Massimiliano Mantione <massi@ximian.com>
15701 * cfold.c: Made so that conversions from pointer to int4 are no-ops
15702 on archs where pointers are 4 bytes long.
15704 * Makefile.am: Added abcremoval.c source file.
15706 * abcremoval.c: Added abcremoval.c.
15708 * abcremoval.h: Added abcremoval.h.
15710 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
15712 * inssel.brg: Enabled bounds check removal.
15714 * mini.c: Added support for abcrem optimization.
15716 * mini.h: Added abcrem optimization label.
15718 * driver.c: Added support for abcrem optimization.
15720 * propagated_relations_table.def: Added propagated_relations_table.def.
15722 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
15724 * mini.c, cfold.c: fix style.
15726 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15728 * mini.c: handle issue with the low-level implementation of
15729 some long opcodes (bug #54209).
15731 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
15733 * basic.cs: test for my new cmov stuff.
15735 2004-05-13 Patrik Torstensson
15737 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
15738 opt and added peephole documentation.
15740 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
15742 * tramp-ppc.c: rewrote the generic trampoline code.
15744 2004-05-11 Patrik Torstensson
15746 * mini-x86.c: optimize long shl/shr asm code (one less branch)
15748 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
15750 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
15752 * mini.h mini.c dominators.c: Applied patch from Derek Woo
15753 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
15755 * mini.c: Add new icalls for AsAny marshalling.
15757 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
15759 * tramp-ppc.c, mini-ppc.c: more cleanups.
15761 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15763 * mini.c: no warnings.
15765 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15767 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
15769 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
15771 * mini.c: In the thread abort signal handler, if the thread is in the
15772 process of being stoped, don't throw the Abort exception, just stop the
15775 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
15777 * tramp-ppc.c: removed old code.
15779 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15781 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
15782 do some simple speed optimizations on ppc.
15784 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15786 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
15787 and large offsets in load/store.
15789 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
15791 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
15792 it causes regressions.
15794 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
15796 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
15799 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
15801 * jit-icalls.c: remove warnings.
15802 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
15803 speedups for unsafe code.
15805 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
15807 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
15809 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
15811 * basic-calls.cs: Add new regression test.
15813 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
15816 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
15818 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
15821 2004-05-06 Patrik Torstensson
15823 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
15824 long reg allocation in any reg (not only eax:edx) and implemented
15825 long shl/shr ops in asm instead of helpers.
15827 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
15829 * mini-sparc.h: Fix warnings.
15831 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
15834 * mini-exceptions.c (mono_handle_exception): Call the filter in a
15835 separate statement for clarity.
15837 * mini-sparc.c: Update status.
15839 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
15841 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
15844 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15846 * inssel-ppc.brg: another small pre-release workaround:
15847 we don't do overflow detection for long_sub_un.
15849 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15851 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
15852 (also works around a weird ppc bug: 57957).
15854 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
15856 * tramp-ppc.c: trampoline fixes.
15858 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
15860 * mini-ppc.c: fixed typos.
15862 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15864 * mini-ppc.c, exceptions-ppc.c: more code saves registers
15865 at the top of the stack. Fixed typos. Use a frame registers
15866 for all the methods with exception clauses.
15868 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15870 * exceptions-ppc.c: restore fp registers.
15872 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
15874 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
15875 order from the stack top (moved the stack room to save the
15876 return value for trace after the param area). Fixed corruption
15877 in restoring registers on unwind.
15879 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15881 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
15883 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15885 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
15886 and prolog/epilog for methods that use it. Allow
15887 enough param area room for varargs methods. Fix miguel's
15888 breakage in exception handling.
15890 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15892 * Makefile.am: run genmdesc only on current arch.
15894 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15896 * exceptions-x86.c:
15897 * mini-x86.h: fix the build on windows.
15899 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
15901 * 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.
15903 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
15905 * mini-exceptions.c: New file.
15907 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
15908 Move some parts of the x86 exception handling code to an
15909 arch-independent file so it can be shared with other ports.
15911 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
15913 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
15915 2004-04-26 David Waite <mass@akuma.org>
15917 * driver.c: remove comma from end of enumeration declaration
15919 2004-04-26 Jackson Harper <jackson@ximian.com>
15921 * driver.c: parse config file before loading first assembly. This
15922 allows the user gac to be enabled/disabled.
15924 2004-04-23 Miguel de Icaza <miguel@ximian.com>
15926 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
15927 simpler mechanism: we do not care what is encoded initially
15928 (branch absolute or relative), we care about the code and its
15929 target. I kept the old code for reference for now.
15931 The new code tries first to determine if the jump is anywhere in
15932 the -/+32 absolute meg range, if it succeeds, it encodes using the
15933 absolute branch; If not, it tried to find something in the
15934 relative range, if not, it uses the handle_thunk code.
15936 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
15938 * exceptions-ppc.c: use the correct ip register on macosx.
15940 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
15942 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
15944 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
15946 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
15947 Raise exception on integer divide by zero by hand since the hw
15948 doesn't support it. Handle NaNs in FP compares.
15950 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
15952 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
15953 code reducing duplication between the platforms and enabled
15954 signal exception handling (on linux for now).
15956 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
15958 * exceptions-ppc.c: more macosx support.
15960 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15962 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
15964 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
15966 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
15968 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
15970 * iltests.il: more tests.
15972 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
15974 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
15977 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15979 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
15981 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
15983 * liveness.c: Mark variables as volatile in all basic blocks reachable
15984 from exception clauses.
15986 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
15988 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
15991 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
15993 * iltests.il, basic.cs: more tests for regalloc.
15995 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
15997 * iltests.il: Some tests for register allocation modifications
16000 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
16002 * exceptions.cs: Add regression test for bug #56782.
16004 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
16005 original stack trace if an exception is rethrown. Fixes #56782. Oh,
16006 the beauty of fixing the same thing in 5 different files...
16008 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
16010 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
16013 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
16015 * mini.c: Add support for STRWLPARRAY marshalling convention.
16017 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16019 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
16020 to init the context to setup the regs pointer).
16022 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16024 * exceptions-ppc.c: more exceptions work.
16026 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16028 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
16031 2004-04-13 Miguel de Icaza <miguel@ximian.com>
16033 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
16034 can use the memory directly.
16036 * cpu-pentium.md: Update documentation from a post from Zoltan.
16038 add x86_add_membase, x86_sub_membase, x86_mul_membase
16040 2004-04-13 Miguel de Icaza <miguel@ximian.com>
16042 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
16043 GENERAL_REGS they were also hardcoded for all PPC ports.
16045 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
16047 Remove hard-coded limit for floating point registers, use
16048 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
16050 Notice that in MacOS X calling conventions you can fit a lot more
16051 floating point values in registers, so I should update the PInvoke
16052 test to excercise the passing of floating point values on the
16053 stack (currently broken).
16055 2004-04-06 Miguel de Icaza <miguel@ximian.com>
16057 * tramp-ppc.c (create_trampoline_code): Added
16058 JUMP_TRAMPOLINE_SIZE.
16059 (ppc_magic_trampoline): Follow the pattern from
16060 x86_magic_trampoline: if code is set to zero, return.
16061 (create_trampoline_code): Always pass MonoMethod to the jump
16062 trampoline, before it was passing a null.
16063 (mono_arch_create_jump_trampoline): Implement the jump stub, could
16064 share the code with mono_arch_create_jit_trampoline.
16066 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
16068 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
16071 * cpu-g4.md: Added length for jmp instruction, the worst case
16072 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
16075 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
16077 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
16079 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
16081 * mini.c: Only set bblock->real_offset when adding a new bblock, and
16082 before each IL instruction.
16084 * mini.c (CEE_BOX): Fix warnings.
16086 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16088 * mini.c: removed a few unused vars and extra whitespace.
16090 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
16092 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
16094 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
16096 (OP_GETCHR): use the above
16097 (CEE_LDELEMA): use the above.
16099 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
16100 version of the generic impl.
16101 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
16102 (CEE_LDELEMA): use the above.
16104 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
16106 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
16109 * iltests.il: Added new regression test for #56317.
16111 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
16113 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
16114 under NetBSD. Fixes #56450.
16116 * liveness.c (update_gen_kill_set): Fix previous patch.
16118 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16120 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
16122 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
16124 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
16125 ldsfld and ldsflda.
16127 * inssel-sparc.brg: Add more optimizations.
16129 * mini-sparc.c: Replace multiply/divide with shifts if possible.
16131 2004-04-01 Martin Baulig <martin@ximian.com>
16133 * mini.c (handle_box): New static function; moved the
16134 implementation of CEE_BOX here.
16135 (mono_method_to_ir): Added `constrained_call' variable.
16136 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
16137 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
16138 mono_method_get_constrained() to get the method.
16140 2004-04-01 Martin Baulig <martin@ximian.com>
16142 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
16143 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
16144 (mono_method_to_ir): We don't need these macros anymore since
16145 mono_class_get_full() already takes care of it.
16147 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16149 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
16150 use @function (as doesn't accept #function here) and check the return
16151 value of system and stop if fails.
16153 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16155 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
16157 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
16159 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
16161 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
16163 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
16166 * basic-long.cs: Add test for negation of Int64.MinValue.
16168 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
16170 * mini-sparc.c: Update status.
16172 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
16174 * exceptions-sparc.c: Fix return value in filters.
16176 * inssel-sparc.brg: Fix register allocation in some rules.
16178 2004-03-28 Martin Baulig <martin@ximian.com>
16180 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
16183 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
16185 * mini-x86.c (mono_arch_patch_code): Fix warnings.
16187 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
16188 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
16189 remove unused conv_u4 opcode.
16191 * mini-x86.c: Remove valgrind workaround since it slows down things
16192 even when mono is not run under valgrind.
16194 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
16196 * mini-sparc.c: Update status.
16198 * inssel-sparc.brg: Add some optimizations.
16200 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
16201 future delay slot filling. Add support for varargs, tail calls and JMP.
16203 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
16204 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
16206 * inssel.brg: Fix register allocation in OP_ARGLIST.
16208 * inssel.brg: Fix warnings.
16210 2004-03-25 Martin Baulig <martin@ximian.com>
16212 * mini.c (inflate_generic_field): Removed.
16213 (mini_get_method): Removed, use mono_get_method_full(),
16214 (mini_get_class): Removed, use mono_class_get_full().
16215 (mono_method_to_ir): Pass our generic context to
16216 mono_field_from_token().
16218 2004-03-25 Martin Baulig <martin@ximian.com>
16220 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
16221 of a `MonoMethod *'.
16222 (mini_get_method): Take a `MonoGenericContext *' instead
16223 of a `MonoMethod *'.
16224 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
16225 a new local variable called `generic_context' which holds the
16226 current `MonoGenericContext *'; use it to lookup things.
16228 2004-03-24 Martin Baulig <martin@ximian.com>
16230 * mini.c (mini_get_class): New static method; if we're inside a
16231 generic instance, inflate the class if neccessary.
16232 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
16234 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
16236 * iltests.il: New regression test for #55976.
16238 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
16241 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
16243 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
16246 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
16248 * liveness.c: Consider SSA stores as well as loads when making vars
16251 * exceptions.cs: New regression tests for register allocation.
16253 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
16255 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
16256 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
16257 domain lock only to protect puntual access to data structures.
16258 Added access lock for sighash, jit_icall_hash_name,
16259 jit_icall_hash_addr and domain->code_mp.
16261 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
16263 * driver.c: Print SIGSEGV handling method.
16265 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
16267 * mini.c (setup_jit_tls_data): Handle case when this is called
16268 multiple times for a thread.
16270 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
16271 is different from fbxx_un. Fixes #54303. Also use constants instead of
16272 magic numbers in a lot of places.
16274 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
16276 * exceptions.cs: Fix cctor test when --regression is used.
16278 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
16280 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
16283 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16285 * inssel-ppc.brg: fixed register assignments for some rules.
16287 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
16289 * exceptions.cs: Add test for exceptions in static constructors.
16291 * mini.c (mono_jit_compile_method_with_out): Move the calling of
16292 static constructors outside the domain lock. Fixes #55720.
16294 2004-03-17 Martin Baulig <martin@ximian.com>
16296 * mini.c (get_generic_field_inst): Removed, this'll never happen.
16297 (inflate_generic_field): Take the `MonoMethod *' instead of the
16298 `MonoClass *' and added support for generic method.
16299 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
16300 have a `field->parent->gen_params', only inflate the field if it's
16301 an open constructed type.
16303 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
16305 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
16306 exception object instead of the preconstructed ones.
16308 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16310 * mini.c: reverted changed to sigsegv_signal_handler commited
16311 accidentally in the previous patch.
16313 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16316 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
16317 running --aot with an old assembly.
16319 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
16321 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
16324 * mini-sparc.c: Add support for v9 branches with prediction.
16326 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
16328 * mini.c (mini_init): #warning is GNUC only
16330 * mini-sparc.h: implement __builtin_frame_address
16331 and __builtin_return_address for Sun C compiler
16333 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
16335 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
16337 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
16339 * basic-calls.cs: Add test for unaligned byref long argument passing.
16341 * mini-ops.h: Add sparcv9 compare and branch instructions.
16343 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
16344 v9 instructions if we have a v9 cpu.
16346 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
16347 registers for global allocation.
16349 * exceptions-sparc.c: Fixes.
16351 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
16353 * liveness.c (mono_analyze_liveness): Optimized version.
16355 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
16357 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
16360 * basic-float.cs basic-calls.cs: New regression tests.
16362 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
16364 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
16365 sigaltstack implementation.
16367 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
16369 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
16370 stuff if SIGSEGV_ON_ALTSTACK is not defined.
16372 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
16374 * mini.c: Fix warnings.
16376 * mini.c (mono_resolve_patch_target): New function which contains the
16377 arch independent part of the patching process.
16379 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
16380 patching code to a separate function.
16382 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
16384 * mini.c (add_signal_handler): ifdef out on Windows
16386 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
16388 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
16389 cpu-sparc.md: Add exception handling support + other fixes.
16391 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
16392 typed GC detection in --version.
16394 * basic.cs exceptions.cs: New regression tests.
16396 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
16397 the arch specific code can store data during a compilation.
16399 * mini-ops.h: Add OP_SETFRET.
16401 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
16402 function, register a separate icall for each arity, so the icalls can
16405 * mini.c (mono_print_tree): Print negative offsets in a more readable
16408 * mini.c: Make signal handling work on sparc.
16410 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
16412 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
16414 * jit-icalls.c: Emulate truncl by aintl on solaris.
16416 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
16418 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
16420 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
16422 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
16424 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
16425 a MarshalByRef type, inline a method that performs the check, taking into
16426 account that the object can be a proxy. Also implemented tow new opcodes:
16427 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16428 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
16429 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
16431 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
16433 * mini-ppc.c: if a relative branch displacement is too big
16434 but it points to and area reachable with an absolute branch,
16437 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
16439 * mini.c: optimize small copies in cpblk.
16441 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
16443 * basic-calls.cs basic-float.cs: New regression tests.
16445 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
16446 negative offsets from %fp. Implement localloc. Fix local register
16447 allocation. Fix the case when the this argument needs to be saved to
16448 the stack. Implement some missing opcodes.
16450 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
16452 * mini.c (mini_method_compile): Reenable global regalloc in methods
16453 with exception handlers.
16455 * linear-scan.c (mono_varlist_sort): Fix warning.
16457 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
16459 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
16462 * liveness.c: Make all variables uses in exception clauses volatile, to
16463 prevent them from being allocated to registers. Fixes #42136.
16465 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
16467 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
16468 causes regressions.
16470 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
16471 argument to mono_arch_regalloc_cost.
16473 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
16476 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
16478 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
16479 Make the cost of allocating a variable to a register arch dependent.
16481 * basic-calls.cs: Fix compilation of tests.
16483 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
16484 helper function to cut back on the number of #ifdefs needed.
16486 * mini-ppc.c: Fix compilation.
16488 * basic-calls.cs: New regression tests.
16490 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
16492 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
16493 of l0 since that is callee saved.
16495 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
16498 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
16499 of delay instruction.
16501 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
16503 * mini.h (MonoCallInst): Add 'virtual' flag.
16505 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
16507 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
16509 * *.cs: New regression tests.
16511 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
16514 * mini.c (mono_runtime_install_handlers): Fix build.
16516 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
16517 'signal_stack_size' members.
16519 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
16520 alternate signal stack.
16522 * exceptions-x86.c: Add stack overflow handling.
16524 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
16525 functions to arch independent code.
16527 * mini.c (mono_print_tree): Print more detailed info for load_membase
16530 2004-02-23 Martin Baulig <martin@ximian.com>
16532 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
16534 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16536 * mini-x86.c: fixed reg allocation for div/rem.
16538 2004-02-22 Miguel de Icaza <miguel@ximian.com>
16540 * driver.c (mono_main): Report some configuratio options on --version.
16542 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
16544 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
16545 low in the address space. Correctly flush memory in thunks where we
16546 output native code.
16548 2004-02-20 Martin Baulig <martin@ximian.com>
16550 * mini.c (mini_get_method): New static method; inflate all generic
16551 methods and methods in open generic instances.
16552 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
16553 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
16555 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
16557 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
16559 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
16561 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
16563 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
16565 * mini-sparc.c (flushi mono_arch_output_basic_block): make
16566 it compile using Sun's compiler.
16568 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
16570 * 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.
16572 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
16574 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
16576 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
16578 * mini-ppc.c: handle calls outside of the allowed range with thunks
16579 allocated using the code manager.
16580 * tramp-ppc.c: use the code manager to hold generated native code.
16581 Fixed the magic trampoline to just patch vtable entries.
16583 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
16585 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
16588 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
16590 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
16593 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
16594 if we have a working __thread implementation.
16596 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
16597 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
16599 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
16601 * mini-x86.c: Fix compilation under gcc 2.
16603 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
16605 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
16606 contains a call to the wrapped function.
16608 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
16609 OP_<CALL>_IMM opcodes, and use them under X86.
16611 * mini.c (mono_jit_find_compiled_method): Fix warning.
16613 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
16615 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
16617 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
16618 functionality to mini.c.
16620 * mini.c (mono_create_jump_trampoline): New function to create a jump
16621 trampoline. Return a compiled method instead of a trampoline if it
16622 exists. Add a cache for jump trampolines.
16624 * mini.c (mono_jit_find_compiled_method): New function to return a
16625 compiled method if it exists.
16627 * mini-x86.c: Call mono_create_jump_trampoline instead of
16628 mono_arch_create_jit_trampoline.
16630 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
16631 a jump trampoline. Fixes #52092.
16633 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
16635 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
16636 which is not up-to-date. Add check_corlib_version () instead.
16638 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
16641 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
16642 since newer valgrind versions do not need it.
16644 * mini.c (mono_jit_compile_method_with_opt): New helper function to
16645 compile a method with a given set of optimizations.
16647 * mini.c: Compile icall wrappers on-demand instead of at startup.
16649 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
16650 wrapper for an icall.
16652 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
16654 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
16657 * iltests.il: Add test for non-empty stack before switch instruction.
16659 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
16661 * mini.c: Add support for new stringbuilder marshalling conventions.
16663 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
16665 2004-02-01 Martin Baulig <martin@ximian.com>
16667 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
16668 in `ginst->mtype_argv'.
16670 2004-01-31 Miguel de Icaza <miguel@ximian.com>
16672 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
16673 facilitate grepping.
16675 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
16677 * mini.c: fixed buglet in initobj generic implementation for references.
16679 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
16681 * Makefile.am: make the version script conditional.
16682 * jit-icalls.c: handle missing truncl().
16684 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
16686 * exceptions.cs: Add more tests for double->int conversion.
16688 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
16689 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
16691 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
16693 * driver.c: make --verbose --version emit an error
16694 if the loaded corlib doesn't match the runtime version.
16696 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
16698 * mini-ppc.h: export ppc_patch().
16699 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
16700 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
16701 on par or better than on MacOSX.
16703 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
16705 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
16706 mono_lookup_pinvoke_call.
16708 * mini-x86.c: Under windows, the default pinvoke calling convention is
16709 stdcall. Fixes #52834.
16711 * mini.c (optimize_branches): Add an upper bound to the number of
16712 iterations to prevent infinite loops on strange loops. Fixes #53003.
16714 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
16716 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
16717 and ISINST. Fixes #52093.
16719 * objects.cs (test_0_vector_array_cast): New tests.
16721 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
16723 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
16724 checking in Array.Set ().
16726 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
16729 * object.cs (test_0_multi_array_cast): New regression test.
16731 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
16733 * exceptions-ppc.c: fix build on Linux/PPC.
16735 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
16737 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
16738 running under valgrind.
16739 (x86_magic_trampoline): Fix build bustage.
16741 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
16742 negative values as well. This is needed for the encoding of the line number
16743 info, since sometimes the line numbers are not in increasing order.
16745 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
16747 * cpu-pentium.md (localloc): Increase the size of the localloc
16748 instruction since it is a loop under Win32.
16750 * debug-mini.c (record_line_number): Get rid of unneccesary memory
16753 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
16755 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
16756 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
16757 Max Horn (max@quendi.de). Fix file names in comments.
16759 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
16761 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
16762 avoid stack overflow.
16763 (replace_usage): Avoid uninitialized variable warnings.
16765 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
16766 and taking the address of valuetype variables.
16768 2004-01-03 Patrik Torstensson
16770 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
16771 for other purposes than FP later on.
16773 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
16775 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
16778 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
16780 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
16782 2003-12-30 Patrik Torstensson <p@rxc.se>
16784 * mini-x86.h: Decreased number of availiable fp regs.
16785 Solves corner cases with FP spilling.
16787 2003-12-23 Patrik Torstensson <p@rxc.se>
16789 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
16790 for floating point stack tracking / spilling on x86.
16793 * basic-float.cs: added float mul overflow test.
16795 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
16797 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
16799 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
16801 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
16802 supports for cond branches that overflow the immediate
16803 overflow offset. mcs can compile simple programs.
16805 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
16807 * exceptions-ppc.c: exception handling support wip:
16808 finally handlers get run on exception.
16810 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
16812 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
16815 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
16817 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
16818 initial support for stack walking and unwinding.
16820 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
16822 * driver.c (mono_main): Make corlib-out-of-sync message more
16823 descriptive. Also remove verify_corlib call.
16825 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
16827 * mini.c: make CEE_NEWARR calls and other emulated opcodes
16828 not overlap with other call's arguments, too.
16830 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
16832 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
16833 move to arch-specific code the choice of arch-specific
16834 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
16835 * mini.c: ensure emulation calls will not interleave
16838 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
16840 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
16841 the magic trampoline stack frame is dropped before executing
16844 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16846 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
16847 and integer to fp conversions. Added support for overflowing
16848 arguments on the stack. Reserve a couple more registers as temps.
16849 Added support for aot compilation (as output still needs to be
16852 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16854 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
16855 Don't overwrite return register in some corner cases.
16857 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
16859 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
16860 static constructors when AOT compiling.
16862 * driver.c (mono_main): Call mono_check_corlib_version.
16864 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
16866 * cpu-g4.md, basic.cs: fixed div target register.
16868 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
16870 * mini-ppc.c, basic.cs: shl_imm fix with test.
16872 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
16874 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
16875 structures by value. Misc fixes.
16876 * objects.cs: more tests.
16878 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
16880 * mini-ppc.c: lconv.ovf.i implemented.
16882 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16885 (mini_init): don't error out if someone already called g_thread_init.
16887 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
16889 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
16890 to be any type per the spec. Fix abnormal memory usage when
16891 the same object is repeatedly thrown.
16893 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
16895 * mini.c: check for overruns in IL code.
16897 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
16899 * TODO: Add/remove some todo entries.
16901 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
16903 * driver.c (mono_main): Call mono_verify_corlib.
16905 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
16907 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
16908 This has been moved to mini.c
16909 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
16910 type being casted is marshalbyref it could be a proxy, so instead of
16911 emitting the type check code, emit a call to a runtime method that will
16912 perform the check by calling CanCastTo if needed.
16914 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
16916 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
16917 methods with large stack frames under Win32.
16919 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
16921 * Makefile.am: Distribute regression tests.
16923 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
16924 at the end instead of inserting each variable into the sorted list.
16926 * linear-scan.c (mono_varlist_sort): New helper function.
16928 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
16930 * mini.c: ensure arguments and locals are within bounds.
16932 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16934 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
16937 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
16939 * mini.c (mono_cprop_copy_values): Fix crash.
16941 * aot.c: Set verbosity back to 0.
16943 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16945 * regalloc.c: complete memory leak fix by Laurent Morichetti
16948 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
16950 * driver.c (main_thread_handler): Revert the previous patch.
16952 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
16955 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
16956 memory from the memory pool.
16958 * driver.c (main_thread_handler): Turn on all optimizations when
16961 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
16962 an array for better performance.
16964 * regalloc.c (mono_regstate_assign): Fix memory leak.
16966 * debug-mini.c (mono_debug_serialize_debug_info): New function to
16967 serialize the debug info.
16969 * debug-mini.c (mono_debug_add_aot_method): New function to load the
16970 debug info from the serialized representation.
16972 * aot.c: Save debug info into the generated file and load it when
16975 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16977 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
16979 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
16980 More FP-related fixes.
16982 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
16984 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
16985 and register allocation buglet. Hello world now runs.
16987 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
16989 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
16990 * tramp-ppc.c: fixed class init trampoline.
16991 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
16993 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
16995 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
16996 mini.c: more ppc changes/fixes.
16998 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
17000 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
17001 Also optimize the case when the arguments are the same in the caller
17004 * iltests.il: Add tests for tail calls with valuetype arguments.
17006 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17008 * mini-ppc.c: fixes for struct return type.
17010 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
17012 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17013 mono_spillvar_offset() to arch-specific code.
17015 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17017 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
17019 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
17021 * exceptions-x86.c: Fix stack space leaks.
17023 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
17024 registers from the lmf if the method has save_lmf set.
17026 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
17028 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
17029 of icall wrappers into InvokeInDomain, since these are now per-domain.
17031 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
17033 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
17034 make some opcode emulation and intrinsic ops enabled/disabled
17035 according to the architecture. More fixes.
17037 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17039 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
17041 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17043 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17044 arch-specific handling for 'this' and struct return type to
17045 arch-specific code.
17047 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17049 * aot.c: prevent divide by zero error when reporting (it happened with
17050 Accessibility.dll).
17052 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
17054 * mini.h (inst_switch): Remove unused macro.
17056 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17059 (load_aot_module): free 'info->methods' and 'info' properly. No more
17060 "free(): invalid pointer blah" messages when you have an old aot
17063 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
17065 * jit-icalls.c, mini.c: Added support for context static fields.
17067 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
17069 * mini.c (mono_method_blittable): Methods which set LastError are not
17070 blittable either. Fixes #51108.
17072 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17074 * mini.c: flush icache.
17075 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
17077 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
17079 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
17081 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
17083 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
17086 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
17089 * inssel.brg (CEE_MKREFANY): Fix AOT case.
17091 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
17093 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
17094 instruction when the result is discarded.
17096 * iltests.il (test_0_div_regalloc): New regression test.
17098 * arrays.cs: Fix compilation error.
17100 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
17102 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
17103 float rules to inssel-x86.brg: sane architectures with FP registers
17104 don't need to implement these rules.
17106 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17108 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
17110 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17112 * mini.h, inssel-long32.brg: fixed endianess issues in int64
17113 implementation of 32 bit systems.
17115 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17117 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
17118 (Jeroen Zwartepoorte).
17120 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
17122 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
17123 the caller and the callee matches.
17125 * mini.c (mono_method_to_ir): Add comment.
17127 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
17128 signbit is missing on some platforms.
17130 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
17132 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
17134 * mini.c (setup_jit_tls_data): Call the new function.
17136 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
17138 * mini-x86.c: Add experimental support for fast access to the lmf
17139 structure under NPTL/Linux 2.6.x.
17141 2003-11-06 Martin Baulig <martin@ximian.com>
17143 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
17144 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
17147 2003-11-02 Martin Baulig <martin@ximian.com>
17149 * mini.c (inflate_generic_field): New static method.
17150 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
17151 generic instance and the field is declared in a generic type, call
17152 inflate_generic_field() to inflate it. Fixes gen-28.cs.
17154 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
17156 * mini.h mini.c (mono_method_same_domain): New function to return
17157 whenever the caller and the callee are in the same domain.
17159 * tramp-x86.c (x86_magic_trampoline): Use the new function.
17161 2003-10-30 Martin Baulig <martin@ximian.com>
17163 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
17164 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
17166 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
17167 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
17169 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
17171 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
17174 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
17175 object here, so it is in the correct appdomain etc.
17177 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
17179 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
17181 (mono_method_to_ir): Avoid freeing the type created returned from
17182 mono_type_create_from_typespec, since it is put into an internal cache
17183 by the function. Fixes pointer.exe.
17185 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
17186 trampolines for icalls and pinvokes as well. Fixes #33569.
17188 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
17190 * mini.c: Update after appdomain changes.
17192 * mini.c (mono_jit_compile_method_inner): Allways compile native
17193 method wrappers in the root domain, since there can only be one
17194 instance of them, whose address is stored in method->info.
17196 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
17198 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
17199 environment variable. Instead detect automatically whenever running
17200 under valgrind using the magic macro RUNNING_ON_VALGRIND from
17203 2003-10-16 Miguel de Icaza <miguel@ximian.com>
17205 * trace.c, trace.h: New files that implement the new trace option
17208 * driver.c: Document new --trace options.
17210 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
17213 - if (mono_jit_trace_calls)
17214 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
17216 * mini.h: prototypes.
17218 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
17220 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
17222 * mini.c inssel.brg: Implement typedefbyref opcodes.
17224 * mini.c (mono_jit_compile_method): Remove unused local variable.
17226 * mini.c (mono_jit_compile_method_inner): Ditto.
17228 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
17230 * tramp-x86.c (x86_class_init_trampoline): Fix build.
17232 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
17234 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
17236 * mini.c (mono_no_aot): Remove unused global variable.
17238 * mini.c: Thread safety fixes.
17240 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
17242 * mini.c (mono_create_class_init_trampoline): Add a lock around
17243 class_init_hash_addr.
17245 * arrays.cs (test_0_newarr_emulation): Add new regression test for
17248 * mini.c: Decompose the NEWARR instruction before decomposing its
17249 arguments. Fixes #30073.
17251 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
17253 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
17256 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
17258 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
17260 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
17262 * driver.c: Add support for compiling icall wrappers to --compile.
17264 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
17266 * inssel.brg: The empty value in class->interface_offsets is -1, not
17269 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
17271 * objects.cs: New test for 'is' operator on an array of interfaces.
17273 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17275 * tramp-ppc.c: update trampoline code to support jumps
17276 and class initialization.
17278 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
17280 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
17282 * inssel.brg (OP_UNBOXCAST): Fix #46027.
17284 * inssel.brg (OP_UNBOX): Remove unused rule.
17286 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
17287 region instead of one for each method. Fixes #47813.
17289 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
17291 * exceptions.cs (test_0_nested_finally): New regression test for
17292 nested exception handlers.
17294 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
17296 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
17298 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
17301 * mini.c (mono_method_check_inlining): Make the inlining limit
17302 configurable by an environment variable.
17304 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
17306 * mini.h: Bump AOT file version.
17308 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
17309 token, store the image along with the token, since the token might not
17310 refer to the same image as the method containing the relocation,
17311 because of inlining.
17313 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
17315 * mini.c (mono_precompile_assemblies): New function to compile
17316 all methods in all loaded assemblies.
17318 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
17320 * regalloc.h regalloc.c (MonoRegState): Change the type of
17321 iassign and fassign to int*, since they can contain large negative
17322 values if the register is spilled. Also added some comments. Fixes
17325 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
17326 under Win32. Fixes #42964.
17328 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
17330 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
17332 * aot.c: Added support for AOT compiling methods which contain calls
17333 to wrappers. Currently, only remoting-invoke-with-check wrappers are
17336 * driver.c (compile_all_methods): Run the compilation in a thread
17337 managed by mono. Fixes #44023.
17339 * mini.c (mono_codegen): Print full method name in verbose output.
17341 * mini-x86.c (mono_arch_patch_code): Fix warning.
17343 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
17344 jumps, since the method we are jumping to might be domain-specific.
17346 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
17348 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17350 * inssel.brg: string chars are unsigned.
17352 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
17354 * TODO: New todo item.
17356 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
17357 which calls mono_runtime_class_init and patches the call site to
17358 avoid further calls.
17359 (mono_arch_create_class_init_trampoline): New arch specific function
17360 to create a class init trampoline.
17361 (create_trampoline_code): Generalized so it can create
17362 class init trampolines as well.
17364 * mini.c (helper_sig_class_init_trampoline): New helper variable.
17365 (mono_create_class_init_trampoline): New function to create and cache
17366 class init trampolines.
17367 (mono_find_class_init_trampoline_by_addr): New function to lookup the
17368 vtable given the address of a class init trampoline. Used by the
17370 (mono_codegen): Generate a call to a trampoline instead of
17371 mono_runtime_class_init in LDSFLD[A].
17372 (mono_codegen): Add relocations for the new trampoline.
17374 * mini.h mini-x86.c aot.c: Added a new relocation type:
17375 MONO_PATCH_INFO_CLASS_INIT.
17377 * mini.h: Bump AOT version number.
17379 * aot.c: Create a copy of the loaded code instead of using the original
17380 so methods which call each other will be close in memory, improving
17383 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
17384 patch since it breaks the regression tests.
17386 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
17387 for the register saving instruction sequence since the
17388 frame_state_for function in glibc 2.3.2 don't seem to detect it.
17390 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
17392 * TODO: Fix todo item && remove another.
17394 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
17396 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
17399 * aot.c: Moved the check for MONO_LASTAOT into the initialization
17400 function of the module.
17402 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
17403 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
17404 --no-aot command line option.
17406 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
17408 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
17409 by Bernie Solomon (bernard@ugsolutions.com).
17411 * inssel.brg: Refactor the interface offset table related code into
17412 its separate functions and add support for the AOT case.
17414 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
17416 * aot.c (mono_aot_get_method_inner): Fix memory leak.
17418 * aot.c: Added mono_aot_verbose variable and made all debugging
17419 output depend on the value of this variable.
17421 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
17422 method_label and info_label.
17424 * mini.h mini-x86.c aot.c: Added a new relocation type
17425 MONO_PATCH_INFO_IID for klass->interface_id.
17427 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
17428 the MonoJitInfo structure.
17430 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
17431 a non-root appdomain in shared mode.
17433 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17435 * aot.c: make aot loader less verbose. Remove free of unused variable.
17437 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
17439 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
17441 * .cvsignore: Added *.dll.
17443 * mini.c (mono_print_tree_nl): New function callable while debugging.
17445 * mini.c (mono_print_code): Export this.
17447 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
17450 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
17452 * mini.h (MonoCompile): Added 'jit_info' field.
17454 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
17455 the cfg structure, since it is needed by the AOT compiler.
17457 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17459 * aot.c: A major rewrite. Changes include:
17460 - save exception tables for methods which have them.
17461 - cache failed lookups in aot_get_method () to avoid the (slow) calls
17462 to g_module_symbol.
17463 - reworked the file format so it is now much smaller and needs
17464 fewer relocation entries.
17466 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
17468 * aot.c (load_aot_module): Fix build bustage on platforms without
17471 2003-09-04 Martin Baulig <martin@ximian.com>
17473 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
17475 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
17477 * TODO: Some new optimization ideas.
17479 * aot.c: Move AOT module loading logic here from mono_assembly_open.
17481 * aot.c: Save the optimization flags used to compile the code into
17484 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
17485 support emitting domain specific code.
17487 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
17488 no longer domain neutral. It can be made domain neutral by compiling
17489 with --optimize=shared.
17491 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
17492 between appdomains.
17494 * driver.c mini.h mini.c: New --no-aot debugging option which disables
17495 loading of AOT code.
17497 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
17499 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
17500 if there is no domain neutrality information.
17502 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
17504 * aot.c (mono_compile_assembly): Emit a symbol containing the file
17505 format version into the generated library.
17507 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
17508 callee method into the caller since one of them could be shared.
17510 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
17511 system exceptions from AOT code now works.
17513 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
17514 method if it is domain neutral and the callee is not.
17516 * graph.c (cfg_emit_one_loop_level): Fix warning.
17518 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
17520 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
17523 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
17525 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
17526 is needed by code which is executed before mono_runtime_init ().
17527 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
17529 * mini.c (mono_thread_abort): Fix warning.
17530 (mono_jit_compile_method): Call static constructor in the AOT case too.
17532 * aot.c (mono_compile_assembly): Fix warning.
17534 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17536 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
17538 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
17540 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
17542 * cpu-pentium.md: Fix the length of call opcodes so they include the
17543 ESP restoring instruction. Fixes #47968.
17545 2003-08-28 Martin Baulig <martin@ximian.com>
17547 * mini-x86.c (mono_arch_call_opcode): Added support for
17548 MONO_TYPE_GENERICINST.
17550 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
17552 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
17554 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
17555 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
17557 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
17560 2003-08-26 Martin Baulig <martin@ximian.com>
17562 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
17563 when reporting an error, set this to the actual error location.
17564 (mono_method_to_ir): Report the correct error location if
17565 get_basic_blocks() returned an error.
17567 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
17569 * mini.c (mono_type_blittable): OBJECT is not blittable.
17570 (mono_method_blittable): Methods which have marshalling descriptors
17571 are not blittable either. Fixes #47842.
17573 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
17575 * driver.c mini.c: Use an environment variable instead of a global
17576 variable. Also fix the build.
17578 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
17579 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
17582 * driver.c mini.c: Added --with-valgrind option to turn off some
17583 code which prevents mono from running under valgrind.
17585 * mini.c (mono_emit_call_args): Fixed warning.
17587 * mini.c (mono_emulate_opcode): Fixed warning.
17589 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17591 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
17592 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
17593 regalloc.c, regalloc.h: specify available registers in arch-specific
17594 code and support floats in the regallocator (patch by Laurent Morichetti
17597 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
17599 * mini.c: mono_thread_current() can be called only after
17600 mono_runtime_init(): rearrange code to not call it early on.
17602 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
17604 * mini.c: allocate jump tables in the code mempools.
17606 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17608 * mini.c, mini.h: make sure per-thread data allocated by the jit is
17611 2003-08-10 Miguel de Icaza <miguel@ximian.com>
17613 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
17614 12 to 16. This fixes bug #47453.
17617 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
17619 * mini-ppc.c: fixed indexed load and unsigned compares.
17621 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
17623 * mini.c: reenabled installation of handler for
17624 thread abort signal.
17626 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17628 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
17629 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
17630 until it's fixed and actually useful.
17632 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17634 * inssel-long32.brg: couple more opcodes implemented.
17636 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
17638 * mini-sparc.c: Even more opcodes implemeted.
17640 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
17642 * mini-sparc.c: More opcodes implemented.
17644 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
17646 * mini-sparc.c: More opcodes implemented.
17648 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
17650 * inssel-sparc.brg: Add some needed rules. Direct
17652 * Makefile.am: Use inssel-sparc.brg
17653 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
17654 an assert happy for now.
17656 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
17658 * mini-sparc.c: Fixed compile errors.
17659 * exceptions-sparc.c: Same. We now produce a mono binary
17660 on sparc-linux. Yea.
17662 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
17664 * mini-sparc.c: Renamed registers. Also some macro cleanups.
17665 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
17666 They compile, but do not work.
17668 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17670 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
17671 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
17672 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
17675 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17677 * mini.c: more opcodes implemented and better support for generics.
17679 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
17681 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
17682 * mini.c, mini.h: first cut at generics support: some new instructions
17683 added and changed the behaviour of some of the existing ones.
17685 2003-07-21 Miguel de Icaza <miguel@ximian.com>
17687 * mini.c: Removed definition of metadata_shared mutex here.
17689 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
17691 * mini-x86.c: make vararg calls work for instance methods.
17693 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
17695 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
17696 returns the arguments in a separte list, now.
17698 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17700 * aot.c, mini.c: updates for array type representation changes.
17702 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
17704 * mini.c: register function to perform jit shutdown.
17706 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17708 * mini.c: use a faster allocator if possible.
17710 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17712 * aot.c: some cleanups and portability changes.
17714 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17716 * mini.c: use faster allocation for CEE_BOX if possible.
17718 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
17720 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
17721 Moved inlined mempcy code to its own function so that is can be
17722 reused. Added an inline memset function as well (optimized initobj).
17723 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
17725 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17727 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
17729 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
17731 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
17732 arch code can setup the cpu for CLR execution, if needed.
17733 We use it on x86 to set the precision of FP operations.
17735 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
17737 * mini.c: disable some optimizations if we can guess they'll cost too
17738 much for a given method.
17740 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
17742 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
17744 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
17745 * mini.h mini.c mini-x86.c: Added instruction level coverage
17746 info collection support.
17748 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17750 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
17751 is now implemented in the profiling API. Get rid of a couple of
17752 unnecessary global variables.
17754 2003-06-15 Nick Drochak <ndrochak@gol.com>
17756 * basic-long.cs: tests for negative values for bigmul, and unsigned.
17757 * cpu-g4.md: add op_bigmul and op_bigmul_un
17758 * cpu_pentium.md: add op_bigmul_un
17759 * inssel-long32.brg: add rule for unsigned bigmul
17760 * mini-ops.h: define OP_BIGMUL_UN
17761 * mini-x86.c: THE BUG: handle (un)signed properly
17762 * mini.c: choose unsigned opcode if needed.
17763 This set of patches fixes bug #44291
17765 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
17767 * mini.c (optimize_branches): improved to handle all kinds of
17768 conditional branches.
17770 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
17772 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
17773 don't raise exceptions.
17775 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
17777 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
17778 to arch-specific files.
17780 2003-06-09 Martin Baulig <martin@ximian.com>
17782 * Makefile.am (libs): Added $(LIBGC_LIBS).
17784 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
17786 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
17787 and OP_ATAN (fixes bug#44293).
17789 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
17791 * Makefile.am, mini-x86.c: rename cpu description array to
17792 pentium_desc, since some compilers define the 'pentium' preprocessor
17795 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
17797 * mini.c (mini_select_instructions): add explicit branch if the
17798 following block is not the false target of a conditional branch -
17799 we need this with any optimization that reorder or remove bblocks
17801 * mini.c (optimize_branches): bug fixes
17803 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
17805 * mini.c (mono_method_to_ir): inline static readonly fields
17807 * ssa.c (fold_tree): start cfold support for long (very simple
17810 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
17812 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17814 * inssel.brg: fixed memcpy (bug #44219).
17816 2003-06-05 Dick Porter <dick@ximian.com>
17818 * driver.c: Set the glib log levels to not abort if g_message
17821 g_set_prgname() has to happen before mini_init() so that the
17822 process handle gets the info.
17824 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17826 * driver.c: add intrins to the default optimizations to get wider
17829 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17831 * mini.h: some large basic blocks will overflow a 16-bit
17832 integers for symbolic registers.
17834 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
17836 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
17837 (mono_arch_output_basic_block): fix bug 43499
17839 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
17841 * mini.c: kill duplicated definition of mono_debug_format.
17843 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
17845 * mini-x86.c, arrays.cs: fixed register allocation bug.
17847 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
17849 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
17851 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
17853 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17856 (print_method_from_ip): also print source location information if
17859 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
17861 * mini.c (mono_find_block_region): bug fix in region code
17862 (mini_method_compile): enable removing unreachable code again, but
17863 only in methods without exception clauses.
17865 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
17867 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
17868 Implemented arglist opcode and handling of TypedReference type.
17869 Fixed x86 call convention when a structure is returned.
17870 Minimal support for calling static vararg methods.
17872 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
17874 * mini.c (mini_method_compile): always remove unreachable code,
17875 because the code in them may be inconsistent (access to dead
17876 variables for example).
17878 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17880 * driver.c, debug-mini.c: warning fixes.
17882 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
17884 * Makefile.am, jit.h, mini.h: install header for embedding mono.
17886 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
17888 * mini.c: thread-static fields are registered in mono_class_vtable(),
17889 so ensure the function is called before checking for them.
17891 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
17893 * mini.c (optimize_branches): fix for bug 43586
17895 * jit-icalls.c (mono_llmult_ovf): added an additional check for
17896 overflow (fixes Bug #43639)
17898 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17900 * mini.c, objects.cs: allow the use of stobj for primitive types.
17902 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17904 * mini.c: be less strict about argument checking until we support
17905 running the verifier.
17907 2003-05-27 Nick Drochak <ndrochak@gol.com>
17909 * basic-long.cs: tests for (ulong)int * (ulong)int also
17910 * mini.c: use the same trick for (ulong)int * (ulong)int
17912 2003-05-27 Nick Drochak <ndrochak@gol.com>
17914 * basic-long.cs: add regression test for (long)int * (long)int
17915 * cpu-pentium.md: add op_bigmul specification
17916 * inssel-long32.brg: add OP_BIGMUL rule
17917 * mini-ops.h: add OP_BIGMUL
17918 * mini-x86.c: register allocator: handle case where src1 needs to be
17920 * mini.c: substitute special BIGMUL opcode in the tree for
17921 (long)int * (long)int
17923 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
17925 * jit-icalls.c: call the type ctor on field access if needed.
17927 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17929 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
17930 to a method (including results of ldelema, bug#43207).
17932 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
17934 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
17935 colors to show exception handler blocks.
17937 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
17938 (fix for pinvoke7.cs).
17940 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17942 * mini.h, mini.c: ensure correct initialization order for types that
17943 require it. Prepare for lazy compilation of jit icall wrappers.
17944 Provide a name for opcode emulation to reduce unneeded mallocing.
17946 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
17948 * mini-x86.c: better register restoring code and profiling
17949 support for tail calls.
17951 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17953 * mini.h, driver.c: prepare for leaf methods optimization.
17955 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17957 * mini.c: get targets of branches before converting a method.
17959 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
17961 * mini.c (optimize_branches): added some experimental code (disbaled)
17963 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
17965 * mini.c (optimize_branches): fix branch to branch optimization
17967 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
17969 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
17971 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
17973 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
17976 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
17978 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
17979 enable use of interface variables again.
17981 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
17982 I1 to registers because there is no simply way to sign extend 8bit
17983 quantities in caller saved registers on x86.
17985 * inssel-float.brg: set costs of some rules to 2 so
17986 that monobure always select the arch. specific ones if supplied,
17987 regardless of the order we pass the files to monoburg.
17989 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17991 * mini.c, mini-x86.c: since the magic trampoline for jumps
17992 can't patch the code directly, we do it as soon as the
17993 method gets compiled.
17995 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
17997 * mini-x86.c, mini.h: introduce a new patching method
17998 to support CEE_JMP and tail calls.
17999 * mini.c: obey tail.call. Don't precompile methods target
18001 * tramp-x86.c: new trampoline code to handle methods
18002 reached through a jump.
18004 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
18006 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
18007 bit values to registers
18009 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
18011 * mini.c (mono_compile_get_interface_var): share interface
18012 variables if possible.
18014 2003-05-16 Martin Baulig <martin@ximian.com>
18016 * debug-mini.c (mono_init_debugger): New function to initialize
18017 the debugger. This is not in the debugger since it needs to
18018 access some of mini's internals.
18020 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
18022 * mini.c (mono_method_to_ir): inlining fixes/cleanups
18024 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
18026 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
18027 for value type handling.
18029 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
18031 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
18032 (mono_method_check_inlining): enable inlining of all kinds of wrappers
18034 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
18036 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
18037 the constructor through a proxy.
18039 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18041 * jit-icalls.c, inssel.brg: fixes to array element address
18044 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
18046 * mini-x86.c (is_regsize_var): allocate pointer to registers
18048 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18050 * driver.c: fixed typo, added intrins to the set of optimizations
18051 tested with regressions.
18053 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18055 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
18056 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
18059 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
18061 * inssel.brg: remove some common pop instructions without side effects
18063 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18065 * inssel-x86.brg: fixed thinko in int to double conversions.
18067 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18069 * mini.c, jit-icalls.c: added runtime thread-static variable support.
18071 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18073 * inssel-long32.brg: two more missing instructions.
18075 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
18077 * mini.c (mono_emit_call_args): set the cil_code for all arguments
18078 if not already set.
18080 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
18082 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
18085 * basic-float.cs: Added tests for negative zero.
18087 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18089 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
18090 a couple of missing operations for long casts, with test cases.
18092 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18094 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
18096 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
18098 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
18099 code size estimation.
18101 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
18103 * mini.c (mono_jit_create_remoting_trampoline): make it work with
18104 abstract methods (fix bug 42542)
18106 * aot.c: add ability to handle array types
18108 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
18110 * mini.c: Call the _specific versions of the object allocation
18111 functions if possible.
18113 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18115 * driver.c: call setlocale ().
18117 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18119 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
18122 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
18124 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
18126 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
18127 wrappers (fix bug 42122)
18129 2003-05-04 Martin Baulig <martin@ximian.com>
18131 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
18133 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
18134 s/mini_set_defaults/mono_set_defaults/g.
18136 2003-05-04 Martin Baulig <martin@ximian.com>
18138 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
18140 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18142 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
18143 (reported by Don Roberts).
18145 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18147 * mini.c: temporarily work around two bugs for this release.
18149 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18151 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
18152 that contains -export-dynamic and it makes using the ld script
18154 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
18156 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18158 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
18161 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18163 * mini.c: make sure leave calls all the needed finally blocks,
18164 even when the target jumps out of multiple exception clauses.
18166 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18168 * ldscript, Makefile.am: add linker script to reduce the number of
18169 exported symbols (should also fix the issues with libwine defining
18170 some of the same symbols in io-layer).
18172 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
18174 * driver.c (mini_main): Avoid assertion when no file name is given on
18177 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
18179 * driver.c: added --version/-V command line option.
18180 Added the inline optimization in the regression tests.
18182 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18184 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
18185 to the type in the method signature (fixes bug#42134).
18187 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
18189 * mini.c: when inlining, check this is not null only when needed (bug #42135).
18191 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
18193 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
18195 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18197 * driver.c: fixed bug #42100.
18199 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
18201 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
18203 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18205 * mini.c: moved most of the code required to do inlining to its own
18206 function so it can be reused. Inline also ctors if appropriate.
18208 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
18210 * Makefile.am: Link with -export-dynamic so shared libs loaded by
18211 the runtime can call mono API functions.
18213 2003-04-27 Martin Baulig <martin@ximian.com>
18215 * debug-mini.c (mono_debug_init_method): Added
18216 `guint32 breakpoint_id' argument; if the method has a breakpoint,
18217 send a notification to the debugger.
18219 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
18220 running in the Mono Debugger, just pass the breakpoint number to
18221 mono_debug_init_method().
18223 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
18225 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
18227 * mini.c: allow some more unsafe compares.
18229 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18231 * mini-x86.c, Makefile.am: make distcheck works (partially from
18232 a patch by Richard Lee <r.h.lee@attbi.com>).
18233 * regset.c, regset.h: removed, they are unused.
18235 2003-04-25 Dick Porter <dick@ximian.com>
18237 * driver.c: Usage reports the name as 'mono' not 'mini'
18238 * exceptions-x86.c: Build and run on freebsd
18240 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18242 * Makefile.am: install the program with the 'mono' name and
18243 the library as libmono instead of mini and libmini.
18245 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18247 * driver.c: provide the APIs for the embedding interface of the old jit.
18249 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
18251 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
18253 2003-04-23 Martin Baulig <martin@ximian.com>
18255 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
18257 * driver.c: Added `--debug' command line argument to enable
18260 2003-04-23 Martin Baulig <martin@ximian.com>
18262 * debug.[ch]: Removed. The code is now in
18263 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
18265 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
18268 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
18270 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
18272 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
18275 (mini_cleanup): moved mono_runtime_cleanup call after the call to
18276 mono_domain_finalize.
18277 (mini_method_compile): use mono_method_profile* if the the option is
18280 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
18282 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18283 methods with their wrapper.
18285 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18286 methods with their wrapper.
18288 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
18291 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
18294 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
18297 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
18299 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
18301 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
18303 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
18304 of the mempool. This is slightly faster and uses less memory
18306 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18308 * mini.c: avoid O(n) allocation for variables.
18310 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18312 * mini.c: handle items on the stack after inlining methods.
18314 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18316 * mini.c: make the method->opcode optimization dependent
18317 on MONO_OPT_INSTRINS and do it lazily.
18319 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18321 * driver.c: print overall results at the end of regression run.
18323 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
18325 * inssel.brg: don't overwrite symbolic registers.
18327 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18329 * inssel-x86.brg: fix conversion from long to float.
18331 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
18333 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
18335 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
18337 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
18339 * driver.c: Added --print-vtable option as in the old JIT.
18341 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18343 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
18345 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
18347 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
18349 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
18351 * mini.c regalloc.c regalloc.h: Fix memory leak.
18353 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
18355 * aot.c (mono_aot_get_method): register all used strings
18357 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18359 * mini.c: always intern strings references with ldstr at compile time.
18361 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18363 * Makefile.am: add BUILT_SOURCES.
18365 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
18367 * driver.c: give a better error message when the assembly to execute
18368 doesn't have an entry point.
18370 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
18372 * Makefile.am: added hack for automake
18374 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
18377 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
18379 22003-04-07 Martin Baulig <martin@ximian.com>
18381 * Makefile.am: Added Makefile.am.
18383 * debugger-main.c: Removed, this is now in the debugger where it
18386 * mini.pc.in: Call this package `mini' for the moment.