1 2008-10-03 Mark Probst <mark.probst@gmail.com>
3 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
5 2008-10-03 Mark Probst <mark.probst@gmail.com>
7 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
10 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
12 * simd-intrinsics.c: Forgot to add this one.
14 * mini-codegen.c: Fix macro in case SIMD is not supported.
16 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
18 This patch land initial JIT support for simd intrinsics.
20 * mini-x86.h: Added new define to make --enable_minimal work on x86.
22 * Makefile.am: Added simd-intrinsics.c
24 * simd-intrinsics.c: New file with simd instrinsic related
27 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
29 * cpu-x86.md: Add simd related instructions.
31 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
33 * driver.c: Added two new --regression variants.
35 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
37 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
39 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
40 extract some complicated logic to helper functions.
42 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
44 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
46 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
47 the specialized simplification pass.
49 * method-to-ir.c (mono_spill_global_vars): Use new macro.
51 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
53 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
56 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
57 if MONO_ARCH_NEED_SIMD_BANK is defined.
59 * mini-ops.h: Added the new simd ops.
61 * mini-x86.c: Added mono_arch_xregname.
63 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
65 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
67 * mini-x86.h: Define simd related MONO_ARCH macros.
69 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
71 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
73 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
74 MONO_CLASS_IS_SIMD to deal with simd related IR.
76 * mini.h (MonoInst): Added spill_var to the backend union.
78 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
80 * mini.h: Added forward declarations of the new simd fuctions.
82 * optflags-def.h: Added new optimization names SIMD.
84 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
86 * regalloc.h: Added support for working with 3 register banks.
88 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
90 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
92 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
94 * mini-exceptions.c: remove 64 bit related ifdef clutter.
96 2008-10-03 Zoltan Varga <vargaz@gmail.com>
98 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
99 instead of one on 64 bit systems.
101 * method-to-ir.c: Remove unused includes.
103 2008-10-02 Zoltan Varga <vargaz@gmail.com>
105 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
106 cfg->used_int_regs, since the two are different on arm.
108 2008-10-02 Mark Probst <mark.probst@gmail.com>
110 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
111 mono_method_get_vtable_index() to get the vtable index.
113 2008-10-02 Mark Probst <mark.probst@gmail.com>
115 * method-to-ir.c (mono_method_to_ir2): Don't create native
116 wrappers for array methods, because they're never called (and if
117 they were called they wouldn't work).
119 2008-10-02 Mark Probst <mark.probst@gmail.com>
121 * method-to-ir.c (mono_method_to_ir2): Array methods are
122 special-cased and must not be invoked indirectly via the (M)RGCTX
123 when generic sharing is turned on. Fixes #431413.
125 2008-10-01 Mark Probst <mark.probst@gmail.com>
127 * method-to-ir.c: When generic sharing is active, call
128 non-interface virtual generic methods via the standard trampoline.
130 * mini-trampolines.c: Handle virtual generic shared methods.
132 * mini.h, mini-x86.c, mini-x86.h: New argument for
133 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
134 method thunks and which is the trampoline to call if the lookup
135 fails. Enable the virtual generic method thunk for x86.
137 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
138 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
139 argument but assert that it's NULL, because these archs don't yet
140 implement the virtual generic method thunk. Changes in the IMT
141 thunk data structures.
143 2008-10-01 Zoltan Varga <vargaz@gmail.com>
145 * aot-compiler.c (emit_globals): Avoid invalid characters in
146 the static linking symbol.
148 * objects.cs: Add a test for the range check optimization. Fix warnings.
150 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
151 optimization from the current JIT.
153 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
154 later in decompose_array_access_opts () to allow more optimizations.
156 * method-to-ir.c (mono_handle_soft_float): Rename this to
157 mono_decompose_soft_float () for consistency.
159 * mini-ops.h: Fix arguments of OP_STRLEN.
161 * method-to-ir.c (save_cast_details): Extract the cast details saving code
162 into a separate function.
163 (reset_cast_details): Ditto.
164 (handle_unbox): Save cast details. Fixes #431254.
166 * method-to-ir.c: Remove some obsolete FIXMEs.
168 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
170 * ir-emit.h (alloc_dreg): Write a warning before crashing.
172 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
174 * mini-codegen.c: More work on macros to make them
175 ready for multiple regbanks.
177 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
179 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
181 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
183 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
185 * mini-codegen.c (mono_spillvar_offset): Proper support for
188 2008-09-30 Zoltan Varga <vargaz@gmail.com>
190 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
191 the stack overflow changes.
193 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
195 * mini-codegen.c: Make all bank macros depend on reg_bank.
197 * mini-codegen.c (mono_local_regalloc): Make free mask
198 initialization regbank aware.
200 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
202 * mini-codegen.c (mono_local_regalloc): Extract callee
203 mask selection to a function and make it regbank aware.
205 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
207 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
208 code to deal with many regbanks.
210 2008-09-30 Zoltan Varga <vargaz@gmail.com>
212 * mini-codegen.c: More fp->regbank changes.
214 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
216 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
217 of a hardcoded constant.
219 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
221 * method-to-ir.c (type_from_stack_type): Fix typo.
223 2008-09-29 Zoltan Varga <vargaz@gmail.com>
225 * mini-ia64.c (emit_move_return_value): Convert float return values to
228 * objects.cs: Add a new test.
230 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
231 VARARG methods to fix an assert later.
233 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
234 end so it at least compiles.
236 2008-09-28 Zoltan Varga <vargaz@gmail.com>
238 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
240 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
242 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
243 optimization to a new function (emit_optimized_ldloca_ir) and enable
244 it for both ldloca and ldloca_s.
246 2008-09-28 Zoltan Varga <vargaz@gmail.com>
248 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
249 gshared CASTCLASS code.
251 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
252 amd64, where the libc stack unwinder encounters stack frames referring to
253 native code in unmapped memory.
255 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
258 * generics.cs: Add new test.
260 2008-09-27 Zoltan Varga <vargaz@gmail.com>
262 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
263 add a check that one of the ARM_FPU_ constants is defined.
265 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
267 * mini-exceptions.c: Fix build on non-altstack platforms.
269 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
272 * ir-emit.h: Add a comment to NEW_PCONST.
274 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
276 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
278 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
279 after the changes to MonoJitDomainInfo.
281 2008-09-27 Mark Probst <mark.probst@gmail.com>
283 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
285 2008-09-27 Mark Probst <mark.probst@gmail.com>
287 * mini-ppc.c: Compiler warning fixes.
289 2008-09-27 Mark Probst <mark.probst@gmail.com>
291 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
294 2008-09-27 Mark Probst <mark.probst@gmail.com>
296 * exceptions-ppc.c, mini-ppc.h: Compile
297 mono_arch_handle_altstack_exception() on Darwin, too.
299 2008-09-27 Mark Probst <mark.probst@gmail.com>
301 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
302 work on archs which don't have generic sharing implemented, only
303 without the vtable_arg.
305 2008-09-26 Mark Probst <mark.probst@gmail.com>
307 * mini.c: Added comment explaining why delegate ctor icall
308 wrappers are compiled.
310 2008-09-26 Mark Probst <mark.probst@gmail.com>
312 * mini.c: Don't produce trampolines to delegate ctor icall
313 wrappers but compile them upfront.
315 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
317 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
318 runtime-set function when going back to managed code. Currently this
319 is used to set back the protection on the soft ovf pages and/or to
320 throw the stack overflow exception that happened in unmanaged code.
322 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
324 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
325 runtime-set function when going back to managed code. Currently this
326 is used to set back the protection on the soft ovf pages and/or to
327 throw the stack overflow exception that happened in unmanaged code.
329 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
331 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
332 the support code for restoring stack protection after stack overflows
333 that happen in unmanaged code. Don't set the exec permission on the
336 2008-09-26 Zoltan Varga <vargaz@gmail.com>
338 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
339 delegate->method_ptr is set. Fixes #428054.
341 2008-09-25 Zoltan Varga <vargaz@gmail.com>
343 * tests.cs: Rename to ratests.cs.
345 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
346 emit_get_rgctx_... functions.
348 2008-09-25 Mark Probst <mark.probst@gmail.com>
350 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
352 2008-09-25 Mark Probst <mark.probst@gmail.com>
354 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
355 before asserting that method is sharable.
357 2008-09-25 Mark Probst <mark.probst@gmail.com>
359 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
360 whether method needs a static RGCTX wrapper used instead of
363 * generic-sharing.c, mini.h: A few functions moved to
364 metadata/generic-sharing.c.
366 2008-09-25 Mark Probst <mark.probst@gmail.com>
368 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
369 Generic code sharing for value types, which essentially means
370 treating value type methods like static methods. The RGCTX is
371 passed in the same way.
373 2008-09-25 Zoltan Varga <vargaz@gmail.com>
375 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
376 opcode when creating multi-dimensional arrays of open types.
378 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
381 * generics.cs: Add a test.
383 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
385 2008-09-24 Zoltan Varga <vargaz@gmail.com>
387 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
389 * mini.c (mini_method_compile): Set it when running under the debugger.
391 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
392 vreg optimization if the flag is set.
394 * driver.c (mono_main): Add --attach= option to pass options to
397 * mini.c (sigquit_signal_handler): Start the attach agent.
399 * ssapre.c: Disable this to save space since it is not yet ported to
402 * regalloc2.c: Disable this to save space.
404 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
406 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
408 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
409 the -v option useful again.
411 2008-09-24 Zoltan Varga <vargaz@gmail.com>
413 * mini-amd64.c (mono_arch_output_basic_block): Add support for
416 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
417 arrays of arrays. Fixes #428406.
419 * method-to-ir.c (mini_emit_castclass): Ditto.
421 * objects.cs: Add new test.
423 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
425 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
426 was wrong at it choked against target_type_is_incompatible for byref types.
428 2008-09-23 Zoltan Varga <vargaz@gmail.com>
430 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
433 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
435 * mini-exceptions.c: update a few more exceptions-related counters.
437 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
439 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
440 new functions to allocate from persistent mempools.
442 2008-09-23 Zoltan Varga <vargaz@gmail.com>
444 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
445 multiple register banks in the future.
447 * mini-codegen.c (mono_local_regalloc): Fix a warning.
449 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
451 * mini.c (type_to_eval_stack_type): Remove duplicated function.
453 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
455 * mini.h: Export type_to_eval_stack_type.
457 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
458 is only ins->klass of byref types.
460 2008-09-22 Zoltan Varga <vargaz@gmail.com>
462 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
463 (mini_emit_memcpy2): Ditto.
465 * mini-amd64.c: Fix a warning.
467 2008-09-21 Mark Probst <mark.probst@gmail.com>
469 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
472 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
474 * method-to-ir.c: Extract stloc micro-optimization to a
475 function and apply it to all cases.
477 2008-09-19 Mark Probst <mark.probst@gmail.com>
479 * method-to-ir.c: Don't fail generic code sharing in cases we
482 2008-09-18 Mark Probst <mark.probst@gmail.com>
484 * mini-ppc.c: Handle structs in tailcalls on Darwin.
486 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
488 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
491 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
493 * trace.c: make tracing more useful and correct, with per-thread
496 2008-09-15 Mark Probst <mark.probst@gmail.com>
498 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
499 doing a method call and the argument is an R4.
501 2008-09-14 Zoltan Varga <vargaz@gmail.com>
503 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
506 2008-09-13 Mark Probst <mark.probst@gmail.com>
508 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
510 2008-09-12 Zoltan Varga <vargaz@gmail.com>
512 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
513 (MONO_JUMP_TABLE_FROM_INS): Ditto.
515 2008-09-11 Zoltan Varga <vargaz@gmail.com>
517 * driver.c: Add a --agent argument (not supported yet) to load managed
518 agent assemblies before loading the main assembly, similarly to how the
519 Java VM handles agents.
521 2008-09-11 Mark Probst <mark.probst@gmail.com>
523 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
524 function to do stack layout of local variables.
526 2008-09-11 Mark Probst <mark.probst@gmail.com>
528 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
531 2008-09-11 Zoltan Varga <vargaz@gmail.com>
533 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
534 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
535 JIT if DISABLE_JIT is defined.
537 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
540 2008-09-10 Mark Probst <mark.probst@gmail.com>
542 * iltests.il.in: Disable the fconv test on PPC (the result is
543 undefined according to ECMA).
545 2008-09-10 Mark Probst <mark.probst@gmail.com>
547 * iltests.il.in: Enable tail call tests for PPC.
549 * mini.h: Add variable for storing incoming valuetype argument
550 addresses for tail calls.
552 * mini-ppc.c: Implement valuetype arguments and return values for
555 2008-09-09 Mark Probst <mark.probst@gmail.com>
557 * mini-ppc.c: Partially implement tail calls (struct arguments and
558 return values not supported).
560 * method-to-ir.c: Enable tail calls on PPC.
562 2008-09-08 Zoltan Varga <vargaz@gmail.com>
564 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
565 runtime-invoke wrappers to work around the problem of them getting
566 assigned to a random class.
568 * aot-runtime.c (mono_aot_get_method): Ditto.
570 2008-09-07 Zoltan Varga <vargaz@gmail.com>
572 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
573 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
575 2008-09-07 Mark Probst <mark.probst@gmail.com>
577 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
578 until they're implemented properly.
580 * exceptions-ppc.c: Use arch-independent exception-handling code
581 instead of custom one.
583 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
586 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
588 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
589 applies when __powerpc__ is defined.
591 2008-09-06 Zoltan Varga <vargaz@gmail.com>
593 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
594 methods to their code to avoid computing the full name of wrappers and
595 doing a lookup in a string hash table.
597 2008-09-05 Zoltan Varga <vargaz@gmail.com>
599 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
600 we identify bblocks before method_to_ir () is ran.
602 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
603 Also avoid optimizing branches pointing to themselves.
605 * mini.c (mini_method_compile): Ditto. Fixes #422947.
607 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
609 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
611 2008-09-05 Zoltan Varga <vargaz@gmail.com>
613 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
614 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
615 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
618 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
619 jumped to the same entry in plt_jump_table.
621 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
623 * method-to-ir.c (initialize_array_data): Handle field with RVA from
626 2008-08-31 Zoltan Varga <vargaz@gmail.com>
628 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
629 other assignment can be if converted. Saves 1.5% on corlib size and fixes
632 2008-08-29 Geoff Norton <gnorton@novell.com>
634 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
635 segment, and doesn't properly handle .space as .text. Fixes
638 2008-08-29 Geoff Norton <gnorton@novell.com>
640 * mini.c: Disable the mach exception handler when running on
643 2008-08-29 Geoff Norton <gnorton@novell.com>
645 * aot-compiler.c: Patch from Renaldas Zioma to properly register
646 globals on Darwin/ARM
648 2008-08-28 Zoltan Varga <vargaz@gmail.com>
650 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
651 since too many things depend on it. Instead, call
652 mono_runtime_set_no_exec ().
654 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
657 * aot-compiler.c: Add an 'asm-only' AOT option.
659 * mini.c: Avoid initializing the runtime when doing AOT compilation.
661 * aot-compiler.c (compile_method): Disable gshared support for now as it
664 2008-08-27 Bill Holmes <billholmes54@gmail.com>
666 * mini-amd64.h : Fix a compiler warning.
668 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
669 Changed to use a callback function to retrieve the unwind info.
670 This avoids problems observed when code blocks were removed by
671 unloading an app domain.
673 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
674 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
677 Contributed under MIT/X11 license.
679 2008-08-27 Bill Holmes <billholmes54@gmail.com>
681 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
682 case to keep the stack aligned to 8.
684 Contributed under MIT/X11 license.
686 2008-08-26 Zoltan Varga <vargaz@gmail.com>
688 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
689 avoid repeated linear searches.
691 2008-08-25 Zoltan Varga <vargaz@gmail.com>
693 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
694 methods it can't handle.
696 * aot-compiler.c (add_method): Avoid adding a method twice.
697 (add_wrappers): Add runtime invoke wrappers for all methods.
699 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
700 function to create an aot-compatible version of this trampoline.
702 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
704 2008-08-24 Zoltan Varga <vargaz@gmail.com>
706 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
708 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
709 with a generic sharing failure.
711 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
713 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
714 CEE_RETHROW. Fixes #419634.
716 * mini.c (mono_method_to_ir): Ditto.
718 * exceptions.cs: Add a new test.
720 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
721 to mono_type_stack_size_internal () since some callers might not pass in
724 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
725 instrument_prolog. Fixes #419878.
727 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
728 doubles in soft float mode volatile.
730 2008-08-23 Zoltan Varga <vargaz@gmail.com>
732 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
734 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
735 to handle soft float correctly.
737 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
740 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
742 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
743 to sp, since the generics catch code requires it.
745 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
748 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
749 mono_arch_emit_imt_argument ().
751 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
753 * mini-arm.c tramp-arm.c: Generic sharing updates.
755 2008-08-22 Zoltan Varga <vargaz@gmail.com>
757 * mini-arm.c: Fix the arm build.
759 * generic-sharing.c (mini_type_get_underlying_type): New helper function
760 handling enums, generic instances and generic sharing.
761 (mini_type_stack_size_full): Ditto.
763 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
765 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
767 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
769 * tramp-arm.c: Implement the rgctx fetch and the generic class init
772 * mini-arm.c: Various small generic sharing changes.
774 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
776 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
779 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
780 helper function to return a generic class init trampoline.
782 * method-to-ir.c mini.c: Use it.
784 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
785 arch-specfic function to return a generic class init trampoline.
787 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
788 the GENERIC_CLASS_INIT custom code.
790 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
791 a fatal error, not a sharing failure.
793 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
796 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
797 trampoline argument from MONO_ARCH_VTABLE_REG.
799 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
800 order of the arguments to the C trampoline: pass 'slot' as the trampoline
801 argument, and pass the vtable in VTABLE_REG.
803 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
804 order of the arguments to the C trampoline: pass 'slot' as the trampoline
805 argument, and pass the vtable in VTABLE_REG.
806 (mono_arch_create_trampoline_code_full): Remove some special casing for
807 the rgctx fetch trampoline.
809 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
812 * iltests.il: Add a test for it.
814 2008-08-21 Zoltan Varga <vargaz@gmail.com>
816 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
818 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
821 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
822 use mono_jit_info_table_find () to avoid recursion.
823 (mono_delegate_trampoline): Add a sync wrapper here.
825 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
828 * mini.c (mono_method_to_ir): Ditto.
830 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
831 add_sync_wrapper argument. Don't add a sync wrapper here.
832 (mono_create_jump_trampoline): Don't add a sync wrapper here.
834 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
836 2008-08-20 Bill Holmes <billholmes54@gmail.com>
838 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
839 of nonvolatile registers back from MonoContext to CONTEXT.
841 Contributed under MIT/X11 license.
843 2008-08-20 Bill Holmes <billholmes54@gmail.com>
845 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
846 arguments on Winx64 there are only 4 argument registers. For this
847 logic to work the last argument must be pulled from the stack.
849 Contributed under MIT/X11 license.
851 2008-08-20 Zoltan Varga <vargaz@gmail.com>
853 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
855 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
856 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
857 encode/decode_method_ref ().
859 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
861 * aot-runtime.c (decode_patch): Ditto.
863 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
864 MONO_PATCH_INFO_METHOD.
866 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
869 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
872 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
874 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
877 * aot-runtime.c (decode_generic_inst): New function to decode and
878 return a interned generic inst.
879 (decode_klass_ref): Use it.
880 (decode_method_ref): Ditto.
882 * aot-compiler.c (emit_exception_debug_info): Save
883 jinfo->has_generic_jit_info too.
885 2008-08-19 Zoltan Varga <vargaz@gmail.com>
887 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
889 * iltests.il.in: Add a test for fconv_to_i.
891 * liveness.c: Disable the liveness2 pass for now to save space.
893 * regalloc2.c: Include mempool-internals.h to fix warnings.
895 * aot-compiler.c (encode_method_ref): Encode the context of generic
898 * aot-runtime.c (decode_method_ref): Inflate generic methods using
899 the context saved in the aot file.
901 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
903 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
905 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
906 volatile so they won't be optimized away.
908 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
914 * dominators.c: Remove duplicated functions that now are in
917 2008-08-19 Zoltan Varga <vargaz@gmail.com>
919 * aot-compiler.c: Fix warnings.
921 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
923 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
925 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
928 * mini.c (mono_resolve_patch_target): Ditto.
930 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
931 (encode_klass_ref): Add support for encoding VARs/MVARs.
933 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
935 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
936 the handling of the got entries into a separate 'decode_got_entry' function.
937 Add support for RGCTX_FETCH.
939 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
940 clobbered by the trampoline code.
942 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
943 not clobbered by the indirect calling code.
945 2008-08-18 Zoltan Varga <vargaz@gmail.com>
947 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
950 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
952 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
953 signature using the compilation mempool otherwise we would leak it.
955 2008-08-18 Zoltan Varga <vargaz@gmail.com>
957 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
958 mono_emit_abs_call ().
960 * patch-info.h: Add GENERIC_CLASS_INIT.
962 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
964 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
965 as their target as a near call.
967 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
969 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
971 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
972 call to a runtime function described by a patch.
974 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
975 mono_emit_abs_call, this has the advantage that the ABS handling code in
976 mono_codegen () can handle them both, and can handle other stuff in the
977 future without additional code.
979 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
981 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
984 * mini.h: Add missing bblock related prototypes.
986 * mini.h (MonoCompile): Remove unused reverse_inst_list and
987 reverse_inst_list_len fields.
989 * mini.c: Refactor this file a bit by moving branch optimizations to
992 * method-to-ir.c: Merge generic sharing changes missed earlier.
994 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
996 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
997 shared patches. Process METHODCONST as a shared patch.
999 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1000 as it crashes on the 2.0 mscorlib.
1002 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1005 * aot-compiler.c: Use is_plt_patch () in a few additional places.
1006 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1009 * aot-compiler.c: Reorganize the got handling code to be a bit more
1012 2008-08-17 Zoltan Varga <vargaz@gmail.com>
1014 * aot-compiler.c: Make the patch_to_plt_offset hash table use
1015 mono_patch_info_equals/hash, and use it to massively simplify
1018 * mini.c (mono_patch_info_hash): Simplify this and add support for
1021 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1023 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1024 handling code, since an offset is not enough to identify a trampoline.
1026 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1028 2008-08-17 Mark Probst <mark.probst@gmail.com>
1030 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1032 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1034 * mini-ops.h: Argument and result types for OVF_CARRY ops.
1036 * decompose.c: PPC decompositions for various ops.
1038 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1040 2008-08-17 Zoltan Varga <vargaz@gmail.com>
1042 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1043 call the generic trampoline code using a call, instead of a jump, to
1044 remove some special casing from the generic trampoline code.
1046 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1047 (mono_codegen): Ditto.
1049 * aot-compiler.c aot-runtime.c: Ditto.
1051 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1053 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1054 helper function to find the offset corresponding to a lazy fetch trampoline.
1056 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1057 when doing generic sharing.
1059 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1062 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1063 mini-trampolines.c to be with the other trampoline creation functions.
1065 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1066 as it is equal to method->signature in most cases, add a
1067 mono_emit_method_call_full variant which takes a signature and an imt
1070 2008-08-16 Zoltan Varga <vargaz@gmail.com>
1072 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1073 to this function, since it could be computed easily from the method
1075 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1078 * method-to-ir.c mini.c: Remove references to
1079 compile_generic_method_wo_context.
1081 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1082 generic method calls.
1084 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1085 dimensional non-szarrays.
1087 * mini.c (mini_init): Register mono_array_new_1.
1089 * jit-icalls.c (mono_array_new_1): New jit icall.
1091 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1092 pointing to the method.
1094 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1095 method addresses belonging to METHOD_JUMP patches in the
1096 jump_target_got_slot_hash.
1097 (mono_aot_load_method): Ditto.
1099 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1100 METHOD_JUMP patches.
1102 * mini.c (mini_create_jit_domain_info): New helper function which
1103 initializes/frees domain->runtime_info.
1104 (mini_free_jit_domain_info): Ditto.
1105 (mini_init): Install the domain hook functions with the runtime.
1107 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1108 information maintained by the JIT.
1110 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1111 insertion into jump_table_hash into mono_codegen (), also implement proper
1114 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1115 tail calls, it is already done by the aot code.
1117 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1120 * iltests.il.in: Make the jmp test a bit more complex.
1122 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1123 generic instances which doesn't have a token.
1125 * aot-runtime.c (decode_method_ref): Ditto.
1127 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1128 can handle this case now.
1129 (handle_box): Ditto.
1131 2008-08-15 Geoff Norton <gnorton@novell.com>
1133 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1136 2008-08-15 Zoltan Varga <vargaz@gmail.com>
1138 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1139 calling generic methods.
1141 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1143 * aot-runtime.c (decode_patch_info): Ditto.
1145 * mini.c (mono_resolve_patch_target): Ditto.
1147 * patch-info.h: Add METHOD_RGCTX.
1149 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1151 2008-08-14 Zoltan Varga <vargaz@gmail.com>
1153 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1154 arguments in registers.
1156 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1157 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1159 * mini.c (mini_method_compile): Abort aot compilation for generic
1160 methods if generic sharing is disabled.
1162 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1165 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
1166 requiring an mrgctx.
1168 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1169 store instructions when converting a vcall to a normal call.
1171 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1172 mono_arch_find_jit_info.
1174 2008-08-13 Zoltan Varga <vargaz@gmail.com>
1176 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1177 avoid calling mono_method_full_name () for every method even if the
1179 (check_inline_caller_method_name_limit): Ditto.
1181 2008-08-12 Zoltan Varga <vargaz@gmail.com>
1183 * driver.c (main_thread_handler): Allow AOT compilation of multiple
1184 assemblies in one run.
1186 * aot-compiler.c (mono_compile_assembly): Only print out a count of
1187 skipped methods if it is not 0.
1189 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1191 2008-08-12 Bill Holmes <billholmes54@gmail.com>
1193 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
1194 MONO_ARCH_HAVE_UNWIND_TABLE.
1196 Contributed under MIT/X11 license.
1198 2008-08-12 Bill Holmes <billholmes54@gmail.com>
1200 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
1201 from default optimizaton list on Winx64.
1203 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
1205 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
1206 the LMF from the MonoJitTlsData structure.
1208 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
1210 Contributed under MIT/X11 license.
1212 2008-08-12 Zoltan Varga <vargaz@gmail.com>
1214 * mini.c (sigsegv_signal_handler): Fix the build.
1216 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
1217 assembly->aot_module.
1219 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1220 hash table. This simplifies and speeds up a lot of code, and fixes support
1223 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1226 * mini-exceptions.c: Ditto.
1228 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1229 'native_offset' argument, since these are computed in the
1230 mono_find_jit_info () function.
1232 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1233 is used by exceptions-ppc.c.
1235 * exceptions-ppc.c: Call mono_find_jit_info () instead of
1236 mono_arch_find_jit_info ().
1238 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1239 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1240 generic code in mini-exceptions.c.
1242 2008-08-11 Zoltan Varga <vargaz@gmail.com>
1244 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1246 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1248 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1249 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1250 called while holding the loader lock. Fixes #415608.
1251 (mono_aot_get_method_from_token_inner): Ditto.
1253 2008-08-09 Zoltan Varga <vargaz@gmail.com>
1255 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1256 to reduce differences between this and the generic implementation in
1258 (ves_icall_get_frame_info): Ditto.
1260 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1262 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1265 * exceptions-ppc.c (arch_get_call_filter): Rename this to
1266 mono_arch_get_call_filter () and make it non-static, for consistency with the
1267 other architectures.
1269 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
1272 * local-propagation.c:
1273 * mini-x86.c: Correct the name of arch defines.
1275 2008-08-09 Zoltan Varga <vargaz@gmail.com>
1277 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1278 NO_EMULATE_LONG_SHIFT_OPS define.
1280 2008-08-08 Zoltan Varga <vargaz@gmail.com>
1282 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1283 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1285 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1286 MACH fixes. Merged from the 2.0 branch.
1288 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1290 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1291 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1293 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1295 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1296 mono_marshal_get_native_wrapper () signature changes.
1298 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
1300 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1301 conversion bug under arm.
1303 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
1305 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1307 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1308 with overflow checking.
1310 2008-08-05 Marek Habersack <mhabersack@novell.com>
1312 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1313 to the genmdesc.pl file
1315 2008-08-05 Zoltan Varga <vargaz@gmail.com>
1317 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1318 arg_array in the soft-float versions of the LOAD/STORE macros.
1320 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1323 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1325 2008-08-02 Zoltan Varga <vargaz@gmail.com>
1327 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1328 a float HFA. Fixes #413621.
1330 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
1332 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1333 frame_size to args_size. Fixes build.
1335 2008-08-02 Zoltan Varga <vargaz@gmail.com>
1337 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1338 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1340 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1341 the stack are not unaligned. Fixes #413247.
1343 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1345 * mini.c: update jitted methods performance counters.
1347 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1349 * mini-exceptions.c: increase the exceptions thrown performance
1350 counter in mono_handle_exception ().
1352 2008-07-29 Zoltan Varga <vargaz@gmail.com>
1354 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1355 can work with netmodules.
1357 2008-07-28 Geoff Norton <gnorton@novell.com>
1359 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
1362 2008-07-28 Zoltan Varga <vargaz@gmail.com>
1364 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1367 2008-07-28 Bill Holmes <billholmes54@gmail.com>
1369 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1370 The float param registers and other param registers must be the
1371 same index on Windows x64.
1373 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
1374 ArgValuetypeAddrInIReg argument case. Setting the argument
1375 op to OP_VTARG_ADDR (OP_REGOFFSET)).
1377 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
1378 variable computed above as the copy length for arguments of storage
1379 type ArgValuetypeAddrInIReg.
1381 * mini-amd64.c (mono_arch_emit_call) : Implementing the
1382 ArgValuetypeAddrInIReg argument case. This case will rely on
1383 mono_arch_emit_outarg_vt to emit the correct code later in the process.
1385 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
1386 a 32 byte stack allocation for all calls. We will omit the adjustment for
1387 jump and tail call instructoins as they do not follow the typical call behavior.
1389 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
1390 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
1391 local variable and pass the local variable by reference to the called method.
1393 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1394 Implementing the ArgValuetypeAddrInIReg argument case. When the address
1395 of a struct is passed in a register it must be saved with the other
1396 volatile argument on the stack.
1398 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
1399 frame pointer the stack adjustment value must be saved to the unwind
1402 Contributed under MIT/X11 license.
1404 2008-07-28 Zoltan Varga <vargaz@gmail.com>
1406 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1407 which got lost in the merge.
1409 2008-07-27 Zoltan Varga <vargaz@gmail.com>
1411 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1414 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1416 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1417 icalls, since they won't be patched.
1419 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1420 different code sequence when running under valgrind to prevent some valgrind
1423 * iltests.il.in: Add new regression test.
1425 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1428 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1429 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1431 * iltests.il.in: Add new test.
1433 * aot-compiler.c: Fix some warnings.
1435 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1438 2008-07-27 Zoltan Varga <vargaz@gmail.com>
1440 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1441 (mini_usage_jitdeveloper): Add a missing --wapi option.
1443 2008-07-25 Zoltan Varga <vargaz@gmail.com>
1445 * mini-codegen.c: Simplify the is_fp macros.
1446 (free_up_ireg): Remove, use free_up_reg instead.
1447 (free_up_reg): Fix the fp case.
1449 2008-07-26 Zoltan Varga <vargaz@gmail.com>
1451 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1454 * exceptions-x86.c: Merge some changes which seemed to have got lost
1455 in the linear-ir merge.
1457 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1459 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1460 long vreg volatile even if the variable was already created.
1462 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1465 2008-07-26 Zoltan Varga <vargaz@gmail.com>
1467 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1469 * mini.c (mono_jit_compile_method_inner): Add support for
1470 MONO_EXCEPTION_BAD_IMAGE.
1472 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
1473 mini_method_get_context () returns NULL. Fixes #356531.
1475 * mini.c (mono_method_to_ir): Ditto.
1477 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1478 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1480 2008-07-25 Zoltan Varga <vargaz@gmail.com>
1482 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1483 in the LDFTN implementation.
1485 2008-07-25 Mark Probst <mark.probst@gmail.com>
1487 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1488 code, patch calls to icalls, too, even if they're not in the
1489 shared generic code hash. Fixes #411962.
1491 2008-07-25 Zoltan Varga <vargaz@gmail.com>
1493 * cpu-x86.md: Increase the length of the fcall opcodes.
1495 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1496 calls returning floats.
1498 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1501 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1504 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1505 into the domain->method_code_hash.
1507 * aot-compiler.c: Fix win32 build.
1509 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1511 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1512 gshared NEWARR implementation.
1514 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1516 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1517 can be used outside of method_to_ir.
1519 * mini.h (MonoCompile): Add arg_types field.
1521 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1523 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1524 the values of the local arg_array and param_types array.
1526 2008-07-24 Zoltan Varga <vargaz@gmail.com>
1528 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1529 got accesses might only get generated later when NEWOBJ is decomposed.
1531 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1532 looking up the native code of the target method when a delegate is called
1535 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1538 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1540 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1541 AOT work on platforms without a working dlsym implementation.
1543 * mini.h: Bump AOT image format version.
1545 2008-07-24 Mark Probst <mark.probst@gmail.com>
1547 * mini-exceptions.c: Free a MonoType with
1548 mono_metadata_free_type() instead of g_free().
1550 * aot-runtime.c: Free a MonoType.
1552 2008-07-24 Zoltan Varga <vargaz@gmail.com>
1554 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1557 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1560 2008-07-23 Massimiliano Mantione <massi@ximian.com>
1561 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1564 2008-07-23 Zoltan Varga <vargaz@gmail.com>
1566 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1567 NEWOBJ calls on valuetypes.
1569 * iltests.il.in: Add new test.
1571 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1573 2008-07-22 Zoltan Varga <vargaz@gmail.com>
1575 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1576 is no longer needed.
1578 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1579 non register sized integer arguments.
1580 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1581 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
1584 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1587 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1588 two a binop with different sized arguments is emitted.
1590 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1591 instruction in the ins==NULL case.
1593 2008-07-23 Zoltan Varga <vargaz@gmail.com>
1595 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1597 * mini-x86.c: Fix osx build.
1599 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1602 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1603 instruction for non int sized variables.
1605 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1608 2008-07-23 Robert Jordan <robertj@gmx.net>
1610 * method-to-ir.c: Fix MSVC build.
1612 2008-07-22 Zoltan Varga <vargaz@gmail.com>
1614 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1615 a non int sized type, widen it to an int since newer versions of gcc seem to
1616 generate code which needs this.
1618 * ssa2.c abcremoval2.c: Fix warnings.
1620 * *: Merge the Linear IR branch.
1622 The original branch is at trunk/branches/vargaz/mini-linear-il, and
1623 the ChangeLog file there describes all the changes done over the years.
1624 Further documentation can be found at www.mono-project.com/Linear_IL.
1626 2008-07-21 Bill Holmes <billholmes54@gmail.com>
1628 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1629 The float param registers and other param registers must be the
1630 same index on Windows x64.
1632 Contributed under MIT/X11 license.
1634 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
1636 * mini.c: Make the previous fix GC safe.
1638 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
1640 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1642 2008-07-21 Bill Holmes <billholmes54@gmail.com>
1644 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1645 on Winx64. This type will not be passed on the stack (ArgOnStack), but
1646 ArgValuetypeAddrInIReg instead.
1648 Contributed under MIT/X11 license.
1650 2008-07-21 Zoltan Varga <vargaz@gmail.com>
1652 * mini-codegen.c (get_register_spilling): Fix a warning.
1654 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
1656 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1657 for types which the initialization fails. Raises the provided exception
1658 at the right stop after cleanup.
1660 2008-07-16 Zoltan Varga <vargaz@gmail.com>
1662 * aot-compiler.c: Free most of the memory allocated during compilation.
1664 * mini.c (mini_parse_debug_options): Fix a leak.
1666 * mini.c (mini_method_compile): Don't add the method to the jit info tables
1667 during aot compilation.
1669 2008-07-14 Zoltan Varga <vargaz@gmail.com>
1671 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
1672 it has too much register pressure.
1674 2008-07-13 Zoltan Varga <vargaz@gmail.com>
1676 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
1678 2008-07-12 Zoltan Varga <vargaz@gmail.com>
1680 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1683 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
1684 on amd64 similar to the way it is done on arm.
1686 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
1688 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
1689 consistency, normalize error messages, avoid loading aot-only modules in
1692 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
1695 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
1697 2008-07-11 Martin Baulig <martin@ximian.com>
1700 (MonoDebuggerInfo): Add `interruption_request'.
1702 2008-07-12 Zoltan Varga <vargaz@gmail.com>
1704 * aot-compiler.c (emit_plt): Remove some dead code.
1706 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
1708 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
1709 return the plt info offset belonging to a given plt entry.
1711 * mini-trampolines.c (mono_aot_plt_trampoline): Use
1712 mono_aot_get_plt_info_offset.
1714 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
1715 similar to the amd64 code by makeing jumps through a separate jump table
1716 instead of embedding the jump addresses into the code.
1718 2008-07-11 Zoltan Varga <vargaz@gmail.com>
1720 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
1723 2008-07-10 Martin Baulig <martin@ximian.com>
1725 * mini.c (mini_method_compile): Disable generics sharing when
1726 running in the debugger.
1728 2008-07-10 Zoltan Varga <vargaz@gmail.com>
1730 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
1732 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
1733 the local register allocator from running out of registers on x86 when
1736 2008-07-10 Bill Holmes <billholmes54@gmail.com>
1738 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
1739 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
1742 Contributed under MIT/X11 license.
1744 2008-07-10 Zoltan Varga <vargaz@gmail.com>
1746 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
1747 speed up the assembler.
1749 2008-07-09 Zoltan Varga <vargaz@gmail.com>
1751 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
1754 * mini.c: Move the soft float handling macros a bit earlier, add
1755 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
1758 * mini.h: Add prototype for mono_arch_fixup_jinfo.
1760 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
1761 read-only to help catch code allocation requests.
1763 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
1764 and turn it off when using --aot-only or when compiling with --aot=full.
1766 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
1767 jump table for switches from the normal domain mempool, not the code
1770 * mini-trampolines.c (get_unbox_trampoline): New function to return an
1771 unbox trampoline which handles aot-only mode too.
1773 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
1774 an AOTed unbox trampoline.
1776 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
1778 2008-07-09 Bill Holmes <billholmes54@gmail.com>
1780 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
1783 Contributed under MIT/X11 license.
1785 2008-07-09 Bill Holmes <billholmes54@gmail.com>
1787 * mini.c (mono_codegen): Allocate space at the end of the code block and store
1788 the unwind information for the method at the end of the allocated block.
1790 * mini-amd64.h: Added declarations for the unwind routines and adding field to
1791 MonoCompileArch to hold the unwind info for SEH on Winx64
1793 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
1794 frame pointer info for the method being compiled.
1796 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
1797 the call to mono_exception_from_token.
1799 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
1800 storing the method prolog information in a format that the Winx64 SEH can understand. This
1801 information is stored a the end of the method block because it is all 32-bit offset based.
1803 Contributed under MIT/X11 license.
1805 2008-07-09 Zoltan Varga <vargaz@gmail.com>
1807 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
1809 * wapihandles.c: Fix warnings.
1811 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
1814 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
1815 mono_jit_compile_method in aot-only mode since that calls the type
1818 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
1819 get_delegate_invoke_impl in aot-only mode.
1821 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
1823 2008-07-08 Zoltan Varga <vargaz@gmail.com>
1825 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
1827 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
1830 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
1832 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
1833 init trampoline from the AOT file as well.
1835 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
1836 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
1839 * mini.c (mini_init): Move the call to mono_exceptions_init () after
1842 * exceptions-amd64.c: Add _full variants for the remaining exception code
1843 creation functions as well, allow emission of relocatable code, remove
1844 caching since that is now done by the caller.
1846 * mini-exceptions.c: Add _full variants for the remaining exception code
1847 creation functions as well, add aot-only support.
1849 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
1850 if we can determine a proper token for them.
1851 (add_wrappers): Add a few more wrappers.
1852 (emit_method_code): Remove some dead code.
1853 (emit_trampolines): Emit exception code too.
1855 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
1857 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
1858 mono_array_new_va which avoids varargs.
1860 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
1862 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
1863 mono_arch_create_specific_trampoline () in all places.
1865 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
1866 a bit so it can be used for other things as well.
1868 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
1871 * exceptions-amd64.c: Rename the caching from the exception code creation
1872 functions, it is done by the caller instead.
1874 * exceptions-amd64.c: Change the signature of the exception code creation
1875 functions to allow the creation of relocatable code later.
1877 * mini-exceptions.c: Add a set of functions to query the various
1878 runtime-generated exception functions.
1880 * mini.c mini-exceptions.c: Use the newly added functions instead of the
1881 mono_arch_.. () functions.
1883 2008-07-07 Zoltan Varga <vargaz@gmail.com>
1885 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
1887 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
1889 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
1890 (mini_get_vtable_trampoline): Ditto.
1892 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
1893 code in the AOT case by returning the code size and a list of relocations to
1896 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
1898 2008-07-07 Bill Holmes <billholmes54@gmail.com>
1900 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
1903 Contributed under MIT/X11 license.
1905 2008-07-07 Zoltan Varga <vargaz@gmail.com>
1907 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
1908 so the buffer size can be computed correctly. Fixes #404735.
1910 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
1911 normally as cfg->debug_info is already freed.
1913 2008-07-06 Zoltan Varga <vargaz@gmail.com>
1915 * mini-amd64.c: For calls returning vtypes in registers, don't store
1916 the return address on the stack, instead allocate a separate local for
1919 2008-07-05 Mark Probst <mark.probst@gmail.com>
1921 * mini-trampolines.c, mini.h: Add an argument to
1922 mono_create_jit_trampoline_in_domain() for turning off the adding
1923 of the sync wrapper.
1925 * mini.c: Use the JIT trampoline without sync instead of
1926 ldftn_nosync in static RGCTX invoke wrappers so that the call can
1929 2008-07-04 Mark Probst <mark.probst@gmail.com>
1931 * driver.c: Turn on GSHARED optimization by default.
1933 2008-07-04 Zoltan Varga <vargaz@gmail.com>
1935 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
1936 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
1938 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
1939 create a variant of the generic trampoline code callable from AOTed trampolines.
1941 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
1942 trampoline code callable from AOTed trampolines.
1944 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
1946 2008-07-04 Mark Probst <mark.probst@gmail.com>
1948 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
1949 pass-through manner.
1951 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
1952 and don't fail sharing for them anymore.
1954 * mini-exceptions.c: Handle exceptions in shared generic methods.
1956 * generic-sharing.c: When checking the context of a generic
1957 method, also check its class's context. Don't treat wrappers as
1960 * mini-trampolines.c: Some code factored out to
1961 metadata/generic-sharing.c. Handle the MRGCTX case.
1963 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
1964 we must deal with the method being of another instantiation of the
1965 class. Add static rgctx invoke wrappers to generic methods.
1967 2008-07-04 Mark Probst <mark.probst@gmail.com>
1969 * mini.c: Provide all jit infos of generic shared methods with a
1972 * mini-exceptions.c: Handle the new situation that a generic info
1973 might be available, but not info about the this/vtable/mrgctx
1976 2008-07-03 Mark Probst <mark.probst@gmail.com>
1978 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
1981 2008-07-03 Zoltan Varga <vargaz@gmail.com>
1983 * dominators.c (check_dominance_frontier): Fix a warning.
1985 * mini.h: Add some missing prototypes.
1987 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
1989 * driver.c (mono_jit_init_version): Correct the comments since the first
1990 argument should be the name of the root domain, not a filename.
1992 * aot-runtime.c (make_writable): Error out if this is called while running
1994 (load_aot_module): Ditto.
1996 * aot-compiler.c: Really fix the computation of method indexes.
1998 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
1999 optimizations as this is no longer called frequently.
2001 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2002 method and the invoke impl code and pass it to the delegate trampoline instead of
2003 just the delegate class.
2005 2008-07-02 Zoltan Varga <vargaz@gmail.com>
2007 * aot-compiler.c: Fixup the computation of method indexes.
2008 (add_wrappers): Create the base methods of the runtime invoke wrappers using
2009 the method builder infrastructure.
2011 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2014 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2015 mode, load the method right away instead of creating a trampoline.
2017 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2019 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2022 2008-07-01 Zoltan Varga <vargaz@gmail.com>
2024 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2025 (mono_aot_load_method): Use method_index instead of method->token.
2027 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2028 can handle icalls etc. properly.
2030 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2032 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2034 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2035 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2036 JIT_ICALL_ADDR patch type.
2038 * patch-info.h: Add JIT_ICALL_ADDR patch type.
2040 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2042 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2044 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2046 2008-06-30 Zoltan Varga <vargaz@gmail.com>
2048 * mini.c: Use domain->jit_code_hash_lock for controlling access to
2049 domain->jit_code_hash.
2051 2008-06-29 Zoltan Varga <vargaz@gmail.com>
2053 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2055 2008-06-27 Zoltan Varga <vargaz@gmail.com>
2057 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2058 get_this_arg_from_call, let it compute it when needed.
2060 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2061 gsctx from code only when needed.
2063 * mini-trampolines.c (get_generic_context): Rename this to
2064 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2065 it can be called by the arch backends.
2067 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2069 2008-06-26 Zoltan Varga <vargaz@gmail.com>
2071 * driver.c (mono_main): Add experimental --aot-only command line option.
2073 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2076 2008-06-26 Kornél Pál <kornelpal@gmail.com>
2078 * driver.c (DllMain): Remove mono_module_handle.
2080 Contributed under MIT/X11 license.
2082 2008-06-25 Zoltan Varga <vargaz@gmail.com>
2084 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2085 for emitting methods which are not in the source assembly. Detect and report
2086 failure of assembling+linking.
2088 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2090 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2092 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2094 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2096 2008-06-24 Zoltan Varga <vargaz@gmail.com>
2098 * mini.h: Remove some obsolete prototypes.
2100 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2102 2008-06-24 Mark Probst <mark.probst@gmail.com>
2104 * mini.c (get_object_generic_inst): Variable-sized arrays are not
2105 supported by Visual Studio, so use alloca().
2107 2008-06-23 Zoltan Varga <vargaz@gmail.com>
2109 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2112 2008-06-23 Mark Probst <mark.probst@gmail.com>
2114 * mini.c: Fail sharing of a generic method if it contains an open
2115 catch clause (because we don't pass MRGCTXs yet).
2117 2008-06-23 Mark Probst <mark.probst@gmail.com>
2119 * mini.c: When compiling a method with generic sharing, insert the
2120 method instantiated with an all-Object generic context into the
2121 jit info table, instead of the context of the first instantiation
2122 of the method we happen to compile.
2124 2008-06-18 Martin Baulig <martin@ximian.com>
2126 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2127 `major_version' and `minor_version'.
2129 2008-06-17 Mark Probst <mark.probst@gmail.com>
2131 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2132 mono_method_is_generic_sharable_impl() takes an additional
2133 argument specifying whether to treat type variables as reference
2136 2008-06-17 Mark Probst <mark.probst@gmail.com>
2138 * mini.h: Removed obsolete prototypes.
2140 2008-06-17 Mark Probst <mark.probst@gmail.com>
2142 * mini.c: Don't fail generic sharing for initobj and sizeof - we
2143 already handle them.
2145 2008-06-17 Mark Probst <mark.probst@gmail.com>
2147 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2148 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2149 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2150 tramp-x86.c: Added a MonoGenericContext* argument to
2151 mono_arch_get_unbox_trampoline() so that it can call other
2152 functions which require it.
2154 2008-06-17 Mark Probst <mark.probst@gmail.com>
2156 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2157 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2158 mono_arch_get_this_arg_from_call() takes a
2159 MonoGenericSharingContext* as well.
2161 2008-06-17 Mark Probst <mark.probst@gmail.com>
2163 * mini.c: Factor out code for emitting unbox into emit_unbox() and
2164 implement generic sharing of unbox.
2166 2008-06-17 Mark Probst <mark.probst@gmail.com>
2168 * mini.c: Don't compute the vtable to determine whether a field is
2169 special static, because it might not work for open types.
2171 2008-06-17 Mark Probst <mark.probst@gmail.com>
2173 * mini.c: Removed the unused token_type and token_source arguments
2174 from get_runtime_generic_context_ptr().
2176 2008-06-17 Marek Habersack <mhabersack@novell.com>
2178 * mini.c (ADD_BINOP): fix the build
2180 2008-06-16 Zoltan Varga <vargaz@gmail.com>
2182 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2185 2008-06-16 Mark Probst <mark.probst@gmail.com>
2187 * mini.h: Removed class relations enum that's not used anymore.
2189 2008-06-16 Mark Probst <mark.probst@gmail.com>
2191 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2193 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2194 the lazy fetch trampoline access code.
2196 2008-06-15 Zoltan Varga <vargaz@gmail.com>
2198 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2200 2008-06-14 Zoltan Varga <vargaz@gmail.com>
2202 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2204 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2206 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2208 2008-06-13 Zoltan Varga <vargaz@gmail.com>
2210 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2213 * mini-ops.h: Add MIN/MAX_UN opcodes.
2215 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2218 * basic-math.cs: Add more min/max tests.
2220 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2222 2008-06-13 Mark Probst <mark.probst@gmail.com>
2224 * mini.c: Small fix in the prologue of emit_castclass.
2226 2008-06-13 Zoltan Varga <vargaz@gmail.com>
2228 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2230 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2231 do not work even for unsigned types. Fixes #400014.
2233 * basic-math.cs: Add regression tests for unsigned Min/Max.
2235 2008-06-13 Mark Probst <mark.probst@gmail.com>
2237 * mini.c: Added additional context_used argument to several
2238 functions, which will be needed for sharing generic methods. Use
2239 GET_RGCTX macro wherever appropriate. Declare only one
2240 context_used in mono_method_to_ir().
2242 2008-06-13 Mark Probst <mark.probst@gmail.com>
2244 * mini.c, generic-sharing.c: Removed generic class relations.
2246 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2247 functions due to MRGCTX changes.
2249 2008-06-13 Mark Probst <mark.probst@gmail.com>
2251 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2252 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2253 with calculated IMT.
2255 * mini.c: Generic sharing of calls via generic interfaces.
2257 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2258 generic method with non-constant MonoGenericContext*. Instead,
2259 the context is taken out of the method itself.
2261 2008-06-13 Mark Probst <mark.probst@gmail.com>
2263 * mini.c: Generic sharing of ldvirtftn.
2265 2008-06-13 Mark Probst <mark.probst@gmail.com>
2267 * mini.c: Generic sharing of ldftn.
2269 2008-06-13 Mark Probst <mark.probst@gmail.com>
2271 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2273 2008-06-13 Mark Probst <mark.probst@gmail.com>
2275 * mini.c: Generic sharing of the special case of ldtoken followed
2276 by a call to GetTypeFromHandle.
2278 2008-06-13 Mark Probst <mark.probst@gmail.com>
2280 * mini.c: Generic sharing of box for nullable types.
2282 2008-06-13 Zoltan Varga <vargaz@gmail.com>
2284 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2285 are passed on the stack. Fixes #324807.
2287 2008-06-12 Bill Holmes <billholmes54@gmail.com>
2289 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2290 for the ArgValuetypeAddrInIReg case.
2292 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
2293 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
2295 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
2296 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
2297 local variable and pass the local variable by reference to the called method.
2299 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
2300 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2302 Contributed under MIT/X11 license.
2304 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2306 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2308 * debug-mini.c (mono_debug_print_vars): Release memory after printing
2311 2008-06-10 Martin Baulig <martin@ximian.com>
2314 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2316 2008-06-09 Kornél Pál <kornelpal@gmail.com>
2318 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2319 possible error when no arguments are passed.
2321 Contributed under MIT/X11 license.
2323 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2325 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2326 where the file name is NULL.
2328 2008-06-09 Zoltan Varga <vargaz@gmail.com>
2330 * mini.c: Fix s390 build.
2332 2008-06-08 Zoltan Varga <vargaz@gmail.com>
2334 * trace.c (mono_trace_parse_options): Fix warnings.
2336 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2338 2008-06-07 Zoltan Varga <vargaz@gmail.com>
2340 * mini.c (remove_block_if_useless): Avoid printing the method name.
2342 * mini.c: Remove needless setting of ins->cil_code which is now done by
2345 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2348 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2349 translated code after it has been patched.
2351 2008-06-06 Zoltan Varga <vargaz@gmail.com>
2353 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2354 avoid problems during code patching on SMP systems.
2355 (emit_call): Avoid adding a patch info which is already added by
2357 (mono_arch_emit_exceptions): Ditto.
2359 2008-06-05 Zoltan Varga <vargaz@gmail.com>
2361 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2362 MONO_TYPE_ISSTRUCT already checks for it.
2364 2008-06-05 Bill Holmes <billholmes54@gmail.com>
2366 * mini-amd64.c:merge_argument_class_from_type: When marshaling
2367 structs with floats on Winx64 the float registers are not used.
2368 The integer registers are always used..
2369 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
2370 only one register will be used and only if the size of the struct
2371 is 1,2,4, or 8 bytes.
2373 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
2376 Contributed under MIT/X11 license.
2378 2008-06-05 Martin Baulig <martin@ximian.com>
2380 * debug-debugger.c (debugger_lookup_class): Also call
2381 mono_class_setup_methods() here; we're only called from RTI.
2383 2008-06-05 Andreas Färber <andreas.faerber@web.de>
2385 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2386 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2387 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2388 Post-process object files and add dtrace-generated object, if necessary.
2390 Contributed under MIT/X11 license.
2392 2008-06-04 Mark Probst <mark.probst@gmail.com>
2394 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2397 * mini.c: Generic sharing for unbox.any and castclass.
2399 2008-06-04 Mark Probst <mark.probst@gmail.com>
2401 * mini.c: Ignore tailcall prefix in shared generic code and when
2402 doing calls which require a vtable/rgctx argument.
2404 2008-06-04 Mark Probst <mark.probst@gmail.com>
2406 * mini.c: Don't free the JIT info.
2408 * driver.c: Changes in the JIT info table testing code.
2410 2008-06-03 Zoltan Varga <vargaz@gmail.com>
2412 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
2413 interruption. Fix some warnings.
2415 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2416 interruption_checkpoint.
2418 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2420 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2421 from embedding applications.
2423 2008-06-02 William Holmes <billholmes54@gmail.com>
2425 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
2426 reserving 32 bytes on the stack when making calls.
2428 Contributed under MIT/X11 license.
2430 2008-06-01 Zoltan Varga <vargaz@gmail.com>
2432 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2433 the linear IL branch.
2435 * driver.c: Print out more information for --version on arm.
2437 2008-05-30 Zoltan Varga <vargaz@gmail.com>
2439 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2440 bb_exit instead, since out of line bblocks might not actually be emitted
2443 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2444 maximum epilog size for out of line bblocks if tracing is enabled.
2446 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2448 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2450 * arrays.cs: Regression tests for allocating arrays with negative sizes.
2452 2008-05-28 Zoltan Varga <vargaz@gmail.com>
2454 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2455 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
2458 2008-05-27 Zoltan Varga <vargaz@gmail.com>
2460 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2461 the 'value' to store is a constant.
2463 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2465 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2466 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2468 2008-05-26 Zoltan Varga <vargaz@gmail.com>
2470 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2471 for accessing method->generic_container.
2473 2008-05-24 Zoltan Varga <vargaz@gmail.com>
2475 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2477 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2479 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2481 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2484 2008-05-23 Zoltan Varga <vargaz@gmail.com>
2486 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2488 * mini.c: Handle the case when mono_class_vtable () fails.
2490 2008-05-23 Massimiliano Mantione <massi@ximian.com>
2491 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2494 2008-05-22 Mark Probst <mark.probst@gmail.com>
2496 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2497 together with domain sharing.
2499 2008-05-22 Mark Probst <mark.probst@gmail.com>
2501 * mini.c: Treat callvirts to final methods like non-virtual calls
2502 when doing generic sharing, i.e. look them up in the runtime
2505 2008-05-22 Mark Probst <mark.probst@gmail.com>
2507 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2508 with computed types (for generic sharing).
2510 * mini.c: Generic sharing for mkrefany and refanyval.
2512 2008-05-22 Zoltan Varga <vargaz@gmail.com>
2514 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2517 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2518 the generic sharing code.
2520 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2523 2008-05-21 Zoltan Varga <vargaz@gmail.com>
2525 * mini.h: Remove the declaration of mono_aot_init_vtable ().
2527 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
2529 * driver.c: updated copyright date
2531 2008-05-21 Zoltan Varga <vargaz@gmail.com>
2533 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2536 2008-05-19 Martin Baulig <martin@ximian.com>
2538 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2539 pointing to the new `_mono_debug_using_mono_debugger' variable.
2542 (mono_main): Check mono_debug_using_mono_debugger() rather than
2543 the `MONO_INSIDE_MDB' environment variable to check whether we're
2544 inside the debugger.
2546 2008-05-19 Zoltan Varga <vargaz@gmail.com>
2548 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2551 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
2553 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2555 * mini.c: Added mini_assembly_can_skip_verification. This
2556 function checks if the assembly requested to skip verification.
2557 Fixes part of #387274.
2559 2008-05-07 Zoltan Varga <vargaz@gmail.com>
2561 * mini.c (mini_get_method): Disable the check for open generic classes when
2562 using generic sharing.
2564 * generics.cs: Add a test #387034.
2566 * mini.c (mini_get_method): Check whenever the method class is an open generic
2567 type, and return NULL in that case, causing a verification error. Fixes
2570 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2572 * driver.c (mono_main): Revert r102623. The right
2573 thing to do is to enable the verifier under verifiable
2574 unless a --security flag was passed.
2576 We need this non-trivial behavior for --verify-all otherwise
2577 mcs-compileall won't be able to use it. As it needs everything to
2578 be verified under validil.
2580 2008-05-06 Martin Baulig <martin@ximian.com>
2584 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2585 (mono_debugger_thread_cleanup): Likewise.
2586 (mono_debugger_extended_notification): Likewise.
2588 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2590 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2591 against both inflated and non-inflated methods. We need to check against the
2592 generic definition for cases where the instantiated method is not visible.
2593 We need to check against the inflated types for cases where the instantiation
2594 changes any super type. This fixes #382986.
2596 Note that this doesn't need to be applied to other parts of mono_method_to_ir
2597 that check for visibiliy as generic params only appears as the type subject
2598 of tokens on call opcodes. Field manipulation and ldftn must always
2599 target an exact type.
2601 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2603 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2604 if no related --security flag is passed.
2606 2008-05-05 Andreas Färber <andreas.faerber@web.de>
2608 * mini-arch.h: Prepare support for ppc64.
2610 Contributed under MIT/X11 license.
2612 2008-05-05 Andreas Färber <andreas.faerber@web.de>
2614 * aot-runtime.c: Prepare support for ppc64.
2616 Contributed under MIT/X11 license.
2618 2008-05-05 Andreas Färber <andreas.faerber@web.de>
2620 * mini-ops.h: Prepare support for ppc64.
2622 Contributed under MIT/X11 license.
2624 2008-05-04 Andreas Färber <andreas.faerber@web.de>
2626 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2628 Contributed under MIT/X11 license.
2630 2008-05-03 Zoltan Varga <vargaz@gmail.com>
2632 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2633 assemblies, since aot_name is not a full path, causing us to load MS.NET
2634 assemblies on windows.
2636 2008-04-28 Kornél Pál <kornelpal@gmail.com>
2638 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2639 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2640 * main.c: Use UTF-8 encoded command line instead of Windows default code
2641 page on Windows to support Unicode.
2642 * driver.c (DllMain): New function for mixed-mode assembly support.
2643 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2644 export __stdcall functions without decoration.
2646 Contributed under MIT/X11 license.
2648 2008-04-28 Mark Probst <mark.probst@gmail.com>
2650 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2651 saving it very early.
2653 2008-04-28 Mark Probst <mark.probst@gmail.com>
2655 * mini.h, mini.c: Lots of code for accessing the old RGCTX
2656 deleted. The only way to access the new RGCTX is via the
2659 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2660 vtable instead of the RGCTX to static methods.
2662 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
2663 accessing the new RGCTX.
2665 * generic-sharing.c: There is no separation between self, type
2666 arguments and other types in the RGCTX anymore.
2668 2008-04-25 Jonathan Chambers <joncham@gmail.com>
2670 * mini-amd64.c (add_general): Remove previous stack adjustment.
2671 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
2672 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
2673 for 32 bytes of stack space reserved for all calls.
2675 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
2676 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
2679 Code contributed under MIT/X11 license.
2681 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
2683 * mini.c (mini_method_verify): Only verify non-inflated methods, check
2684 against the root definition, peeling out method and type instantiations.
2685 Cache verify success results, code that fails verification is still
2686 checked multiple times.
2688 2008-04-23 Zoltan Varga <vargaz@gmail.com>
2690 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
2692 2008-04-23 Jonathan Chambers <joncham@gmail.com>
2694 * mini-amd64.c (add_general): Always increment stack on Win64.
2695 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
2698 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
2699 stack based argument handling on Win64.
2701 Code contributed under MIT/X11 license.
2703 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
2705 * Makefile.am (version.h): Add support for git-svn.
2707 2008-04-22 Zoltan Varga <vargaz@gmail.com>
2709 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
2710 so instead of calling g_spawn_command_line_sync, we do everything by hand,
2711 avoiding allocations and libc functions which might deadlock.
2713 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
2714 'no-gdb-backtrace' option is set.
2716 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
2718 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
2720 2008-04-21 Martin Baulig <martin@ximian.com>
2722 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
2723 and `get_lmf_addr'; `notification_address' is no longer a pointer.
2725 2008-04-21 Martin Baulig <martin@ximian.com>
2727 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
2728 `thread_vtable', `event_handler_ptr' and `event_handler'.
2730 2008-04-21 Martin Baulig <martin@ximian.com>
2732 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
2733 allows delayed initialization of the `executable_code_buffer' when
2736 2008-04-21 Martin Baulig <martin@ximian.com>
2738 * mini.h (mono_debugger_create_notification_function): Removed.
2739 * tramp-*.c (mono_debugger_create_notification_function): Removed.
2741 * mdb-debug-info64.s
2742 (MONO_DEBUGGER__notification_function): Added this in the .text section.
2744 * mdb-debug-info32.s
2745 (MONO_DEBUGGER__notification_function): Added this in the .text section.
2747 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
2748 currently only works on x86 and x86_64, so don't create it on ppc.
2750 2008-04-21 Martin Baulig <martin@ximian.com>
2752 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
2755 (mini_method_compile): In the fp elimination check, check
2756 `debug_options.mdb_optimizations' in addition to
2757 mono_debug_using_mono_debugger().
2759 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
2760 disable some JIT optimizations which are only disabled when
2761 running inside the debugger.
2762 Added `--help-debug' option to describe the debugging options.
2763 (parse_debug_options): New static function to parse the `--debug'
2764 options, so we can easily add more stuff in future.
2766 2008-04-20 Zoltan Varga <vargaz@gmail.com>
2768 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
2769 the method has no body.
2771 2008-04-19 Jonathan Chambers <joncham@gmail.com>
2773 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
2774 assembly is not allowed in MSVC 64-bit compiler.
2775 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
2776 as we get floating point exceptions everywhere.
2778 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
2779 correctly align arguments for call to throw_exception.
2780 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
2782 Code contributed under MIT/X11 license.
2784 2008-04-19 Zoltan Varga <vargaz@gmail.com>
2786 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
2788 2008-04-17 Zoltan Varga <vargaz@gmail.com>
2790 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
2792 * mini-amd64.c (NEW_INS): Set cil_code.
2794 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
2795 from mini-amd64.c so all debugger related logic is in one place.
2797 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
2798 later won't have a random ip assigned to them.
2800 2008-04-16 Zoltan Varga <vargaz@gmail.com>
2802 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
2803 the arch specific function initializes code_size.
2804 (mono_create_delegate_trampoline): Ditto.
2806 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
2807 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
2810 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
2811 running under the debugger.
2813 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
2816 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
2817 debugger. Also move the disabling of optimizations here from driver.c.
2818 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
2821 * mini.h (MonoCompile): Add a few new flags.
2823 2008-04-15 Zoltan Varga <vargaz@gmail.com>
2825 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
2826 so the cil_code field of created MonoInst's is properly set.
2827 (mini_select_instructions): Ditto.
2829 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
2830 (MONO_INST_NEW_CALL): Ditto.
2832 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
2833 in many places so the ins->cil_code field is properly initialized.
2835 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
2838 2008-04-14 Zoltan Varga <vargaz@gmail.com>
2840 * mini.c (mini_method_compile): Print a different message when compiling a
2843 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
2846 2008-04-11 Zoltan Varga <vargaz@gmail.com>
2848 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
2851 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
2853 2008-04-11 Zoltan Varga <vargaz@gmail.com>
2855 * mini.c (handle_stack_args): Make this return void since its return value was
2856 never used. Also set cfg->unverifiable for invalid IL instead of calling
2859 2008-04-10 Mark Probst <mark.probst@gmail.com>
2861 * mini.c: Make sure "this" is live in catch clauses with type
2862 variables in shared generic code.
2864 2008-04-08 Mark Probst <mark.probst@gmail.com>
2866 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
2867 generic_class_is_reference_type() to ensure the proper behaviour
2868 when sharing generic code and the type in question is a type
2871 2008-04-08 Zoltan Varga <vargaz@gmail.com>
2873 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
2874 race conditions when printing thread dumps. Fixes #377738.
2876 2008-04-08 Massimiliano Mantione <massi@ximian.com>
2878 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
2879 shows up when both MonoInst arguments can cause aliasig.
2880 There is likely no way in the current JIT to trigger this problem, but
2881 it showed up in the development of generics sharing, when in a new
2882 opcode both args of an OP_GROUP can be aliases (addresses of a local).
2883 When the generics sharing code will be committed, its tests will be
2884 valid also for this bug.
2886 2008-04-08 Zoltan Varga <vargaz@gmail.com>
2888 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
2891 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
2894 2008-04-07 Zoltan Varga <vargaz@gmail.com>
2896 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
2897 use a more detailed exception message for InvalidCastException.
2899 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
2901 * driver.c (mono_main): Add --debug=casts option to turn on better
2902 InvalidCastException message details.
2904 * mini.c (mini_get_debug_options): New helper function to return the address of
2905 the debug_options variable.
2907 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
2908 the jit_tls TLS variable.
2910 * mini.c (mono_jit_tls): New TLS variable.
2912 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
2915 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
2917 * mini.h: Removed verifer related stuff. This code was moved to verify.c
2919 * mini.c: Removed verifer related stuff, code moved to verify.c.
2921 * driver.c: Using code from verify.c instead of mini.c.
2923 2008-04-05 Zoltan Varga <vargaz@gmail.com>
2925 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
2928 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
2930 * mini.c (check_for_method_verify): Enabling verification of
2931 corlib if mono_verify_all is set. Bugs in the verifier preventing that
2934 2008-04-04 Zoltan Varga <vargaz@gmail.com>
2936 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
2937 caller saved registers as well.
2939 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
2940 saved registers as well.
2942 2008-03-30 Zoltan Varga <vargaz@gmail.com>
2944 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
2946 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
2949 2008-03-27 Zoltan Varga <vargaz@gmail.com>
2951 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
2953 (get_call_info): Take a gsctx argument instead of 'cfg'.
2955 2008-03-26 Zoltan Varga <vargaz@gmail.com>
2957 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
2958 mono_verify_all is set.
2960 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
2962 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
2964 2008-03-25 Zoltan Varga <vargaz@gmail.com>
2966 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
2969 * driver.c mini.c mini.h: Add a --verify-all development option to test the
2970 verifier and the code generated by the compiler.
2972 2008-03-25 Mark Probst <mark.probst@gmail.com>
2974 * mini.c: Generic sharing of the non-nullable case of the box
2977 2008-03-24 Zoltan Varga <vargaz@gmail.com>
2979 * inssel.brg: Fix the build.
2981 * iltests.il.in: Add a test for lconv.ovf.u8.un.
2983 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
2985 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
2986 Array:Address. Fixes #372410.
2988 * iltests.il.in: New tests for readonly prefix.
2990 2008-03-23 Zoltan Varga <vargaz@gmail.com>
2992 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
2995 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
2998 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3000 * mini.c (mono_decompose_op_imm): New helper function.
3002 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3003 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3006 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
3007 mono_arch_output_basic_block. Fix warnings.
3009 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3012 2008-03-22 Zoltan Varga <vargaz@gmail.com>
3014 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3015 since the extra frame is now detected automatically inside the loop.
3017 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
3018 opts which are now in mono_peephole_ins ().
3020 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3022 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3023 frames and skip duplicate managed-to-native frames. Fixes #367665.
3025 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3026 opts which are now in mono_peephole_ins ().
3027 (mono_arch_peephole_pass_2): Ditto.
3029 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3031 * mini-codegen.c (mono_peephole_ins): New helper function containing the
3032 arch independent peephole optimizations.
3034 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3035 opts which are now in mono_peephole_ins ().
3037 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3039 * mini-s390.c (mono_arch_output_basic_block): Fix build.
3041 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3044 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3045 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3048 2008-03-21 Zoltan Varga <vargaz@gmail.com>
3050 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3051 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3054 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
3055 mono_arch_output_basic_block. Fix warnings.
3057 2008-03-20 Zoltan Varga <vargaz@gmail.com>
3059 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3062 2008-03-20 Zoltan Varga <vargaz@gmail.com>
3064 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3067 * iltests.il: Add new tests.
3069 2008-03-20 Kornél Pál <kornelpal@gmail.com>
3071 * mini.c: Removed Windows version macros.
3073 2008-03-20 Mark Probst <mark.probst@gmail.com>
3075 * generic-sharing.c: Put reflection types in the extensible part
3076 of the runtime generic context.
3078 * mini.c: Generic sharing of the GetTypeHandle special case of the
3079 ldtoken instruction.
3081 2008-03-20 Zoltan Varga <vargaz@gmail.com>
3083 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3085 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3087 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
3088 consistency with the other version on the linear IR branch.
3090 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3092 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3094 * iltests.il.in: Add new tests.
3096 2008-03-19 Zoltan Varga <vargaz@gmail.com>
3098 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3100 * iltests.il.in: Add new tests.
3102 2008-03-19 Mark Probst <mark.probst@gmail.com>
3104 * mini.c: Two variables with the same name were declared in
3105 nesting contexts and one wasn't initialized. Fixed.
3107 2008-03-19 Mark Probst <mark.probst@gmail.com>
3109 * mini.c: Generic sharing of the initobj instruction.
3111 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3113 * mini.c: make the test to optimize ldtoken from typeof() more
3116 2008-03-18 Mark Probst <mark.probst@gmail.com>
3118 * mini.c: Generic sharing of the initobj instruction for reference
3121 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3123 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3124 the mono_breakpoint_clean_code() code to perform bound checks.
3126 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3128 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3129 mono_arch_patch_callsite() to include the start of the managed method
3130 to be able to perform bound checks.
3132 2008-03-17 Mark Probst <mark.probst@gmail.com>
3134 * mini.c: Generic sharing for the isinst instruction.
3136 2008-03-17 Mark Probst <mark.probst@gmail.com>
3138 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3139 inssel-long32-mips.brg: Added opcodes for doing indirect calls
3140 with the runtime generic context argument.
3142 * mini.c: Share calls to several types of unsharable methods by
3143 putting the address of the method code in the runtime generic
3144 context and doing an indirect call.
3146 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3149 2008-03-16 Mark Probst <mark.probst@gmail.com>
3151 * generic-sharing.c: Change due to a change in the runtime genric
3154 2008-03-15 Martin Baulig <martin@ximian.com>
3157 (mono_arch_nullify_class_init_trampoline): Add call to
3158 mono_breakpoint_clean_code() to make things work when running
3159 inside the debugger.
3162 (mono_arch_nullify_class_init_trampoline): Add call to
3163 mono_breakpoint_clean_code() to make things work when running
3164 inside the debugger.
3166 2008-03-14 Zoltan Varga <vargaz@gmail.com>
3168 * inssel-long.brg (reg): Fix 64 bit build.
3170 2008-03-14 Mark Probst <mark.probst@gmail.com>
3172 * mini.c, mini.h: Share static generic code by passing it an
3173 implicit argument pointing to the runtime generic context.
3175 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3176 inssel-long32-mips.brg: New opcodes for calling shared static,
3177 which need to be passed the runtime generic context.
3179 * mini-amd64.c, mini-x86.c: Save the runtime generic context
3180 argument on the stack in the prologue if needed. New function for
3181 finding the runtime generic context argument from the registers
3182 saved by the trampoline.
3184 * mini-amd64.h, mini-x86.h: Specify which register to use for the
3185 runtime generic context argument.
3187 * tramp-amd64.c: Also restore the register used for the runtime
3188 generic context argument.
3190 * mini-trampoline.c: Resolve shared static calls by consulting the
3191 runtime generic context via the new argument.
3193 * generic-sharing.c: Add an argument to sharability-checking
3194 functions that specifies whether type variables should be treated
3195 as sharable type arguments.
3197 * inssel-x86.brg: Removed a superfluous, buggy rule.
3199 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3202 2008-03-14 Martin Baulig <martin@ximian.com>
3204 * debug-debugger.c (main_thread_handler): Call
3205 mono_runtime_run_main() without sending any notifications.
3207 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3209 2008-03-14 Zoltan Varga <vargaz@gmail.com>
3211 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3213 2008-03-14 Mark Probst <mark.probst@gmail.com>
3215 * tramp-x86.c: Fixed register restore offsets in the trampoline
3216 code for ECX and EDX.
3218 2008-03-12 Geoff Norton <gnorton@novell.com>
3220 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3221 different ucontext_t implementations.
3222 * exceptions-arm.c: Use the above defines to get exceptions working on
3223 iPhone (based on a patch by Luke Howard lukeh@padl.com)
3224 * mini-arm.c: Implement iPhone icache support (based on a patch by
3225 Luke Howard lukeh@padl.com)
3227 2008-03-12 Mark Probst <mark.probst@gmail.com>
3229 * mini.c: Enable generic sharing of calls to non-static
3230 non-interface non-generic non-value-type methods.
3232 * mini-trampolines.c: Resolve calls from shared generic code.
3234 2008-03-11 Zoltan Varga <vargaz@gmail.com>
3236 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3238 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3240 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3242 * mini.c: some fixes for the AOT compiler.
3244 2008-03-07 Zoltan Varga <vargaz@gmail.com>
3246 * cpu-amd64.md: Add clob:1 to some float opcodes.
3248 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
3250 * mini.h: Added MiniVerifierMode enumeration.
3252 * mini.c: Added mini_verifier_set_mode to control
3253 the usage of the new verifier.
3255 * mini.c (mono_method): Integrated the new verifier.
3257 * driver.c: Extended --security option with validil and
3258 verifiable options to activate the new verifier.
3260 2008-03-07 Zoltan Varga <vargaz@gmail.com>
3262 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
3263 optimization to ctors taking 0 or 2 arguments too.
3265 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3268 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3270 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3272 2008-03-06 Zoltan Varga <vargaz@gmail.com>
3274 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3275 non-aot case as well.
3277 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3279 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3282 * aot-compiler.c (encode_patch): Ditto.
3284 * mini.h (G_MININT32): Fix the definition of this.
3286 2008-03-05 Zoltan Varga <vargaz@gmail.com>
3288 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3290 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3292 2008-03-04 Zoltan Varga <vargaz@gmail.com>
3294 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
3295 methods returning vtypes in registers.
3296 (mono_arch_allocate_vars): Ditto.
3298 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3300 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
3302 * generics.cs: Add a test from the linear IR branch.
3304 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3306 * mini.c (inline_method): Cache failed inline attempts.
3308 2008-03-04 Mark Probst <mark.probst@gmail.com>
3310 * mini.c: For shared methods of generic classes put the location
3311 of "this" into the MonoGenericJitInfo.
3313 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3314 register out of a MonoContext by register number. Add the generic
3315 sharing context as an argument to mono_arch_find_this_argument().
3317 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3318 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3319 for new arch function.
3321 * mini-exception.c: Handle open exception clauses in shared
3324 * mini-trampolines.c: Supply additional argument to
3325 mono_arch_find_this_argument().
3327 2008-03-04 Zoltan Varga <vargaz@gmail.com>
3329 * Makefile.am (regtests): Run the bench.exe tests last.
3331 2008-03-03 Zoltan Varga <vargaz@gmail.com>
3333 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3336 2008-03-02 Zoltan Varga <vargaz@gmail.com>
3338 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3341 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3343 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3345 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3346 whose class has no cctor.
3348 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3350 2008-03-01 Zoltan Varga <vargaz@gmail.com>
3352 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3355 2008-02-29 Zoltan Varga <vargaz@gmail.com>
3357 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3358 to be in sync with the code on the linear IR branch.
3360 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3362 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3364 2008-02-27 Zoltan Varga <vargaz@gmail.com>
3366 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3368 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3370 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3372 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3374 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3376 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3379 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
3381 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3382 OP_LOADR4_MEMBASE emission.
3384 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3385 (mono_spillvar_offset_float): Ditto.
3387 * mini-mips.c (mono_arch_emit_prolog): Ditto.
3389 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3392 * basic-long.cs: Add regression tests for them.
3394 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3396 (mono_arch_allocate_vars): Fix representation of single-precision float
3398 (mono_arch_output_basic_block): Ditto.
3400 * inssel-mips.brg: Ditto, remove duplicate items.
3402 * mini-mips.c (emit_load_volatile_arguments): New function to handle
3403 arguments of tail calls as on other platforms.
3404 (mono_arch_output_basic_block): Handle tail calls.
3406 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3409 * objects.cs (test_5_pass_static_struct): Add test for it.
3411 Contributed under MIT/X11 license.
3413 2008-02-26 Zoltan Varga <vargaz@gmail.com>
3415 * Makefile.am: Use gmcs for compiling the regression tests.
3417 * *.2.cs *.2.il: Rename to *.cs and *.il.
3419 2008-02-24 Zoltan Varga <vargaz@gmail.com>
3421 * regalloc.h: Make the vassign array smaller.
3423 * mini.c (mini_method_compile): Remove an unused field in cfg.
3425 * mini-codegen.c: Add a bunch of micro optimizations.
3427 2008-02-23 Zoltan Varga <vargaz@gmail.com>
3429 * regalloc.h: Remove some unused fields.
3431 2008-02-22 Zoltan Varga <vargaz@gmail.com>
3433 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3435 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3437 2008-02-22 Mark Probst <mark.probst@gmail.com>
3439 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3441 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3442 trampoline: Fetch an entry from the runtime generic context. If
3443 it's NULL, jump to the actual trampoline to fill the runtime
3444 generic context. Otherwise, return it.
3446 * mini.c: Call the lazy fetch trampoline to get entries out of the
3447 runtime generic context.
3449 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3450 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3451 tramp-sparc.c: Stubs for the lazy fetch trampoline.
3453 2008-02-21 Mark Probst <mark.probst@gmail.com>
3455 * mini.c: Fetch data out of the extensible part of the runtime
3456 generic context instead of calling a helper function.
3458 * generic-sharing.c: Some functions moved into
3459 metadata/generic-sharing.c. Helper function for fetching other
3460 types now checks and asserts against extensible rgctx (just for
3461 debugging purposes - the helper function isn't called anymore
3462 unless for debugging).
3464 2008-02-21 Zoltan Varga <vargaz@gmail.com>
3466 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3467 for tail calls up to the point that the tests in iltests.exe run. Also add a
3468 dummy CKFINITE implementation.
3469 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3470 needed for trampoline LMF frames.
3472 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
3473 trampoline LMF frames.
3475 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
3477 * mini.c (inline_method): clean any pending loader error when inlining fail.
3478 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3480 2008-02-21 Zoltan Varga <vargaz@gmail.com>
3482 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3484 * aot-runtime.c (decode_patch_info): Ditto.
3486 * mini.c (mono_resolve_patch_target): Ditto.
3488 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3491 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3493 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3494 if it references an icall address.
3496 2008-02-20 Zoltan Varga <vargaz@gmail.com>
3498 * cpu-s390x.md: Remove some more unused opcodes.
3500 * cpu-s390x.md: Remove some unused opcodes.
3502 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3503 mono_op_imm_to_op ().
3505 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3506 instead of a switch statement.
3508 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3509 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3511 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3513 * mini-codegen.c: Remove unused mono_regstate2_... functions.
3515 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3518 2008-02-19 Zoltan Varga <vargaz@gmail.com>
3520 * driver.c (mono_main): Improve error reporting when an assembly cannot be
3521 opened. Fixes #362607.
3523 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3525 * iltests.il.in: Add a test for static methods in interfaces.
3527 2008-02-18 Zoltan Varga <vargaz@gmail.com>
3529 * genmdesc.c (build_table): Fix a crash on older glib versions.
3531 * cpu-sparc.md: Remove some unused opcodes.
3533 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
3534 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3536 * cpu-amd64.md: Remove some unused opcodes.
3538 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3539 like the other opcodes.
3541 2008-02-17 Zoltan Varga <vargaz@gmail.com>
3543 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3545 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3547 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3548 variables 'cfg' instead of 'm' for consistency.
3550 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3552 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3553 argument holding the vtype return address, to avoid the ambigious use of
3554 cfg->ret for this purpose.
3556 * mini.c (NEW_RETLOADA): Use vret_addr if set.
3558 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3560 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3561 new mono_print_ins () function which only takes one argument.
3563 2008-02-15 Zoltan Varga <vargaz@gmail.com>
3565 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3568 2008-02-14 Zoltan Varga <vargaz@gmail.com>
3570 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3572 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3574 * mini-x86.c: Sync with the version on the linear IR branch by adding new
3575 opcodes and other small changes.
3577 * mini-ops.h: Add some new opcodes from the linear IR branch.
3579 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3581 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3582 opcodes, use the REG_MEMBASE opcodes instead.
3584 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3585 opcodes, use the REG_MEMBASE opcodes instead.
3587 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3590 * mini.c (mono_op_imm_to_op): New helper function.
3592 * mini-ops.h: Add some opcodes from linear IR branch.
3594 2008-02-13 Zoltan Varga <vargaz@gmail.com>
3596 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
3599 2008-02-12 Zoltan Varga <vargaz@gmail.com>
3601 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
3604 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3606 2008-02-09 Zoltan Varga <vargaz@gmail.com>
3608 * aot-compiler.c (emit_method_code): Add an assert.
3610 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3611 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3614 2008-02-08 Zoltan Varga <vargaz@gmail.com>
3616 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
3617 some load/store opcodes so they are consistent.
3618 (mono_arch_emit_prolog): Simplify some code.
3620 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3622 * objects.cs: Add tests for large argument offsets on ARM.
3624 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
3625 stack offsets. Fixes #359651.
3627 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3629 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3631 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3633 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3635 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3637 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3638 rid of CEE_CONV_R_UN.
3640 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3642 2008-02-07 Zoltan Varga <vargaz@gmail.com>
3644 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3646 * mini.c (mono_normalize_opcodes): Add some more opcodes.
3648 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3650 * cpu-amd64.md: Remove some unused opcodes.
3652 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3654 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3656 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
3657 arch specific functions for its parts. Call the peephole pass after local
3658 regalloc so the prolog can compute a more accurate max_offset.
3660 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3661 the corresponding OP_I/OP_L opcodes.
3663 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
3665 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
3667 2008-02-06 Zoltan Varga <vargaz@gmail.com>
3669 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
3670 as they are handled in mini.c.
3672 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
3674 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
3675 case since it is handled in mini.c.
3677 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
3679 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
3681 * *.c: Use the new opcodes in the IR and back end code.
3683 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
3685 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
3687 2008-02-06 Mark Probst <mark.probst@gmail.com>
3689 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
3690 an assert because it has a race condition.
3692 2008-02-06 Zoltan Varga <vargaz@gmail.com>
3694 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
3696 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
3698 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
3700 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
3701 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
3703 2008-02-05 Zoltan Varga <vargaz@gmail.com>
3705 * cpu-amd64.md (move): Correct the maximum size of move.
3707 2008-02-05 Mark Probst <mark.probst@gmail.com>
3709 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
3710 the generic class init trampoline to return quickly if the class
3713 2008-02-04 Zoltan Varga <vargaz@gmail.com>
3715 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
3716 issues where an 32 bit callsite cannot be patched by a 64 bit address.
3718 2008-02-03 Zoltan Varga <vargaz@gmail.com>
3720 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
3723 2008-01-31 Zoltan Varga <vargaz@gmail.com>
3725 * objects.cs: Add some soft-float tests.
3727 * mini.c: Fix a couple more soft-float issues.
3729 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
3731 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
3734 2008-01-30 Zoltan Varga <vargaz@gmail.com>
3736 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
3737 exception happens while compiling a virtual method.
3739 2008-01-29 Zoltan Varga <vargaz@gmail.com>
3741 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
3743 * mini-sparc.c: Fix build.
3745 * mini-sparc.c (get_call_info): Add support for generic sharing.
3747 * mini-exceptions.c: Add a FIXME.
3749 2008-01-27 Zoltan Varga <vargaz@gmail.com>
3751 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
3752 altstack handling code.
3754 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
3756 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
3758 * mini-s390.c: Add support for generic sharing.
3760 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
3762 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3764 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
3766 * mini-s390x.c: Add support for generic sharing.
3768 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
3770 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
3772 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
3773 can be used since it takes a 16 bit signed immediate.
3775 * inssel-s390x.brg: Fix OP_SETRET.
3777 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
3779 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
3781 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
3783 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
3785 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
3788 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
3791 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
3792 of the unused mono_arch_patch_delegate_trampoline stuff.
3794 2008-01-26 Zoltan Varga <vargaz@gmail.com>
3796 * basic-long.cs: Move the fp related tests to basic-float.cs.
3798 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
3800 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
3802 * basic-calls.cs: Add a test for proper float argument passing.
3804 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
3805 if the context corresponds to an exception received through a signal.
3807 * exceptions.cs: Add a test for nullref handling at the start of a try
3810 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
3812 * jit-icalls.c (mono_break): New JIT icall.
3814 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
3816 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
3818 2008-01-25 Zoltan Varga <vargaz@gmail.com>
3820 * cpu-*.md: Get rid of unused opcodes.
3822 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
3824 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
3827 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
3830 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
3831 the arch independent trampoline code in mini-trampolines.c.
3833 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
3835 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
3837 * mini-s390.h: Remove an unused define.
3839 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
3840 the arch independent trampoline code in mini-trampolines.c.
3842 * mini-arm.c (mono_arch_emit_prolog): Fix build.
3844 2008-01-24 Zoltan Varga <vargaz@gmail.com>
3846 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
3848 * mini-s390.c (mono_arch_emit_prolog): Fix build.
3850 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
3852 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
3854 * cpu-amd64.md: Use smaller sizes for int opcodes.
3856 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
3858 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
3861 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
3864 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
3865 instead of though a pointer to save an indirection when accessing elements of
3868 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
3870 (NOT_IMPLEMENTED): New helper macro.
3871 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
3874 * *.c: Use the new helper macro.
3876 2008-01-21 Zoltan Varga <vargaz@gmail.com>
3878 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
3880 2008-01-20 Zoltan Varga <vargaz@gmail.com>
3882 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
3885 2008-01-18 Zoltan Varga <vargaz@gmail.com>
3887 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
3888 profiling is enabled.
3890 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
3892 (mono_arch_emit_prolog): Add more first bblock optimizations.
3894 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
3895 in order if possible.
3896 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
3897 bblock, since the arguments are still in their original registers.
3899 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
3901 2008-01-17 Zoltan Varga <vargaz@gmail.com>
3903 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
3906 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
3909 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
3911 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
3912 process async exceptions received while in unmanaged code.
3914 * mini.c (mini_init): Install a callback with the runtime which will be called
3915 when a thread receives an async exception while in unmanaged code.
3917 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
3919 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
3921 2008-01-16 Wade Berrier <wberrier@novell.com>
3928 2008-01-16 Zoltan Varga <vargaz@gmail.com>
3930 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
3931 compilation with sun cc.
3933 * cpu-*.md: Fix the build.
3935 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
3937 * mini-amd64.h: Add some comments to the MonoLMF structure.
3939 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
3941 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
3942 in the LMF structure if possible. This saves two instructions in the
3943 managed->native wrappers.
3945 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
3947 2008-01-16 Mark Probst <mark.probst@gmail.com>
3949 * generic-sharing.c: New type argument lookup code which uses the
3950 runtime generic context template.
3952 2008-01-15 Zoltan Varga <vargaz@gmail.com>
3954 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
3956 * mini-arm.c (add_general): Fix arm eabi parameter passing.
3957 (mono_arch_output_basic_block): Fix localloc implementation.
3959 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
3961 * mini-ia64.c (peephole_pass): Fix ia64 build.
3963 * mini-amd64.c (peephole_pass): Fix a warning.
3965 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
3966 at a constant offset from sp/fp.
3968 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
3969 instead of obtaining it from *lmf in the managed method case.
3971 2008-01-14 Zoltan Varga <vargaz@gmail.com>
3973 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
3975 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
3977 * mini.h (MonoInstList): New type.
3978 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
3979 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
3980 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
3981 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
3982 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
3983 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
3984 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
3985 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
3986 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
3987 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
3988 MONO_INST_LIST_FOR_EACH_ENTRY,
3989 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
3990 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
3991 mono_inst_list_first, mono_inst_list_last,
3992 mono_inst_list_next, mono_inst_list_prev): New instruction
3993 list handling interfaces.
3994 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
3995 list head 'ins_list'.
3996 (MonoInst): Replace next pointer with list head 'node'.
3997 (MonoCallInst): Make 'out_args' a MonoInstList.
3998 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
3999 (MonoCompile): Delete reverse_inst_list and
4000 reverse_inst_list_len.
4001 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4002 mono_arch_lowering_pass, mono_arch_local_regalloc,
4003 mono_arch_output_basic_block, mono_arch_emit_prolog):
4004 Convert to new instruction lists.
4005 (insert_after_ins): Delete.
4006 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4008 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4009 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4010 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4011 mono_emulate_opcode, mono_emit_load_got_addr,
4012 inline_method, mono_method_to_ir, mono_print_bb_code,
4013 print_dfn, decompose_pass, nullify_basic_block,
4014 replace_out_block_in_code, remove_block_if_useless,
4015 merge_basic_blocks, move_basic_block_to_end,
4016 try_unsigned_compare, optimize_branches, mono_print_code,
4017 mini_select_instructions, remove_critical_edges): Likewise.
4018 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4019 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4020 mono_arch_output_basic_block, mono_arch_emit_prolog):
4022 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4023 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4024 mono_arch_output_basic_block): Likewise.
4025 (inst_list_prepend, insert_after_ins): Delete.
4026 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4027 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4029 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4030 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4031 mono_arch_emit_prolog): Likewise.
4032 * cfold.c (mono_constant_fold): Likewise.
4033 * liveness.c (visit_bb, mono_analyze_liveness,
4034 optimize_initlocals): Likewise.
4035 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4036 * graph.c (mono_draw_code_cfg): Likewise.
4037 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4038 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4039 mono_ssa_cprop): Likewise.
4040 * abcremoval (get_relations_from_previous_bb, process_block):
4042 * local-propagation (mono_cprop_invalidate_values,
4043 mono_local_cprop_bb): Likewise.
4044 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4045 peephole_pass, mono_arch_output_basic_block,
4046 mono_arch_emit_prolog): Likewise.
4047 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4048 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4049 mono_arch_emit_prolog): Likewise.
4050 (insert_after_ins): Delete.
4051 * aliasing.c (print_code_with_aliasing_information,
4052 mono_build_aliasing_information, mono_aliasing_deadce):
4053 Convert to new instruction lists.
4054 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4055 peephole_pass, NEW_INS, mono_arch_lowering_pass,
4056 mono_arch_local_regalloc, mono_arch_output_basic_block):
4058 (insert_after_ins): Delete.
4059 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4060 peephole_pass, mono_arch_output_basic_block): Convert to
4061 new instruction lists.
4062 * mini-codegen (InstList, inst_list_prepend,
4063 insert_after_ins): Delete.
4064 (insert_before_ins, get_register_force_spilling,
4065 get_register_spilling, free_up_ireg, free_up_reg,
4066 create_copy_ins, create_spilled_store, alloc_int_reg,
4067 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4068 to new instruction lists.
4069 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4070 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4071 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4072 (insert_after_ins): Delete.
4073 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4074 mono_arch_local_regalloc, mono_arch_output_basic_block,
4075 mono_arch_call_opcode): Convert to new instruction lists.
4076 (insert_after_ins): Delete.
4077 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4078 peephole_pass, mono_arch_output_basic_block,
4079 mono_arch_emit_prolog): Convert to new instruction lists.
4081 2008-01-11 Zoltan Varga <vargaz@gmail.com>
4083 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4085 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4088 * Makefile.am (version.h): Make this work with non-bash shells.
4090 2008-01-10 Zoltan Varga <vargaz@gmail.com>
4092 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4094 2008-01-08 Zoltan Varga <vargaz@gmail.com>
4096 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
4097 the InitializeArray optimization.
4099 2008-01-06 Zoltan Varga <vargaz@gmail.com>
4101 * mini.c driver.c: Don't include os/gc_wrapper.h.
4103 2008-01-05 Zoltan Varga <vargaz@gmail.com>
4105 * mini.c (print_jit_stats): Print GC statistics if available.
4107 2008-01-04 Zoltan Varga <vargaz@gmail.com>
4109 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4111 2007-12-29 Zoltan Varga <vargaz@gmail.com>
4113 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4115 2007-12-26 Zoltan Varga <vargaz@gmail.com>
4117 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4119 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4121 * driver.c (mono_main): Ditto.
4123 2007-12-23 Zoltan Varga <vargaz@gmail.com>
4125 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4127 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4128 in the vtable can't be encoded.
4129 (compile_method): Ditto.
4131 2007-12-21 Zoltan Varga <vargaz@gmail.com>
4133 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4136 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
4139 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4140 the top LMF entry belongs to the current method.
4142 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4144 2007-12-20 Zoltan Varga <vargaz@gmail.com>
4146 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4148 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4150 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4152 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4154 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4156 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
4159 * basic-float.cs: Add an ulong->double cast test.
4161 2007-12-15 Zoltan Varga <vargaz@gmail.com>
4163 * mini.c (mono_method_to_ir): Fix a warning.
4165 2007-12-14 Zoltan Varga <vargaz@gmail.com>
4167 * mini-ops.h: Add OP_SWITCH.
4169 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4170 CEE_SWITCH in back-end code, use OP_SWITCH instead.
4172 2007-12-11 Geoff Norton <gnorton@novell.com>
4174 * mini-s390x.c: Minor change to the MAX() define to allow
4175 it to compile with other gcc versions.
4177 2007-12-11 Geoff Norton <gnorton@novell.com>
4180 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4182 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
4184 exceptions-arm.c (mono_arch_get_restore_context): Restore
4187 exceptions-arm.c (throw_exception): Save the frame pointer.
4188 This is a partial fix for #323747. Only the client side is
4191 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
4193 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4194 was using an unrelated variable to log the class which
4195 needed the cctor to be called. This was crashing on arm.
4197 2007-12-09 Robert Jordan <robertj@gmx.net>
4199 * mini-x86.c (mono_arch_emit_epilog):
4200 Consider all kinds of 64-bit types. Fixes #323114.
4202 2007-12-08 Zoltan Varga <vargaz@gmail.com>
4204 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4206 2007-12-07 Zoltan Varga <vargaz@gmail.com>
4208 * mini-amd64.c (peephole_pass): Add a missing instruction check.
4210 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4212 * mini.c: run type ctor before allocating an object, not only
4213 when running it's constructor method (fixes at least part of bug #342507).
4215 2007-12-07 Zoltan Varga <vargaz@gmail.com>
4217 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4219 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4220 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
4223 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4224 mono_generic_class_init_trampoline () the same as it is done with the other
4227 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
4228 aot-runtime.c aot-compiler.c: Implement AOT support.
4230 2007-12-07 Mark Probst <mark.probst@gmail.com>
4232 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4233 build for archs which don't have the vtable trampoline defined
4236 2007-12-07 Zoltan Varga <vargaz@gmail.com>
4238 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4240 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4242 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4244 * tramp-<ARCH>.c: Use the new helper function.
4246 2007-12-07 Mark Probst <mark.probst@gmail.com>
4248 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4249 trampoline call, which takes a vtable argument.
4251 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4252 OP_TRAMPCALL_VTABLEs like other calls.
4254 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4255 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4256 call. Implemented a support function which fetches the vtable
4257 from a register set.
4259 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4260 Implemented a generic class init trampoline, using the
4261 OP_TRAMPCALL_VTABLE opcode.
4263 * mini.c: Implemented static field access when sharing generic
4264 code. This implies initing the class using the new
4265 OP_TRAMPCALL_VTABLE call.
4267 2007-12-07 Mark Probst <mark.probst@gmail.com>
4269 * mini.c: Don't compile methods with sharing enabled if their
4270 classes are disabled for sharing.
4272 2007-12-06 Zoltan Varga <vargaz@gmail.com>
4274 * inssel.brg: Add a missing sign extension to the GETCHR and array access
4275 opcodes. Fixes #346563.
4277 * objects.cs: Add a new test.
4279 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4281 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4282 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4284 2007-12-06 Zoltan Varga <vargaz@gmail.com>
4286 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4288 2007-12-03 Zoltan Varga <vargaz@gmail.com>
4290 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4293 2007-12-02 Zoltan Varga <vargaz@gmail.com>
4295 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4297 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
4298 optimization in the AOT case.
4300 2007-11-30 Zoltan Varga <vargaz@gmail.com>
4302 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4304 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4306 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4308 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4310 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4311 is created by the inlined delegate ctor.
4313 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4315 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4317 2007-11-29 Zoltan Varga <vargaz@gmail.com>
4319 * cpu-x86.md: Fix the length of ckfinite.
4321 2007-11-28 Zoltan Varga <vargaz@gmail.com>
4323 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4325 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4326 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4328 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4330 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
4331 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4333 2007-11-28 Martin Baulig <martin@ximian.com>
4336 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4337 after creating the trampoline.
4339 2007-11-27 Zoltan Varga <vargaz@gmail.com>
4341 * aot-runtime.c (load_aot_module): Check runtime version if needed.
4343 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4346 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4347 instead of the calling method to help AOT.
4349 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4351 2007-11-26 Zoltan Varga <vargaz@gmail.com>
4353 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4356 2007-11-23 Zoltan Varga <vargaz@gmail.com>
4358 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4360 * aot-compiler.c (compile_method): Correct check for generic method definitions.
4361 (encode_method_ref): No need to handle generic method definitions specially.
4363 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4365 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
4368 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4370 (compile_method): Enable generic sharing.
4372 2007-11-22 Zoltan Varga <vargaz@gmail.com>
4374 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4375 (mini_method_compile): Add preliminary support for AOTing shared generic code.
4377 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4380 * mini-trampolines.c: Fix a warning.
4382 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4384 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4385 (generic_class_is_reference_type): Remove unused function.
4387 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4388 in the generic vtable trampoline case.
4390 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4392 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4393 return an AOT method based on a vtable slot.
4395 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4397 * mini.c (mini_get_vtable_trampoline): Export this.
4399 2007-11-22 Martin Baulig <martin@ximian.com>
4402 (MonoDebuggerInfo): Move `debugger_version' up.
4404 2007-11-22 Martin Baulig <martin@ximian.com>
4407 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4409 * mini-trampolines.c
4410 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4411 after compiling the method.
4413 2007-11-20 Martin Baulig <martin@ximian.com>
4416 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4417 (mono_debugger_remove_breakpoint): Likewise.
4418 (mono_debugger_check_breakpoints): Likewise.
4420 * debug-debugger.c: Implement the new breakpoint interface here.
4422 2007-11-18 Zoltan Varga <vargaz@gmail.com>
4424 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4425 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4427 * mini-x86.c (mono_arch_output_basic_block): Ditto.
4429 2007-11-17 Zoltan Varga <vargaz@gmail.com>
4431 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4433 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4436 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4439 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4440 returning a vtype in a register.
4442 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4443 here from the arch specific code.
4445 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4448 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4449 (mono_arch_emit_prolog): Increment maximum prolog size.
4451 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4452 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4454 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
4455 MonoGenericSharingContext.
4457 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
4458 MonoGenericSharingContext. Allocate memory from the cfg mempool.
4460 2007-11-15 Mark Probst <mark.probst@gmail.com>
4462 * mini.c, mini.h, generic-sharing.c: Functions for producing code
4463 which extract fields out of the runtime generic context. Full
4464 sharing of the NEWARR opcode.
4466 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4468 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4469 --enable-minimal=ssa.
4471 2007-11-13 Zoltan Varga <vargaz@gmail.com>
4473 * mini-trampolines.c (mono_delegate_trampoline): Update after
4474 mono_marshal_get_delegate_invoke () signature change.
4476 2007-11-13 Mark Probst <mark.probst@gmail.com>
4478 * mini.c: Removed the shared context in favor of the generic
4479 sharing context. Allocate the MonoJitInfo structure with room for
4480 the generic sharing context if it's needed.
4482 * mini.h: Remove MonoGenericSharingContext declaration. It's in
4483 domain-internals.h now.
4485 * mini-x86.c: Pass the generic sharing context to get_call_info ().
4487 * generic-sharing.c: Several changes for working without a shared
4488 context and instead operating on open types instead.
4490 2007-11-12 David S. Miller <davem@davemloft.net>
4492 * inssel-sparc.brg: Fix double instruction emit.
4494 2007-11-12 Zoltan Varga <vargaz@gmail.com>
4496 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
4497 Get/Set/Address methods.
4499 * mini.c debug-debugger.c mini-trampolines.c: Update after
4500 mono_marshal_get_delegate_invoke signature change.
4502 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
4504 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4505 This can happens with dynamic methods. Fixes the other bug in #322722.
4507 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
4509 * tramp-arm.c (mono_arch_patch_callsite): Support patching
4512 * mini-arm.c (arm_patch): Implement patching of BX call
4513 sequence. Fixes one of the bugs in #322722.
4515 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
4517 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4518 under Linux. We only need to flush every 32-byte cache line.
4520 2007-11-07 Massimiliano Mantione <massi@ximian.com>
4523 move_basic_block_to_end: Add branches when needed, eventually creating
4525 optimize_branches: added a parameter that tells if it's ok to create
4526 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4527 and avoid calling move_basic_block_to_end when it's not ok.
4530 2007-11-07 Mark Probst <mark.probst@gmail.com>
4532 * mini.c: Abort inlining call to InitializeArray if something
4533 looks wrong. Let the icall handle it, which now has proper safety
4536 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
4538 * mini.c (mono_spill_call): add support for soft-float.
4540 * mini.c (mono_method_to_ir): add support for soft-float
4541 to inlined functions that return float.
4543 * mini.c (mono_method_to_ir): add support for soft-float
4544 to cee_stsfld opcode on float fields.
4546 2007-11-05 Geoff Norton <gnorton@novell.com>
4548 * mini-x86.h: Fix the structure access for X86 Leopard.
4551 2007-11-05 Martin Baulig <martin@ximian.com>
4553 * mini-trampolines.c
4554 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4555 after compiling the method to notify the debugger.
4557 2007-11-05 Martin Baulig <martin@ximian.com>
4559 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4561 2007-11-02 Zoltan Varga <vargaz@gmail.com>
4563 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4564 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4566 2007-11-01 Zoltan Varga <vargaz@gmail.com>
4568 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4569 native-to-managed wrappers.
4571 2007-11-01 Geoff Norton <gnorton@novell.com>
4573 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
4576 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4578 * mini.c, mini-x86.c: when getting back from unmanaged code
4579 to managed via a marshaled delegate we also need to set the
4582 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4584 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4587 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4589 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4590 let the debugger or other external agents to tell the JIT when
4591 a sw breakpoint has been inserted in the code that the JIT needs
4592 to be able to inspect.
4594 2007-10-31 Martin Baulig <martin@ximian.com>
4597 (MonoDebuggerInfo): Remove `runtime_class_init'.
4599 2007-10-30 Martin Baulig <martin@ximian.com>
4602 (mono_debugger_thread_created): Added `MonoThread *' argument.
4603 (mono_debugger_extended_notification): New public method.
4604 (mono_debugger_trampoline_compiled): New public method.
4607 (MonoDebuggerThreadInfo): Added `thread' and
4608 `extended_notifications' fields.
4611 (debugger_executable_code_buffer): New static variable.
4614 (MonoDebuggerInfo): Added `executable_code_buffer',
4615 `executable_code_buffer_size', `breakpoint_info_area',
4616 `breakpoint_table' and `breakpoint_table_size'.
4618 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
4620 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4621 that IP either is an unused value or the vtable pointer. IMT
4622 calls use vtable + offset now. Reduced by almost half the size
4625 2007-10-26 Jonathan Chambers <joncham@gmail.com>
4627 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4628 defines to access param registers. Replace long usage with
4629 gsize as sizeof(long) != sizeof(void*) on Win64.
4631 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4632 on Win64. Fix intrinsic, use _AddressOfReturnAddress
4633 instead of non-existant _GetAddressOfReturnAddress.
4635 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
4636 param registers. Save/restore %rdi and %rsi in MonoLMF.
4638 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
4639 param registers. Modify (throw_exception) signature to take
4640 %rdi and %rsi on Win64.
4642 Code is contributed under MIT/X11 license.
4644 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4646 * helpers.c: unlink debugging output files.
4648 2007-10-25 Zoltan Varga <vargaz@gmail.com>
4650 * mini.c: Move mono_create_ftnptr () to object.c.
4652 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
4654 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4655 optional. This function can now be used to disassemble code generated
4656 outside the JIT such as trampolines and IMT thunks.
4658 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4660 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4661 vtable pointer from a ldr instruction.
4663 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
4664 new IMT call sequence.
4666 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
4667 call sequence for interface invocations.
4669 * mini-arm.c (mono_arch_emit_imt_argument): added, required
4670 for imt support. This function is empty since IMT on ARM requires no
4671 special handling on the IR side.
4673 * mini-arm.c (mono_arch_find_imt_method): added, required for
4676 * mini-arm.c (mono_arch_find_this_argument): added, required
4679 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
4680 a ldr instruction to load a value stored in the code stream.
4682 * mini-arm.c (mono_arch_build_imt_thunk):added, required
4686 2007-10-23 Zoltan Varga <vargaz@gmail.com>
4688 * mini.c (mini_init): Install the jump trampoline callback.
4690 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4692 * mini-trampolines.c: handle synchronized methods with the common
4693 vtable trampoline (bug #335601).
4695 2007-10-17 Zoltan Varga <vargaz@gmail.com>
4697 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
4699 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
4702 * mini-ia64.h mini-ia64.c: Add support for IMT.
4704 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
4705 prolog. Fixes #331958.
4707 2007-10-15 Zoltan Varga <vargaz@gmail.com>
4709 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
4711 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4713 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
4716 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4718 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
4721 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
4723 * mini-x86.c, mini-x86.h: x86 support for the common vtable
4726 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
4728 * mini-trampolines.c: changed the magic rampoline to understand
4729 the common vtable trampoline method: the method to invoke is
4730 determined by the vtable displacement of the call.
4732 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4734 * mini.c, mini.h: register the common vtable trampoline if the
4735 architecture supports it.
4737 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4739 * cpu-amd64.md: use the correct max length for tls_get.
4741 2007-10-14 Zoltan Varga <vargaz@gmail.com>
4743 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
4744 CEE_STELEM_ANY. Fixes #333696.
4746 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4748 * exceptions-x86.c: provide more graceful handling of the case where
4749 we followed a bogus function pointer from managed code (bug #332866).
4751 2007-10-11 Mark Probst <mark.probst@gmail.com>
4753 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
4754 replaces the generic_shared flag and will carry more information
4757 * generic-sharing.c: Added mini_type_stack_size() which allows
4758 allows open types if given a generic sharing context.
4759 mini_get_basic_type_from_generic() takes a
4760 MonoGenericSharingContext* instead of a MonoCompile* now.
4762 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
4763 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
4764 mini-sparc.c, mini-x86.c: Trivial changes required by the two
4765 changes above. Just passing arguments through to the right
4768 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
4770 * mini-arm.c: unify the call emission to emit_code_seq().
4772 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
4774 * tramp-arm.c: reduced the trampoline size.
4776 2007-10-10 Mark Probst <mark.probst@gmail.com>
4778 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
4779 variable handling out of arch-specific code.
4781 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
4783 * mini-arm.c: implemented fast delegate dispatch.
4785 2007-10-09 Zoltan Varga <vargaz@gmail.com>
4787 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
4788 that fp elimination is turned off if the space required by locals is too
4791 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4793 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
4794 ARM to the new style trampoline.
4796 2007-10-09 Zoltan Varga <vargaz@gmail.com>
4798 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
4800 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
4802 2007-10-09 Martin Baulig <martin@ximian.com>
4805 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
4806 `field_info_offset_offset'.
4808 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
4810 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
4811 removed more internal usage of the r11 register and made it available
4812 to the register allocator.
4814 2007-10-08 Mark Probst <mark.probst@gmail.com>
4816 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
4817 when sharing generics and treat type variables as references.
4819 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4821 * mini-ppc.c: started removing the internal uses of register r11
4822 to eventually allow the register allocator to manage it as an
4823 additional available register.
4825 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4827 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
4829 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
4831 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
4832 specific trampolines as they are not performance critical as a jump
4833 target (maybe align as before only for AOT code?). This saves about
4834 200 KB of native code on x86 for monodevelop startup.
4836 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
4838 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
4839 monodevelop startup.
4841 2007-10-06 Zoltan Varga <vargaz@gmail.com>
4843 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
4845 * mini-sparc.h mini-sparc.c: Implement IMT support.
4847 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
4848 its smaller and doesn't clobber sparc_g1.
4850 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
4852 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
4854 * mini-ppc.c: optimized the size of the IMT thunks a bit.
4856 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4858 * mini-ppc.c: implemented fast delegate invocation.
4860 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
4862 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
4864 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4866 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
4867 code to the new style trampoline in preparation for IMT support.
4869 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
4871 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
4872 systems already. This also reduces the specific trampiline sizes and
4873 prepares for the use of r12 as the IMT identifier register.
4875 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4877 * mini-mips.h: endianess fix (simplified from a patch by
4878 Thomas Kunze <thommy@tabao.de>, bug #323737).
4880 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
4882 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
4883 to access ucontext fields and enable netbsd support
4884 (partially from Magnus Henoch <mange@freemail.hu>).
4886 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4888 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
4889 use the preprocessor from the CPP env var if it is set.
4891 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
4893 * mini-trampolines.c: fixed an assertion and moved it earlier in the
4894 code, before interface_offset gets used.
4896 2007-10-02 Zoltan Varga <vargaz@gmail.com>
4898 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
4899 mono_class_setup_vtable () before accessing klass->vtable.
4901 2007-10-01 Zoltan Varga <vargaz@gmail.com>
4903 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
4906 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
4908 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
4909 IMT slots (this saves hundreds of KB of memory in programs like
4910 IronPython and Monodevelop).
4912 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4914 * mini.c: print the delegate counter.
4916 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
4918 * mini-x86.c: make it easier to enable the debugging code for IMT
4921 2007-09-28 Martin Baulig <martin@ximian.com>
4924 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
4925 `mono_method_klass_offset' and `mono_method_token_offset'.
4927 2007-09-20 Mark Probst <mark.probst@gmail.com>
4929 * mini.c: First generics sharing implementation. Can only share
4930 in very simple cases. If sharing doesn't work it falls back to
4931 dedicated compilation.
4933 * mini.h: Flag in MonoCompile to specify whether generic
4934 compilation is shared. Flags enum for marking which generic inst
4935 of a context is used. Prototypes for helper functions.
4937 * generic-sharing.c: Helper functions for generic method sharing.
4939 * optflags-def.h: Optimization flag (gshared) for enabling generic
4940 method sharing added.
4942 * Makefile.am: generic-sharing.c added.
4944 2007-09-19 Daniel Nauck <dna@mono-project.de>
4946 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
4948 2007-09-19 Massimiliano Mantione <massi@ximian.com>
4949 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
4952 2007-09-19 Martin Baulig <martin@ximian.com>
4954 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
4955 mono_debug_cleanup() is now part of mono_cleanup().
4957 2007-09-18 Zoltan Varga <vargaz@gmail.com>
4959 * driver.c (mono_main): Fix a warning.
4961 2007-09-17 Zoltan Varga <vargaz@gmail.com>
4963 * aot-compiler.c: Optimize various parts when processing large assemblies.
4966 * mini.c (mono_patch_info_hash): Improve hash function.
4968 2007-09-14 Jonathan Chambers <joncham@gmail.com>
4970 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
4972 Code is contributed under MIT/X11 license.
4974 2007-09-14 Zoltan Varga <vargaz@gmail.com>
4976 * mini.c (mini_init): Fix a leak.
4978 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
4980 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
4982 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
4984 2007-09-14 Zoltan Varga <vargaz@gmail.com>
4986 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
4988 2007-09-13 Zoltan Varga <vargaz@gmail.com>
4990 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
4993 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
4995 * mini.c (handle_alloc): Enable managed allocators in AOT code.
4997 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
4999 * aot-runtime.c (decode_patch_info): Ditto.
5001 2007-09-12 Jonathan Chambers <joncham@gmail.com>
5003 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5004 static case. Cache delegates in architecture specific code,
5005 based on number of parameters.
5007 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5008 in architecture specific code, based on number of parameters.
5010 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
5011 caching happen in architecture specific code now.
5013 Code is contributed under MIT/X11 license.
5015 2007-09-12 Jonathan Chambers <joncham@gmail.com>
5017 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5018 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5019 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5021 Code is contributed under MIT/X11 license.
5023 2007-05-15 Massimiliano Mantione <massi@ximian.com>
5024 * mini.c: (mono_thread_abort) Fixed bug #82416.
5026 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5028 * mini.: hook the new managed GC allocation feature into the JIT.
5030 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5032 * mini.c: implementation for the new runtime tls opcode.
5034 2007-09-11 Martin Baulig <martin@ximian.com>
5037 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5038 `mono_method_inflated_offset'.
5040 2007-09-07 Zoltan Varga <vargaz@gmail.com>
5042 * driver.c mini.h mini.c: Add a new devel command line option for injecting
5043 async exceptions into a method.
5045 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5046 purpose of testing whenever the unwinder works at every instruction.
5048 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5050 * mini.c: check accessibility of method used in ldftn (fixes
5053 2007-09-04 Zoltan Varga <vargaz@gmail.com>
5055 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5057 * inssel.brg: Fix a warning.
5059 2007-09-03 Martin Baulig <martin@ximian.com>
5061 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5062 now takes the `main_method' as argument.
5064 2007-09-02 Zoltan Varga <vargaz@gmail.com>
5066 * cpu-sparc.md (endfilter): Add missing src1:i argument.
5068 2007-08-30 Jonathan Chambers <joncham@gmail.com>
5070 * driver.c: include the cil-coff.h header on Windows.
5072 Code is contributed under MIT/X11 license.
5074 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5076 * mini.c, driver.c: don't include the cil-coff.h header.
5078 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5080 * mini.c: flag places that needs fixes fo soft-float support.
5082 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5084 * mini.h, inssel-float.brg: fix soft-float constant loads on big
5085 endian systems (partially from Dean Jenkins, bug #81924).
5087 2007-08-28 Mark Probst <mark.probst@gmail.com>
5089 * mini.c (check_linkdemand): Remove embedded reference object in
5090 call to LinkDemandSecurityException.
5091 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5092 with an IntPtr instead of a reference object.
5094 2007-08-28 Zoltan Varga <vargaz@gmail.com>
5096 * mini.c (handle_initobj): Handle alignment properly.
5098 * inssel.brg (mini_emit_memset): Ditto.
5100 * inssel.brg (mini_emit_memcpy): Ditto.
5102 * inssel-sparc.brg: Ditto.
5104 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5106 2007-08-26 Zoltan Varga <vargaz@gmail.com>
5108 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5109 exceptions raised in unmanaged code. Fixes part of #82594.
5111 2007-08-24 Mark Probst <mark.probst@gmail.com>
5113 * mini.c (mono_method_to_ir), declsec.c
5114 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5116 2007-08-22 Martin Baulig <martin@ximian.com>
5119 (MonoDebuggerThreadInfo): New typedef.
5120 (mono_debugger_thread_table): New global variable.
5121 (mono_debugger_thread_created): New public function.
5122 (mono_debugger_thread_cleanup): New public function.
5126 - removed `get_current_thread' and `lookup_assembly'.
5127 - removed `data_table'.
5128 - added `thread_table'.
5131 (mono_thread_start_cb): Call mono_debugger_thread_created().
5132 (mono_thread_attach_cb): Likewise.
5133 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5134 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5137 * driver.c (mono_main): Move mono_debug_init() up, before calling
5138 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5140 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5142 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5143 together when passing several arguments of type double (gives a small
5144 speedup and saves a few bytes of generated code).
5146 2007-08-20 Jb Evain <jbevain@novell.com>
5148 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5150 2007-08-20 Jb Evain <jbevain@novell.com>
5152 * mini.c (mono_method_to_ir): throw MethodAccessException
5153 and FieldAccessException instead of InvalidProgramException.
5155 2007-08-20 Mark Probst <mark.probst@gmail.com>
5157 * mini.c: CoreCLR security checks.
5159 * mini.h: Removed MonoSecurityMode (moved to
5160 metadata/security-manager.h) and mono_security_mode global var
5161 (replaced by set/get functions in security-manager.h).
5163 * driver.c: Added "core-clr-test" security mode for testing. Used
5164 set-function for setting security mode.
5166 2007-08-17 Mark Probst <mark.probst@gmail.com>
5168 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
5169 the new jit_info_table.
5171 * driver.c: Test code for the new jit_info_table (enabled by the
5172 define MONO_JIT_INFO_TABLE_TEST).
5174 2007-08-14 Zoltan Varga <vargaz@gmail.com>
5176 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5177 detection of call <REG> instruction sequence. Fixes build on freebsd.
5179 2007-08-13 Zoltan Varga <vargaz@gmail.com>
5181 * mini-exceptions.c: Fix a warning.
5183 2007-08-11 Zoltan Varga <vargaz@gmail.com>
5185 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5186 stack overflow handling code on amd64 too.
5188 * mini-exceptions.c (mono_setup_altstack): Make this use
5189 mono_thread_get_stack_bounds ().
5191 * mini-x86.h: Disable sigaltstack on solaris x86.
5193 2007-08-10 Zoltan Varga <vargaz@gmail.com>
5195 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5197 2007-08-10 Geoff Norton <gnorton@customerdna.com>
5199 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
5201 2007-08-08 Zoltan Varga <vargaz@gmail.com>
5203 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5205 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5207 2007-08-03 Neale Ferguson <neale@sinenomine.net>
5209 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5212 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5214 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5215 to be emitted (bug #82281).
5217 2007-08-01 Martin Baulig <martin@ximian.com>
5219 Merged the `debugger-dublin' branch.
5221 * debug-debugger.h (MonoDebuggerInfo):
5222 Removed the `old_*' compatibility entries.
5223 Added `debugger_version' and `data_table'.
5224 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5225 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5228 (MiniDebugMethodBreakpointInfo): Add `address_list'.
5229 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5230 instead of a `gconstpointer'.
5231 (mono_debugger_insert_method_breakpoint): Return a
5232 `MonoDebugMethodAddressList *'.
5234 2007-06-28 Martin Baulig <martin@ximian.com>
5236 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5238 2007-08-01 Zoltan Varga <vargaz@gmail.com>
5240 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
5241 __builtin_frame_address () since it is broken on older gcc versions.
5243 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5245 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5246 on the stack overflow handling and made the managed stack overflows
5247 catchable in most cases using soft guard pages.
5248 * exceptions-x86.c: added code to restore the protection in the soft
5249 guard pages at the end of exception handling.
5251 2007-07-31 Zoltan Varga <vargaz@gmail.com>
5253 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5255 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5257 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5260 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5262 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5263 signal handling support until it has been ported to the new mechanism.
5264 * mini.c: fixed stack overflow detection and use the new
5265 architecture code to handle signals on the altstack.
5267 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5269 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5270 stack overflows on the alt stack.
5272 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5274 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5275 stack overflows on the alt stack.
5277 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5279 * exceptions-ppc.c: cleanup preparing for altstack support.
5281 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5283 * exceptions-arm.c: cleanup preparing for altstack support.
5285 2007-07-27 Mark Probst <mark.probst@gmail.com>
5287 * mini.c (print_jit_stats): Output hazard pointer stats.
5289 2007-07-26 Mark Probst <mark.probst@gmail.com>
5291 * driver.c, mini.c: Replaced security mode flags with a single
5294 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5296 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5298 2007-07-25 Mark Probst <mark.probst@gmail.com>
5300 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5301 (which doesn't do anything yet) for activating Core CLR
5302 (Silverlight) security.
5304 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5306 * mini-codegen.c: work around a possible gcc bug on arm.
5308 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5310 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5311 message for platforms that don't support AOT compilation.
5313 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5315 * mini.h, mini.c, driver.c: temporary smcs hack.
5317 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5319 * mini-arm.h, mini-arm.c: arm EABI fixes.
5321 2007-07-22 Zoltan Varga <vargaz@gmail.com>
5323 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5326 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5327 trampolines taking a method argument.
5329 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5331 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5332 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5334 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5335 JIT compilation throws an exception. Fixes #82050.
5337 2007-07-19 Mark Probst <mark.probst@gmail.com>
5339 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5340 with the MONO_EXCEPTION_ defines.
5342 2007-07-17 Zoltan Varga <vargaz@gmail.com>
5344 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5347 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5348 the cause of an assertion.
5350 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5352 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5355 2007-07-15 Zoltan Varga <vargaz@gmail.com>
5357 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5358 assert. Should fix #82103.
5360 2007-07-14 Zoltan Varga <vargaz@gmail.com>
5362 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5363 here too. Fixes #82095.
5365 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5368 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5370 * mini-amd64.h: Enable IMT for amd64.
5372 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5374 2007-07-12 Zoltan Varga <vargaz@gmail.com>
5376 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5378 2007-07-12 Mark Probst <mark.probst@gmail.com>
5380 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5381 as soon as check_linkdemand sets an exception_type.
5383 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5385 * mini-x86.c: fixed offsets for IMT call sequence.
5386 * mini-x86.h: enable IMT again.
5388 2007-07-11 Zoltan Varga <vargaz@gmail.com>
5390 * trace.c (mono_trace_enter_method): Decode MonoType too.
5392 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5394 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5396 * mini-amd64.c: Add preliminary IMT implementation.
5398 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5400 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5401 understand the new IMT-base interface invocation (thanks to
5402 Daniel Nauck for the report and the remote debugging session).
5404 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5406 * mini-x86.c: size and speed optimizations for the IMT bsearch.
5408 2007-07-11 Zoltan Varga <vargaz@gmail.com>
5410 * Makefile.am (aotcheck): Make this actually use the AOTed code.
5412 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5414 * mini-trampolines.c: implement AOT IMT support.
5415 * mini-x86.h: enable IMT support for wider testing.
5417 2007-07-10 Zoltan Varga <vargaz@gmail.com>
5419 * inssel.brg (emit_imt_argument): Add aot support here.
5421 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5423 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5425 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5426 of the IMT implementation, partially from massi, with my
5427 implementation of the bsearch sequence. Disabled by default until
5428 the AOT code is implemented.
5430 2007-07-10 Zoltan Varga <vargaz@gmail.com>
5432 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5434 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5436 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5438 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5439 arch-independent IMT JIT code from Massimiliano
5440 Mantione (massi@ximian.com) with small cleanups from me.
5442 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5444 * Makefile.am: fix svn invocation to get the svn revision to be
5445 independent of the local language (build fix).
5447 2007-07-09 Mark Probst <mark.probst@gmail.com>
5449 * mini.c (inline_method): Reset cfg->exception_type if the
5450 inlining is aborted. Fixes: 82049.
5452 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5454 * mini.c: remove assert from exception handling code when exception_ptr
5457 2007-07-05 Zoltan Varga <vargaz@gmail.com>
5459 * mini.c (mono_codegen): Add an assert.
5461 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
5462 enter and leave code.
5463 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5465 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5467 * mini-ppc.c: fixed memory corruption for localloc(0)
5470 2007-07-05 Zoltan Varga <vargaz@gmail.com>
5472 * mini.c: Fix warnings.
5474 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5476 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5477 to emit better double->int conversions.
5479 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5481 * mini.c: the provided Min/Max optimizations are valid for unisgned
5484 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
5486 * 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
5488 2007-06-28 Miguel de Icaza <miguel@novell.com>
5490 * mini.c (mono_running_on_valgrind): Add support for reporting the
5491 method and its boundaries to valgrind.
5493 2007-06-28 Martin Baulig <martin@ximian.com>
5495 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5497 2007-06-25 Zoltan Varga <vargaz@gmail.com>
5499 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5501 * generic.2.cs: Add new test case.
5503 2007-06-25 Martin Baulig <martin@ximian.com>
5505 Merged the `debugger-dublin' branch.
5508 (mono_debugger_insert_method_breakpoint): New public method.
5509 (mono_debugger_remove_method_breakpoint): Likewise.
5510 (mono_debugger_check_breakpoints): New static method.
5511 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5513 * debug-debugger.h (MonoDebuggerInfo):
5514 Renamed (to keep backward compatibility in the vtable):
5515 `insert_breakpoint' -> `old_insert_breakpoint'.
5516 `remove_breakpoint' -> `old_remove_breakpoint'.
5517 `create_string' -> `old_create_string'.
5518 `lookup_class' -> `old_lookup_class'.
5519 `lookup_type' -> removed; changed into a dummy field.
5520 `lookup_assembly' -> `old_lookup_assembly'.
5521 Added (same functionality, but different signature):
5522 `create_string', `lookup_class', `lookup_assembly'
5524 `get_method_addr_or_bpt', `remove_method_breakpoint',
5525 `runtime_class_init'.
5527 * debug-debugger.c: Merged the `debugger-dublin' branch.
5529 2007-06-23 Zoltan Varga <vargaz@gmail.com>
5531 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5533 (peephole_pass): Likewise.
5535 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5537 * driver.c: hopefully make setaffinity work also for ancient
5540 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
5542 * driver.c : win32 build fix.
5544 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5546 * driver.c: check for the MONO_NO_SMP env var and bind to a single
5547 processor if it is set.
5549 2007-06-21 Martin Baulig <martin@ximian.com>
5551 * debug-mini.h: New file.
5554 (mono_debugger_insert_breakpoint_full): Moved here from
5555 ../metadata/mono-debug-debugger.c.
5556 (mono_debugger_remove_breakpoint): Likewise.
5557 (mono_debugger_breakpoint_callback): Likewise.
5559 2007-06-15 Raja R Harinath <rharinath@novell.com>
5561 * jit-icalls.c (mono_helper_compile_generic_method): Update to
5562 changes in MonoGenericClass.
5564 2007-06-14 Zoltan Varga <vargaz@gmail.com>
5566 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5568 2007-06-14 Raja R Harinath <rharinath@novell.com>
5570 * jit-icalls.c (mono_helper_compile_generic_method): Update to
5571 removal of MonoGenericMethod.
5573 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5575 * mini-exceptions.c: hooks for the exception events profiling API.
5577 2007-06-14 Randolph Chung <tausq@debian.org>
5579 * Makefile.ma: Add hppa target.
5580 * mini-arch.h: Include mini-hppa.h
5581 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5582 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5583 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5585 2007-06-14 Randolph Chung <tausq@debian.org>
5587 * inssel.brg: Add rules for "chained" compare-branch operations so that
5588 a single compare op can affect multiple branches. Adjust cost for
5589 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5590 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
5591 cost for some rules so that they can more easily be overridden by
5592 per-arch rules (with fixes from lupus).
5593 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5595 2007-06-13 Randolph Chung <tausq@debian.org>
5597 * mini-ops.h: Reorder branch ops so that they match the order of the
5598 corresponding CEE_* ops. The code expects them this way.
5599 Add new ops for HPPA target.
5600 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5602 2007-06-13 Randolph Chung <tausq@debian.org>
5604 * mini-exceptions.c: Handle cases where the stack grows towards
5606 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5608 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5610 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5612 * driver.c: explain where a non-matching corlib is found.
5614 2007-06-13 Mark Probst <mark.probst@gmail.com>
5616 * mini.c (print_jit_stats): Output dynamic code allocation stats.
5618 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
5620 * mini-exceptions.c: Generate a method profile leave event during
5621 an exception to ensure that the profiler gets notified.
5623 2007-06-07 Zoltan Varga <vargaz@gmail.com>
5625 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
5628 * cpu-amd64.md: Add long_and/or/xor opcodes.
5630 2007-06-06 Wade Berrier <wberrier@novell.com>
5632 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5633 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
5634 length of instruction shr_imm (expected 8, got 10)
5636 2007-06-06 Zoltan Varga <vargaz@gmail.com>
5638 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5640 2007-06-06 Mark Probst <mark.probst@gmail.com>
5642 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5643 MonoInternalHashTable again (fixed bug in the internal hash table
5646 2007-06-06 Mark Probst <mark.probst@gmail.com>
5648 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5649 Have to figure out what makes it crash the SWF regression.
5651 2007-06-05 Zoltan Varga <vargaz@gmail.com>
5653 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5655 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5657 * mini.c: optimize out the type check when storing null in a
5660 2007-06-04 Mark Probst <mark.probst@gmail.com>
5662 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5663 MonoInternalHashTable.
5665 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
5667 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
5668 signed integer methods.
5670 2007-06-02 Zoltan Varga <vargaz@gmail.com>
5672 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
5673 permanently since the current approach doesn't work.
5675 2007-06-02 Zoltan Varga <vargaz@gmail.com>
5677 * inssel.brg (stmt): Only call delegate->invoke_impl if
5678 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
5680 2007-06-01 Zoltan Varga <vargaz@gmail.com>
5682 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
5683 the sreg2==rdx case.
5685 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
5686 account if it contains a rex prefix.
5687 (peephole_pass): Handle OP_FMOVE as well.
5689 2007-06-01 Zoltan Varga <vargaz@gmail.com>
5691 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
5692 as it causes regressions.
5694 2007-05-31 Zoltan Varga <vargaz@gmail.com>
5696 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
5697 static case as well.
5699 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
5701 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5702 (mono_arch_get_this_arg_from_call): Ditto.
5704 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
5706 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
5709 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
5710 (mono_arch_get_this_arg_from_call): Ditto.
5712 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
5714 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
5715 try to create optimized invoke code and use that for further invocations.
5716 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
5718 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
5720 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
5722 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
5723 sealed classes or methods.
5724 *devirtualization.cs: tests for the new optimization
5726 2007-05-29 Zoltan Varga <vargaz@gmail.com>
5728 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
5729 by the update_volatile () function.
5731 2007-05-27 Zoltan Varga <vargaz@gmail.com>
5733 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
5736 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
5738 2007-05-24 Jonathan Chambers <joncham@gmail.com>
5740 * mini.c: Add configure checks for header files.
5741 * mini-x86.c: Add configure checks for header files.
5742 * trace.c: Add configure checks for header files.
5743 * aot-runtime.c: Add configure checks for header files.
5744 * aot-compiler.c: Add configure checks for header files.
5745 * driver.c: Add configure checks for header files.
5746 * mini-codegen.c: Add configure checks for header files.
5748 Code is contributed under MIT/X11 license.
5750 2007-05-22 Zoltan Varga <vargaz@gmail.com>
5752 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
5753 icompare_imm -128 + op_iclt. Fixes #81703.
5755 2007-05-19 Zoltan Varga <vargaz@gmail.com>
5757 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
5759 2007-05-15 Massimiliano Mantione <massi@ximian.com>
5761 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
5762 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
5763 so that all isinst checks now use "interface_bitmap".
5765 2007-05-15 Zoltan Varga <vargaz@gmail.com>
5767 * cpu-amd64.md (jmp): Fix a warning.
5769 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
5771 * basic.cs: Add new regression test.
5773 * basic.cs: Remove test which is now in basic-long.cs.
5775 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
5777 * basic-long.cs: Add new test.
5779 2007-05-13 Zoltan Varga <vargaz@gmail.com>
5781 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
5783 2007-05-12 Zoltan Varga <vargaz@gmail.com>
5785 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
5787 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
5790 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
5791 throwing code a bit.
5793 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
5794 the exception throwing code a bit.
5796 * mini-x86.c (get_call_info): Allocate result from a mempool.
5798 2007-05-11 Zoltan Varga <vargaz@gmail.com>
5800 * aot-compiler.c (find_typespec_for_class): Fix the assert.
5802 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
5804 * mini.h (MonoCompile): Add 'token_info_hash' field.
5806 * mini.c: Save token->method associations during compilation so the AOT
5807 compiler can use it.
5809 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
5810 which reference generic classes and methods.
5812 2007-05-10 Zoltan Varga <vargaz@gmail.com>
5814 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
5816 * aot-compiler.c (compile_method): Fix a typo in a comment.
5818 * aot-runtime.c (decode_cached_class_info): Skip generic types.
5820 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
5823 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
5825 2007-05-09 Zoltan Varga <vargaz@gmail.com>
5827 * mini.h (MonoCompile): Add 'args' field.
5829 * mini.c (mono_compile_create_vars): Store variables representing the arguments
5832 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
5834 2007-05-08 Zoltan Varga <vargaz@gmail.com>
5836 * mini.c (mono_compile_get_interface_var): Remove this unused function.
5838 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
5840 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
5841 opcodes for some opcodes.
5843 * mini.h *.brg *.c: Use the new opcodes.
5845 2007-05-08 Massimiliano Mantione <massi@ximian.com>
5847 * mini.h: Bumped aot revision.
5849 * inssel.brg: modified code generation of type checks for interfaces
5850 to use the new "MonoClass.interface_bitmap" instead of the old
5851 "MonoClass.interface_offsets".
5853 2007-04-30 Zoltan Varga <vargaz@gmail.com>
5855 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
5857 2007-04-29 Zoltan Varga <vargaz@gmail.com>
5859 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
5862 2007-04-27 Neale Ferguson <neale@sinenomine.net>
5864 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
5866 2007-04-27 Wade Berrier <wberrier@novell.com>
5868 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
5869 mini.h) to fix build.
5871 2007-04-26 Zoltan Varga <vargaz@gmail.com>
5873 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
5875 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
5876 causes the corlib unit tests to fail.
5878 2007-04-25 Zoltan Varga <vargaz@gmail.com>
5880 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
5882 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
5884 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
5885 opcodes to the comparison relations.
5887 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
5888 opcodes to their types.
5890 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
5892 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
5893 it in cfg->arch.cinfo.
5895 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
5897 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
5898 cfg->cil_offset_to_bb.
5900 2007-04-24 Zoltan Varga <vargaz@gmail.com>
5902 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
5903 created becase of initlocals.
5905 2007-04-23 Zoltan Varga <vargaz@gmail.com>
5907 * mini-alpha.c cpu-alpha.md: More alpha port work from
5908 Sergey Tikhonov <tsv@solvo.ru>.
5910 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
5912 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
5914 2007-04-19 Zoltan Varga <vargaz@gmail.com>
5916 * cpu-s390.md (break): Correct the length of break instruction.
5918 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5920 * mini.c: fix a couple of soft-float issues and comments.
5922 2007-04-15 Miguel de Icaza <miguel@novell.com>
5924 * trace.c (is_filenamechar): - is also a filename char.
5926 2007-04-15 Neale Ferguson <neale@sinenomine.net>
5928 * mini-s390.c: Correct checking for enum type in return value processing.
5930 2007-04-14 Raja R Harinath <rharinath@novell.com>
5932 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
5933 (version.h): Makefile is in the build directory.
5935 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
5937 * mini-amd64.h: fix for assertion failure on Solaris/amd64
5939 2007-04-11 Martin Baulig <martin@ximian.com>
5941 * mini.c (can_access_member): Fix handling of generic classes;
5944 2007-04-10 Zoltan Varga <vargaz@gmail.com>
5946 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
5948 2007-04-05 Zoltan Varga <vargaz@gmail.com>
5950 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
5952 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5954 * mini-codegen.c: make sure the right spill amount is
5955 used for fp or integer registers (fixes the float_sub_spill() on ppc).
5957 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
5959 * mini-ppc.c: fixes for the fp_branch_nan test.
5961 2007-03-23 Zoltan Varga <vargaz@gmail.com>
5963 * basic.cs: Comment out new test which still fails on ia64.
5965 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5967 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
5969 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
5971 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
5973 2007-03-22 Zoltan Varga <vargaz@gmail.com>
5975 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
5976 on 64 bit machines. Fixes part of #80738.
5978 * basic.cs: Add regression test.
5980 2007-03-17 Zoltan Varga <vargaz@gmail.com>
5982 * inssel.brg basic.cs: Revert previous change to fix build.
5984 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
5987 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
5989 * basic.cs: Add new regression test.
5991 2007-03-17 Zoltan Varga <vargaz@gmail.com>
5993 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
5996 2007-03-16 Neale Ferguson <neale@sinenomine.net>
5998 * cpu-s390x.md: Correct length of break instruction.
6000 2007-03-16 Neale Ferguson <neale@sinenomine.net>
6002 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6003 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6005 2007-03-15 Jonathan Chambers <joncham@gmail.com>
6007 * *.c: Begin WIN64 port.
6008 * mini.c: Use correct register in profiler.
6009 * mini-amd64.c: No inline assembly on Win64.
6010 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6011 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6012 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6013 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6014 mono_arch_ip_from_context for Win64.
6016 Contributed under MIT/X11 license.
6018 2007-03-15 Zoltan Varga <vargaz@gmail.com>
6020 * exceptions-amd64.c (seh_handler): Ditto.
6022 * exceptions-x86.c (seh_handler): Fix a memory leak.
6024 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6026 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6027 mini-s390x.c: fixed peephole optimizations to deal
6028 correctly with 1 and 2 byte reload avoidance.
6030 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6032 * cpu-s390.md, cpu-s390x.md: update localloc length.
6034 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6036 * cpu-g4.md: added missing descriptions.
6038 2007-03-14 Miguel de Icaza <miguel@novell.com>
6040 * Makefile.am: Add support so the tail tests are not executed on
6041 PowerPC as that is a known limitation of the PowerPC port.
6043 2007-03-13 Jonathan Chambers <joncham@gmail.com>
6045 * runmdesc.bat: Move to msvc directory.
6047 2007-03-13 Jonathan Chambers <joncham@gmail.com>
6049 * runmdesc.bat: Run executable that was produced by the current
6050 target and sent via an argument.
6052 2007-03-11 Zoltan Varga <vargaz@gmail.com>
6054 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6057 * generics.2.cs: Add regression test.
6059 2007-03-09 Wade berrier <wberrier@novell.com>
6061 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6063 2007-03-09 Zoltan Varga <vargaz@gmail.com>
6065 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6066 AOT code depends on this.
6068 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6070 * mini.c: more precise tracking of types in the eval stack
6071 (part of fix for bug #81044).
6073 2007-03-07 Zoltan Varga <vargaz@gmail.com>
6075 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6077 * aot-compiler.c (encode_patch): Remove an obsolete comment.
6079 2007-03-06 Zoltan Varga <vargaz@gmail.com>
6081 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6083 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6085 2007-02-22 Zoltan Varga <vargaz@gmail.com>
6087 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6088 a pointer on 64 bit systems. Fixes #80190.
6090 * iltests.il: Add new regression test.
6092 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6094 * mini.c: inline a constant for Environment.IsRunningOnWindows.
6096 2007-02-19 Geoff Norton <gnorton@customerdna.com>
6098 * trace.c: Remove an erroneous alignemnt check when tracing.
6099 Fixes --trace on OSX86.
6101 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6103 * mini-$(arch).h: initialize SP in context for all the archs.
6105 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
6107 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6108 regressions in the thread tests.
6110 2007-02-14 Zoltan Varga <vargaz@gmail.com>
6112 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6113 - fixed implementation of LOCALLOC opcode
6114 - implemented non-un compare for floats
6116 - implementation of FDIV and CKFINITE opcodes
6117 - fixes for latest mono updates
6118 - additional arch opcodes
6120 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6122 * Makefile.am: simplify and merge rules for cross-compilation.
6124 2007-02-07 Massimiliano Mantione <massi@ximian.com>
6126 * local-propagation.c: Actually *apply* the fix for bug 80591...
6128 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6130 * mini-exceptions.c: backuot part of the last change
6131 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6133 2007-02-06 Massimiliano Mantione <massi@ximian.com>
6134 * inssel.brg: Fix bug 59286.
6137 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6139 * mini-exceptions.c: patch from Zoltan to correctly check for
6140 stack boundaries (using the stack register, not the frame register),
6141 fixes bugs #80724, #79717.
6143 2007-02-03 Zoltan Varga <vargaz@gmail.com>
6145 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6146 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6148 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6149 presence of frame pointer elimination.
6151 2007-02-01 Geoff Norton <gnorton@customerdna.com>
6153 * mini-x86.h: NetBSD UCONTEX_REG defines.
6155 2007-02-01 Zoltan Varga <vargaz@gmail.com>
6157 * inssel-amd64.brg: Fix amd64 build.
6159 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6161 * mini.h: remove extern to workaround what looks likes gcc bug 26905
6164 2007-01-31 Zoltan Varga <vargaz@gmail.com>
6166 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6169 * mini-<ARCH>.c: Use mono_is_regsize_var ().
6171 2007-01-30 Mark Mason <mason@broadcom.com>
6173 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6174 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6175 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6176 beginning support for CEE_JMP [not quite working yet]
6177 * tramp-mips.c: LMF handling now works
6179 2007-01-30 Zoltan Varga <vargaz@gmail.com>
6181 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6183 * mini.h (NULLIFY_INS): New macro.
6185 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6187 * mini.c: statistical profiler fix for windows, patch
6188 from Tor Lillqvist (tml@novell.com).
6190 2007-01-30 Massimiliano Mantione <massi@ximian.com>
6191 * local-propagation.c: Fix bug 80591.
6193 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6195 * Makefile.am: put back the --export-dynamic option as with
6196 the previous gmodule flags (thanks to Robert Jordan).
6198 2007-01-28 Zoltan Varga <vargaz@gmail.com>
6200 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6202 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6203 simplify and speed up the local register allocator. Also rename some fields
6204 like iassign->vassign.
6206 * regalloc.c: Remove some functions which are no longer used since their
6207 inlined version is in mini-codegen.c.
6209 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6211 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6213 2007-01-27 Zoltan Varga <vargaz@gmail.com>
6215 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
6216 narrowing. Fixes #80622.
6218 * iltests.il: Add new regresssion test.
6220 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6222 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6223 debug-debugger.c, debug-debugger.h: warning fixes.
6224 * driver.c: updated copyright year and made it fit in one line.
6226 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6228 * aot-runtime.c: updated to use mono-dl instead of gmodule.
6230 2007-01-25 Zoltan Varga <vargaz@gmail.com>
6232 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6234 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6236 * iltests.il: Add new test for bug #80507.
6238 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6240 * mini-arm.h: use soft-float also on vfp for now.
6242 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6244 * mini.c: fix some more soft-float issues.
6246 2007-01-24 Zoltan Varga <vargaz@gmail.com>
6248 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6250 2007-01-24 Massimiliano Mantione <massi@ximian.com>
6251 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6252 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6253 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6255 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6257 * mini-arm.c: typo fix.
6259 2007-01-23 Neale Ferguson <neale@sinenomine.net>
6261 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6263 2007-01-21 Zoltan Varga <vargaz@gmail.com>
6265 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6266 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6268 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6270 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
6272 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6274 * inssel.brg: Fix a warning.
6276 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6278 * abcremoval.c ssa.c ssapre.c: Update after this change.
6280 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6282 * dominators.c (df_set): Use mono_bitset_union_fast.
6284 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6286 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6287 mini-codegen.c: reduce relocations and memory usage for the cpu
6290 2007-01-20 Zoltan Varga <vargaz@gmail.com>
6292 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6294 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6295 to reduce their size.
6297 2007-01-19 Mark Mason <mason@broadcom.com>
6299 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6300 * mini-mips.c: more configuration macros, support long conditional branches, additional
6301 asserts, fix epilog instrumentation.
6302 * mini-mips.h: use standard stack walk
6303 * cpu-mips.md: increase size of div, rem and conditional branches
6305 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6307 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6310 2007-01-19 Zoltan Varga <vargaz@gmail.com>
6312 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6313 (compile_method): Ditto.
6315 * aot-runtime.c (decode_klass_info): Ditto.
6317 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6318 needed by the code generated by inssel.brg. Also fix a warning.
6320 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6322 * mini.c: deal with enums that become genericinsts by
6323 being nested in a generic class (bug #79956).
6325 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6327 * mini.c: match the generic definition to check for
6328 private access with generic types (bug #78431).
6330 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6332 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6333 to make life easier for people cross-compiling that insist on not
6336 2007-01-17 Mark Mason <mason@broadcom.com>
6338 * inssel-long.brg: patch to deal with mips missing flags
6339 * inssel-long32-mips.brg: implement overflow checks
6340 * insset-mips.brg: implement overflow checks
6341 * mini-mips.h: implement conditional exception handling
6342 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6343 Remove unused code, minor cleanups.
6344 * exceptions-mips.c: minor cleanups
6345 * mini-ops.h: add mips conditional exception ops
6346 * cpu-mips.md: add mips conditional exception ops
6349 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6351 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6352 to deal with mips missing of flags.
6354 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6356 * exceptions-ppc.c: execute fault handlers.
6358 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6360 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6362 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6364 * mini.c: handle also floating point values in initialize_array.
6366 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6368 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6369 array initialization and make it conditional on the intrins option.
6371 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6373 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6374 relocations and put the patch info names close to the enum definition.
6376 2007-01-15 Mark Mason <mason@broadcom.com>
6378 * basic.cs, exceptions.cs: break up large tests to increase debugability.
6380 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6382 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6384 2007-01-12 Raja R Harinath <rharinath@novell.com>
6386 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6388 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6390 * Makefile.am: distribute the mips sources.
6392 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6394 * mini-codegen.h: handle bug #80489 here, by excluding ecx
6397 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6399 * cpu-x86.md: back out for now as this triggers other regressions.
6401 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6403 * cpu-x86.md: force src1 and dest regpair for long shift instructions
6404 to eax:edx, so ecx can't get allocated to them (bug #80489).
6406 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6408 * mini.c, mini-exceptions.c: enabled running fault handlers
6411 2007-01-03 Miguel de Icaza <miguel@novell.com>
6413 * driver.c: If nothing fail, do not use the string "failed",
6414 because it makes it very annoying to view test result logs on the
6417 2006-12-30 Miguel de Icaza <miguel@novell.com>
6419 * debug-debugger.c (mono_debugger_main): Rename "main" to
6420 "main_method" to prevent a warning.
6422 Remove a warning for unused field.
6424 2006-12-28 Martin Baulig <martin@ximian.com>
6427 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6429 2006-12-22 Martin Baulig <martin@ximian.com>
6431 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6432 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6433 seperate `.mdb_debug_info' section, so we can access it from the
6434 debugger even if the binary is stripped.
6436 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6437 from the `.mdb_debug_info' here to prevent the linker from
6438 removing that section.
6440 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6443 2006-12-19 Robert Jordan <robertj@gmx.net>
6445 * mini-x86: enable the code to return small structures in
6446 registers for FreeBSD as well. Fixes bug #80278.
6447 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6449 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6451 * mini-x86.c: align the stack when calling the profiler
6452 function instrumenting the prolog (on OSX).
6454 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6456 * mini.c: emit a break opcode where Debugger.Break () is called.
6458 2006-12-13 Miguel de Icaza <miguel@novell.com>
6460 * mini.c (mono_method_to_ir): Provide useful information on this
6461 assert, to prevent others from debugging like I did.
6463 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6465 * mini.c: enable code which was incorrectly commented
6468 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6470 * mini-x86.c: enable on OSX, too, the code to return small
6471 structures in registers.
6473 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6475 * mini-x86.c: remove the use of the dynamic code manager here, too.
6477 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6479 * mini.h, debug-debugger.c, tramp-*.c: fixed
6480 mono_debugger_create_notification_function() to use
6481 mono_global_codeman_reserve () instead of a dynamic code manager.
6483 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6485 * mini.c, jit-icalls.h, jit-icalls.c: remove the
6486 ves_array_element_address() jit icall and use a generated
6487 managed method instead (which is about 4 times faster for a rank 3
6490 2006-11-29 Mark Mason <mason@broadcom.com>
6492 * basic-calls.cs: additional tests for passing
6493 structures as function arguments.
6495 2006-11-29 Mark Mason <mason@broadcom.com>
6497 * mini-mips.h: disable custom exception handling
6498 * mini-mips.c: throw/rethrow should use jalr to call
6499 exception stubs. Fixed bug with passing structures
6500 by value. More support for tracing floating point
6503 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6505 * mini.c: fixed typo in the soft-float ldind.r4 handling
6508 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6510 * mini.c, mini.h, driver.c: added --runtime command line
6511 option to select a different runtime than the autodetected one.
6512 * jit.h: added API for embedders to initialize with a specific
6515 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6517 * mini.c: handle also boxing of r4 values (bug #80024).
6519 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6521 * mini-ppc.c: force indirect calls until we reserve
6522 enough address space for all the generated code.
6524 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6526 * exceptions-arm.c: workaround bugs in the libc definition
6529 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6531 * inssel.brg: fixes from me and Mark Mason.
6533 2006-11-23 Dick Porter <dick@ximian.com>
6535 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6536 semaphore display now we've fixed the initial value
6538 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6540 * inssel.brg: partially revert the last change to fix the build.
6542 2006-11-21 Mark Mason <mason@broadcom.com>
6544 * inssel.brg: Add and use compare-and-branch macros to support
6545 architectures that do not have condition code registers (ie. MIPS).
6546 * *-mips.{c,brg,md}: Fix copyright statements
6548 2006-11-20 Mark Mason <mason@broadcom.com>
6550 * Makefile.am: remove mini-codegen.c from list of MIPS sources
6551 * mini.c: Allow GET_CONTEXT to be specified by the arch port
6552 * mini.h: Added declaration for mono_print_ins()
6553 * mini-codegen.c: added ins_spec initializer for MIPS
6554 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6555 vreg to be virtual and hreg to be non-virtual.
6556 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6557 is not yet working/implemented correctly.
6558 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6559 non-static, fixup calls to print_ins() from other parts in the file.
6561 2006-11-20 Mark Mason <mason@broadcom.com>
6563 * basic-calls.cs: added tests for passing structures as arguments
6566 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6568 * inssel-long32.brg: optimize signed division by power of two.
6570 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6572 * mini-arm.c: added support for interworking with thumb code
6573 (mono must be still be built using the ARM instruction encoding).
6575 2006-11-19 Miguel de Icaza <miguel@novell.com>
6577 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6578 verifier has different rules for it. Fixes a few verifier issues
6581 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6582 at the end, so people know what happened.
6584 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6586 * brach-opts.c: in optimize_exception_target() make sure we
6587 are in a catch clause (fixes bug #79871).
6589 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6591 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6592 more soft-float support fixes.
6594 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6596 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6597 that are passed half on the stack and half in registers.
6599 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6601 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6602 more mips integration work from Mark E Mason
6603 <mark.e.mason@broadcom.com>.
6605 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6607 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6608 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6609 tramp-mips.c: added sources for the mips port, not
6610 integrated in the build yet. Contributed by
6611 Mark E Mason <mark.e.mason@broadcom.com>.
6613 2006-11-14 Neale Ferguson <neale@sinenomine.net>
6615 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6617 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6619 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6620 put the soft-float rules in its own file since it seems to
6621 break s390 compilation.
6623 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6625 * mini-arm.c: fixed wrnings.
6627 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6629 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6630 inssel-arm.brg: ARM support for soft-float.
6632 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6634 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6635 loads and stores of 32 bit fp values.
6637 2006-11-10 Zoltan Varga <vargaz@gmail.com>
6639 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6641 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6642 works. Fixes #79852 and #79463.
6644 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6646 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6647 more soft-float support WIP and fixes.
6649 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6651 * mini-arm.c: some VFP updates.
6653 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6655 * mini-exceptions.c: 0 is a valid local var offset in some
6656 architectures, don't assert (bug #78508).
6658 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6660 * exceptions-arm.c: fixed off by one error in stack walk code.
6662 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
6664 * mini.h, mini.c: more precise tracking of type load exceptions.
6666 2006-11-03 Robert Jordan <robertj@gmx.net>
6668 * Makefile.am: [WIN32] Add monow.exe target.
6669 * driver.c: [WIN32] Don't detach the console when debugging.
6672 2006-10-30 Miguel de Icaza <miguel@novell.com>
6674 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
6676 2006-10-23 Zoltan Varga <vargaz@gmail.com>
6678 * aot-compiler.c (emit_method_info): Add a case missed earlier.
6680 * driver.c (mini_regression): Fix --regression with AOT.
6682 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
6684 2006-10-17 Zoltan Varga <vargaz@gmail.com>
6686 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
6688 * mini-sparc.h: Don't use sigaction on sparc/linux.
6690 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
6692 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
6694 * mini-exceptions.c: Add proper include files for getpid ().
6696 2006-10-16 Zoltan Varga <vargaz@gmail.com>
6698 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
6699 address instead of a MonoJitInfo* to avoid decoding the exception info for the
6702 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
6703 name cache to reduce its size.
6705 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
6707 2006-10-15 Zoltan Varga <vargaz@gmail.com>
6709 * mini-x86.c: Save/restore the current LMF structure more efficiently using
6710 the mono_lmf TLS variable.
6712 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
6713 trampoline lmf frames.
6715 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
6717 2006-10-14 Zoltan Varga <vargaz@gmail.com>
6719 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
6720 the mono_lmf TLS variable.
6722 * mini-exceptions.c: Access the LMF structure through accessors.
6724 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
6725 variable instead of in jit_tls->lmf.
6727 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
6729 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
6730 trampoline lmf frames.
6732 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
6734 2006-10-12 Zoltan Varga <vargaz@gmail.com>
6736 * mini.c trace.c mini-x86.c: Revert these too.
6738 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
6741 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
6743 * genmdesc.c: removed now dead code.
6745 2006-10-09 Robert Jordan <robertj@gmx.net>
6747 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
6749 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
6751 * mini.h: do not leave gaps in the opcode values.
6753 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
6755 * jit-icalls.h: flag functions as internal here, too.
6757 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
6759 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
6760 functions with the internal attribute.
6762 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
6764 * aot-compiler.c: fclose the file descriptor in the profile read loop.
6766 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
6768 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
6771 2006-10-05 Zoltan Varga <vargaz@gmail.com>
6773 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
6774 tail calls as on other platforms.
6776 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
6778 * iltests.il: Add a few tailcall tests.
6780 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6782 * driver.c: fix loop for old compilers (bug #79521).
6784 2006-10-02 Zoltan Varga <vargaz@gmail.com>
6786 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
6788 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
6790 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
6791 metadata without any code.
6793 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
6794 more precise debugging information using gdb.
6796 2006-09-30 Zoltan Varga <vargaz@gmail.com>
6798 * inssel-ia64.brg: Make the helper methods static.
6800 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6802 * inssel-x86.brg: make the helper methods static.
6804 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
6806 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
6808 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
6810 * mini.c: updates for monoburg changes.
6811 * inssel.brg: make a few helper functions static as they should.
6813 2006-09-27 Zoltan Varga <vargaz@gmail.com>
6815 * Makefile.am: Move mini-codegen.c to common_sources.
6817 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
6819 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
6821 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
6822 mini-ppc.h: port to use the common local register allocator.
6824 2006-09-26 Zoltan Varga <vargaz@gmail.com>
6826 * mini.h: Remove the comment too then.
6828 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
6830 * mini.h: put back backend.data which is to be used shortly and
6831 doesn't increase the size of MonoInst. If any 64 bit arch aligned
6832 pointers on 4 byte boundaries it'd have much bigger issues running
6833 and you can ifdef it out anyway.
6835 2006-09-26 Zoltan Varga <vargaz@gmail.com>
6837 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
6838 MonoInst size by 4 bytes on 64 bit machines.
6840 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
6842 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
6843 replacement with more meaningful field names. Arch maintainers, please
6844 check the assigned names are good enough for your arch.
6846 2006-09-26 Zoltan Varga <vargaz@gmail.com>
6848 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
6849 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
6851 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
6853 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
6854 relocations and memory requirements, put the optimization flags
6855 definitions in their own file.
6857 2006-09-24 Zoltan Varga <vargaz@gmail.com>
6859 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
6861 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
6863 2006-09-22 Zoltan Varga <vargaz@gmail.com>
6865 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
6867 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
6869 * inssel.brg: use the correct function to get the size of an item
6870 in an array, given an element class.
6871 * aot-compiler.c: do not access class->class_size directly.
6873 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
6875 * mini.h, debug-mini.c: added a debugging function to print
6876 info about local variables and arguments in a jitted method.
6878 2006-09-20 Zoltan Varga <vargaz@gmail.com>
6880 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
6882 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
6884 2006-09-19 Zoltan Varga <vargaz@gmail.com>
6886 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
6887 inner and outer loops when passing vtypes.
6889 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
6891 * mini-ppc.c: take into account the cpu errata for cache flushing
6892 which caused some random errors (bug #79381).
6894 2006-09-19 Zoltan Varga <vargaz@gmail.com>
6896 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
6897 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
6899 2006-09-17 Zoltan Varga <vargaz@gmail.com>
6901 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
6904 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
6907 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
6908 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
6910 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
6913 2006-09-13 Zoltan Varga <vargaz@gmail.com>
6915 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
6917 2006-09-12 Zoltan Varga <vargaz@gmail.com>
6919 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
6920 macro does not have to be changed during debugging.
6922 * 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>.
6924 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
6926 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
6928 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
6929 MONO_ARCH_NO_EMULATE_MUL is defined.
6931 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
6933 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
6935 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
6937 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
6939 2006-09-11 Zoltan Varga <vargaz@gmail.com>
6941 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
6942 stuff to mini-exceptions.c where it is used.
6944 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
6945 setup code, the real one is in mini-exceptions.c.
6947 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
6948 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
6949 some changes from the freebsd ports tree.
6951 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
6954 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
6956 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
6958 * mini.c: on Linux, check for /proc to be mounted
6959 (bug# 79351, novell bug#201204).
6961 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
6963 * mini.c: handle cases where pthread_attr_getstack() behaves
6964 incorrectly (bug #78096).
6966 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
6968 * mini-arm.c: support larger stack frames (bug #79272).
6970 2006-09-08 Zoltan Varga <vargaz@gmail.com>
6972 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
6974 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
6977 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
6978 mono_class_from_name () to find a class from its name.
6980 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
6982 2006-09-07 Zoltan Varga <vargaz@gmail.com>
6984 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
6986 2006-09-05 Kornél Pál <kornelpal@gmail.com>
6988 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
6990 2006-09-04 Zoltan Varga <vargaz@gmail.com>
6992 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
6993 callinfo->trampoline.
6995 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
6997 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7000 2006-09-03 Zoltan Varga <vargaz@gmail.com>
7002 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7004 2006-09-02 Zoltan Varga <vargaz@gmail.com>
7006 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7007 stats.method_trampolines, it is already done by the generic trampoline code.
7009 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7011 2006-09-01 Zoltan Varga <vargaz@gmail.com>
7013 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7015 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7017 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7019 * mini.c (print_jit_stats): Print mscorlib mempool size too.
7021 * mini.c (print_jit_stats): Print new stats.
7023 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7025 2006-08-31 Zoltan Varga <vargaz@gmail.com>
7027 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7028 Address on two dimensional arrays. Fixes #78729.
7030 * mini.h (MonoCompile): Add a 'skip_visibility' field.
7032 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7035 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7037 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7040 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7042 (mini_get_ldelema_ins): Ditto.
7044 2006-08-30 Zoltan Varga <vargaz@gmail.com>
7046 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7047 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
7050 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7052 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7053 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
7055 * exceptions-s390x.c: Cosmetic change.
7057 * tramp-s390.c: Fix warning.
7059 * cpu-s390.md: Correct length of mul_imm.
7061 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7063 * aot-compiler.c: added binary writer with ELF backend
7064 implementation (only on Linux/x86 for now).
7066 2006-08-18 Zoltan Varga <vargaz@gmail.com>
7068 * Makefile.am: Don't run net 2.0 AOT tests.
7070 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7071 (mono_compile_assembly): Skip net 2.0 assemblies as well.
7073 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7075 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7077 * aot-compiler.c: simplified and refactored the asm-writing code
7078 to allow different backends.
7080 2006-08-18 Zoltan Varga <vargaz@gmail.com>
7082 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7084 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
7085 little. Share patches of type TYPE_FROM_HANDLE as well.
7087 * mini.c (mono_patch_info_equal): New helper function.
7088 (mono_patch_info_hash): Ditto.
7090 * aot-compiler.c (emit_method_code): Fix s390 build.
7092 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7093 is not handled because it is stored as a flag and not as a type ctor. Fixes
7096 2006-08-17 Zoltan Varga <vargaz@gmail.com>
7098 * aot-compiler.c: Fix computation of GOT slot statistics.
7100 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7101 Also remove support for not PIC AOT.
7103 * mini.h: Bump AOT file format version.
7105 * objects.cs: Add a test for #78990.
7107 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7108 (peter.dettman@iinet.net.au). Fixes #79087.
7110 * basic-long.cs: Add a test for the above.
7112 2006-08-16 Zoltan Varga <vargaz@gmail.com>
7114 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7116 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7119 2006-08-15 Zoltan Varga <vargaz@gmail.com>
7121 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7124 2006-08-10 Jonathan Chambers <joncham@gmail.com>
7126 * mini.c: Don't verify COM proxy invoke calls
7129 2006-08-10 Dick Porter <dick@ximian.com>
7131 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7132 which process is holding semaphores locked.
7134 2006-08-08 Zoltan Varga <vargaz@gmail.com>
7136 * mini-ia64.c mini-amd64.c: Fix #79027.
7138 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7140 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7142 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7143 implicit arguments in a vararg call. Fixes #79027.
7145 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
7147 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7148 (mono_get_array_new_va_signature): Ditto.
7150 2006-08-05 Zoltan Varga <vargaz@gmail.com>
7152 * aot-runtime.c: Call init_plt lazily.
7154 * inssel-long.brg: Fix unsigned long->int conversion.
7156 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7158 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7159 that most data is now in the .rss/.data section.
7161 2006-08-04 Zoltan Varga <vargaz@gmail.com>
7163 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
7165 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7167 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7169 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7171 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7172 virtual call. Fixes #79010.
7174 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
7175 and use the result as the this argument in the real call.
7177 * generics.2.cs: Add a new test for #79010.
7179 2006-08-03 Zoltan Varga <vargaz@gmail.com>
7181 * mini-x86.c: Fix a warning.
7183 * aot-compiler.c: Add a bunch of statistics.
7185 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7187 2006-08-02 Zoltan Varga <vargaz@gmail.com>
7189 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7191 2006-08-01 Zoltan Varga <vargaz@gmail.com>
7193 * 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>.
7195 2006-07-13 Miguel de Icaza <miguel@novell.com>
7197 * mini.c (mono_method_to_ir): Obtain the original method in the
7198 CIL stream and use this to perform validation.
7202 2006-07-19 Zoltan Varga <vargaz@gmail.com>
7204 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7205 (mono_arch_call_opcode): Ditto.
7207 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7210 * mini.c (mono_patch_info_dup_mp): New helper function.
7212 * aot-compiler.c (compile_method): Fix some of the memory allocated during
7213 compilation. Fixes #78827.
7215 2006-07-18 Kornél Pál <kornelpal@gmail.com>
7217 * declsec.c: Use original security informations for
7218 MONO_WRAPPER_MANAGED_TO_MANAGED.
7220 2006-07-15 Jonathan Chambers <joncham@gmail.com>
7222 * mini.c: Allow Com Interop methods/classes and
7223 don't verify COM wrapper calls
7226 2006-07-13 Zoltan Varga <vargaz@gmail.com>
7228 * inssel-long32.brg: Fix long->i4 checked conversion.
7230 * exceptions.cs: Add a test for the above.
7232 2006-07-08 Zoltan Varga <vargaz@gmail.com>
7234 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7236 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
7239 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7242 2006-07-03 Zoltan Varga <vargaz@gmail.com>
7244 * mini.c: Fix solaris/x86 exception handling.
7246 * Makefile.am: Get rid of $(ICU_LIBS).
7248 2006-07-02 Zoltan Varga <vargaz@gmail.com>
7250 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7251 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7252 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7254 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7256 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7257 this function causes a SIGSEGV.
7259 2006-06-22 Zoltan Varga <vargaz@gmail.com>
7261 * mini.c: Remove unused solaris/x86 includes.
7263 2006-06-21 Zoltan Varga <vargaz@gmail.com>
7265 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7267 2006-06-20 Jb Evain <jbevain@gmail.com>
7269 * cpu-g4.md: fix max length of start_handler instruction.
7271 2006-06-20 Massimiliano Mantione <massi@ximian.com>
7272 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7274 2006-06-16 Massimiliano Mantione <massi@ximian.com>
7275 * ssa.c: Fixed bug 78653 for SSA based deadce.
7276 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7277 MonoInst.flags, used in SSA based deadce.
7278 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7279 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7281 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7283 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7284 it can end up using non executable memory on ppc64 systems
7285 running ppc32 userspace (fix from Johannes Berg).
7287 2006-06-14 Dick Porter <dick@ximian.com>
7289 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7292 2006-06-13 Massimiliano Mantione <massi@ximian.com>
7293 * mini.c: Made so that inline is locally disabled if it would
7294 trigger a .cctor, because too many apps depend on this behavior
7295 (which seems to be also the one of the MS CLR).
7297 2006-06-13 Zoltan Varga <vargaz@gmail.com>
7299 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7300 No idea why this worked before.
7302 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7303 which branch to outer exception clauses since they could skip the
7304 inner finally clauses. Fixes #78633.
7306 * exceptions.cs: Add a test for the above.
7308 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7311 * iltests.il: Add a test for the above.
7313 2006-06-12 Zoltan Varga <vargaz@gmail.com>
7315 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7316 after the end of a try bblock, to prevent asserts in mini_method_compile ().
7318 * iltests.il: Add a test for the above.
7320 2006-06-10 Zoltan Varga <vargaz@gmail.com>
7322 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7324 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7325 methods as instrinsics.
7327 2006-06-09 Wade Berrier <wberrier@novell.com>
7329 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7330 (simple-cee-ops.h ssapre-mini-ops.h)
7332 2006-06-09 Neale Ferguson <neale@sinenomine.net>
7334 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7335 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7337 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7338 * cpu-s390x.md: Fix max. length values for a couple of instructions.
7340 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
7342 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7344 2006-06-08 Massimiliano Mantione <massi@ximian.com>
7346 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7347 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7348 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7349 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7350 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7351 of opcodes, so that bug 78549 should not happen again.
7352 * ssapre.c: Updated to use the renamed files.
7354 2006-06-08 Zoltan Varga <vargaz@gmail.com>
7356 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
7357 in OP_ATOMIC_EXCHANGE_I4.
7359 2006-06-07 Wade Berrier <wberrier@novell.com>
7361 * tramp-s390.c: Fix s390 build (add missing pointer declarations
7362 in mono_debugger_create_notification_function)
7364 2006-06-06 Zoltan Varga <vargaz@gmail.com>
7366 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7368 * mini.c (type_from_stack_type): Disable some changes which do not
7371 * driver.c: Reenable opts.
7373 * mini.h (MonoStackSlot): New structure to keep track of the verification state
7374 of the evaluation stack.
7376 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7377 evaluation stack trace at entry to the bblock.
7379 * mini.c (merge_stacks): New function to perform verification of stack merges.
7380 Turned off by default.
7382 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7385 2006-06-06 Massimiliano Mantione <massi@ximian.com>
7387 * local-propagation.c: Fixed bug 78549.
7389 2006-06-04 Zoltan Varga <vargaz@gmail.com>
7391 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7393 2006-06-02 Miguel de Icaza <miguel@novell.com>
7395 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7396 tramp-arm.c, tramp-ia64.c
7397 (mono_debugger_create_notification_function): Update signature to
7398 new signature and use new protocol for creating the notification
7401 Should fix the build.
7403 2006-06-02 Geoff Norton <gnorton@customerdna.com>
7405 * exceptions-ppc.c (mono_jit_walk_stack)
7406 (ves_icall_get_frame_info): Fix the build
7408 2006-06-02 Zoltan Varga <vargaz@gmail.com>
7410 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7412 2006-05-31 Raja R Harinath <rharinath@novell.com>
7414 * il2tests.2.il: New file for generics CIL tests. Add test for
7416 * Makefile.am: Update.
7419 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7422 2006-05-30 Massimiliano Mantione <massi@ximian.com>
7424 * aliasing.c: Fixed bug 78311.
7426 2006-05-29 Martin Baulig <martin@ximian.com>
7428 * mini-exceptions.c (mono_find_jit_info): When computing the
7429 native offset, check whether we're actually inside the method's
7430 code; call mono_debug_print_stack_frame() to format the frame.
7431 (ves_icall_System_Exception_get_trace): Call
7432 mono_debug_print_stack_frame() to format the stack frame.
7433 (ves_icall_get_trace): Update to the new debugging API.
7434 (mono_jit_walk_stack_from_ctx): Likewise.
7435 (ves_icall_get_frame_info): Likewise.
7437 * mini.c (get_method_from_ip): Use the new debugging API.
7438 (mono_print_method_from_ip): Likewise.
7441 (mono_jit_walk_stack): Use the new debugging API.
7442 (ves_icall_get_frame_info): Likewise.
7444 2006-05-27 Zoltan Varga <vargaz@gmail.com>
7446 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7448 2006-05-25 Massimiliano Mantione <massi@ximian.com>
7450 * mini.c: Added "limitator" to inline for debugging.
7452 2006-05-24 Martin Baulig <martin@ximian.com>
7454 * debug-debugger.c (mono_debugger_init): Create a private,
7455 malloc()-based code manager for the notification function and
7456 intentionally leak it on exit. This fixes the crash-on-exit race
7460 (mono_debugger_create_notification_function): Added
7461 `MonoCodeManager *' argument.
7464 (mono_debugger_create_notification_function): Added
7465 `MonoCodeManager *' argument.
7467 2006-05-23 Massimiliano Mantione <massi@ximian.com>
7469 * aliasing.c: Fixed 64 bit issue.
7470 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7471 default since all known bugs are fixed (one more time!).
7473 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7475 * mini.c: write barrier support.
7477 2006-05-23 Martin Baulig <martin@ximian.com>
7479 * debug-debugger.c: Revert Paolo's change. Add comment and #error
7480 check at the top of the file.
7482 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7484 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7485 reverting changes without reason and without changelog entries.
7487 2006-05-18 Zoltan Varga <vargaz@gmail.com>
7489 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7490 to a few opcodes. Fixes #78439.
7492 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7493 consistency with other archs.
7495 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7497 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7499 * debug-debugger.c: fix the build.
7501 2006-05-17 Martin Baulig <martin@ximian.com>
7504 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7505 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7506 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7507 (debugger_attach): Call GC_mono_debugger_add_all_threads().
7509 2006-05-11 Zoltan Varga <vargaz@gmail.com>
7511 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7513 2006-05-10 Zoltan Varga <vargaz@gmail.com>
7515 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
7516 MONO_TYPE_GENERICINST.
7518 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
7519 MONO_TYPE_GENERICINST.
7521 2006-05-09 Zoltan Varga <vargaz@gmail.com>
7523 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7526 2006-05-08 Zoltan Varga <vargaz@gmail.com>
7528 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7530 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7532 2006-05-06 Zoltan Varga <vargaz@gmail.com>
7534 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7535 mono_trace_cleanup ().
7537 * iltests.il: Fix problem with the newly added test.
7539 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7540 due to register constraints, free up the previous hreg. Fixes #78314.
7542 * iltests.il: Add new test for #78314.
7544 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7545 Interlocked.Add. Fixes #78312.
7547 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7549 2006-05-05 Zoltan Varga <vargaz@gmail.com>
7551 * inssel.brg (mini_emit_virtual_call): Fix a warning.
7553 2006-05-05 Martin Baulig <martin@ximian.com>
7555 * debug-mini.c (mono_debug_open_block): New method.
7558 (mono_arch_output_basic_block): Call mono_debug_open_block() at
7559 the beginning of each basic block.
7562 (mono_arch_output_basic_block): Call mono_debug_open_block() at
7563 the beginning of each basic block.
7565 2006-05-04 Massimiliano Mantione <massi@ximian.com>
7567 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7568 default until I understand why they break the build on amd64.
7570 2006-05-04 Zoltan Varga <vargaz@gmail.com>
7572 * mini.c (mini_cleanup): Call mono_cleanup ().
7574 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7577 2006-05-04 Massimiliano Mantione <massi@ximian.com>
7579 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7580 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7581 default since all known bugs are fixed, and I cannot reproduce bug
7582 77944... I'm asking Matt Hargett to test again after this commit.
7584 2006-04-28 Massimiliano Mantione <massi@ximian.com>
7586 * mini-codegen.c: Fixed typo that thrashed inline.
7588 2006-04-28 Zoltan Varga <vargaz@gmail.com>
7590 * dominators.c (compute_dominators): Avoid using a worklist since
7591 it is not correct in some cases. Instead, iterate over all bblocks as
7592 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7594 2006-04-28 Miguel de Icaza <miguel@novell.com>
7596 * mini.c (mono_jit_compile_method_inner): Use
7597 mono_prepare_exception_from_error that resets the value
7600 2006-04-27 Miguel de Icaza <miguel@novell.com>
7602 * mini.c: Move the mini_loader_error_to_exception to metadata.
7604 2006-04-27 Massimiliano Mantione <massi@ximian.com>
7606 * aliasing.c: Fixed bug 78210.
7608 2006-04-27 Massimiliano Mantione <massi@ximian.com>
7610 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7611 default until all their problems (or the ones they trigger) are fixed.
7613 2006-04-26 Zoltan Varga <vargaz@gmail.com>
7615 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7617 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7618 as loaded only after resolving patches since that could invoke the same method.
7620 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7622 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7625 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7628 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7631 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7632 made from AOT code through the PLT table.
7634 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7635 holding the plt offset when a call is made to the aot plt trampoline.
7637 2006-04-25 Zoltan Varga <vargaz@gmail.com>
7639 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
7642 * Makefile.am (common_sources): Fix build breakage.
7644 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7645 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7646 intra-assembly calls if possible.
7648 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7650 * mini-trampolines.c: Handle PLT entries.
7652 * mini.c: Avoid creating a GOT var for calls.
7654 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7657 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7660 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
7663 * mini.h: Bump AOT file format version.
7665 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
7668 2006-04-25 Martin Baulig <martin@ximian.com>
7670 * driver.c: Disable copyprop, consprop and inline when running
7671 inside the debugger.
7673 2006-04-25 Martin Baulig <martin@ximian.com>
7675 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
7676 with `get_current_thread' and added `detach'.
7677 (MonoDebuggerMetadataInfo): Added `thread_size',
7678 `thread_tid_offset', `thread_stack_ptr_offset' and
7679 `thread_end_stack_offset'.
7681 2006-04-25 Zoltan Varga <vargaz@gmail.com>
7683 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
7686 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
7687 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
7689 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
7691 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
7693 * aot.c: Add support for ADJUSTED_IID.
7695 2006-04-24 Zoltan Varga <vargaz@gmail.com>
7697 * aot.c (emit_method_order): Don't align method_order_end.
7699 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
7700 the interface ID changes.
7702 2006-04-21 Dick Porter <dick@ximian.com>
7704 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
7705 cleaning up a thread. Fixes the new part of bug 77470.
7707 2006-04-20 Geoff Norton <gnorton@customerdna.com>
7709 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
7712 2006-04-19 Zoltan Varga <vargaz@gmail.com>
7714 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
7716 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
7717 SIGSEGV. Fixes #78072.
7719 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
7720 unregister our SIGABRT handler.
7722 2006-04-19 Massimiliano Mantione <massi@ximian.com>
7724 * mini.c: Disabled inline where it can alter the call stack in a
7725 way visible from managed code.
7726 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
7729 2006-04-16 Zoltan Varga <vargaz@gmail.com>
7731 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
7732 on other platforms. Fixes #78089.
7734 2006-04-13 Martin Baulig <martin@ximian.com>
7736 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
7737 determine whether we're inside the debugger.
7740 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
7742 2006-04-12 Zoltan Varga <vargaz@gmail.com>
7744 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
7745 handler clauses. Fixes #78024.
7747 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
7748 in the CALL_MEMBASE opcodes. Fixes #78088.
7749 (mono_arch_get_vcall_slot_addr): Ditto.
7751 2006-04-10 Martin Baulig <martin@ximian.com>
7753 * debug-debugger.c: The thread handling code has now been moved
7754 into ../metadata/threads.c.
7756 2006-04-10 Zoltan Varga <vargaz@gmail.com>
7758 * driver.c (mono_main): Fix --with-gc=none build.
7760 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
7761 (mono_spillvar_offset_float): Ditto.
7762 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
7763 hreg, not when its !global, since on ia64, there is a third category: stacked
7766 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
7768 * mini.c: set MonoInst->klass for load field address and a few other
7771 2006-04-10 Zoltan Varga <vargaz@gmail.com>
7773 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
7775 2006-04-07 Zoltan Varga <vargaz@gmail.com>
7777 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
7778 the branch opt changes.
7780 2006-04-06 Dick Porter <dick@ximian.com>
7782 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
7784 * wapihandles.c (mini_wapi_seminfo):
7785 * driver.c (mono_main): Add semaphore info option
7787 2006-04-05 Zoltan Varga <vargaz@gmail.com>
7789 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
7790 branch optimization changes. Fixes #78009.
7792 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7794 * mini.c: ignore accessibility of methods in managed->native wrappers.
7796 2006-04-04 Zoltan Varga <vargaz@gmail.com>
7798 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
7800 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
7802 2006-04-03 Zoltan Varga <vargaz@gmail.com>
7804 * mini.c: Modify the branch optimizations to preserve the invariant that
7805 the entries inside the in_bb and out_bb arrays are unique.
7806 (mono_unlink_bblock): Avoid creation of new arrays.
7808 2006-04-02 Zoltan Varga <vargaz@gmail.com>
7810 * mini.c (mono_unlink_bblock): Fix regression caused by previous
7813 2006-04-01 Zoltan Varga <vargaz@gmail.com>
7815 * mini.c (optimize_branches): Remove the "optimizations" in
7816 the cbranch1/cbranch2 -> branch cases which were causing several
7817 problems in the past. Fixes #77986.
7819 2006-03-31 Chris Toshok <toshok@ximian.com>
7821 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
7822 default optimizations :(
7824 2006-03-31 Zoltan Varga <vargaz@gmail.com>
7826 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
7829 2006-03-31 Massimiliano Mantione <massi@ximian.com>
7831 * local-propagation.c: Added comments to structs and removed
7832 "Mono" prefixes from local tree mover types.
7834 2006-03-30 Zoltan Varga <vargaz@gmail.com>
7836 * Makefile.am (arch_sources): Define this for each architecture so
7837 libmono_la_SOURCES is defined in one place.
7839 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
7841 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
7844 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
7846 * driver.c: print the GC name supplied by configure.
7848 2006-03-29 Massimiliano Mantione <massi@ximian.com>
7850 * local-propagation.c: Added tree mover, and moved here all the
7851 local propagation code from mini.c
7852 * mini.c: Added support for treeprop, and moved all the local
7853 propagation code to local-propagation.c
7854 * mini.h: Added support for treeprop
7855 * driver.c: Added support for treeprop, enabled consprop, copyprop,
7856 treeprop, inline and deadce by default
7857 * Makefile.am: Added local-propagation.c
7859 2006-03-25 Zoltan Varga <vargaz@gmail.com>
7861 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
7863 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
7865 * debug-debugger.c: make it compile without the Boehm GC.
7867 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7869 * mini.c: fixed issue with mismatch when an icall is registered
7870 with multiple names but same address.
7872 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
7874 * declsec.c, mini-exceptions.c: use write barrier to set reference
7875 fields of managed objects.
7877 2006-03-19 Zoltan Varga <vargaz@gmail.com>
7879 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
7880 (can_access_internals): Fix a warning.
7882 * mini.c (print_method_from_ip): Rename this to
7883 mono_print_method_from_ip so it gets exported.
7885 * trace.c: Deal with strings inside StringBuilder's containing garbage
7886 and fix memory leaks. Fixes #77848.
7888 2006-03-19 Zoltan Varga <vargaz@gmail.com>
7890 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
7893 2006-03-16 Neale Ferguson <neale@sinenomine.net>
7895 * mini-s390.c: Remove OP_X86_TEST_NULL.
7897 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
7899 * mini.c: use the correct GetHashCode() for the moving collector.
7901 2006-03-16 Massimiliano Mantione <massi@ximian.com>
7903 * liveness.c: Regalloc spill cost tuning.
7905 2006-03-15 Neale Ferguson <neale@sinenomine.net>
7907 * mini-s390x.h: Correct S390_LONG macro.
7909 * mini-s390x.c: Cleanup unused code.
7911 2006-03-15 Zoltan Varga <vargaz@gmail.com>
7913 * jit-icalls.h: New file.
7915 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
7916 icalls and include that instead of including jit-icalls.c.
7918 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
7921 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
7923 * mini.c: when checking for member accessibility, also check for
7924 friend assemblies and for explicit interface implementations.
7926 2006-03-14 Zoltan Varga <vargaz@gmail.com>
7928 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
7930 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
7932 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7933 common cases are done first.
7935 * mini-ops.h: Only define platform specific opcodes on the given platform.
7937 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
7940 2006-03-14 Martin Baulig <martin@ximian.com>
7942 Revert Paolo's change from r57348:
7944 * mini.h: don't use gboolean for bitfields.
7945 * mini.c: verifier changes for fields and methods accessibility.
7947 2006-03-13 Neale Ferguson <neale@sinenomine.net>
7949 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
7951 * mini-s390x.c: Fix conv_r_un.
7953 * cpu-s390, cpu-s390x.md: Fix lengths.
7955 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
7957 * mini.c: nested types have access to all the nesting
7958 levels, not just the enclosing types.
7960 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7962 * mini.c: added a few more verification checks.
7964 2006-03-12 Zoltan Varga <vargaz@gmail.com>
7966 * liveness.c: Merge optimizations from the linear-il branch.
7968 2006-03-11 Zoltan Varga <vargaz@gmail.com>
7970 * mini-ia64.c (emit_call): Add a comment.
7972 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
7974 * tramp-ia64.c: Fix some warnings.
7976 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
7978 * mini.h: don't use gboolean for bitfields.
7979 * mini.c: verifier changes for fields and methods accessibility.
7981 2006-03-11 Zoltan Varga <vargaz@gmail.com>
7983 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
7984 lazy icall wrapper changes.
7986 * dominators.c: Replace all the dominator algorithms with faster
7987 ones from the linear-il branch.
7989 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
7992 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
7993 common cases are done first.
7995 * mini-amd64.c: Fix some warnings.
7997 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8000 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8003 * mini.h: Add a missing prototype.
8005 2006-03-10 Zoltan Varga <vargaz@gmail.com>
8007 * mini.c: Compile icall wrappers lazily.
8009 * mini-codegen.c: Use printf instead of g_print since its much faster.
8011 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8014 * mini.c (optimize_branches): Cache the negative result from
8015 remove_block_if_useless ().
8017 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
8018 Also fix some bblock linking issues.
8020 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8023 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8025 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8026 accessed fields first, for better cache behavior.
8028 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8030 * mini.c: speedup IList<T> array accesses.
8032 2006-03-09 Zoltan Varga <vargaz@gmail.com>
8034 * mini.c (mono_method_to_ir): Handle large methods overflowing the
8035 inline_costs counter. Fixes #77190.
8037 2006-03-06 Zoltan Varga <vargaz@gmail.com>
8039 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8040 trace messages. Fixes #77706.
8042 2006-03-04 Martin Baulig <martin@ximian.com>
8044 * tramp-amd64.c, tramp-x86.c
8045 (mono_debugger_create_notification_function): Use
8046 mono_global_codeman_reserve() to allocate a buffer at runtime and
8049 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8051 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8052 notification function at runtime and then call `initialize' in the
8053 `MONO_DEBUGGER__debugger_info' vtable.
8055 2006-03-04 Zoltan Varga <vargaz@gmail.com>
8057 * iltests.il: Fix a visibility problem.
8059 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8061 * driver.c, mini.c: add hooks for the counters API.
8063 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8065 * driver.c: show disabled options.
8067 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8069 * linear-scan.c: always use cost-driven selection.
8071 2006-02-28 Raja R Harinath <rharinath@novell.com>
8073 * jit-icalls.c (helper_compile_generic_method): Revert change from
8076 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8078 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8080 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8082 * inssel.brg: style fixes, mostly to force the updated monoburg
8083 to run for people using svn.
8085 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8087 * mini.c: match monoburg changes.
8089 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8091 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8092 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8093 declaration in the header file.
8095 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8097 * helpers.c: reduce relocations and mem usage.
8099 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8101 * mini.h, mini-codegen.c: disable logging features if
8102 requested by configure.
8104 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8106 * mini.c: tiny verifier changes.
8108 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8110 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8111 cpu-pentium.md: stack alignment changes for osx/x86,
8112 partially from Geoff Norton <gnorton@customerdna.com>.
8114 2006-02-24 Raja R Harinath <harinath@gmail.com>
8116 * jit-icalls.c (helper_compile_generic_method): Update to changes
8117 in metadata/class.c.
8119 2006-02-24 Zoltan Varga <vargaz@gmail.com>
8121 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8123 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8124 interface calls with large offsets.
8126 2006-02-23 Raja R Harinath <rharinath@novell.com>
8128 * jit-icalls.c (helper_compile_generic_method): Document the
8129 special-case we depend on so that we can inflate the method twice
8130 with the same context with no bad side-effects.
8132 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8134 * mini-x86.c, mini-amd64.c: fix for case when xen support
8137 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8139 * mini-x86.c, mini-amd64.c: generate code to access tls items
8140 in a faster way for Xen systems.
8142 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8144 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8145 updates and compilation fixes for the OSX/x86 port, mostly from
8146 Geoff Norton <gnorton@customerdna.com>.
8148 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8150 * inssel.brg: faster interface call implementation
8151 to sync with the interface_offsets MonoVTable changes.
8153 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8155 * mini.c: more verification checks.
8157 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8159 * mini.c: added a few more verification checks.
8161 2006-02-17 Neale Ferguson <neale@sinenomine.net>
8163 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8164 facility on the processor and use it if available.
8166 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8168 * driver.c, aot.c, mini.c: throw exception if the IL code is
8169 invalid or unverifiable.
8171 2006-02-17 Raja R Harinath <rharinath@novell.com>
8173 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8176 2006-02-16 Zoltan Varga <vargaz@gmail.com>
8178 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8180 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8182 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8183 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8184 handling of instantiated generic valuetypes.
8186 2006-02-11 Zoltan Varga <vargaz@gmail.com>
8188 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
8189 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8192 * generics.2.cs: Revert the nullable reftypes tests.
8194 2006-02-10 Zoltan Varga <vargaz@gmail.com>
8196 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8197 using __builtin_frame_address (1) as it doesn't work in the presence
8198 of optimizations. Hopefully fixes #77273.
8200 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8201 -> generics.cs change as it doesn't work with some automake versions.
8203 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8205 * mini.c: handle systems that sue a different way to
8206 retrieve the stack address of the current thread.
8208 2006-02-09 Zoltan Varga <vargaz@gmail.com>
8210 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8211 it specially in the makefile.
8213 * generics.2.cs: Add tests for nullable reference types.
8215 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8217 * mini.c: always handle the case when mono_jit_init()
8218 is called in a thread different from the main thread,
8219 confusing libgc (bug #77309).
8221 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8223 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8225 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8227 * mini.c: change optimize_branches () to use a single loop
8228 and introduce a new optimization to simplify some range checks.
8230 2006-02-03 Martin Baulig <martin@ximian.com>
8232 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8233 and merged with debugger_thread_manager_add_thread().
8234 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8235 inform the debugger about the main thread.
8237 2006-02-03 Zoltan Varga <vargaz@gmail.com>
8239 * basic.cs: Add test for div.un/rem.un constant folding.
8241 2006-02-03 Neale Ferguson <neale@sinenomine.net>
8243 * cpu-s390x.md: correct int_xor_imm length
8245 2006-02-03 Zoltan Varga <vargaz@gmail.com>
8247 * generics.2.cs: New test for #77442.
8249 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8252 2006-02-02 Martin Baulig <martin@ximian.com>
8254 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8255 <mono/metadata/mono-debug-debugger.h>
8257 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8259 2006-02-02 Martin Baulig <martin@ximian.com>
8261 * debug-debugger.h: New header file for debug-debugger.c.
8263 * debug-debugger.c: Big API cleanup; don't run the managed Main()
8264 function is a separate thread anymore; add support for attaching.
8266 2006-02-01 Zoltan Varga <vargaz@gmail.com>
8268 * tramp-x86.c: Fix a warning.
8270 2006-01-31 Zoltan Varga <vargaz@gmail.com>
8272 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8273 on very large methods.
8275 * aot.c (load_patch_info): Fix a warning.
8277 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8279 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8280 mini-ops.h: alu membase optimizations.
8282 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8284 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8285 to speedup StringBuilder.
8287 2006-01-27 Zoltan Varga <vargaz@gmail.com>
8289 * dominators.c (mono_compute_natural_loops): Fix detection of
8290 loop body start blocks.
8292 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8294 2006-01-26 Zoltan Varga <vargaz@gmail.com>
8296 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8299 2006-01-25 Massimiliano Mantione <massi@ximian.com>
8301 * aliasing.c: Fixed aliasing issue on 64 bit archs.
8303 2006-01-25 Martin Baulig <martin@ximian.com>
8305 * debug-debugger.c: Moved the `MonoDebuggerManager' and
8306 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8307 started to cleanup this file a little bit.
8309 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8311 * mini.c: optimize a codepath frequently happening in generics code.
8313 2006-01-23 Martin Baulig <martin@ximian.com>
8315 * Makefile.am: Only compile debug-debugger.c on supported platforms.
8317 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8320 * driver.c: debug-debugger.c is only available if
8321 `MONO_DEBUGGER_SUPPORTED' is defined.
8323 2006-01-23 Martin Baulig <martin@ximian.com>
8325 * debug-debugger.c: Only enable this on platforms where the Mono
8326 Debugger is working (x86 and x86_64).
8328 2006-01-21 Martin Baulig <martin@ximian.com>
8330 The Mono Debugger is now using the normal `mono' instead of the
8331 `mono-debugger-mini-wrapper' when executing managed code.
8333 * debug-debugger.c: New file; previously known as
8334 debugger/wrapper/wrapper.c.
8336 * debug-mini.c (mono_init_debugger): Removed.
8338 * driver.c (mono_main): Added new `--inside-mdb' command line
8339 argument which is used when running inside the debugger.
8341 2006-01-20 Zoltan Varga <vargaz@gmail.com>
8343 * liveness.c (mono_analyze_liveness): Remove some unused data
8346 2006-01-17 Zoltan Varga <vargaz@gmail.com>
8348 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8350 2006-01-16 Zoltan Varga <vargaz@gmail.com>
8352 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8353 depends on implementation details of monobitset.
8355 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8358 2006-01-15 Zoltan Varga <vargaz@gmail.com>
8360 * liveness.c: Update after monobitset changes.
8362 2006-01-14 Zoltan Varga <vargaz@gmail.com>
8364 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8366 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8368 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8370 * mini-s390x.c: Remove warning messages.
8372 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
8374 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8376 2006-01-10 Zoltan Varga <vargaz@gmail.com>
8378 * generics.2.cs: Add ldelem/stelem_any test.
8380 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8382 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8384 2006-01-07 Zoltan Varga <vargaz@gmail.com>
8386 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8388 2006-01-06 Zoltan Varga <vargaz@gmail.com>
8390 * generics.2.cs: Reenable vtype tests.
8392 * inssel-x86.brg: Remove an icorrect valuetype rule.
8394 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8396 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8397 initial support for OP_ABS.
8399 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8401 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8403 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8405 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
8406 conversion and implement LADD/LSUB.
8408 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8411 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8413 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8415 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8418 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8420 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
8421 localloc is encountered. Fixes crash in test-183.cs when using gmcs
8422 (stack walk problem).
8424 2006-01-04 Zoltan Varga <vargaz@gmail.com>
8426 * aot.c (mono_aot_load_method): Fix a warning.
8428 2006-01-03 Neale Ferguson <neale@sinenomine.net>
8430 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8432 2006-01-03 Zoltan Varga <vargaz@gmail.com>
8434 * iltests.il: Add test for #77148.
8436 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8439 2006-01-03 Neale Ferguson <neale@sinenomine.net>
8441 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8443 2006-01-03 Neale Ferguson <neale@sinenomine.net>
8445 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8446 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8448 * basic-long.cs: Add lconv-to-r4/r8 tests.
8450 2006-01-03 Zoltan Varga <vargaz@gmail.com>
8452 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8454 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8455 here as on other archs.
8457 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8459 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8461 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8463 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8465 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8467 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8468 instrument_prolog; Add memory_barrier instruction.
8470 2005-12-26 Zoltan Varga <vargaz@gmail.com>
8472 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8474 2005-12-23 Zoltan Varga <vargaz@gmail.com>
8476 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8478 * aliasing.c inssel.brg: Fix warnings.
8480 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8481 could skip initialization of some parts of memory.
8483 * mini.c mini-ia64.c: Fix warnings.
8485 * inssel-sparc.brg: Add an implementation of lneg which actually works.
8487 2005-12-22 Zoltan Varga <vargaz@gmail.com>
8489 * aliasing.c (mono_build_aliasing_information): Add a workaround for
8490 a crash seen on sparc.
8492 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8494 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8496 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8498 * mini-ops.h: Add s390_backchain instruction
8500 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8502 * cpu-s390.md: Add s390_backchain instruction
8504 * mini-s390.c: Significant ABI changes
8506 * mini-s390.h: Cater for zero length structures
8508 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8510 * mini-s390.c: ABI fixes
8512 * inssel-s390.brg: Remove debug statements
8514 * cpu-s390.md: Fix length of ATOMIC_xx operations
8516 2005-12-19 Zoltan Varga <vargaz@gmail.com>
8518 * basic-float.cs: Add float<->long conversion tests.
8520 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8522 * mini-s390.c: Fix LOCALLOC processing.
8524 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8526 2005-12-15 Zoltan Varga <vargaz@gmail.com>
8528 * iltests.il: Add tests for some opcodes not covered by the other
8531 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8533 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
8534 register loading for Tail processing; Correct trace output.
8536 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8538 * cpu-s390.md: Correct size of jmp instruction.
8540 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8542 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8544 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8546 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8547 Bring s390 up to current level.
8549 2005-12-12 Zltan Varga <vargaz@gmail.com>
8551 * generics.2.cs: Disable the newly added tests as they do not work yet.
8553 * generics.2.cs: Add valuetype tests.
8555 2005-12-09 Zoltan Varga <vargaz@gmail.com>
8557 * basic-long.cs: Add i4->u8 test.
8559 * objects.cs: Add tests for JIT intrinsic.
8561 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8562 optimizations lost by a mistake.
8564 2005-12-07 Zoltan Varga <vargaz@gmail.com>
8566 * basic-long.cs: Remove a test moved to objects.cs.
8568 * arrays.cs: Add more array tests.
8570 2005-12-06 Zoltan Varga <vargaz@gmail.com>
8572 * arrays.cs: Add new tests for multi-dimensional arrays.
8574 2005-12-06 Raja R Harinath <rharinath@novell.com>
8576 * Makefile.am (test_sources2): Add generics.2.cs.
8577 (EXTRA_DIST): Add test_sources2.
8579 2005-12-05 Ben Maurer <bmaurer@ximian.com>
8581 Support for boxing and unboxing nullable types as well as the
8582 isinst operation on nullables, per the CLI ammendment.
8584 * inssel.brg (CEE_ISINST): Special case for nullable
8586 * mini.c (handle_unbox_nullable): new method
8587 (handle_box): Special case for nullable types
8588 (mono_method_to_ir): Call handle_unbox_nullable in correct
8591 * generics.2.cs: New test suite
8593 * Makefile.am: Support for regression tests with generics.
8595 2005-12-03 Zoltan Varga <vargaz@gmail.com>
8597 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8598 allocated to registers. Fixes #76800.
8600 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8602 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8604 2005-11-30 Zoltan Varga <vargaz@gmail.com>
8606 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
8609 2005-11-29 Zoltan Varga <vargaz@gmail.com>
8611 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8614 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8616 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8617 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8619 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8620 single precision before storing to a single precision location.
8622 2005-11-28 Raja R Harinath <rharinath@novell.com>
8624 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8626 2005-11-27 Zoltan Varga <vargaz@gmail.com>
8628 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8631 * basic.cs: Remove test_0_byte_compares test which was moved to
8632 objects.cs a long time ago.
8634 2005-11-22 Massimiliano Mantione <massi@ximian.com>
8636 * aliasing.c: Fixed aliasing issue on 64 bit archs.
8638 2005-11-20 Zoltan Varga <vargaz@gmail.com>
8640 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8641 handlers are called.
8643 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8646 * mini-ia64.c: Add support for the throw->branch exception
8649 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8651 2005-11-18 Massimiliano Mantione <massi@ximian.com>
8653 * mini.c: Enabled "fastpath" deadce :-)
8655 2005-11-18 Massimiliano Mantione <massi@ximian.com>
8657 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8658 alias analysis pass to support it.
8661 * liveness.c: Likewise (liveness computation can use aliasing
8662 information to be more accurate).
8663 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
8664 moreover made so that "--compile-all" uses the given optimization
8665 flags and not the default ones.
8666 * aliasing.c: Alias analysis (new file).
8667 * aliasing.h: Likewise.
8668 * Makefile.am: added "aliasing.c" and "aliasing.h".
8670 2005-11-17 Zoltan Varga <vargaz@gmail.com>
8672 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
8675 2005-11-13 Zoltan Varga <vargaz@gmail.com>
8677 * mini-exceptions.c (mono_handle_exception_internal): Remove the
8678 fp >= end_of_stack exit condition, as it is not needed, and it might
8679 become true for fp eliminated frames.
8681 2005-11-11 Zoltan Varga <vargaz@gmail.com>
8683 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
8686 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
8688 * mini-arm.c: fixed alignment of doubles/longs to match
8689 the C ABI (bug #76635).
8691 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
8693 * aot.c: fix compilation with --enable-minimal=aot.
8695 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
8697 * mini-arm.c: fixed compatibility with the new
8698 floating point emulator package for compares.
8700 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
8702 * mini.c : reverted sig->pinvoke changes (r51396-51397).
8704 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
8706 * mini-exceptions.c (print_stack_frame): Output to stderr.
8707 (mono_handle_native_sigsegv): Ditto.
8709 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
8711 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
8712 OP_LCONV_TO_OVF_I implementation.
8714 * mini-amd64.c: Add support for the throw->branch exception
8717 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
8718 when the catch clause catches a more general exception, i.e. Object.
8720 2005-10-30 Zoltan Varga <vargaz@gmail.com>
8722 * cpu-ia64.md: Remove unused opcodes.
8724 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
8725 specific defines for architectures defining USE_SIGACTION.
8727 * mini-ia64.c: Fix some warnings.
8729 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
8730 version seemed to skip a frame.
8732 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
8734 * mini.c: Clean up the usage of sig->pinvoke flag. Now
8735 only calls which are made to native code use this flag.
8737 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
8739 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
8740 varargs methods as well.
8742 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
8743 which have save_lmf set. Reorganize methods prologs a bit.
8745 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
8746 debugger to the proper place.
8748 2005-10-29 Martin Baulig <martin@ximian.com>
8750 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
8751 when running inside the debugger until the debugger has support
8754 2005-10-26 Zoltan Varga <vargaz@gmail.com>
8756 * mini.h: Fix a warning.
8758 2005-10-24 Miguel de Icaza <miguel@novell.com>
8760 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
8761 we expose publicly, this returns the string.
8763 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
8765 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
8766 with fp elimination.
8768 2005-10-21 Zoltan Varga <vargaz@gmail.com>
8770 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
8771 native stacktrace using the glibc 'backtrace' function if available.
8773 2005-10-20 Zoltan Varga <vargaz@gmail.com>
8775 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
8777 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
8778 handle SIGSEGVs received while in native code.
8780 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
8781 code, call mono_handle_native_sigsegv which will abort the runtime
8782 after printing some diagnostics, instead of converting it into a
8783 confusing NullReferenceException.
8785 2005-10-18 Zoltan Varga <vargaz@gmail.com>
8787 * cpu-pentium.md: Remove unused opcodes.
8789 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
8791 * mini-amd64.h (MonoLMF): Add rsp field.
8793 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
8796 2005-10-17 Zoltan Varga <vargaz@gmail.com>
8798 * mini-codegen.c (get_register_spilling): Fix some warnings.
8800 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
8802 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
8803 elimination during exception handling. Enable fp elimination by
8806 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
8809 2005-10-16 Martin Baulig <martin@ximian.com>
8812 (mono_debugger_run_finally): New public method for the debugger.
8814 2005-10-10 Zoltan Varga <vargaz@gmail.com>
8816 * debug-mini.c (mono_debug_init_method): Fix warning.
8818 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
8819 the 'exname' parameter const to fix some warnings.
8821 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
8823 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
8824 introduced by the previous patch.
8826 2005-10-08 Zoltan Varga <vargaz@gmail.com>
8828 * basic-float.cs: Add test for precision of float arithmetic.
8830 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
8831 when loading/storing single values from/to memory.
8833 * mini.c (mono_jit_compile_method_with_opt): Create the function
8834 pointers in the correct domain.
8836 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
8838 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
8839 introduced by previous patch.
8841 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
8842 when out_filter_idx is NULL.
8844 * mini-exceptions.c: Don't run filter clauses twice during exception
8845 handling. Fixes #75755.
8847 2005-10-07 Zoltan Varga <vargaz@gmail.com>
8849 * aot.c: Add support for ldflda wrappers.
8851 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
8854 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
8856 * mini.c, mini.h: do not consider exception handlers blocks when
8857 setting up interface variables.
8859 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
8861 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
8863 2005-10-03 Zoltan Varga <vargaz@gmail.com>
8865 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
8866 causes a regression.
8868 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
8870 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
8872 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
8873 of the OP_P definitions.
8875 * TODO: Add a proposal for dealing with the CEE/OP mess.
8877 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
8878 optimizations from the x86 port.
8880 * cpu-amd64.md: Ditto.
8882 * basic.cs basic-long.cs: Add tests.
8884 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
8886 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
8887 Patrik Torstensson's implementation of my exception-handling
8888 optimization idea, when the exception object is not used
8891 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
8893 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
8894 of the mul_imm optimizations from the old jit.
8896 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
8898 * mini.c, liveness.c: patch by Patrik Torstensson and
8899 Zoltan Varga to improve performance in methods with
8902 2005-09-30 Zoltan Varga <vargaz@gmail.com>
8904 * driver.c: Remove 'Globalization' entry from --version.
8906 2005-09-28 Zoltan Varga <vargaz@gmail.com>
8908 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
8909 there is a profiler interested in JIT events.
8911 * aot.c: Load profile files produced by the AOT profiling module, and
8912 reorder methods based on the profiling info. Add a 'method_order' table
8913 to the AOT file to make mono_aot_find_jit_info work with the reordered
8916 * mini.h: Bump AOT file version info.
8918 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
8920 * mini-arm.h: work around what looks like a gcc bug when optimizations
8923 2005-09-28 Raja R Harinath <rharinath@novell.com>
8925 * Makefile.am (AM_CFLAGS): Don't use += to append inside
8926 conditionals. Use ...
8927 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
8929 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
8931 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
8932 to determine the amount of memory to copy when passing valuetypes.
8934 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
8935 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
8937 2005-09-27 Zoltan Varga <vargaz@gmail.com>
8939 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
8940 information about aot.
8942 2005-09-27 Ben Maurer <bmaurer@ximian.com>
8944 * *.c: Replace the use of {Enter,Leave}CriticalSection with
8945 macros. This will allow a deadlock debugger to easily be plugged
8948 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
8950 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
8952 2005-09-27 Raja R Harinath <rharinath@novell.com>
8954 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
8955 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
8956 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
8957 ($(arch_built)) [CROSS_COMPILING]: Error out.
8959 2005-09-26 Zoltan Varga <vargaz@gmail.com>
8961 * aot.c: Add support for the no_special_static flag for classes.
8963 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
8965 * Reapply reverted patches.
8967 * *: Revert r50174 as well.
8969 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
8971 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
8973 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
8975 2005-09-23 Miguel de Icaza <miguel@novell.com>
8977 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
8978 part of the SIG_HANDLER_SIGNATURE.
8980 2005-09-23 Zoltan Varga <vargaz@gmail.com>
8982 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
8985 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
8986 introduced by previous patch.
8988 2005-09-21 Zoltan Varga <vargaz@gmail.com>
8990 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
8991 saved registers too.
8993 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
8994 upon the information returned by get_call_info ().
8996 * mini-x86.c (add_float): Fix stack size calculation.
8997 (mono_arch_call_opcode): Rewrite this so it works based up the
8998 information returned by get_call_info ().
8999 (mono_arch_get_this_vret_args): Ditto.
9001 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
9003 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9004 in cinfo to determine the registers which need to be used.
9006 2005-09-20 Miguel de Icaza <miguel@novell.com>
9008 * driver.c (mono_main): Add --server and --desktop flags.
9010 2005-09-16 Zoltan Varga <vargaz@gmail.com>
9012 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9013 registers as global registers.
9015 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
9016 longer needed with the new register allocator.
9018 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9020 * cpu-ia64.md: Remove unused opcodes.
9022 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9024 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
9026 * cpu-amd64.md: Remove unused opcodes.
9028 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9029 needed with the new register allocator.
9031 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9034 2005-09-16 Raja R Harinath <rharinath@novell.com>
9036 * Makefile.am (check-local): Don't invoke semdel-wrapper.
9038 2005-09-16 Martin Baulig <martin@ximian.com>
9040 * exceptions-amd64.c
9041 (throw_exception): Don't call mono_debugger_throw_exception() if
9042 we're a rethrow - see the FIXME in the code.
9044 2005-09-15 Geoff Norton <gnorton@customerdna.com>
9046 * mini.c (mono_init_exceptions): This only works on some architectures.
9048 2005-09-15 Zoltan Varga <vargaz@gmail.com>
9050 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9053 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9055 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9056 now in mini-exceptions.c.
9058 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
9060 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9061 now in mini-exceptions.c.
9063 2005-09-15 Zoltan Varga <vargaz@gmail.com>
9065 * exceptions-x86.c: Applied patch from Patrik Torstensson
9066 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9068 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9069 code into mini-exceptions.c. Add some assertions to it.
9071 2005-09-12 Zoltan Varga <vargaz@gmail.com>
9073 * aot.c (emit_section_change): Applied patch from "The Software Team"
9074 (<software@solmersa.com>). Fix as errors on windows.
9076 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
9078 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9079 method info into the LMF.
9081 2005-09-11 Zoltan Varga <vargaz@gmail.com>
9083 * mini-ia64.c: Add proper unwind info for method epilogs.
9085 * exceptions-ia64.c: Add some code to help debugging.
9087 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9089 * mini-exceptions.c: Fix warning.
9091 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
9093 * mini.c: Really fix build.
9095 * mini-x86.c mini-amd64.c: Fix build.
9097 2005-09-11 Zoltan Varga <vargaz@gmail.com>
9099 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9101 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9102 some Interlocked methods as intrinsics.
9104 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9105 for Thread methods as well.
9107 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9109 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9111 * mini-ia64.c mini-x86.c mini-amd64.c
9112 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
9115 * mini.c (mono_init_exceptions): Fix build breakage.
9117 2005-09-10 Zoltan Varga <vargaz@gmail.com>
9119 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9120 of instructions. Use the new ia64_unw_op macros for emitting unwind
9123 * mini.c (mono_init_exceptions): Initialize exception handling
9124 related trampolines at startup.
9126 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9128 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9130 2005-09-09 Zoltan Varga <vargaz@gmail.com>
9132 * mini.c: Handle type loading errors gracefully during compilation and
9133 throw the appropriate exception.
9135 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9137 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9138 for the mono binary.
9140 2005-09-09 Martin Baulig <martin@ximian.com>
9142 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9145 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9147 * mini-arm.h: use emulation for conv.r.un for the release.
9149 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9151 * mini-arm.c, objects.cs: more fixes and tests for them.
9153 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9155 * mini-arm.c: align structures to at least 4 bytes to be able
9156 to keep our current optimized memcpy.
9158 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9160 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9162 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9164 * mini.c: ignore SIGPIPE.
9166 2005-09-04 Zoltan Varga <vargaz@gmail.com>
9168 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9170 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9172 2005-09-02 Zoltan Varga <vargaz@gmail.com>
9174 * mini.h: Add prototype for mono_allocate_stack_slots_full.
9176 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9178 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9179 exception handling support.
9180 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9181 patch by Brian Koropoff <briank@marakicorp.com>).
9183 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9185 * mini.c: revert another 'optimization' which breaks when
9186 items on the eval stack need to be saved at a basic block end
9189 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9191 * jit-icalls.c: for arrays, ensure we always provide
9194 2005-08-30 Zoltan Varga <vargaz@gmail.com>
9196 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9198 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9200 2005-08-29 Zoltan Varga <vargaz@gmail.com>
9202 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9203 arguments in their original register.
9205 2005-08-28 Zoltan Varga <vargaz@gmail.com>
9207 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9210 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9211 when ssapre is enabled.
9213 * inssel-long.brg: Fix bug in previous patch.
9215 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
9216 multiplication by a constant.
9218 2005-08-27 Zoltan Varga <vargaz@gmail.com>
9220 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9223 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9226 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9228 * inssel-arm.brg: apply changes tested by Brian Koropoff
9229 <briank@marakicorp.com>.
9231 2005-08-25 Zoltan Varga <vargaz@gmail.com>
9233 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9235 2005-08-24 Zoltan Varga <vargaz@gmail.com>
9237 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9238 to the same register if dreg is just a base register.
9239 (print_ins): Improve printing of membase opcodes.
9241 * inssel-x86.brg: Add optimized ldind(reg) rules.
9243 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9245 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9247 * mini.c: when running under valgrind, set the stack bottom for
9248 the GC at the actual approximate stack for the app (fixes running
9249 mono with valgrind).
9251 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9253 * mini.c: do no break at the first valuetype to init found
9256 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9258 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9260 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9262 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9264 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
9266 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9268 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
9270 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9272 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9275 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9278 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9281 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9283 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9285 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
9287 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9288 in the tail recursion optimization.
9290 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
9291 debug info into the assembly file.
9293 * iltests.il: Add test for filter regions.
9295 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9296 initial stack of filter regions. Fixes #75755.
9298 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9300 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9303 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
9305 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9306 the check for an already compiled method on non-ia64 platforms.
9307 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9310 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9312 * inssel-x86.brg: Add some optimized call rules.
9314 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
9316 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9319 * mini.h mini-trampolines.c: Pass the trampoline argument to
9320 mono_arch_patch_delegate_trampoline.
9322 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9324 * mini-trampolines.c: Fix build.
9326 * mini-amd64.h: Add delegate trampolines.
9328 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9330 * inssel-amd64.brg: Add optimized call rules.
9332 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9334 * inssel-ia64.brg: Add optimized ldind(reg) rules.
9336 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
9338 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9341 * mini-ia64.c: Remove LMF fixmes.
9343 * mini-ia64.h: Remove most fields from LMF.
9345 * inssel-ia64.brg (stmt): Fix unaligned access errors.
9347 * mini-trampolines.c: Add support for IA64 function descriptors.
9349 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9350 for IA64 function descriptors.
9352 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9354 * tramp-arm.c: patch the vtable for virtual calls. Added
9355 support code to register/unregister the LMF.
9356 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9359 2005-08-19 Dick Porter <dick@ximian.com>
9361 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9362 bit value if needed.
9364 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
9366 * mini.c (mini_get_method): Move handling of wrapper data here.
9368 * mini.c (mono_method_to_ir): Add support for dynamic methods.
9370 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9373 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
9374 bblock->code does not remain empty.
9376 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
9378 * arrays.cs: Add regression test for #75832.
9380 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9381 rules. Fixes #75832.
9383 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9384 instruction scheduling.
9386 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
9388 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9390 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
9392 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9394 * mini-codegen.c: Fix VC build.
9396 * cpu-pentium.md: Increase length of atomic_exhange_i4.
9398 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9400 * mini.h: fix signature for mono_register_opcode_emulation.
9402 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
9404 * mini.c: Get rid of most of the helper_sig_... constants using
9405 mono_create_icall_signature ().
9407 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
9409 * jit-icalls.c (helper_ldstr): New helper function.
9411 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9413 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9414 throw, load the string using a helper call instead of creating a string object.
9416 * aot.c: Update after LDSTR changes.
9418 * mini.h: Bump AOT file version.
9420 * aot.c: Save class size info into the AOT file. Print more statistics during
9423 * mini.h: Bump AOT file version.
9425 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9426 ordering of disasm cases. Fixes #74957.
9428 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9430 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9431 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9432 the generic code needed for the ARM port.
9434 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9436 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9437 inssel-arm.brg: more ARM features and fixes.
9439 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9441 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9442 ARM port work in progress.
9444 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
9446 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9448 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9450 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9452 * inssel.brg (mini_emit_memset): Add support for unaligned access.
9454 * *-ia64.*: Ongoing IA64 work.
9456 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9458 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
9460 * TODO: Remove out-of-data todo stuff.
9462 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9465 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9467 * mini.h: Bump corlib version.
9469 2005-07-27 Martin Baulig <martin@ximian.com>
9472 (create_copy_ins): Added `const unsigned char *ip' argument; set
9473 `copy->cil_code' from it.
9475 2005-07-27 Martin Baulig <martin@ximian.com>
9477 * mini-exceptions.c (mono_handle_exception): Don't call
9478 mono_debugger_handle_exception() for filters.
9480 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
9482 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9485 2005-07-26 Martin Baulig <martin@ximian.com>
9487 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9489 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9490 helper_compile_generic_method() if the method is actually virtual
9493 2005-07-26 Martin Baulig <martin@ximian.com>
9496 (trampoline_code): Renamed to `mono_trampoline_code' and made it
9497 public; this is now accessed directly by the debugger.
9498 (mono_generic_trampoline_code): Removed.
9501 (mono_debug_init_method): Also add interncalls and wrappers.
9503 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
9505 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9507 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
9509 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9511 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
9513 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9515 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
9517 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9518 getting TLS offsets on AMD64 too.
9520 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
9522 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9524 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9526 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9527 inssel-arm.brg, mini-arm.h: ARM port work in progress.
9529 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
9531 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9533 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9536 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
9537 mono_sparc_is_virtual_call ().
9539 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9541 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9542 trampoline parameters.
9544 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9546 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9547 to mono_arch_get_vcall_slot_addr.
9549 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9552 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9554 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
9556 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9558 2005-07-19 Martin Baulig <martin@ximian.com>
9560 * exceptions-amd64.c (throw_exception): Call
9561 mono_debugger_throw_exception() here like we're doing it on i386.
9563 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
9565 * mini-ia64.c: Add optimized TLS access support.
9567 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
9569 * mini-exceptions.c: Ongoing IA64 work.
9571 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9573 * mini.c: Use the default optimization set when embedding. Fixes
9576 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
9578 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
9579 of trampolines to a separate file.
9581 * mini-trampolines.c: New file.
9583 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
9586 * tramp-x86.c: Reorganize the trampoline code to be similar to the
9589 * mini-codegen.c: Fix cygwin build.
9591 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
9593 * mini.c: Add some minor changes needed by the IA64 port.
9595 * *-ia64.*: Ongoing IA64 work.
9597 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
9599 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
9600 trampolines into arch-independent and arch-dependent parts.
9602 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9604 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
9606 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9608 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9609 the xp-regalloc-branch for amd64.
9611 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9612 xp-regalloc-branch for x86.
9614 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
9616 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9618 2005-07-06 Martin Baulig <martin@ximian.com>
9621 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9622 (mono_jit_runtime_invoke): Likewise.
9624 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
9626 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9629 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9630 without loading their metadata. Reorganize the file format so exception handling+
9631 debug info is kept separate from normal method info. Create MonoJitInfo
9632 structures for methods lazily.
9634 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9636 (x86_class_init_trampoline): Patch AOT class init trampolines too.
9638 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9640 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9643 * mini.h: Bump AOT file version.
9645 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
9647 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9649 2005-07-01 Raja R Harinath <rharinath@novell.com>
9651 * Makefile.am (check-local): Call semdel-wrapper.
9653 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
9655 * mini-x86.c: Revert the last change as it seems to break the build..
9657 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
9659 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9661 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
9663 2005-06-27 Ben Maurer <bmaurer@ximian.com>
9665 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
9666 outside of the macro, so strange stuff doesn't happen with gcc4
9667 (NEW_AOTCONST_TOKEN): Likewise.
9669 2005-06-28 Martin Baulig <martin@ximian.com>
9671 * mini.c (mini_class_is_system_array): New static method; use this
9672 instead of `klass->parent == mono_defaults.array_class' everywhere
9673 since this also works for the new generic array class.
9675 2005-06-26 Ben Maurer <bmaurer@ximian.com>
9677 * inssel.brg: Remove warnings.
9679 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
9681 * mini-ia64.c: Ongoing IA64 work.
9683 * basic-float.cs: Add float->i1 conversion test.
9685 * iltests.il: Add conv.u4 test.
9687 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
9689 * inssel-long.brg: Fix bug caused by last change.
9691 2005-06-23 Geoff Norton <gnorton@customerdna.com>
9693 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
9694 BSDs. Allows the x86 JIT to work on OSX86
9696 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
9698 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
9701 * mini-ia64.c: Ongoing IA64 work.
9703 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
9705 * mini-ia64.c: Ongoing IA64 work.
9707 * driver.c: Clean up jit_code_hash as well when using --regression.
9709 * inssel-long.brg: Fix long->i4/u4 conversion rules.
9711 * basic-long.cs: Add tests for long->u4 conversion.
9713 2005-06-18 Ben Maurer <bmaurer@ximian.com>
9715 * mini.c: Take mono_get_domainvar out of macros. This makes sure
9716 that we do not depend on undefined C behavior: the order stuff
9717 gets evaluated within an expression. Fixes mono when compiled on
9720 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
9722 * *-ia64.*: Ongoing IA64 work.
9724 * aot.c: Lower memory usage while loading AOT methods.
9726 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
9728 * mini.h: Bump AOT file format version.
9730 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
9732 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
9734 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
9736 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
9737 not on callee assembly). Fixed some comments.
9739 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
9741 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
9742 it gets proper disassembly.
9743 (emit_method_info): Remove some dead code.
9745 * mini.c (mini_method_compile): Allways allocate the GOT var in
9746 mono_method_to_ir for emulating opcodes.
9748 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
9750 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
9751 before freeing the code memory. Fixes #74990.
9753 * objects.cs: Add regression test for #74992.
9755 * liveness.c: Extend live ranges of arguments to the beginning of the
9756 method. Fixes #74992.
9758 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
9759 so it points into the faulting instruction.
9761 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
9763 * jit-icalls.c (mono_imul_ovf): Add exception handling.
9765 * *-ia64.*: Ongoing IA64 work.
9767 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
9769 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
9771 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
9773 * *-ia64.*: Ongoing IA64 work.
9775 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
9777 * basic-long.cs: Add tests for add/sub.ovf.
9779 * basic.cs: Add tests for sub.ovf.
9781 * *-ia64.*: Ongoing IA64 work.
9783 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
9785 * *-ia64.*: Ongoing IA64 work.
9787 * basic.cs: Add conv.ovf.i4.un test.
9789 2005-06-09 Massimiliano Mantione <massi@ximian.com>
9791 * mini.c: (remove_block_if_useless) Fixed bug 75061.
9793 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9795 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
9797 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
9799 * *-ia64.*: Ongoing IA64 work.
9801 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9804 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
9806 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
9808 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
9810 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
9812 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
9814 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
9815 of a call is callable by a near call.
9817 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
9819 * mini-ia64.c: Ongoing IA64 work.
9821 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
9823 * genmdesc.c: Make the generated array non-static.
9825 * inssel-long.brg: Fix LSHR_IMM rule.
9827 * *-ia64.*: Ongoing IA64 work.
9829 * *-ia64.*: Ongoing IA64 work.
9831 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
9833 * *-ia64.*: Ongoing IA64 work.
9835 * *-ia64.*: Ongoing IA64 work.
9837 * mini-ia64.c: Ongoing IA64 work.
9839 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
9841 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
9843 * objects.cs basic-calls.cs: Move some tests to objects.cs.
9845 * objects.cs basic-long.cs: Move some tests to objects.cs.
9847 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
9849 * *-ia64.*: Ongoing IA64 work.
9851 * iltests.il: Add a new test.
9853 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
9854 newobj. Fixes #75042.
9856 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
9858 * *-ia64.*: Ongoing IA64 work.
9860 * *-ia64.*: Ongoing IA64 work.
9862 * *-ia64.*: Ongoing IA64 work.
9864 * basic.cs objects.cs: Move tests accessing static variables as well.
9866 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
9868 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
9870 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
9872 * driver.c: Always print failed tests.
9874 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
9877 * *ia64*: Ongoing IA64 work.
9879 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
9881 * basic.cs: Add tests for add.ovf. Fix warnings.
9883 2005-05-18 Miguel de Icaza <miguel@novell.com>
9885 * driver.c (mono_main): Avoid crash if no argument is passed to
9886 --break; Do not use g_error, but f_printf. And fix all other
9887 ocurrences of the same crash.
9889 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
9891 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
9892 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
9895 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
9897 * *-ia64.*: Add beginnings of IA64 backend.
9899 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
9901 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
9903 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
9906 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
9908 * mini-amd64.c: Fix a warning.
9910 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
9912 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
9913 in float_neg. Fixes #74897.
9915 * mini-amd64.c (emit_call): Fix another near call bug.
9917 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
9919 * declsec.c: Keep the appdomain information in the structure. Added a
9920 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
9921 value gets overwritten).
9922 * declsec.h: Set the default MonoArray for the the stack to 6. Added
9923 an MonoAppDomain member to MonoSecurityFrame.
9924 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
9925 used in the stack walk. Now use a MonoArray which grow (double) when
9928 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
9930 * mini.c: Re-enabled runtime cleanup, since running threads should
9931 now properly stop when exiting.
9933 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
9935 * mini-codegen.c: New file contaning the arch-independent local
9936 register allocator. Not used by any architectures yet.
9938 * mini.h linear-scan.c: Merge some changes from the
9939 mini-xp-local-regalloc branch.
9941 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
9943 * mini-amd64.c (emit_call): Fix calls to native functions when the
9944 runtime is compiled as a shared library. Fixes #74756.
9946 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
9947 on a literal field. Fixes #74751.
9949 2005-04-25 Raja R Harinath <rharinath@novell.com>
9951 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
9953 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
9955 * objects.cs: Add missing null casting test.
9957 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
9959 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
9960 in wrapper methods. Also rename 'address' variable to 'offset'.
9962 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
9964 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
9967 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
9969 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
9972 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9974 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
9976 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
9978 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
9979 just the last bytes.
9981 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
9983 * aot.c (mono_compile_assembly): Fix warning.
9985 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
9986 by the _MSC_VER stuff.
9988 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
9990 * inssel-long.brg: Fix #74588.
9992 * cpu-amd64.md: Fix #74591.
9994 * iltests.il: Add new regression tests.
9996 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
9998 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10001 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
10003 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10005 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
10006 from Bill Middleton <flashdict@gmail.com>.
10008 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
10010 * arrays.cs: Add new regression test. Fix warnings.
10012 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
10014 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10015 and leakage in CKFINITE.
10017 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10018 this to a null op since it is called on amd64 too.
10020 * exceptions-amd64.c (get_throw_trampoline): Align stack.
10022 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10023 body since this is not used on amd64.
10025 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10027 * mini-amd64.c: Remove obsolete fixmes.
10029 * mini.c (print_method_from_ip): Fix debugging support.
10031 2005-2-1 Massimiliano Mantione <massi@ximian.com>
10033 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10034 so that expressions that don't give much gain are not reduced.
10035 * ssapre.h: Likewise.
10037 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
10039 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10041 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10043 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10045 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
10047 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10049 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10051 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
10053 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10056 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10058 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10060 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10062 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
10063 MONO_ARCH_USE_SIGACTION. Fixes #74252.
10065 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10067 * mini-x86.c: Fix up stack overflow handling.
10069 * exceptions.cs: Add new regression test.
10071 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
10073 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10074 mono_jit_thread_attach.
10076 * mini.c (mono_method_to_ir): Verify called method is not abstract.
10078 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
10080 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10081 avoid calling constructors using callvirt.
10083 * inssel.brg: Fix #74073.
10085 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
10087 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
10088 compilation with non-GCC compilers.
10089 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10090 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10092 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10094 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10095 klass->interface_offsets (will likely fix bug#74073).
10097 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
10099 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10101 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
10103 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10104 to amd64_div_reg_size ().
10106 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10108 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
10110 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10112 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
10114 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10116 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
10118 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10120 * mini.c (mono_precompile_assembly): Load and precompile referenced
10121 assemblies as well. Fixes #74015.
10123 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
10125 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10127 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
10129 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10130 a lot of checks and (anyway) permissions cannot work until corlib is
10133 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10135 * mini-ppc.c: fixed ABI issue on sysv/ppc.
10137 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10139 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10140 calls (fixes bug#72824).
10142 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10144 * mini.c: fix tail recursion elimination (see test in bug#73936).
10146 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
10148 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10149 some fp functions in sse2 mode.
10151 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
10153 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10155 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
10157 * mini.h mini.c: Add mono_get_jit_tls_key ().
10159 * mini-x86.c: Enable fast TLS support on windows.
10161 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
10163 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10164 * mini.c: Check for p/invoke method when generating code. If a
10165 p/invoke method, or it's class, isn't decorated with [Suppress
10166 UnmanagedCodeSecurity] then generate code to call System.Security.
10167 UnmanagedDemand (only if the security manager is active).
10169 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
10171 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
10172 last change as it seems to cause strange crashes.
10174 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10176 * *.c: handle unsafe function pointers where needed.
10178 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
10180 * mini.c (mono_jit_free_method): Remove the fixme too.
10182 2005-03-15 Miguel de Icaza <miguel@novell.com>
10184 * mini.c: As discussed, make the code actually free the delegate
10185 thunk now, to enable the debugging of delegate problems, use
10186 MONO_DEBUG=1 when running Mono.
10188 This takes also care of parts of the leaks as seen by Joe.
10190 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
10192 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
10193 thread_tls_offset calculation.
10195 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
10197 * declsec.c: Reworked linkdemand checks for icall. The previous code
10198 was using the declaration code (untrusted) and didn't work as expected
10199 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10202 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
10204 * iltests.il: Add new localloc test.
10206 * mini-amd64.c: Handle large stack allocations the same way as on
10207 windows if stack overflow handling is working.
10209 * mini-amd64.c: Allocate the signal stack using mmap.
10211 * mini.c (sigsegv_signal_handler): Fix reading of context.
10213 * mini-exceptions.c: Fix up stack overflow handling.
10215 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10217 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10219 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10221 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10223 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10224 tramp_init functions as they are no longer needed.
10226 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
10228 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10230 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10232 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10234 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10237 * mini-ops.h: Add OP_LMUL_IMM.
10239 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10240 long mul/div opcodes as intrinsic.
10242 * mini-amd64.c (emit_call): Handle the case when the callee might be
10245 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
10247 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10250 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10252 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10254 2005-03-09 Ben Maurer <bmaurer@ximian.com>
10256 * mini.c (mono_codegen): Don't leak here, to help people running
10259 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
10261 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
10262 conversions in sse2 mode.
10264 * basic-float.cs: Add regression test.
10266 * mini-amd64.c: Reenable sse2.
10268 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
10270 * mini-amd64.c: Disable sse2 until some regressions are fixed.
10272 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
10274 * driver.c: Copyright text should include 2005.
10276 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
10278 * cpu-amd64.md (load_membase): Fix more max lengths.
10280 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
10282 * cpu-amd64.md (load_membase): Fix max length.
10284 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10286 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10288 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10289 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10291 * basic-float.cs: Add rounding regression test.
10293 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10295 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
10297 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10298 structures in registers for pinvoke wrappers.
10300 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
10302 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10304 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
10306 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10307 wrapper to mono_jit_thread_attach.
10309 * mini.c (mini_jit_thread_attach): New jit icall.
10311 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
10312 native->managed wrappers.
10314 * exceptions.cs: Add new regression test.
10316 * mini.c (optimize_branches): Check regions in the cbranch to throw
10317 block case as well. Fixes #73242.
10319 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10321 * mini.c: thread safety fixes.
10323 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
10325 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10326 patching stuff, since delegates use jump trampolines so there is
10329 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
10332 * tramp-amd64.c: Fix build.
10334 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10335 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10337 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10338 Rename this to mono_arch....
10339 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10341 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10343 * mini-amd64.c (emit_call): If both the caller and the callee is
10344 guaranteed to have 32 bit addresses, emit a normal call.
10346 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10348 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
10349 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10350 method_ptr inside delegates.
10352 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
10354 * mini.c (mono_jit_free_method): Free the method info even if the native code is
10355 invalidated. Fixes #73001.
10357 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10359 * mini-x86.c: Only use stdcall for pinvokes on windows.
10361 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10363 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10364 * mini-x86.c: remove unreliable __thread var offset detection,
10365 use the correct accessors and enable by default.
10367 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
10369 * mini.c (mono_jit_free_method): Fix memory leak.
10371 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
10373 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
10375 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
10377 * cpu-amd64.md: Fix lengths of atomic opcodes.
10379 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10381 * driver.c: try to not imply using ICU is any good.
10383 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
10385 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
10386 functions as inline ops.
10388 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10389 some Interlocked functions as inline ops.
10391 * mini.c (move_basic_block_to_end): Fix bug in last patch.
10393 * mini.h (MonoBasicBlock): Reorganize fields a bit.
10395 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10397 * mini.c: Add support for OP_NOT_TAKEN.
10399 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
10400 structures in registers for pinvoke wrappers.
10402 * mini-amd64.c: Fix warnings.
10404 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
10406 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10408 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10410 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
10411 address instead of loading the address from it.
10413 * mini-x86.c: Add support for returning small structs in registers
10414 on Win32. Fixes part of #70864.
10416 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
10418 * trace.c (get_token): Improve error checking.
10420 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
10422 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10424 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
10426 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10427 it can be reused for MonoClass.
10428 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10431 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
10433 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
10434 instead of a MonoReflectionMethod. The method information wasn't used
10435 when displaying SecurityException details (but will be now).
10437 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
10439 * Makefile.am : windows build fix.
10441 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
10443 * iltests.il: Add new regression test.
10445 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10448 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
10450 * mini.c: Moved linkdemand check into helper function check_linkdemand
10451 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
10454 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
10456 * declsec.c: Added statistics counter for different kinds of
10458 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10459 (and commented) declaration.
10460 * mini.c: Added statistics counter for security Demand code
10461 generation. Added display of security statistics.
10463 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
10465 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10466 Fix compilation errors under gcc-2.95.
10468 2005-02-12 Ben Maurer <bmaurer@ximian.com>
10470 * mini.c, driver.c: Use the new jit trampoline hashtable
10472 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10474 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10476 2005-02-11 Martin Baulig <martin@ximian.com>
10478 * debug-mini.c (mono_debug_close_method): Free the line number array.
10480 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
10482 * aot.c: Break up large methods into smaller ones. Share GOT slots for
10485 * mini.h: Bump AOT file format version.
10487 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
10489 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10491 * declsec.h: Added macros to get/set lazyly initialized security
10492 informations about assemblies. Added new enum for different type of
10493 possible LinkDemand violation. Added function to check LinkDemands.
10494 * mini.h: Added a field to MonoCompile to hold any security violation
10495 detected when JITting a method (so it can be thrown later).
10496 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
10497 and CEE_CALLVIRT. Added code to throw exception at the end of
10498 mini_method_compile (note: the exception is unhandled right now).
10500 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10502 * mini.c, jit-icalls.c: use the managed implementation of
10503 memset for initobj and memset, to avoid managed <-> unmanaged
10506 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
10508 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10509 optimization if it would need a GOT var.
10511 * basic.cs: Add tests for constant propagation and switch statements.
10513 * ssa.c: Fix out-of-range constant propagation and switch statements.
10515 2005-02-09 <vargaz@freemail.hu>
10517 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10519 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
10521 * cpu-amd64.md (load_membase): Fix max length of load_membase.
10523 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10525 * mini.c: update to new signature of mono_class_get_allocation_ftn().
10527 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
10529 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
10530 arithmetic operations.
10532 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10534 * mini-ppc.c: add a workaround for broken user code that
10535 DllImports vararg functions with non-vararg signatures.
10537 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10539 * mini.c (mono_jit_compile_method_inner): Add detection and a
10540 meaningfull error message for assemblies written in Managed C++.
10542 * tramp-amd64.c mini-amd64.h: Add support for
10543 create_trampoline_from_token ().
10545 * aot.c mini-x86.c abcremoval.c: Applied patch from
10546 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10548 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
10550 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
10551 which takes a MonoImage/token as parameter instead of a MonoMethod.
10553 * aot.c: Use the new trampoline for initializing vtables.
10555 * aot.c: Add support for ldfld/stfld_remote wrappers.
10557 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10558 rules for compare <MEM>, IMM.
10560 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10562 * aot.c: Handle inherited finalizers correctly.
10564 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
10566 * inssel.brg (stmt): Add a missing _setup_... ().
10568 * aot.c: Save some parts of the class state to the AOT file and use it
10569 to recompute that state when a class is initialized.
10571 * mini.c: Install AOT hooks into the runtime.
10573 * mini.h: Bump AOT file format version.
10575 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10578 * iltests.il: Add new test.
10580 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10582 * mini.c: fix typo.
10584 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10586 * mini.c: setup the statistical profiler in the thread attach
10587 callback to cope with the new single thread code.
10589 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10591 * mini-ppc.c: ensure we have enough room for the profiler
10592 calls (fixed bug#72084).
10594 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
10596 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
10599 2005-2-1 Massimiliano Mantione <massi@ximian.com>
10601 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10603 2005-2-1 Massimiliano Mantione <massi@ximian.com>
10605 * ssapre.c: Fixed an issue with down safety (this allows IronPython
10606 to succesfully execute parrotbench).
10607 * ssapre.h: Likewise.
10609 2005-2-1 Massimiliano Mantione <massi@ximian.com>
10611 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10612 variable for stores to method arguments (fixes a SSAPRE issue).
10614 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10616 * mini.c: handle value types in dup, fixes gen-112.cs.
10618 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10620 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10621 sequence for calls in dynamic methods to avoid thunks.
10623 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10625 * mini.c: correctly remove dynamic methods from the hashtable.
10627 2005-1-20 Massimiliano Mantione <massi@ximian.com>
10629 * driver.c: Disabled SSAPRE until fix the bug that appears
10630 in IronPython's parrotbench.
10632 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
10634 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10636 * mini.c (mono_method_to_ir): Revert the previous change.
10638 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10639 when AOT compiling.
10641 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
10642 mono_jit_info_table_find () etc. when running under valgrind.
10644 * inssel.brg: Fix warnings.
10646 * mini-exceptions.c: Fix warnings.
10648 2005-01-31 Martin Baulig <martin@ximian.com>
10650 * driver.c (compile_all_methods_thread_main): Don't try to compile
10651 generic methods or anything which has type parameters.
10653 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
10655 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10657 * TestDriver.cs: Add --verbose flags.
10659 * graph.c ssa.c: Fix 64 bit warnings.
10661 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
10662 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
10663 Fix 64 bit warnings.
10665 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
10666 variable not spotted by gcc.
10668 * mini-amd64.c inssel-amd64.brg: Applied patch from
10669 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
10670 X86_COMPARE_MEMBASE opcodes.
10672 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
10674 2005-01-29 Ben Maurer <bmaurer@ximian.com>
10676 * *: MonoMethod->signature might be NULL now. You *MUST* use
10677 mono_method_signature.
10679 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
10681 * driver.c (compile_all_methods_thread_main): Compile the methods
10682 without invoking cctors.
10684 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10686 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
10687 * basic-calls.cs: test for the above.
10689 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
10691 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
10692 MonoJitInfo changes.
10694 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
10696 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
10697 eagerly if it contains dynamic methods.
10699 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
10701 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
10702 trace, it is now computed by an icall from trace_ips.
10704 * mini-exceptions.c: Fix a warning.
10706 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
10708 * mini-exceptions.c: don't bother getting stack trace info if
10709 it's not going to be used.
10711 2005-01-27 Raja R Harinath <rharinath@novell.com>
10713 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
10716 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
10718 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
10720 * aot.c: Avoid calling mono_method_get_header () if not needed.
10722 * mini.h: Bump AOT file format version.
10724 * mini.c (mono_emit_native_call): Allocate a GOT var here.
10726 * mini.c (mono_print_tree): Print more info for calls.
10728 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
10730 * declsec.h: Remove warning by adding missing include for marshal.h
10732 2005-01-26 Martin Baulig <martin@ximian.com>
10734 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
10737 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
10739 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
10742 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
10744 * aot.c (mono_compile_assembly): Fix a warning.
10746 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
10748 * declsec.c: Look for security attributes on the original MonoMethod
10749 (and not the wrapped one). This fix permissions on icalls.
10751 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
10753 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10755 * mini.c (mono_allocate_stack_slots): Add a fixme.
10757 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
10759 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10761 * inssel.brg: optimize casts of sealed types (more
10762 optimizations waiting for fixes in remoting).
10764 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
10766 * inssel.brg (stmt): Add another dummy rule.
10768 * driver.c: Fix warnings.
10770 * driver.c (mono_main): If running under valgrind, instruct glib to use
10771 the system allocation functions so valgrind can track the memory
10772 allocated by the g_... functions.
10774 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
10776 * mini-ops.h: Add OP_DUMMY_STORE opcode.
10778 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
10780 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
10781 variables in try regions.
10783 * mini.c (mini_method_compile): Don't disable optimizations on large
10784 methods when AOT compiling.
10786 * mini.c (mono_allocate_stack_slots): New arch independent method to
10787 allocate stack slots. Not yet used.
10789 2005-01-22 Ben Maurer <bmaurer@ximian.com>
10791 * debug-mini.c (mono_debug_close_method): Plug some leaks.
10793 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
10795 * mini-ppc.c: make the branch info relative as the code
10796 buffer can be reallocated.
10798 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
10800 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
10801 * driver.c: Removed the AOT/security restriction. Now initialize the
10802 security manager (in metadata) if --security is used.
10803 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
10804 rather than the pointer to declarative security, when AOT is used.
10806 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
10808 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
10809 basic blocks, reduced intrinsic exception throwing code size.
10811 2005-01-22 Miguel de Icaza <miguel@ximian.com>
10813 * driver.c (mini_usage): Reorder the usage screen.
10815 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
10817 * mini.c (mono_resolve_patch_target): Fix warning.
10819 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
10821 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
10824 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
10826 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
10827 breaks the amd64 build.
10829 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
10830 register allocation. Fixes #71454.
10832 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
10834 * arrays.cs: Add new regression test.
10836 2005-1-20 Massimiliano Mantione <massi@ximian.com>
10838 * ssapre.c: Turned usage of snprintf to GString.
10839 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
10840 (I left it on by mistake in my previous commit).
10842 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
10844 * mini.c, cfold.c, basic-calls.cs: preserve side effects
10845 on cond branch optimization (fixes bug# 71515).
10847 2005-1-20 Massimiliano Mantione <massi@ximian.com>
10849 * abcremoval.c: Fixed bug 71062.
10850 * abcremoval.h: Likewise.
10852 2005-1-20 Massimiliano Mantione <massi@ximian.com>
10854 * mini.c: Added a new functionality to optimize_branches, the removal
10855 of useless basic blocks, and fixed some problem in the removal of
10856 critical edges; some utility functions added for both purposes.
10857 * ssapre.c: Added complex expression support, and fixed bug 70637.
10858 * ssapre.h: Likewise.
10859 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
10861 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
10862 * driver.c: Re-enabled SSAPRE.
10864 2005-01-19 Martin Baulig <martin@ximian.com>
10866 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
10867 the result of mono_get_method_constrained().
10869 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
10871 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
10874 2005-01-18 Geoff Norton <gnorton@customerdna.com>
10876 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
10877 be detected. Fixes #59296.
10879 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
10881 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
10882 which can happen. Fixes #71361.
10884 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
10886 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
10889 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
10891 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
10892 appdomain-unload.exe to fail.
10894 * mini.c: Fix some memory leaks.
10896 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
10898 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
10899 Fixed bug and sped up some codepaths.
10901 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
10903 * mini.c: Fix some memory leaks.
10905 * exceptions.cs basic-long.cs: Add test for checked ulong->int
10908 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
10910 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
10913 * iltests.il: Add regression test for #71320.
10915 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
10917 * mini.c (mono_codegen): Fix installation of profiler hooks.
10919 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
10921 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
10923 * mini.h, mini.c, cfold.c: optimize access to enum
10924 readonly fields, too. Eval conditional branches if possible
10925 to perform unreachable code removal in more cases.
10927 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
10929 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
10931 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
10934 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
10935 WinXP DEP. Fixes #71244.
10937 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
10939 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
10941 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
10943 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
10945 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
10947 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
10950 * mini.h: Bump AOT version.
10952 * mini.h (MonoCompile): Change exvar to a hash table.
10954 * mini.c: Allocate a separate exvar for each handler block.
10956 * mini.c: Get rid of the computation of filter_lengths, its not needed.
10958 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
10959 ex var with the pending exception and only throw if the two are equal.
10962 * exceptions.cs: Add tests for rethrow and nested catch clauses.
10964 * mini-x86.c: Fix warnings.
10966 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
10967 used by all the ports now.
10969 * aot.c: Add write-symbols and save-temps options.
10971 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
10973 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
10975 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
10977 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
10980 * tramp-s390.c: Check vtable slot belongs to the domain.
10982 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
10983 as per other platforms.
10985 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
10987 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
10989 * driver.c: we don't run the Main() code in a subthread anymore.
10991 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
10993 * mini.c: added experimental rtc support in the statistical
10994 profiler: if the user has the permission, more accurate statistics
10995 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
10996 The MONO_RTC value must be restricted to what the linux rtc allows:
10997 power of two from 64 to 8192 Hz.
10999 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
11001 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11003 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11005 * mini-ppc.c: better icache flush for smp.
11007 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
11009 * mini-amd64.c (emit_move_return_value): Fix memory leak.
11011 * mini-x86.c (get_call_info): Add the get_call_info () code from the
11012 amd64 port, not yet used.
11014 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
11016 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11019 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
11021 * driver.c: Added --security option to activate the security manager.
11022 Right now this will allow code generation for declarative demands and
11023 is disabled when AOT is specified.
11024 * mini.c: Add code generation for declarative security demands.
11025 * mini.h: Add mono_use_security_manager as an extern gboolean.
11027 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
11029 * aot.c (mono_compile_assembly): Speed up compilation a bit by
11030 emitting more dense assembly code.
11032 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11033 exception throwing stuff.
11035 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
11037 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11040 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11041 left in by mistake.
11043 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
11046 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11048 * tramp-*.c: Only patch vtable slots if the object is in the current
11049 domain. Fixes appdomain-unload.exe.
11051 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11053 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11056 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
11058 * mini.c (reverse_branch_op): New helper function.
11060 * mini.c (optimize_branches): Run the new optimization only on
11061 platforms which support it. Also reverse all kinds of branches.
11063 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11065 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11068 * mini.c (optimize_branches): Reverse not-equals branches if the false
11069 bblock is a throw. This happens a lot of time with argument checking in
11072 * mini.c (mono_codegen): Add support for placing basic blocks after
11073 the function epilogue.
11075 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11078 2005-01-05 Miguel de Icaza <miguel@ximian.com>
11080 * mini.c (setup_stat_profiler): Only set this up if the platform
11081 supports ITIMER_PROF.
11083 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
11085 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11088 * inssel.brg: Fix a warning.
11090 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11092 * mini.c: added support for statistical profiler
11093 (run with: --profile=default:stat).
11095 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
11097 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11099 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11101 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
11102 related to global registers from the amd64 port.
11104 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
11106 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11108 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11109 with global registers.
11110 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11112 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11114 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
11116 * debug-mini.c (encode_value): Fix off-by-one.
11118 * aot.c (encode_value): Likewise.
11120 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11122 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
11124 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
11127 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11129 * aot.c (emit_method_info): Increase size of temp buffer.
11131 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
11134 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
11136 * aot.c (emit_method_info): Fix build.
11138 * aot.c: Further rework of the AOT file format to reduce the size of
11139 the method info data.
11141 * mini.h: Bump AOT file format version.
11143 2004-12-27 Martin Baulig <martin@ximian.com>
11145 * mini.c (mini_get_method): New static method; call
11146 mono_get_method_full() and mono_get_inflated_method().
11147 (mono_method_to_ir): Use mini_get_method() instead of
11148 mono_get_method_full().
11150 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
11152 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
11154 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
11156 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11158 * inssel-amd64.brg: Add some optimization rules.
11160 2004-12-24 Ben Maurer <bmaurer@ximian.com>
11162 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11163 standard not GC'd stuff is fine.
11165 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
11167 * aot.c: Rework the AOT file format to get rid of most of the global
11168 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11170 * mini.h: Bump AOT file format version.
11172 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
11174 * mini.h: Bump AOT file format version.
11176 * aot.c (mono_aot_is_got_entry): New function to determine if an
11177 address is inside a GOT.
11179 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11181 * cpu-pentium.md: Increase the maximum size of some instructions which
11182 might involve a got access.
11184 * mini.c (get_method_from_ip): Another debug helper function.
11186 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11187 when got var accesses are created during the decompose phase.
11189 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11191 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11192 argument mini_compile_method and to MonoCompile, and use this to
11193 determine whenever a given method is compiled for AOT. This allows the
11194 other methods compiled during AOT compilation to be free of AOT stuff,
11195 so the backends does not need to add special support for them by
11196 creating a fake GOT etc.
11198 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11201 2004-12-21 Ben Maurer <bmaurer@ximian.com>
11203 * mini.c (mono_method_to_ir): It turns out that some of the
11204 x-appdomain wrappers are lax with types, so just ignore this for
11207 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11208 at the vtable->klass. If it is non-shared code we can just use the
11211 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11213 * mini-ppc.c: access MonoDomain from tls, too.
11215 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
11217 * declsec.c: Removed unused variable (and related warning ;-)
11219 2004-12-21 Ben Maurer <bmaurer@ximian.com>
11221 * iltests.il: New test for LDELEMA on an array of ref types.
11223 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11224 all ldelema's on reftypes.
11225 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11226 it was the wrong place to put it.
11228 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11229 register to pop to make this cleaner, at the request of Paolo.
11231 2004-12-20 Ben Maurer <bmaurer@ximian.com>
11233 * mini-ops.h (OP_GETHASHCODE): New op.
11235 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11237 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11240 For a microbenchmark, this reduces the cost of Hashtable.get_Item
11243 * mini-x86.c (mono_arch_output_basic_block): Rather than
11251 The first is 3 bytes while the second is 1. This saves 36 kb on
11252 mscorlib, quite a big saving. When bootstraping mcs, I was able to
11253 see a small boost because of icache locality.
11255 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11257 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11259 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11260 started code sharing with the generic code.
11262 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11264 * mini-ppc.c, cpu-g4.md: added code for direct access to
11267 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11269 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11270 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11273 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
11275 * declsec.c|h: Added functions to cache the declarative stack modifiers
11276 in MonoJitInfo and to create a security frame from a MonoJitInfo
11278 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11279 created. Register internal calls for System.Security.SecurityFrame::
11280 _GetSecurityFrame and _GetSecurityStack.
11281 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11282 the definitions for the new stack walk/callback mechanism.
11283 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
11284 first security frame for LinkDemands and InheritanceDemands) and
11285 GetSecurityStack for Demands. Both use the new mono_walk_stack code
11287 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11288 walk initialization (lupus).
11290 2004-12-20 Ben Maurer <bmaurer@ximian.com>
11292 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11294 (handle_loaded_temps): Do not create a temporary variable for
11295 things that we know are temps. They will never be modified.
11296 (mono_spill_call): Set MONO_INST_IS_TEMP
11297 (mono_emulate_opcode): ditto
11299 (mono_method_to_ir.CEE_DUP): ditto
11301 2004-12-19 Ben Maurer <bmaurer@ximian.com>
11303 * mini.c (type_to_eval_stack_type): Make this handle the void type
11304 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11305 (emit_tree): use ip_in_bb to special case some common idioms
11306 Update all callers to pass in the IP.
11307 (mono_method_to_ir): Make CEE_CALL* do the above as well.
11309 This gives us a nice 2% speedup in mcs bootstrap.
11311 * mini-x86.c (peephole_pass): Peephole pass to make
11320 * mini.c (ip_in_bb): new method.
11321 (mono_method_to_ir): use this method rather than doing the hash
11324 * linear-scan.c (mono_linear_scan): When expiring actives, you
11325 don't need to keep around variables that expire on this
11326 instruction. This makes it so that:
11329 store (ebx add (ebx, 1))
11333 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
11335 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
11336 combination to avoid doing two copies. Fix up problems with previous
11339 * mini.c: Fix 64 bit warnings.
11341 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11343 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
11345 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11346 changes from the x86 code.
11348 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11350 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
11352 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11353 throwing code to reduce its size, unify the AOT and non-aot code and
11354 get rid of relocations in the AOT case.
11356 * mini-x86.h mini.c exceptions-x86.c
11357 (mono_arch_get_throw_corlib_exception): New arch specific function to
11358 raise corlib exceptions which doesn't require relocations in the
11361 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11363 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
11365 * mini.c (mono_emit_method_call): Only allocate the got var when it is
11368 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11371 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
11373 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11374 with add function when used from Inc/dec atomic
11375 functions. Re-enabled optimization on x86.
11376 * mini-ops.h: renamed atomic_add functions to
11377 allow _add to match the Interlocked::Add and
11378 _add_next to match Interlocked::Inc/Dec.
11380 2004-12-15 Massimiliano Mantione <massi@ximian.com>
11382 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11383 linking of BBs to the end BB, and enabled SSAPRE also with
11384 consprop and copyprop (which was prevented by that bug).
11386 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
11388 * mini-x86.c: disabling the Interlocked optimizing code.
11390 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
11392 * aot.c (load_aot_module): Move reading of got_addr after the AOT
11393 file version check.
11395 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
11397 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
11398 interlocked optimization due lack of support on x86, rewrote
11399 exchange to take into account that base may be in eax.
11401 xsp works again; activated Interlocked optimizing code.
11403 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
11405 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11407 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
11409 * mini-ops.h: Add new opcodes.
11411 * mini.h: Add new patch types. Add got_var to MonoCompile.
11413 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
11414 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11415 make it work with all kinds of patchable code.
11417 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11418 address of the GOT, and referencing entries in the GOT.
11420 * mini.c: Add code to load the GOT address if needed by an opcode.
11422 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
11423 independent AOT code on the x86 using an elf-style Global Offset Table.
11425 2004-12-14 Raja R Harinath <rharinath@novell.com>
11427 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11429 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11431 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11434 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
11436 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11437 of Interlocked:Increment/Decrement/Add as inline ops.
11438 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11440 2004-12-12 Geoff Norton <gnorton@customerdna.com>
11442 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11443 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11445 2004-12-12 Duncan Mak <duncan@ximian.com>
11447 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11448 again. `patch_info->table_size' is no longer valid after Zoltan's
11451 2004-12-12 Martin Baulig <martin@ximian.com>
11453 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11454 if we are the "real" method, ie. not an inlined method inside it.
11456 2004-12-11 Ben Maurer <bmaurer@ximian.com>
11458 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11459 before we look in the special fields table. This fixes
11460 ../tests/thread-static-init.cs.
11462 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11464 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11465 for Array get_Rank and get_Length. Fixes bug #70465.
11467 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
11469 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11470 separate structure to reduce the size of MonoJumpInfo.
11472 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11474 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11476 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
11478 * mini.c (mini_get_inst_for_method): Changed to allow ports
11479 to return a MonoInst instead of opcode
11480 (renamed mini_get_opcode_for_method to better reflect the new functionality)
11482 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
11483 Allow ports to return a created MonoInst instead of op-code, will enable
11485 (renamed mini_get_opcode_for_method to better reflected the functionality)
11487 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
11489 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11491 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
11493 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11496 2004-12-08 Martin Baulig <martin@ximian.com>
11498 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11499 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
11501 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
11503 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11506 * exceptions.cs: Disable some tests which depend on properties of x86 fp
11509 2004-12-08 Raja R Harinath <rharinath@novell.com>
11511 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11513 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
11515 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11516 bug introduced by the previous patch.
11518 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11520 * mini-ppc.c, objectc.cs: handle large structs passed by value
11521 (fixes bug #69972).
11523 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11525 * mini-ppc.c: OP_ARGLIST implementation from
11526 Geoff Norton <gnorton@customerdna.com>.
11528 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11530 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11531 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11533 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11535 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11537 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11539 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11542 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
11544 * mini-sparc.c: Zero out localled-ed memory.
11546 * iltests.il: Add tests for zeroing out localloc-ed memory.
11548 2004-12-04 Martin Baulig <martin@ximian.com>
11550 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11551 mono_method_get_signature_full().
11553 2004-12-03 Massimiliano Mantione <massi@ximian.com>
11555 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11556 and some utility functions (always for SSAPRE), integrated SSAPRE.
11557 * mini.h: Likewise.
11558 * driver.c: Added ssapre option.
11559 * ssa.c: Small fix on OP_ARG handling.
11560 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11561 * Makefile.am: Likewise.
11563 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
11565 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11566 now in the xp code.
11568 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11571 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11573 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11575 * cpu-s390.md : Increase instruction length of oparglist.
11577 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11579 2004-11-30 Martin Baulig <martin@ximian.com>
11581 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11582 virtual generic methods. We call a special helper_compile_generic_method()
11583 icall to retrieve the method from the vtable, inflate and compile
11584 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
11586 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11588 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
11590 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11592 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
11594 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11597 2004-11-27 Ben Maurer <bmaurer@ximian.com>
11599 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11600 platforms with PIC aot.
11602 2004-11-28 Martin Baulig <martin@ximian.com>
11604 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11607 2004-11-28 Martin Baulig <martin@ximian.com>
11609 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11610 the result of mono_type_get_underlying_type() to check whether
11613 2004-11-26 Martin Baulig <martin@ximian.com>
11616 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11619 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
11621 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11622 the same way as the other arguments so they won't get clobbered.
11624 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
11625 calls through R11 since it is clobbered by the trampoline code.
11627 2004-11-26 Raja R Harinath <rharinath@novell.com>
11629 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11630 pick up in-tree mscorlib.dll.
11632 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
11634 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11636 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
11637 runtime data/code are now stored in a table similar to the GOT in ELF.
11638 This allows the code itself to be position independent.
11640 * aot.c: Fix loading of referenced assemblies after the lazy assembly
11643 * aot.c: Attach ELF type (object/function) directives to all global
11646 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11648 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11650 * mini-amd64.h: Turn on PIC AOT code.
11652 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11653 returning the offset within an OP_AOTCONST instruction where the GOT
11654 offset needs to be added.
11656 * mini.h: Bump AOT file format version.
11658 2004-11-25 Martin Baulig <martin@ximian.com>
11660 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11661 uninflated generic methods.
11663 2004-11-25 Martin Baulig <martin@ximian.com>
11665 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
11667 2004-11-24 Martin Baulig <martin@ximian.com>
11669 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
11670 original klass (this only applies for generic instances).
11672 2004-11-24 Martin Baulig <martin@ximian.com>
11674 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
11675 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
11678 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
11680 * mini.c (mono_method_to_ir): Disable inlining for methods containing
11681 localloc. Fixes #69678.
11683 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
11685 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
11687 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
11688 used SSE registers on pinvoke calls. Fixes #69774.
11690 2004-11-23 Geoff Norton <gnorton@customerdna.com>
11692 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
11693 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
11695 2004-11-23 Raja R Harinath <rharinath@novell.com>
11697 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
11698 Refer directly to the mcs/ tree.
11700 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11702 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
11703 Check if a trampoline for a synchronized method is required.
11705 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
11707 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
11708 with localloc if needed. Throe arithmetric exception in
11709 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
11710 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
11712 2004-11-19 Geoff Norton <gnorton@customerdna.com>
11714 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
11715 types before switching on type. Fixes #69622.
11717 2004-11-19 Raja R Harinath <rharinath@novell.com>
11719 * Makefile.am (check-local): New. Integrate into 'make check'.
11720 (MCS,RUNTIME): Define using in-tree mono and mcs.
11722 (%.exe): Use $(ILASM).
11724 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
11726 * mini-ppc.c: adjust initial prolog size (bug #69691).
11728 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
11730 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
11733 2004-11-17 Raja R Harinath <rharinath@novell.com>
11735 * Makefile.am (clean-local): Rename from 'clean'.
11737 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11739 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
11740 to mono_arch_is_int_overflow.
11741 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
11744 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
11746 * declsec.c|h: New files to support declarative security attributes.
11747 Added function to check if a method has (applicable) security.
11748 * mini.c|h: Add check for declarative security attributes in
11749 mono_method_check_inlining.
11750 * Makefile.am: Added declsec.c and declsec.h to the build.
11752 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
11754 * mini.c, mini.h: update to keep dynamic code info per-domain.
11756 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
11758 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
11759 (mini_init): Get rid of it from here too.
11761 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
11763 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
11764 implemented OP_RETHROW (patch by Geoff Norton
11765 <gnorton@customerdna.com>).
11767 2004-11-10 Geoff Norton <gnorton@customerdna.com>
11769 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
11770 between appdomains. Fixes appdomain-unload on PPC.
11772 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
11774 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11775 mini-exceptions.c: handle the new wrapper types.
11776 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
11777 token value as a MonoClass* when compiling a wrapper.
11778 mono_jit_create_remoting_trampoline now takes an additional
11779 MonoRemotingTarget parameter.
11781 2004-11-10 Martin Baulig <martin@localhost>
11783 * mini.c (mono_method_to_ir): Use `generic_container->context'
11784 rather than creating a new one.
11786 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11788 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
11790 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
11792 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
11794 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
11795 the experimental aot cache stuff.
11797 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
11799 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11800 mini-exceptions.c: update to exception clause structure changes.
11802 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
11804 * exceptions-x86.c (throw_exception): Fix warnings.
11806 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
11809 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
11811 * exceptions-sparc.c (get_throw_exception): Really fix this.
11813 2004-11-07 Ben Maurer <bmaurer@ximian.com>
11815 * tramp-*.c: we no longer support icalls without wrappers, so
11816 a bit of code can be removed here
11818 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
11820 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
11823 * cpu-sparc.md: Add op_rethrow.
11825 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
11827 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
11829 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
11830 * mini-ops.h: Add OP_RETHROW.
11832 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
11834 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
11836 2004-11-05 Geoff Norton <gnorton@customerdna.com>
11838 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
11839 Makes the output much easier to read
11841 2004-11-05 Ben Maurer <bmaurer@ximian.com>
11843 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
11844 prevents another huge leak when compiling with ssa. Secondly, the
11845 performance of doing this rather than freeing the lists is much
11846 better. GList does a lock every time you allocate a list link,
11847 so that it can use a memory pool. So, it is better to just use
11848 a memory pool of our own.
11850 * ssa.c, linear-scan.c: replace g_list_remove_link with
11851 g_list_delete. The remove one does not free the GList, so we were
11852 leaking memory. On -O=all --compile-all with corlib, this cut down
11853 3 MB of allocations.
11855 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
11857 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
11859 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
11861 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
11862 into a new function mono_create_jit_trampoline ().
11864 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
11866 * trace.c (get_spec): Allow tracing of classes without a namespace.
11868 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
11870 * mini.c: Fix pointer overwrite in mini_method_compile.
11872 2004-11-2 Geoff Norton <gnorton@customerdna.com>
11874 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
11875 The darwin ABI needs some special handling for 1 and 2 byte structs
11876 Lets use lbz/lhz instead of lwz everywhere.
11877 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
11878 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
11879 Use stb/sth for the former, and put the latter always on stack instead of in
11880 argument registers.
11882 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
11884 * trace.c (is_filenamechar): Add '_'.
11886 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11888 * mini-s390.c: Fix prolog length to allow for large trace requirements.
11890 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
11892 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
11894 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
11895 depends on libmonogc. Fixes #68805.
11897 2004-10-26 Miguel de Icaza <miguel@ximian.com>
11899 * mini.c (mono_jit_free_method): Provide extra information for
11900 this error. Currently this leaks, but will be turned into a
11901 developer option in the future.
11903 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
11905 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
11907 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
11909 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
11910 boundary. Fixes reading of PATCH_INFO_R4 and R8.
11911 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
11913 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
11915 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
11916 trampolines for AOT code.
11918 2004-10-22 <vargaz@freemail.hu>
11920 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
11921 constructed types. Fixes #68136.
11923 2004-10-21 Martin Baulig <martin@ximian.com>
11925 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
11926 if it returns true, unwind the stack to the call instruction.
11928 2004-10-21 <vargaz@freemail.hu>
11930 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
11932 * mini.h: Bump AOT version number.
11934 * objects.cs: Add another test for unbox trampolines.
11936 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
11939 2004-10-20 <vargaz@freemail.hu>
11941 * driver.c: Add SHARED to the set of optimizations tested.
11943 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
11945 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
11946 used by CEE_NEWARR.
11948 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
11950 2004-10-20 Martin Baulig <martin@ximian.com>
11952 * mini-exceptions.c (mono_handle_exception): Call
11953 mono_debugger_handle_exception() to tell the debugger about
11954 catch/finally clauses.
11956 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
11958 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
11960 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
11963 2004-10-15 Geoff Norton <gnorton@customerdna.com>
11965 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
11966 methods as their native size, fixed bug #57543, #57545.
11967 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
11968 This saves a temporary register and mullw call down into 1 (minor perf
11969 increase for cases like sum = sum * 5; This use to translate into:
11972 It now translates to
11975 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
11977 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
11980 2004-10-11 Martin Baulig <martin@ximian.com>
11982 * mini.c (mono_method_to_ir): If we're a generic method, get the
11983 MonoGenericContainer from our MonoMethodNormal and create a
11984 MonoGenericContext from it.
11986 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
11988 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
11990 * basic-long.cs: Add test for checked i8->i2 cast.
11992 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11994 * inssel-ppc.brg: added a couple of speedup rules.
11996 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
11998 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
11999 to speed up rebuilds.
12001 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12003 * mini-s390.c: Minor fix to OP_OR_IMM.
12005 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
12007 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12008 better. Fixes appdomain-unload.exe on sparc.
12010 2004-10-02 Massimiliano Mantione <massi@ximian.com>
12012 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12013 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12016 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
12018 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12020 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
12022 * mini.c: Always generate a field read/write wrapper for members
12023 of the class MarshalByRefObject since the actual instance could
12026 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
12028 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12030 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
12032 * driver.c mini.h trace.c: Move the setting of the main assembly into
12033 a separate function called mono_trace_set_assembly () and call it after
12034 actually loading the main assembly. Fixes #66872.
12036 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
12038 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12039 using the code manager.
12041 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
12043 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12045 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
12047 * cpu-amd64.md: Fix bug in previous patch.
12049 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12052 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12054 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12055 mini-exceptions.c: updates for changed stack walk interface.
12057 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12059 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12061 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
12063 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12065 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
12067 * driver.c (mini_regression_list): Do not call mono_assembly_close
12068 since assemblies can't be unloaded.
12070 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
12072 * cpu-amd64.md: Fix more instruction lengths.
12074 * cpu-amd64.md: Fix lengths of some instructions.
12076 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
12078 * inssel.brg: Make the array ldelema check aot friendly.
12080 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
12082 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12084 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12086 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
12088 * mini-x86.c: Fix build.
12090 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
12091 mono_type_get_underlying_type () helper function to simplify code.
12093 2004-09-09 Martin Baulig <martin@ximian.com>
12095 * mini-amd64.c: Don't access `type->data.klass' directly, call
12096 mono_class_from_mono_type() instead since the type may be a
12099 2004-09-09 Martin Baulig <martin@ximian.com>
12101 * mini-amd64.c (get_call_info): Fix support for generic instances.
12102 (add_valuetype): Use mono_class_from_mono_type() to get the class
12103 since we can be a generic instance.
12105 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12107 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12109 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
12111 * liveness.c: reset spill costs on each scan: bug 62107
12113 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
12115 * exceptions-sparc.c (mono_arch_find_jit_info): remove
12116 unnecessary line that doesn't compile
12118 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12120 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12121 trampolines, make them call an error function so people can fix their
12124 2004-09-06 Martin Baulig <martin@ximian.com>
12126 * mini.c (mono_method_to_ir): When initializing locals, handle a
12127 generic instances like a valuetype if it's a valuetype and like a
12128 class if it's a class.
12130 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12132 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12133 stack. Fixes #64674.
12135 * exceptions.cs: Add test for unwinding of call arguments.
12137 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12139 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12140 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12141 set the carry/borrow flag). The sparc and s390 implementations
12142 can now use optimized versions (and simplify the code). ppc bugfixes.
12144 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12146 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12148 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
12150 * inssel-amd64.brg: Remove leftover 32 bit rule.
12152 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12154 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
12156 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12157 mono_arch_find_jit_info functions into a new function. Fix a memory
12160 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12163 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
12165 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12168 * exceptions.cs: Add array size tests.
12170 * mini.c: Allocate a separate icall wrapper for each arity of
12171 mono_array_new_va. Fixes #59509.
12173 * exceptions.cs: Add testcase for 64578.
12175 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12177 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12179 2004-09-02 Martin Baulig <martin@ximian.com>
12181 * mini.c (mono_method_to_ir): When initializing the locals, call
12182 handle_initobj() on the generic instance itself, not its
12185 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
12187 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
12188 MonoJitInfo for dynamic methods.
12190 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12192 * mini.c: Add support for freeing JIT data for dynamic methods.
12194 2004-09-01 Martin Baulig <martin@ximian.com>
12196 * mini-x86.c (is_regsize_var): Added support for generic
12198 (mono_arch_emit_prolog): Make this compile again, use
12199 `x86_push_imm_template (code)'.
12201 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
12203 * mini-x86.c: make all push_imm instructions that get
12204 patched always emit the long form
12206 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
12208 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
12209 in a per-domain hash.
12211 * mini-amd64.c (merge_argument_class_from_type): Handle generic
12214 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
12216 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12219 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12222 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12223 Beginnings of SSE2 support.
12225 * exceptions.cs: Add more tests for checked int<->uint casts.
12227 2004-08-28 Martin Baulig <martin@ximian.com>
12229 * mini-x86.c (mono_arch_instrument_epilog): Added support for
12233 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12234 Handle generic instances recursively.
12236 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
12238 * iltests.il: test for conv.u8 on a constant
12240 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
12242 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12243 LCONV_x4 (shrun_32 (membase)).
12245 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
12247 * inssel-x86.brg: c&p rules for push/setret of long
12249 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
12251 * inssel-x86.brg: c&p rules for compare (base, regvar) and
12252 compare (regvar, base)
12254 * inssel-x86.brg: more burg love
12256 * inssel.brg: more cleanup
12258 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12260 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
12262 * basic-long.cs, basic-calls.cs: new tests for optimization.
12264 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
12266 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12269 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
12271 * mini-amd64.c (read_tls_offset_from_method): Add another case.
12273 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
12275 * inssel.brg (mini_emit_memcpy): use
12276 NO_UNALIGNED_ACCESS to disable memcpy optimization
12278 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
12280 * mini-amd64.c: Handle generic types in various places.
12282 * mini.c (mono_method_to_ir): Handle generic types in init locals.
12284 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
12286 * mini.c (handle_box): Fix warning.
12288 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12290 * mini-amd64.h: Enable the emit_state optimization.
12292 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12294 * mini-amd64.c: Add some new 64 bit peephole opts.
12296 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12298 * cpu-amd64.md: sreg1 of div instructions must be %rax.
12300 * mini-amd64.c: Register allocator fixes.
12302 * mini.c: Add an optimization to emit_state to avoid allocation of new
12303 registers on some platforms.
12305 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
12307 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12309 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12310 allocation. Fixes #63085.
12312 * basic-long.cs: Add new regression test.
12314 * mini-amd64.c: Register allocator improvements.
12316 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
12318 * mini-amd64.c (read_tls_offset_from_method): Add another code
12321 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12322 instruction sequence for nullifying class init trampolines.
12324 * objects.cs: Add new regalloc test.
12326 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12328 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
12330 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12332 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12335 * driver.c: Fix profiling after TLS changes.
12337 * driver.c (mono_main): Set mono_stats.enabled if needed.
12339 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12342 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
12344 * mini-x86.c: use a 1 op rather than a 2 op tls access
12345 instruction -> faster.
12347 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
12349 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12352 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12354 * exceptions-sparc.c (throw_exception): fix typo
12356 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
12358 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12359 set tree->dreg correctly with tls. Allow any
12360 register to be used.
12362 * mini-x86.c (read_tls_offset_from_method): add new code
12363 generation pattern seen with GCC.
12366 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12368 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12369 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12370 exceptions-sparc.c: fix some performance issues in exception
12371 handling and setting of the stack trace for exceptions that were
12374 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
12376 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12379 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
12382 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
12384 This patch inlines tls access, when possible.
12386 * mini.h: new arch functions for TLS intrinsics.
12387 All platforms updated with a stub.
12389 * mini.c: use the new intrinsics
12391 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12392 arch specific intrinsic for tls variables
12394 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
12396 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12399 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
12401 * mini.c: thread local allocation
12403 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
12405 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12407 * Makefile.am: Link against the static version of libmonogc.
12409 * Makefile.am: Link the static versions of the convenience libraries
12410 into the mono executable.
12412 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12414 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
12416 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12417 on integer overflow.
12419 * mini-amd64.c: Reorganize function call code.
12421 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12423 2004-08-14 Ben Maurer <bmaurer@ximian.com>
12425 * inssel-x86.brg: use xor eax,eax.
12427 * basic.cs: new tests
12429 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
12431 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12432 in exception throwing code.
12434 2004-08-14 Ben Maurer <bmaurer@ximian.com>
12436 * inssel-x86.brg: use xor esi,esi.
12438 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
12440 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12441 can trace methods compiled during mini_init () too.
12443 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
12446 2004-08-14 Ben Maurer <bmaurer@ximian.com>
12448 * Makefile.am: static link on x86 (r=zoltan)
12450 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
12452 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12453 code since it causes some programs to fail.
12455 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
12457 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12459 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
12461 * mini.c: ovfops_op_map - add STACK_OBJ case for
12463 * basic.cs: add test_0_pin_string as test
12466 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
12468 * Makefile.am: build C# if srcdir != builddir
12470 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12472 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12473 fall-through blocks.
12475 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12477 * driver.c: enable loop by default again and include abcrem in -O=all.
12479 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
12481 * iltests.il: Add some localloc tests.
12483 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12485 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
12488 * inssel-amd64.brg: Add some optimizations.
12490 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12493 * Makefile.am: Statically link mono against libmono on AMD64.
12495 * mini-amd64.c inssel-amd64.brg: Optimizations.
12497 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
12499 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12501 * tramp-amd64.c: Patch calling code in trampolines.
12503 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
12505 * mini-amd64.c: pinvoke struct passing fixes.
12507 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
12509 * mini-sparc.c: redo change, make mono_arch_cpu_init call
12510 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12512 2004-08-05 Duncan Mak <duncan@ximian.com>
12514 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12517 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
12519 * mini-amd64.c (emit_move_return_value): Move return value for normal
12522 2004-08-05 Martin Baulig <martin@ximian.com>
12524 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12525 `type->type'; just modify `type' itself when dealing with enums
12526 and generic instances.
12527 (check_call_signature): Make `simple_type' a `MonoType *'.
12529 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
12531 * mini.c: Use OP_PADD to add offsets to addresses.
12533 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12535 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
12537 * mini-sparc.c (mono_arch_emit_epilog): fix check
12538 for folding last op into restore instruction
12540 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
12542 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12543 helper methods using the code manager.
12545 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12547 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12549 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12551 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12552 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12554 * mini-s390.c: fix tail processing
12556 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12558 * mini-ppc.c: mul.ovf.un exception name fix.
12560 2004-08-03 Martin Baulig <martin@ximian.com>
12562 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12563 instances; before jumping to `handle_enum', also modify `ptype'.
12565 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
12567 * cpu-sparc.md: fcall maximal length too small.
12569 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
12571 * mini-amd64.c mini.h: Add initial support for passing/returning
12572 structures to/from pinvoked methods.
12574 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12576 * mini-ppc.c: reg allocator fix.
12578 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
12580 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12582 * inssel.brg: Optimize memset on 64 bit machines.
12584 * mini-amd64.c: Fix some vararg cases.
12586 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12588 * mini-s390.c: Corrected macro in emit_float_to_int
12590 * s390-abi.cs: Tests to exercise the s390 ABI
12592 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
12594 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12597 * basic.cs: Add a test for add.ovf.un.
12599 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
12601 * mini-sparc.c: add case for OP_IDIV_UN
12603 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
12605 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12607 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12609 2004-07-30 Ben Maurer <bmaurer@ximian.com>
12611 * basic.cs: regression tests.
12613 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12616 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
12618 * basic.cs: Add a new test.
12620 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
12621 and AOT. Various fixes and optimizations.
12623 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12625 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12627 * mini-ppc.c: make sure temp regs are not used for global reg
12630 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
12632 * cpu-sparc.md: conv_i8 fix for 64bits
12634 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12636 2004-07-29 Ben Maurer <bmaurer@ximian.com>
12638 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12639 add opcode for cmp BYTE PTR [eax], imm.
12641 * inssel.brg: Make memcpy and memset takes bases.
12643 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
12645 * *-amd64.*: More AMD64 work.
12647 2004-07-28 Ben Maurer <bmaurer@ximian.com>
12649 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12650 add a compare-not-equal opcode.
12652 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
12654 * mini.c: Use mono_init_from_assembly instead of mono_init.
12656 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
12658 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12660 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
12662 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
12664 * inssel.brg: 64 bit fixes.
12666 * mini.h (MonoCallInst): Add some AMD64 specific data.
12668 * mini.h: Add some OP_P opcodes.
12670 2004-07-28 Ben Maurer <bmaurer@ximian.com>
12672 * basic.cs: tests for 61797 and 61740
12674 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
12676 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
12677 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
12679 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
12681 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
12683 * *-amd64*.*: Ongoing AMD64 work.
12685 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
12687 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
12689 * *-amd64*: Ongoing AMD64 work.
12691 * mini-arch.h: Add AMD64 support.
12693 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
12695 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
12697 * mini-ops.h: Add new opcodes.
12699 * Makefile.am: Add AMD64 support.
12701 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
12702 rules into the inssel-long*.brg files.
12704 * *-amd64.*: Add beginnings of AMD64 backend.
12706 2004-07-22 Ben Maurer <bmaurer@ximian.com>
12708 * mini.c (print_dfn): commenting out the code that prints
12709 the cil. With -O=deadce, this makes -v -v crash.
12711 * cpu-pentium.md: make checkthis have a length of 2
12713 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
12715 * mini-sparc.h: fix implementations of __builtin
12716 functions for Sun compiler for V9.
12718 2004-07-16 Ben Maurer <bmaurer@ximain.com>
12720 * mini.c: use the new stelem.ref wrapper
12721 * exceptions.cs, arrays.cs: new stelem.ref tests
12723 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12725 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
12726 new XSP should work with these changes).
12728 2004-07-14 Ben Maurer <bmaurer@ximain.com>
12730 * inssel-{long32,x86,}.brg: trivial optimizations.
12732 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
12734 * mini.c: load value when emitting box operation in
12737 2004-07-12 Ben Maurer <bmaurer@ximian.com>
12739 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
12740 is one byte shorter than cmp DWORD PTR [eax], 0.
12742 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12744 * inssel-ppc.brg: arguments on the stack are always
12745 relative to the stack pointer (spotted by Neale Ferguson).
12747 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12749 * exceptions-x86.c: delay appending the method name to the trace until
12750 after mono_jit_info_table_find is called, as this gets the real
12753 2004-07-09 Ben Maurer <bmaurer@ximian.com>
12755 * aot.c: register roots
12757 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
12759 * aot.c : I could just use PLATFORM_WIN32 flag.
12761 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
12763 * aot.c : Reverting the previous fix. This time it broke linux build.
12765 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
12767 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
12769 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
12771 * mini.c (handle_stack_args): Remove some more debugging code.
12773 * mini.c (handle_stack_args): Remove debug output left in by mistake.
12775 * driver.c mini.h aot.c: Allow additional options to be specified with
12776 --aot and pass them to mono_compile_assembly.
12778 * aot.c: Add experimental code to AOT compile all loaded assemblies
12779 on demand and save the code into a cache in the filesystem.
12781 * aot.c: Add support for more wrapper methods.
12783 * mini.c (handle_stack_args): Handle some corner cases. Fixes
12786 * cpu-*.md: Remove removed opcodes.
12788 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
12789 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
12790 related icalls to marshal.c.
12792 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
12794 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
12796 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
12798 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
12800 2004-07-06 Ben Maurer <bmaurer@ximian.com>
12801 * liveness.c: If liveness is recomputated we need to reset the information
12802 for each variable. This way, if the liveness range has been narrowed
12803 by optimizations that happened after the last computation, we can return
12806 For example, if you have
12811 // Tons of code that does not affect i
12817 i = 0 is dead code and will be removed by SSA. However, when
12818 linear scan gets to the code, i will still appear to be live
12819 throughout the entire block. This prevents good register allocation.
12821 2004-07-06 Martin Baulig <martin@ximian.com>
12823 * debug-mini.c (mono_debug_init_method): Allow
12824 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
12825 (mono_debug_add_icall_wrapper): New method.
12827 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
12829 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
12831 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
12834 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
12836 * aot.c (mono_aot_load_method): Fix loading of debug info.
12838 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
12840 * aot.c: Add logging support.
12842 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
12844 * mini.h: Add prototype for mono_print_method_from_ip.
12846 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
12848 * inssel.brg: 64 bit fixes.
12850 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
12853 * Makefile.am: Add SPARC64 support.
12855 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
12857 * aot.c: Fix alignment problems on 32 bit platforms.
12859 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
12861 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
12864 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
12867 * mini.h: Bump AOT file version. Some 64 bit fixes.
12869 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
12871 * inssel-sparc.brg: Add new rule to avoid register moves.
12873 * inssel.brg: Add ldind_to_load_membase helper function.
12875 2004-06-30 Ben Maurer <bmaurer@ximian.com>
12877 * mini.c: OffsetToStringData intrinsic.
12879 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
12881 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
12883 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
12886 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
12887 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12889 * mini.c: reinstated mono_compile_get_interface_var()
12890 on x86, too, since the change breaks the Gtk# build there as well.
12892 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12894 * driver.c: remove loop from the default optimizations: it seems to
12895 interact badly with some of the other options (see bug #60613).
12897 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
12899 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
12900 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
12902 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
12904 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
12905 vararg-using methods.
12907 2004-06-21 Martin Baulig <martin@ximian.com>
12909 * mini/mini-exceptions.c
12910 (mono_handle_exception): Added `gpointer original_ip' argument.
12911 After calling mono_unhandled_exception(), call
12912 mono_debugger_unhandled_exception() and if that returns true,
12913 restore the context and return.
12915 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
12917 * mini-ppc.c: prefer the use of relative branches so
12918 they won't need to be patched in aot code (patch from Patrick Beard).
12920 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
12922 * aot.c: patch from Patrick Beard to make the output assembly
12923 more correct for the MacOSX assembler. Small tweak to
12924 generate sane images on Linux/PPC, too.
12926 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12928 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
12929 case until bug #59509 is fixed (shows up in #60332).
12931 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12933 * mini.c: make sure the needed wrappers are compiled, too, with
12936 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
12938 * driver.c: remove NPTL reference in --version output.
12940 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12942 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
12943 generate valid assembly for the Mach-O assembler.
12945 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12947 * driver.c: don't include abcrem in the all optimization specifier
12948 since it slows down jit compilation too much for now.
12950 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
12952 * mini.c: use BIGMUL only if both operands have the same signage.
12953 * iltests.il: Test for bug 60056. (errors related to signage in
12958 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
12960 * mini.c, aot.c: memory leak fixes.
12962 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12964 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
12966 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
12968 * Makefile.am: remove the -static hack completely, it links in
12969 statically glib as well.
12971 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
12973 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
12974 * exceptions.cs: make it compile with new mcs/csc.
12976 2004-06-03 Massimiliano Mantione <massi@ximian.com>
12977 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
12978 and added relevant test case.
12980 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
12982 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
12983 regressions in gtk-sharp.
12985 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
12987 * exceptions.cs: New regression tests.
12989 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
12991 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
12993 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
12995 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
12997 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
12999 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13001 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
13003 * mini.c (mono_jit_runtime_invoke): Init class in this
13004 method instead of trusting mono_jit_compile_method to
13005 do the work (because wrappers can be in object class)
13007 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
13009 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13011 * basic-long.cs: New regression test.
13013 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13015 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13016 and div/rem checks.
13018 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13020 * Makefile.am: fix miguel's change to build mono statically against
13021 libmono (track build dependencies).
13023 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
13025 * cfold.c: Some glib versions do not have G_MININT32.
13027 2004-05-26 Massimiliano Mantione <massi@ximian.com>
13029 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13030 with precision of tan, atan, sin and cos, and implemented related
13031 regressions tests (fixes bug 54467, but one new problem appeared and
13034 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
13036 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13038 * exceptions.cs: Add test for constant folding && division by zero.
13040 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13041 since driver.c is in libmono too, so the optimization was useless.
13043 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
13044 variable to driver.c so the compiler can emit more efficient code to
13047 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13049 * Makefile.am: don't distribute generated inssel.[ch] files.
13051 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
13053 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13054 into the default appdomain. Fixes #58707.
13056 * jit-icalls.c: Remove the broken approximation for truncl, doing
13057 no conversion is better.
13059 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13062 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13064 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13065 of the mcrxr instruction which is not available on some processors
13066 even if it's documented to be. Implement add and sub overflow correctly
13067 (still not complete for long unsigned). Speed up icalls a bit.
13069 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13071 * mini.c (mono_jit_compile_method_with_opt): Make sure that
13072 we run .cctor in the current domain instead of target_domain.
13074 Fixes bug #58558, .cctor not being called in -O=shared.
13076 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13078 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13080 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
13082 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13083 which can be done with an imm8, do it that way.
13084 (mono_arch_output_basic_block): ditto for a jmp
13085 (mono_arch_emit_prolog): Computate maximum offset of a label.
13087 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13089 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13090 now tries to allocate prefered physical reg's for virtual
13091 regs. This reduces the number of emited spills/loads with
13092 20-30% on our core assemblies.
13094 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13096 * jit-icalls.c: truncl() is not needed and trunc() is
13097 the correct thing to do anyway (bug #58287).
13099 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
13101 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13104 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13106 * driver.c: enable loop optimizations by default.
13108 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13110 * mini-x86.c: fix calc of max loop size when aligning loops start.
13112 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
13114 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13117 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
13119 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13122 * basic-long.cs: Add tests for add/subtract of immediates with carry.
13124 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13126 * mini.c (inline_method): Allways inline some wrappers even if the cost
13127 is too large. Fixes #58785.
13129 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13131 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
13133 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13134 (crichton@gimp.org). Beginning of support for sparc/linux.
13136 * mini-sparc.c: Optimize retrieval of LMF address.
13138 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13140 * exceptions-ppc.c: handle alloca in methods with clauses.
13142 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13144 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13146 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
13148 * mini.c: Delegate most of the abort signal work to
13149 mono_thread_request_interruption, which also handles Stop and Suspend
13152 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
13154 * mini.c mini.h: Allow inlining of icall wrappers if the backend
13155 supports the save/restore lmf opcodes.
13157 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
13159 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13160 by gcc-3.4 as well.
13162 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13164 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
13166 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
13167 methods which contain array accesses.
13169 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13170 boundaries. Fixes #58537.
13172 * iltests.il: Add regression test for #58537.
13174 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
13176 * mini-x86.c (mono_arch_local_regalloc): Last part of
13177 fix for bug #58633 (releasing register to early).
13179 2004-05-18 Miguel de Icaza <miguel@ximian.com>
13181 * basic-long.cs: Add new regression test.
13183 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
13185 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13186 register too early on the chain.
13188 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
13190 * mini.c (create_helper_signature): Use a helper function to reduce
13191 the code which needs to be written. Also set the calling convention of
13192 icalls on windows. Fixes #57840.
13194 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13196 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13197 exceptions-ppc.c: added helper function to get the instruction address
13198 from a signal handler context.
13200 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
13202 * helpers.c: use g_get_tmp_dir. Invokes happyness
13205 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
13207 * helpers.c: Add new env variable to pass args to objdump.
13208 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13210 2004-05-17 Radek Doulik <rodo@ximian.com>
13212 * Makefile.am (common_sources): added abcremoval.h so it get
13213 disted and daily mono packages on go-mono.com will build again
13215 2004-05-17 Massimiliano Mantione <massi@ximian.com>
13217 * abcremoval.c: Fixed coding style, added copyright header.
13219 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13221 * mini.h: Added prototype for abc removal main function.
13223 * build_relations_propagation_table.pl: Added copyright header.
13225 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
13227 * basic-long.cs: reg test for complex ceq_long bug.
13229 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
13231 * mini-x86.c (mono_arch_local_regalloc): Correctly free
13232 reg in long and clob case (bug #58343). Fixed/added comments.
13234 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
13236 * mini.c (mono_jit_runtime_invoke): Follow new convention
13237 of calling the invoke method with an function pointer.
13239 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
13241 * ChangeLog: Fix author of memory leak patch.
13243 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13245 * Makefile.am: fix make dist as well...
13248 2004-05-14 Massimiliano Mantione <massi@ximian.com>
13250 * cfold.c: Made so that conversions from pointer to int4 are no-ops
13251 on archs where pointers are 4 bytes long.
13253 * Makefile.am: Added abcremoval.c source file.
13255 * abcremoval.c: Added abcremoval.c.
13257 * abcremoval.h: Added abcremoval.h.
13259 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13261 * inssel.brg: Enabled bounds check removal.
13263 * mini.c: Added support for abcrem optimization.
13265 * mini.h: Added abcrem optimization label.
13267 * driver.c: Added support for abcrem optimization.
13269 * propagated_relations_table.def: Added propagated_relations_table.def.
13271 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13273 * mini.c, cfold.c: fix style.
13275 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13277 * mini.c: handle issue with the low-level implementation of
13278 some long opcodes (bug #54209).
13280 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
13282 * basic.cs: test for my new cmov stuff.
13284 2004-05-13 Patrik Torstensson
13286 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13287 opt and added peephole documentation.
13289 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13291 * tramp-ppc.c: rewrote the generic trampoline code.
13293 2004-05-11 Patrik Torstensson
13295 * mini-x86.c: optimize long shl/shr asm code (one less branch)
13297 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
13299 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13301 * mini.h mini.c dominators.c: Applied patch from Derek Woo
13302 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13304 * mini.c: Add new icalls for AsAny marshalling.
13306 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13308 * tramp-ppc.c, mini-ppc.c: more cleanups.
13310 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13312 * mini.c: no warnings.
13314 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13316 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13318 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
13320 * mini.c: In the thread abort signal handler, if the thread is in the
13321 process of being stoped, don't throw the Abort exception, just stop the
13324 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13326 * tramp-ppc.c: removed old code.
13328 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13330 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13331 do some simple speed optimizations on ppc.
13333 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13335 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13336 and large offsets in load/store.
13338 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
13340 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13341 it causes regressions.
13343 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
13345 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13348 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13350 * jit-icalls.c: remove warnings.
13351 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13352 speedups for unsafe code.
13354 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
13356 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13358 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
13360 * basic-calls.cs: Add new regression test.
13362 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13365 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13367 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13370 2004-05-06 Patrik Torstensson
13372 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13373 long reg allocation in any reg (not only eax:edx) and implemented
13374 long shl/shr ops in asm instead of helpers.
13376 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
13378 * mini-sparc.h: Fix warnings.
13380 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13383 * mini-exceptions.c (mono_handle_exception): Call the filter in a
13384 separate statement for clarity.
13386 * mini-sparc.c: Update status.
13388 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
13390 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13393 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13395 * inssel-ppc.brg: another small pre-release workaround:
13396 we don't do overflow detection for long_sub_un.
13398 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13400 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13401 (also works around a weird ppc bug: 57957).
13403 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13405 * tramp-ppc.c: trampoline fixes.
13407 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
13409 * mini-ppc.c: fixed typos.
13411 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13413 * mini-ppc.c, exceptions-ppc.c: more code saves registers
13414 at the top of the stack. Fixed typos. Use a frame registers
13415 for all the methods with exception clauses.
13417 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13419 * exceptions-ppc.c: restore fp registers.
13421 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13423 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13424 order from the stack top (moved the stack room to save the
13425 return value for trace after the param area). Fixed corruption
13426 in restoring registers on unwind.
13428 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13430 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13432 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13434 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13435 and prolog/epilog for methods that use it. Allow
13436 enough param area room for varargs methods. Fix miguel's
13437 breakage in exception handling.
13439 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13441 * Makefile.am: run genmdesc only on current arch.
13443 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13445 * exceptions-x86.c:
13446 * mini-x86.h: fix the build on windows.
13448 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
13450 * 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.
13452 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13454 * mini-exceptions.c: New file.
13456 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13457 Move some parts of the x86 exception handling code to an
13458 arch-independent file so it can be shared with other ports.
13460 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13462 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13464 2004-04-26 David Waite <mass@akuma.org>
13466 * driver.c: remove comma from end of enumeration declaration
13468 2004-04-26 Jackson Harper <jackson@ximian.com>
13470 * driver.c: parse config file before loading first assembly. This
13471 allows the user gac to be enabled/disabled.
13473 2004-04-23 Miguel de Icaza <miguel@ximian.com>
13475 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13476 simpler mechanism: we do not care what is encoded initially
13477 (branch absolute or relative), we care about the code and its
13478 target. I kept the old code for reference for now.
13480 The new code tries first to determine if the jump is anywhere in
13481 the -/+32 absolute meg range, if it succeeds, it encodes using the
13482 absolute branch; If not, it tried to find something in the
13483 relative range, if not, it uses the handle_thunk code.
13485 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13487 * exceptions-ppc.c: use the correct ip register on macosx.
13489 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13491 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13493 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13495 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13496 Raise exception on integer divide by zero by hand since the hw
13497 doesn't support it. Handle NaNs in FP compares.
13499 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13501 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13502 code reducing duplication between the platforms and enabled
13503 signal exception handling (on linux for now).
13505 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13507 * exceptions-ppc.c: more macosx support.
13509 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13511 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13513 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13515 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13517 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
13519 * iltests.il: more tests.
13521 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
13523 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13526 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13528 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13530 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
13532 * liveness.c: Mark variables as volatile in all basic blocks reachable
13533 from exception clauses.
13535 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
13537 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13540 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
13542 * iltests.il, basic.cs: more tests for regalloc.
13544 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
13546 * iltests.il: Some tests for register allocation modifications
13549 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
13551 * exceptions.cs: Add regression test for bug #56782.
13553 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13554 original stack trace if an exception is rethrown. Fixes #56782. Oh,
13555 the beauty of fixing the same thing in 5 different files...
13557 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
13559 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13562 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
13564 * mini.c: Add support for STRWLPARRAY marshalling convention.
13566 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13568 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13569 to init the context to setup the regs pointer).
13571 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13573 * exceptions-ppc.c: more exceptions work.
13575 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13577 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13580 2004-04-13 Miguel de Icaza <miguel@ximian.com>
13582 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13583 can use the memory directly.
13585 * cpu-pentium.md: Update documentation from a post from Zoltan.
13587 add x86_add_membase, x86_sub_membase, x86_mul_membase
13589 2004-04-13 Miguel de Icaza <miguel@ximian.com>
13591 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13592 GENERAL_REGS they were also hardcoded for all PPC ports.
13594 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13596 Remove hard-coded limit for floating point registers, use
13597 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13599 Notice that in MacOS X calling conventions you can fit a lot more
13600 floating point values in registers, so I should update the PInvoke
13601 test to excercise the passing of floating point values on the
13602 stack (currently broken).
13604 2004-04-06 Miguel de Icaza <miguel@ximian.com>
13606 * tramp-ppc.c (create_trampoline_code): Added
13607 JUMP_TRAMPOLINE_SIZE.
13608 (ppc_magic_trampoline): Follow the pattern from
13609 x86_magic_trampoline: if code is set to zero, return.
13610 (create_trampoline_code): Always pass MonoMethod to the jump
13611 trampoline, before it was passing a null.
13612 (mono_arch_create_jump_trampoline): Implement the jump stub, could
13613 share the code with mono_arch_create_jit_trampoline.
13615 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13617 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13620 * cpu-g4.md: Added length for jmp instruction, the worst case
13621 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13624 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
13626 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13628 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
13630 * mini.c: Only set bblock->real_offset when adding a new bblock, and
13631 before each IL instruction.
13633 * mini.c (CEE_BOX): Fix warnings.
13635 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13637 * mini.c: removed a few unused vars and extra whitespace.
13639 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
13641 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13643 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13645 (OP_GETCHR): use the above
13646 (CEE_LDELEMA): use the above.
13648 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13649 version of the generic impl.
13650 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13651 (CEE_LDELEMA): use the above.
13653 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
13655 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13658 * iltests.il: Added new regression test for #56317.
13660 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
13662 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
13663 under NetBSD. Fixes #56450.
13665 * liveness.c (update_gen_kill_set): Fix previous patch.
13667 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13669 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
13671 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
13673 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
13674 ldsfld and ldsflda.
13676 * inssel-sparc.brg: Add more optimizations.
13678 * mini-sparc.c: Replace multiply/divide with shifts if possible.
13680 2004-04-01 Martin Baulig <martin@ximian.com>
13682 * mini.c (handle_box): New static function; moved the
13683 implementation of CEE_BOX here.
13684 (mono_method_to_ir): Added `constrained_call' variable.
13685 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
13686 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
13687 mono_method_get_constrained() to get the method.
13689 2004-04-01 Martin Baulig <martin@ximian.com>
13691 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
13692 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
13693 (mono_method_to_ir): We don't need these macros anymore since
13694 mono_class_get_full() already takes care of it.
13696 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13698 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
13699 use @function (as doesn't accept #function here) and check the return
13700 value of system and stop if fails.
13702 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13704 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
13706 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
13708 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
13710 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
13712 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
13715 * basic-long.cs: Add test for negation of Int64.MinValue.
13717 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
13719 * mini-sparc.c: Update status.
13721 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
13723 * exceptions-sparc.c: Fix return value in filters.
13725 * inssel-sparc.brg: Fix register allocation in some rules.
13727 2004-03-28 Martin Baulig <martin@ximian.com>
13729 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
13732 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
13734 * mini-x86.c (mono_arch_patch_code): Fix warnings.
13736 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
13737 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
13738 remove unused conv_u4 opcode.
13740 * mini-x86.c: Remove valgrind workaround since it slows down things
13741 even when mono is not run under valgrind.
13743 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
13745 * mini-sparc.c: Update status.
13747 * inssel-sparc.brg: Add some optimizations.
13749 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
13750 future delay slot filling. Add support for varargs, tail calls and JMP.
13752 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
13753 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
13755 * inssel.brg: Fix register allocation in OP_ARGLIST.
13757 * inssel.brg: Fix warnings.
13759 2004-03-25 Martin Baulig <martin@ximian.com>
13761 * mini.c (inflate_generic_field): Removed.
13762 (mini_get_method): Removed, use mono_get_method_full(),
13763 (mini_get_class): Removed, use mono_class_get_full().
13764 (mono_method_to_ir): Pass our generic context to
13765 mono_field_from_token().
13767 2004-03-25 Martin Baulig <martin@ximian.com>
13769 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
13770 of a `MonoMethod *'.
13771 (mini_get_method): Take a `MonoGenericContext *' instead
13772 of a `MonoMethod *'.
13773 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
13774 a new local variable called `generic_context' which holds the
13775 current `MonoGenericContext *'; use it to lookup things.
13777 2004-03-24 Martin Baulig <martin@ximian.com>
13779 * mini.c (mini_get_class): New static method; if we're inside a
13780 generic instance, inflate the class if neccessary.
13781 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
13783 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
13785 * iltests.il: New regression test for #55976.
13787 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
13790 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
13792 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
13795 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
13797 * liveness.c: Consider SSA stores as well as loads when making vars
13800 * exceptions.cs: New regression tests for register allocation.
13802 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
13804 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
13805 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
13806 domain lock only to protect puntual access to data structures.
13807 Added access lock for sighash, jit_icall_hash_name,
13808 jit_icall_hash_addr and domain->code_mp.
13810 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
13812 * driver.c: Print SIGSEGV handling method.
13814 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
13816 * mini.c (setup_jit_tls_data): Handle case when this is called
13817 multiple times for a thread.
13819 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
13820 is different from fbxx_un. Fixes #54303. Also use constants instead of
13821 magic numbers in a lot of places.
13823 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
13825 * exceptions.cs: Fix cctor test when --regression is used.
13827 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
13829 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
13832 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
13834 * inssel-ppc.brg: fixed register assignments for some rules.
13836 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
13838 * exceptions.cs: Add test for exceptions in static constructors.
13840 * mini.c (mono_jit_compile_method_with_out): Move the calling of
13841 static constructors outside the domain lock. Fixes #55720.
13843 2004-03-17 Martin Baulig <martin@ximian.com>
13845 * mini.c (get_generic_field_inst): Removed, this'll never happen.
13846 (inflate_generic_field): Take the `MonoMethod *' instead of the
13847 `MonoClass *' and added support for generic method.
13848 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
13849 have a `field->parent->gen_params', only inflate the field if it's
13850 an open constructed type.
13852 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
13854 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
13855 exception object instead of the preconstructed ones.
13857 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13859 * mini.c: reverted changed to sigsegv_signal_handler commited
13860 accidentally in the previous patch.
13862 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13865 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
13866 running --aot with an old assembly.
13868 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
13870 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
13873 * mini-sparc.c: Add support for v9 branches with prediction.
13875 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
13877 * mini.c (mini_init): #warning is GNUC only
13879 * mini-sparc.h: implement __builtin_frame_address
13880 and __builtin_return_address for Sun C compiler
13882 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
13884 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
13886 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
13888 * basic-calls.cs: Add test for unaligned byref long argument passing.
13890 * mini-ops.h: Add sparcv9 compare and branch instructions.
13892 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
13893 v9 instructions if we have a v9 cpu.
13895 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
13896 registers for global allocation.
13898 * exceptions-sparc.c: Fixes.
13900 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
13902 * liveness.c (mono_analyze_liveness): Optimized version.
13904 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
13906 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
13909 * basic-float.cs basic-calls.cs: New regression tests.
13911 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
13913 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
13914 sigaltstack implementation.
13916 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
13918 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
13919 stuff if SIGSEGV_ON_ALTSTACK is not defined.
13921 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
13923 * mini.c: Fix warnings.
13925 * mini.c (mono_resolve_patch_target): New function which contains the
13926 arch independent part of the patching process.
13928 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
13929 patching code to a separate function.
13931 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
13933 * mini.c (add_signal_handler): ifdef out on Windows
13935 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
13937 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
13938 cpu-sparc.md: Add exception handling support + other fixes.
13940 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
13941 typed GC detection in --version.
13943 * basic.cs exceptions.cs: New regression tests.
13945 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
13946 the arch specific code can store data during a compilation.
13948 * mini-ops.h: Add OP_SETFRET.
13950 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
13951 function, register a separate icall for each arity, so the icalls can
13954 * mini.c (mono_print_tree): Print negative offsets in a more readable
13957 * mini.c: Make signal handling work on sparc.
13959 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
13961 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
13963 * jit-icalls.c: Emulate truncl by aintl on solaris.
13965 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
13967 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
13969 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
13971 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
13973 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
13974 a MarshalByRef type, inline a method that performs the check, taking into
13975 account that the object can be a proxy. Also implemented tow new opcodes:
13976 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13977 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
13978 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
13980 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
13982 * mini-ppc.c: if a relative branch displacement is too big
13983 but it points to and area reachable with an absolute branch,
13986 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
13988 * mini.c: optimize small copies in cpblk.
13990 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
13992 * basic-calls.cs basic-float.cs: New regression tests.
13994 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
13995 negative offsets from %fp. Implement localloc. Fix local register
13996 allocation. Fix the case when the this argument needs to be saved to
13997 the stack. Implement some missing opcodes.
13999 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
14001 * mini.c (mini_method_compile): Reenable global regalloc in methods
14002 with exception handlers.
14004 * linear-scan.c (mono_varlist_sort): Fix warning.
14006 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14008 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14011 * liveness.c: Make all variables uses in exception clauses volatile, to
14012 prevent them from being allocated to registers. Fixes #42136.
14014 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
14016 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14017 causes regressions.
14019 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14020 argument to mono_arch_regalloc_cost.
14022 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
14025 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
14027 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
14028 Make the cost of allocating a variable to a register arch dependent.
14030 * basic-calls.cs: Fix compilation of tests.
14032 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14033 helper function to cut back on the number of #ifdefs needed.
14035 * mini-ppc.c: Fix compilation.
14037 * basic-calls.cs: New regression tests.
14039 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14041 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14042 of l0 since that is callee saved.
14044 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14047 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
14048 of delay instruction.
14050 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14052 * mini.h (MonoCallInst): Add 'virtual' flag.
14054 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14056 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
14058 * *.cs: New regression tests.
14060 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
14063 * mini.c (mono_runtime_install_handlers): Fix build.
14065 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14066 'signal_stack_size' members.
14068 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
14069 alternate signal stack.
14071 * exceptions-x86.c: Add stack overflow handling.
14073 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
14074 functions to arch independent code.
14076 * mini.c (mono_print_tree): Print more detailed info for load_membase
14079 2004-02-23 Martin Baulig <martin@ximian.com>
14081 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14083 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14085 * mini-x86.c: fixed reg allocation for div/rem.
14087 2004-02-22 Miguel de Icaza <miguel@ximian.com>
14089 * driver.c (mono_main): Report some configuratio options on --version.
14091 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14093 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14094 low in the address space. Correctly flush memory in thunks where we
14095 output native code.
14097 2004-02-20 Martin Baulig <martin@ximian.com>
14099 * mini.c (mini_get_method): New static method; inflate all generic
14100 methods and methods in open generic instances.
14101 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14102 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14104 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
14106 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14108 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14110 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
14112 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14114 * mini-sparc.c (flushi mono_arch_output_basic_block): make
14115 it compile using Sun's compiler.
14117 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
14119 * 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.
14121 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14123 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14125 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14127 * mini-ppc.c: handle calls outside of the allowed range with thunks
14128 allocated using the code manager.
14129 * tramp-ppc.c: use the code manager to hold generated native code.
14130 Fixed the magic trampoline to just patch vtable entries.
14132 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
14134 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14137 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
14139 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14142 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14143 if we have a working __thread implementation.
14145 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
14146 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14148 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
14150 * mini-x86.c: Fix compilation under gcc 2.
14152 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
14154 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14155 contains a call to the wrapped function.
14157 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
14158 OP_<CALL>_IMM opcodes, and use them under X86.
14160 * mini.c (mono_jit_find_compiled_method): Fix warning.
14162 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14164 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14166 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14167 functionality to mini.c.
14169 * mini.c (mono_create_jump_trampoline): New function to create a jump
14170 trampoline. Return a compiled method instead of a trampoline if it
14171 exists. Add a cache for jump trampolines.
14173 * mini.c (mono_jit_find_compiled_method): New function to return a
14174 compiled method if it exists.
14176 * mini-x86.c: Call mono_create_jump_trampoline instead of
14177 mono_arch_create_jit_trampoline.
14179 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14180 a jump trampoline. Fixes #52092.
14182 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
14184 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14185 which is not up-to-date. Add check_corlib_version () instead.
14187 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
14190 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14191 since newer valgrind versions do not need it.
14193 * mini.c (mono_jit_compile_method_with_opt): New helper function to
14194 compile a method with a given set of optimizations.
14196 * mini.c: Compile icall wrappers on-demand instead of at startup.
14198 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14199 wrapper for an icall.
14201 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
14203 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14206 * iltests.il: Add test for non-empty stack before switch instruction.
14208 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
14210 * mini.c: Add support for new stringbuilder marshalling conventions.
14212 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14214 2004-02-01 Martin Baulig <martin@ximian.com>
14216 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14217 in `ginst->mtype_argv'.
14219 2004-01-31 Miguel de Icaza <miguel@ximian.com>
14221 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14222 facilitate grepping.
14224 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14226 * mini.c: fixed buglet in initobj generic implementation for references.
14228 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14230 * Makefile.am: make the version script conditional.
14231 * jit-icalls.c: handle missing truncl().
14233 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
14235 * exceptions.cs: Add more tests for double->int conversion.
14237 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14238 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14240 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14242 * driver.c: make --verbose --version emit an error
14243 if the loaded corlib doesn't match the runtime version.
14245 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14247 * mini-ppc.h: export ppc_patch().
14248 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14249 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14250 on par or better than on MacOSX.
14252 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
14254 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14255 mono_lookup_pinvoke_call.
14257 * mini-x86.c: Under windows, the default pinvoke calling convention is
14258 stdcall. Fixes #52834.
14260 * mini.c (optimize_branches): Add an upper bound to the number of
14261 iterations to prevent infinite loops on strange loops. Fixes #53003.
14263 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
14265 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14266 and ISINST. Fixes #52093.
14268 * objects.cs (test_0_vector_array_cast): New tests.
14270 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
14272 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14273 checking in Array.Set ().
14275 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14278 * object.cs (test_0_multi_array_cast): New regression test.
14280 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14282 * exceptions-ppc.c: fix build on Linux/PPC.
14284 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
14286 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14287 running under valgrind.
14288 (x86_magic_trampoline): Fix build bustage.
14290 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14291 negative values as well. This is needed for the encoding of the line number
14292 info, since sometimes the line numbers are not in increasing order.
14294 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
14296 * cpu-pentium.md (localloc): Increase the size of the localloc
14297 instruction since it is a loop under Win32.
14299 * debug-mini.c (record_line_number): Get rid of unneccesary memory
14302 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
14304 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
14305 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
14306 Max Horn (max@quendi.de). Fix file names in comments.
14308 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
14310 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14311 avoid stack overflow.
14312 (replace_usage): Avoid uninitialized variable warnings.
14314 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14315 and taking the address of valuetype variables.
14317 2004-01-03 Patrik Torstensson
14319 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14320 for other purposes than FP later on.
14322 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
14324 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14327 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14329 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14331 2003-12-30 Patrik Torstensson <p@rxc.se>
14333 * mini-x86.h: Decreased number of availiable fp regs.
14334 Solves corner cases with FP spilling.
14336 2003-12-23 Patrik Torstensson <p@rxc.se>
14338 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14339 for floating point stack tracking / spilling on x86.
14342 * basic-float.cs: added float mul overflow test.
14344 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
14346 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14348 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14350 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14351 supports for cond branches that overflow the immediate
14352 overflow offset. mcs can compile simple programs.
14354 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14356 * exceptions-ppc.c: exception handling support wip:
14357 finally handlers get run on exception.
14359 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
14361 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
14364 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14366 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14367 initial support for stack walking and unwinding.
14369 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
14371 * driver.c (mono_main): Make corlib-out-of-sync message more
14372 descriptive. Also remove verify_corlib call.
14374 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14376 * mini.c: make CEE_NEWARR calls and other emulated opcodes
14377 not overlap with other call's arguments, too.
14379 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14381 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
14382 move to arch-specific code the choice of arch-specific
14383 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14384 * mini.c: ensure emulation calls will not interleave
14387 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14389 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14390 the magic trampoline stack frame is dropped before executing
14393 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14395 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14396 and integer to fp conversions. Added support for overflowing
14397 arguments on the stack. Reserve a couple more registers as temps.
14398 Added support for aot compilation (as output still needs to be
14401 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14403 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14404 Don't overwrite return register in some corner cases.
14406 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
14408 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14409 static constructors when AOT compiling.
14411 * driver.c (mono_main): Call mono_check_corlib_version.
14413 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14415 * cpu-g4.md, basic.cs: fixed div target register.
14417 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14419 * mini-ppc.c, basic.cs: shl_imm fix with test.
14421 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14423 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
14424 structures by value. Misc fixes.
14425 * objects.cs: more tests.
14427 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14429 * mini-ppc.c: lconv.ovf.i implemented.
14431 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14434 (mini_init): don't error out if someone already called g_thread_init.
14436 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14438 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14439 to be any type per the spec. Fix abnormal memory usage when
14440 the same object is repeatedly thrown.
14442 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14444 * mini.c: check for overruns in IL code.
14446 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
14448 * TODO: Add/remove some todo entries.
14450 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
14452 * driver.c (mono_main): Call mono_verify_corlib.
14454 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
14456 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
14457 This has been moved to mini.c
14458 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14459 type being casted is marshalbyref it could be a proxy, so instead of
14460 emitting the type check code, emit a call to a runtime method that will
14461 perform the check by calling CanCastTo if needed.
14463 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
14465 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14466 methods with large stack frames under Win32.
14468 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
14470 * Makefile.am: Distribute regression tests.
14472 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14473 at the end instead of inserting each variable into the sorted list.
14475 * linear-scan.c (mono_varlist_sort): New helper function.
14477 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14479 * mini.c: ensure arguments and locals are within bounds.
14481 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14483 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
14486 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
14488 * mini.c (mono_cprop_copy_values): Fix crash.
14490 * aot.c: Set verbosity back to 0.
14492 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14494 * regalloc.c: complete memory leak fix by Laurent Morichetti
14497 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
14499 * driver.c (main_thread_handler): Revert the previous patch.
14501 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14504 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14505 memory from the memory pool.
14507 * driver.c (main_thread_handler): Turn on all optimizations when
14510 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14511 an array for better performance.
14513 * regalloc.c (mono_regstate_assign): Fix memory leak.
14515 * debug-mini.c (mono_debug_serialize_debug_info): New function to
14516 serialize the debug info.
14518 * debug-mini.c (mono_debug_add_aot_method): New function to load the
14519 debug info from the serialized representation.
14521 * aot.c: Save debug info into the generated file and load it when
14524 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14526 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14528 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14529 More FP-related fixes.
14531 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14533 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14534 and register allocation buglet. Hello world now runs.
14536 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14538 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14539 * tramp-ppc.c: fixed class init trampoline.
14540 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14542 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14544 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14545 mini.c: more ppc changes/fixes.
14547 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
14549 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14550 Also optimize the case when the arguments are the same in the caller
14553 * iltests.il: Add tests for tail calls with valuetype arguments.
14555 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14557 * mini-ppc.c: fixes for struct return type.
14559 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14561 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14562 mono_spillvar_offset() to arch-specific code.
14564 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14566 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14568 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
14570 * exceptions-x86.c: Fix stack space leaks.
14572 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14573 registers from the lmf if the method has save_lmf set.
14575 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
14577 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14578 of icall wrappers into InvokeInDomain, since these are now per-domain.
14580 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14582 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14583 make some opcode emulation and intrinsic ops enabled/disabled
14584 according to the architecture. More fixes.
14586 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14588 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14590 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14592 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14593 arch-specific handling for 'this' and struct return type to
14594 arch-specific code.
14596 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14598 * aot.c: prevent divide by zero error when reporting (it happened with
14599 Accessibility.dll).
14601 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
14603 * mini.h (inst_switch): Remove unused macro.
14605 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14608 (load_aot_module): free 'info->methods' and 'info' properly. No more
14609 "free(): invalid pointer blah" messages when you have an old aot
14612 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
14614 * jit-icalls.c, mini.c: Added support for context static fields.
14616 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
14618 * mini.c (mono_method_blittable): Methods which set LastError are not
14619 blittable either. Fixes #51108.
14621 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14623 * mini.c: flush icache.
14624 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14626 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
14628 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14630 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
14632 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14635 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
14638 * inssel.brg (CEE_MKREFANY): Fix AOT case.
14640 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
14642 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
14643 instruction when the result is discarded.
14645 * iltests.il (test_0_div_regalloc): New regression test.
14647 * arrays.cs: Fix compilation error.
14649 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14651 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14652 float rules to inssel-x86.brg: sane architectures with FP registers
14653 don't need to implement these rules.
14655 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14657 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14659 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14661 * mini.h, inssel-long32.brg: fixed endianess issues in int64
14662 implementation of 32 bit systems.
14664 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14666 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
14667 (Jeroen Zwartepoorte).
14669 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
14671 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
14672 the caller and the callee matches.
14674 * mini.c (mono_method_to_ir): Add comment.
14676 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
14677 signbit is missing on some platforms.
14679 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
14681 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
14683 * mini.c (setup_jit_tls_data): Call the new function.
14685 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
14687 * mini-x86.c: Add experimental support for fast access to the lmf
14688 structure under NPTL/Linux 2.6.x.
14690 2003-11-06 Martin Baulig <martin@ximian.com>
14692 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
14693 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
14696 2003-11-02 Martin Baulig <martin@ximian.com>
14698 * mini.c (inflate_generic_field): New static method.
14699 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
14700 generic instance and the field is declared in a generic type, call
14701 inflate_generic_field() to inflate it. Fixes gen-28.cs.
14703 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
14705 * mini.h mini.c (mono_method_same_domain): New function to return
14706 whenever the caller and the callee are in the same domain.
14708 * tramp-x86.c (x86_magic_trampoline): Use the new function.
14710 2003-10-30 Martin Baulig <martin@ximian.com>
14712 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
14713 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
14715 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
14716 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
14718 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
14720 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
14723 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
14724 object here, so it is in the correct appdomain etc.
14726 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
14728 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
14730 (mono_method_to_ir): Avoid freeing the type created returned from
14731 mono_type_create_from_typespec, since it is put into an internal cache
14732 by the function. Fixes pointer.exe.
14734 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
14735 trampolines for icalls and pinvokes as well. Fixes #33569.
14737 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
14739 * mini.c: Update after appdomain changes.
14741 * mini.c (mono_jit_compile_method_inner): Allways compile native
14742 method wrappers in the root domain, since there can only be one
14743 instance of them, whose address is stored in method->info.
14745 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
14747 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
14748 environment variable. Instead detect automatically whenever running
14749 under valgrind using the magic macro RUNNING_ON_VALGRIND from
14752 2003-10-16 Miguel de Icaza <miguel@ximian.com>
14754 * trace.c, trace.h: New files that implement the new trace option
14757 * driver.c: Document new --trace options.
14759 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
14762 - if (mono_jit_trace_calls)
14763 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
14765 * mini.h: prototypes.
14767 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
14769 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
14771 * mini.c inssel.brg: Implement typedefbyref opcodes.
14773 * mini.c (mono_jit_compile_method): Remove unused local variable.
14775 * mini.c (mono_jit_compile_method_inner): Ditto.
14777 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
14779 * tramp-x86.c (x86_class_init_trampoline): Fix build.
14781 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
14783 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
14785 * mini.c (mono_no_aot): Remove unused global variable.
14787 * mini.c: Thread safety fixes.
14789 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
14791 * mini.c (mono_create_class_init_trampoline): Add a lock around
14792 class_init_hash_addr.
14794 * arrays.cs (test_0_newarr_emulation): Add new regression test for
14797 * mini.c: Decompose the NEWARR instruction before decomposing its
14798 arguments. Fixes #30073.
14800 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
14802 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
14805 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
14807 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
14809 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
14811 * driver.c: Add support for compiling icall wrappers to --compile.
14813 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
14815 * inssel.brg: The empty value in class->interface_offsets is -1, not
14818 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
14820 * objects.cs: New test for 'is' operator on an array of interfaces.
14822 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14824 * tramp-ppc.c: update trampoline code to support jumps
14825 and class initialization.
14827 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
14829 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
14831 * inssel.brg (OP_UNBOXCAST): Fix #46027.
14833 * inssel.brg (OP_UNBOX): Remove unused rule.
14835 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
14836 region instead of one for each method. Fixes #47813.
14838 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
14840 * exceptions.cs (test_0_nested_finally): New regression test for
14841 nested exception handlers.
14843 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
14845 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
14847 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
14850 * mini.c (mono_method_check_inlining): Make the inlining limit
14851 configurable by an environment variable.
14853 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
14855 * mini.h: Bump AOT file version.
14857 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
14858 token, store the image along with the token, since the token might not
14859 refer to the same image as the method containing the relocation,
14860 because of inlining.
14862 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
14864 * mini.c (mono_precompile_assemblies): New function to compile
14865 all methods in all loaded assemblies.
14867 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
14869 * regalloc.h regalloc.c (MonoRegState): Change the type of
14870 iassign and fassign to int*, since they can contain large negative
14871 values if the register is spilled. Also added some comments. Fixes
14874 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
14875 under Win32. Fixes #42964.
14877 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
14879 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
14881 * aot.c: Added support for AOT compiling methods which contain calls
14882 to wrappers. Currently, only remoting-invoke-with-check wrappers are
14885 * driver.c (compile_all_methods): Run the compilation in a thread
14886 managed by mono. Fixes #44023.
14888 * mini.c (mono_codegen): Print full method name in verbose output.
14890 * mini-x86.c (mono_arch_patch_code): Fix warning.
14892 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
14893 jumps, since the method we are jumping to might be domain-specific.
14895 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
14897 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14899 * inssel.brg: string chars are unsigned.
14901 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
14903 * TODO: New todo item.
14905 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
14906 which calls mono_runtime_class_init and patches the call site to
14907 avoid further calls.
14908 (mono_arch_create_class_init_trampoline): New arch specific function
14909 to create a class init trampoline.
14910 (create_trampoline_code): Generalized so it can create
14911 class init trampolines as well.
14913 * mini.c (helper_sig_class_init_trampoline): New helper variable.
14914 (mono_create_class_init_trampoline): New function to create and cache
14915 class init trampolines.
14916 (mono_find_class_init_trampoline_by_addr): New function to lookup the
14917 vtable given the address of a class init trampoline. Used by the
14919 (mono_codegen): Generate a call to a trampoline instead of
14920 mono_runtime_class_init in LDSFLD[A].
14921 (mono_codegen): Add relocations for the new trampoline.
14923 * mini.h mini-x86.c aot.c: Added a new relocation type:
14924 MONO_PATCH_INFO_CLASS_INIT.
14926 * mini.h: Bump AOT version number.
14928 * aot.c: Create a copy of the loaded code instead of using the original
14929 so methods which call each other will be close in memory, improving
14932 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
14933 patch since it breaks the regression tests.
14935 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
14936 for the register saving instruction sequence since the
14937 frame_state_for function in glibc 2.3.2 don't seem to detect it.
14939 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
14941 * TODO: Fix todo item && remove another.
14943 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
14945 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
14948 * aot.c: Moved the check for MONO_LASTAOT into the initialization
14949 function of the module.
14951 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
14952 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
14953 --no-aot command line option.
14955 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
14957 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
14958 by Bernie Solomon (bernard@ugsolutions.com).
14960 * inssel.brg: Refactor the interface offset table related code into
14961 its separate functions and add support for the AOT case.
14963 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
14965 * aot.c (mono_aot_get_method_inner): Fix memory leak.
14967 * aot.c: Added mono_aot_verbose variable and made all debugging
14968 output depend on the value of this variable.
14970 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
14971 method_label and info_label.
14973 * mini.h mini-x86.c aot.c: Added a new relocation type
14974 MONO_PATCH_INFO_IID for klass->interface_id.
14976 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
14977 the MonoJitInfo structure.
14979 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
14980 a non-root appdomain in shared mode.
14982 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14984 * aot.c: make aot loader less verbose. Remove free of unused variable.
14986 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
14988 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
14990 * .cvsignore: Added *.dll.
14992 * mini.c (mono_print_tree_nl): New function callable while debugging.
14994 * mini.c (mono_print_code): Export this.
14996 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
14999 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
15001 * mini.h (MonoCompile): Added 'jit_info' field.
15003 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15004 the cfg structure, since it is needed by the AOT compiler.
15006 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15008 * aot.c: A major rewrite. Changes include:
15009 - save exception tables for methods which have them.
15010 - cache failed lookups in aot_get_method () to avoid the (slow) calls
15011 to g_module_symbol.
15012 - reworked the file format so it is now much smaller and needs
15013 fewer relocation entries.
15015 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
15017 * aot.c (load_aot_module): Fix build bustage on platforms without
15020 2003-09-04 Martin Baulig <martin@ximian.com>
15022 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15024 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
15026 * TODO: Some new optimization ideas.
15028 * aot.c: Move AOT module loading logic here from mono_assembly_open.
15030 * aot.c: Save the optimization flags used to compile the code into
15033 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15034 support emitting domain specific code.
15036 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
15037 no longer domain neutral. It can be made domain neutral by compiling
15038 with --optimize=shared.
15040 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15041 between appdomains.
15043 * driver.c mini.h mini.c: New --no-aot debugging option which disables
15044 loading of AOT code.
15046 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15048 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15049 if there is no domain neutrality information.
15051 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
15053 * aot.c (mono_compile_assembly): Emit a symbol containing the file
15054 format version into the generated library.
15056 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15057 callee method into the caller since one of them could be shared.
15059 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15060 system exceptions from AOT code now works.
15062 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
15063 method if it is domain neutral and the callee is not.
15065 * graph.c (cfg_emit_one_loop_level): Fix warning.
15067 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
15069 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15072 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
15074 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15075 is needed by code which is executed before mono_runtime_init ().
15076 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15078 * mini.c (mono_thread_abort): Fix warning.
15079 (mono_jit_compile_method): Call static constructor in the AOT case too.
15081 * aot.c (mono_compile_assembly): Fix warning.
15083 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15085 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15087 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
15089 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15091 * cpu-pentium.md: Fix the length of call opcodes so they include the
15092 ESP restoring instruction. Fixes #47968.
15094 2003-08-28 Martin Baulig <martin@ximian.com>
15096 * mini-x86.c (mono_arch_call_opcode): Added support for
15097 MONO_TYPE_GENERICINST.
15099 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
15101 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
15103 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15104 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15106 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15109 2003-08-26 Martin Baulig <martin@ximian.com>
15111 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15112 when reporting an error, set this to the actual error location.
15113 (mono_method_to_ir): Report the correct error location if
15114 get_basic_blocks() returned an error.
15116 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
15118 * mini.c (mono_type_blittable): OBJECT is not blittable.
15119 (mono_method_blittable): Methods which have marshalling descriptors
15120 are not blittable either. Fixes #47842.
15122 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
15124 * driver.c mini.c: Use an environment variable instead of a global
15125 variable. Also fix the build.
15127 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
15128 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
15131 * driver.c mini.c: Added --with-valgrind option to turn off some
15132 code which prevents mono from running under valgrind.
15134 * mini.c (mono_emit_call_args): Fixed warning.
15136 * mini.c (mono_emulate_opcode): Fixed warning.
15138 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15140 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15141 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15142 regalloc.c, regalloc.h: specify available registers in arch-specific
15143 code and support floats in the regallocator (patch by Laurent Morichetti
15146 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15148 * mini.c: mono_thread_current() can be called only after
15149 mono_runtime_init(): rearrange code to not call it early on.
15151 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15153 * mini.c: allocate jump tables in the code mempools.
15155 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15157 * mini.c, mini.h: make sure per-thread data allocated by the jit is
15160 2003-08-10 Miguel de Icaza <miguel@ximian.com>
15162 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15163 12 to 16. This fixes bug #47453.
15166 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15168 * mini-ppc.c: fixed indexed load and unsigned compares.
15170 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
15172 * mini.c: reenabled installation of handler for
15173 thread abort signal.
15175 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15177 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15178 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15179 until it's fixed and actually useful.
15181 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15183 * inssel-long32.brg: couple more opcodes implemented.
15185 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15187 * mini-sparc.c: Even more opcodes implemeted.
15189 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15191 * mini-sparc.c: More opcodes implemented.
15193 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15195 * mini-sparc.c: More opcodes implemented.
15197 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15199 * inssel-sparc.brg: Add some needed rules. Direct
15201 * Makefile.am: Use inssel-sparc.brg
15202 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15203 an assert happy for now.
15205 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15207 * mini-sparc.c: Fixed compile errors.
15208 * exceptions-sparc.c: Same. We now produce a mono binary
15209 on sparc-linux. Yea.
15211 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15213 * mini-sparc.c: Renamed registers. Also some macro cleanups.
15214 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15215 They compile, but do not work.
15217 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15219 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15220 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15221 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15224 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15226 * mini.c: more opcodes implemented and better support for generics.
15228 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15230 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15231 * mini.c, mini.h: first cut at generics support: some new instructions
15232 added and changed the behaviour of some of the existing ones.
15234 2003-07-21 Miguel de Icaza <miguel@ximian.com>
15236 * mini.c: Removed definition of metadata_shared mutex here.
15238 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15240 * mini-x86.c: make vararg calls work for instance methods.
15242 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15244 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15245 returns the arguments in a separte list, now.
15247 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15249 * aot.c, mini.c: updates for array type representation changes.
15251 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15253 * mini.c: register function to perform jit shutdown.
15255 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15257 * mini.c: use a faster allocator if possible.
15259 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15261 * aot.c: some cleanups and portability changes.
15263 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15265 * mini.c: use faster allocation for CEE_BOX if possible.
15267 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15269 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15270 Moved inlined mempcy code to its own function so that is can be
15271 reused. Added an inline memset function as well (optimized initobj).
15272 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15274 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15276 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15278 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15280 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15281 arch code can setup the cpu for CLR execution, if needed.
15282 We use it on x86 to set the precision of FP operations.
15284 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15286 * mini.c: disable some optimizations if we can guess they'll cost too
15287 much for a given method.
15289 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
15291 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15293 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
15294 * mini.h mini.c mini-x86.c: Added instruction level coverage
15295 info collection support.
15297 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15299 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15300 is now implemented in the profiling API. Get rid of a couple of
15301 unnecessary global variables.
15303 2003-06-15 Nick Drochak <ndrochak@gol.com>
15305 * basic-long.cs: tests for negative values for bigmul, and unsigned.
15306 * cpu-g4.md: add op_bigmul and op_bigmul_un
15307 * cpu_pentium.md: add op_bigmul_un
15308 * inssel-long32.brg: add rule for unsigned bigmul
15309 * mini-ops.h: define OP_BIGMUL_UN
15310 * mini-x86.c: THE BUG: handle (un)signed properly
15311 * mini.c: choose unsigned opcode if needed.
15312 This set of patches fixes bug #44291
15314 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
15316 * mini.c (optimize_branches): improved to handle all kinds of
15317 conditional branches.
15319 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15321 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15322 don't raise exceptions.
15324 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15326 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15327 to arch-specific files.
15329 2003-06-09 Martin Baulig <martin@ximian.com>
15331 * Makefile.am (libs): Added $(LIBGC_LIBS).
15333 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15335 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15336 and OP_ATAN (fixes bug#44293).
15338 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15340 * Makefile.am, mini-x86.c: rename cpu description array to
15341 pentium_desc, since some compilers define the 'pentium' preprocessor
15344 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
15346 * mini.c (mini_select_instructions): add explicit branch if the
15347 following block is not the false target of a conditional branch -
15348 we need this with any optimization that reorder or remove bblocks
15350 * mini.c (optimize_branches): bug fixes
15352 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
15354 * mini.c (mono_method_to_ir): inline static readonly fields
15356 * ssa.c (fold_tree): start cfold support for long (very simple
15359 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15361 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15363 * inssel.brg: fixed memcpy (bug #44219).
15365 2003-06-05 Dick Porter <dick@ximian.com>
15367 * driver.c: Set the glib log levels to not abort if g_message
15370 g_set_prgname() has to happen before mini_init() so that the
15371 process handle gets the info.
15373 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15375 * driver.c: add intrins to the default optimizations to get wider
15378 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15380 * mini.h: some large basic blocks will overflow a 16-bit
15381 integers for symbolic registers.
15383 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
15385 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15386 (mono_arch_output_basic_block): fix bug 43499
15388 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15390 * mini.c: kill duplicated definition of mono_debug_format.
15392 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15394 * mini-x86.c, arrays.cs: fixed register allocation bug.
15396 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
15398 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15400 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15402 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15405 (print_method_from_ip): also print source location information if
15408 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
15410 * mini.c (mono_find_block_region): bug fix in region code
15411 (mini_method_compile): enable removing unreachable code again, but
15412 only in methods without exception clauses.
15414 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15416 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15417 Implemented arglist opcode and handling of TypedReference type.
15418 Fixed x86 call convention when a structure is returned.
15419 Minimal support for calling static vararg methods.
15421 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
15423 * mini.c (mini_method_compile): always remove unreachable code,
15424 because the code in them may be inconsistent (access to dead
15425 variables for example).
15427 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15429 * driver.c, debug-mini.c: warning fixes.
15431 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15433 * Makefile.am, jit.h, mini.h: install header for embedding mono.
15435 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15437 * mini.c: thread-static fields are registered in mono_class_vtable(),
15438 so ensure the function is called before checking for them.
15440 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
15442 * mini.c (optimize_branches): fix for bug 43586
15444 * jit-icalls.c (mono_llmult_ovf): added an additional check for
15445 overflow (fixes Bug #43639)
15447 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15449 * mini.c, objects.cs: allow the use of stobj for primitive types.
15451 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15453 * mini.c: be less strict about argument checking until we support
15454 running the verifier.
15456 2003-05-27 Nick Drochak <ndrochak@gol.com>
15458 * basic-long.cs: tests for (ulong)int * (ulong)int also
15459 * mini.c: use the same trick for (ulong)int * (ulong)int
15461 2003-05-27 Nick Drochak <ndrochak@gol.com>
15463 * basic-long.cs: add regression test for (long)int * (long)int
15464 * cpu-pentium.md: add op_bigmul specification
15465 * inssel-long32.brg: add OP_BIGMUL rule
15466 * mini-ops.h: add OP_BIGMUL
15467 * mini-x86.c: register allocator: handle case where src1 needs to be
15469 * mini.c: substitute special BIGMUL opcode in the tree for
15470 (long)int * (long)int
15472 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15474 * jit-icalls.c: call the type ctor on field access if needed.
15476 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15478 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15479 to a method (including results of ldelema, bug#43207).
15481 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
15483 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15484 colors to show exception handler blocks.
15486 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15487 (fix for pinvoke7.cs).
15489 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15491 * mini.h, mini.c: ensure correct initialization order for types that
15492 require it. Prepare for lazy compilation of jit icall wrappers.
15493 Provide a name for opcode emulation to reduce unneeded mallocing.
15495 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15497 * mini-x86.c: better register restoring code and profiling
15498 support for tail calls.
15500 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15502 * mini.h, driver.c: prepare for leaf methods optimization.
15504 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15506 * mini.c: get targets of branches before converting a method.
15508 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
15510 * mini.c (optimize_branches): added some experimental code (disbaled)
15512 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
15514 * mini.c (optimize_branches): fix branch to branch optimization
15516 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15518 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15520 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15522 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15525 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
15527 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15528 enable use of interface variables again.
15530 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15531 I1 to registers because there is no simply way to sign extend 8bit
15532 quantities in caller saved registers on x86.
15534 * inssel-float.brg: set costs of some rules to 2 so
15535 that monobure always select the arch. specific ones if supplied,
15536 regardless of the order we pass the files to monoburg.
15538 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15540 * mini.c, mini-x86.c: since the magic trampoline for jumps
15541 can't patch the code directly, we do it as soon as the
15542 method gets compiled.
15544 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15546 * mini-x86.c, mini.h: introduce a new patching method
15547 to support CEE_JMP and tail calls.
15548 * mini.c: obey tail.call. Don't precompile methods target
15550 * tramp-x86.c: new trampoline code to handle methods
15551 reached through a jump.
15553 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
15555 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15556 bit values to registers
15558 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
15560 * mini.c (mono_compile_get_interface_var): share interface
15561 variables if possible.
15563 2003-05-16 Martin Baulig <martin@ximian.com>
15565 * debug-mini.c (mono_init_debugger): New function to initialize
15566 the debugger. This is not in the debugger since it needs to
15567 access some of mini's internals.
15569 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
15571 * mini.c (mono_method_to_ir): inlining fixes/cleanups
15573 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15575 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15576 for value type handling.
15578 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
15580 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15581 (mono_method_check_inlining): enable inlining of all kinds of wrappers
15583 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
15585 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15586 the constructor through a proxy.
15588 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15590 * jit-icalls.c, inssel.brg: fixes to array element address
15593 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
15595 * mini-x86.c (is_regsize_var): allocate pointer to registers
15597 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15599 * driver.c: fixed typo, added intrins to the set of optimizations
15600 tested with regressions.
15602 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15604 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15605 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15608 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
15610 * inssel.brg: remove some common pop instructions without side effects
15612 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15614 * inssel-x86.brg: fixed thinko in int to double conversions.
15616 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15618 * mini.c, jit-icalls.c: added runtime thread-static variable support.
15620 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15622 * inssel-long32.brg: two more missing instructions.
15624 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
15626 * mini.c (mono_emit_call_args): set the cil_code for all arguments
15627 if not already set.
15629 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
15631 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15634 * basic-float.cs: Added tests for negative zero.
15636 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15638 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15639 a couple of missing operations for long casts, with test cases.
15641 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15643 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15645 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
15647 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15648 code size estimation.
15650 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
15652 * mini.c (mono_jit_create_remoting_trampoline): make it work with
15653 abstract methods (fix bug 42542)
15655 * aot.c: add ability to handle array types
15657 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
15659 * mini.c: Call the _specific versions of the object allocation
15660 functions if possible.
15662 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15664 * driver.c: call setlocale ().
15666 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15668 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
15671 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
15673 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
15675 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
15676 wrappers (fix bug 42122)
15678 2003-05-04 Martin Baulig <martin@ximian.com>
15680 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
15682 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
15683 s/mini_set_defaults/mono_set_defaults/g.
15685 2003-05-04 Martin Baulig <martin@ximian.com>
15687 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
15689 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15691 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
15692 (reported by Don Roberts).
15694 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15696 * mini.c: temporarily work around two bugs for this release.
15698 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15700 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
15701 that contains -export-dynamic and it makes using the ld script
15703 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
15705 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15707 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
15710 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15712 * mini.c: make sure leave calls all the needed finally blocks,
15713 even when the target jumps out of multiple exception clauses.
15715 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15717 * ldscript, Makefile.am: add linker script to reduce the number of
15718 exported symbols (should also fix the issues with libwine defining
15719 some of the same symbols in io-layer).
15721 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
15723 * driver.c (mini_main): Avoid assertion when no file name is given on
15726 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
15728 * driver.c: added --version/-V command line option.
15729 Added the inline optimization in the regression tests.
15731 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15733 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
15734 to the type in the method signature (fixes bug#42134).
15736 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
15738 * mini.c: when inlining, check this is not null only when needed (bug #42135).
15740 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
15742 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
15744 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15746 * driver.c: fixed bug #42100.
15748 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
15750 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
15752 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15754 * mini.c: moved most of the code required to do inlining to its own
15755 function so it can be reused. Inline also ctors if appropriate.
15757 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
15759 * Makefile.am: Link with -export-dynamic so shared libs loaded by
15760 the runtime can call mono API functions.
15762 2003-04-27 Martin Baulig <martin@ximian.com>
15764 * debug-mini.c (mono_debug_init_method): Added
15765 `guint32 breakpoint_id' argument; if the method has a breakpoint,
15766 send a notification to the debugger.
15768 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
15769 running in the Mono Debugger, just pass the breakpoint number to
15770 mono_debug_init_method().
15772 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
15774 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
15776 * mini.c: allow some more unsafe compares.
15778 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15780 * mini-x86.c, Makefile.am: make distcheck works (partially from
15781 a patch by Richard Lee <r.h.lee@attbi.com>).
15782 * regset.c, regset.h: removed, they are unused.
15784 2003-04-25 Dick Porter <dick@ximian.com>
15786 * driver.c: Usage reports the name as 'mono' not 'mini'
15787 * exceptions-x86.c: Build and run on freebsd
15789 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
15791 * Makefile.am: install the program with the 'mono' name and
15792 the library as libmono instead of mini and libmini.
15794 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15796 * driver.c: provide the APIs for the embedding interface of the old jit.
15798 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
15800 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
15802 2003-04-23 Martin Baulig <martin@ximian.com>
15804 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
15806 * driver.c: Added `--debug' command line argument to enable
15809 2003-04-23 Martin Baulig <martin@ximian.com>
15811 * debug.[ch]: Removed. The code is now in
15812 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
15814 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
15817 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
15819 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
15821 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15824 (mini_cleanup): moved mono_runtime_cleanup call after the call to
15825 mono_domain_finalize.
15826 (mini_method_compile): use mono_method_profile* if the the option is
15829 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
15831 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15832 methods with their wrapper.
15834 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
15835 methods with their wrapper.
15837 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
15840 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
15843 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
15846 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
15848 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
15850 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
15852 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
15853 of the mempool. This is slightly faster and uses less memory
15855 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15857 * mini.c: avoid O(n) allocation for variables.
15859 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15861 * mini.c: handle items on the stack after inlining methods.
15863 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15865 * mini.c: make the method->opcode optimization dependent
15866 on MONO_OPT_INSTRINS and do it lazily.
15868 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15870 * driver.c: print overall results at the end of regression run.
15872 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
15874 * inssel.brg: don't overwrite symbolic registers.
15876 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15878 * inssel-x86.brg: fix conversion from long to float.
15880 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
15882 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
15884 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
15886 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
15888 * driver.c: Added --print-vtable option as in the old JIT.
15890 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15892 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
15894 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
15896 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
15898 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
15900 * mini.c regalloc.c regalloc.h: Fix memory leak.
15902 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
15904 * aot.c (mono_aot_get_method): register all used strings
15906 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15908 * mini.c: always intern strings references with ldstr at compile time.
15910 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15912 * Makefile.am: add BUILT_SOURCES.
15914 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
15916 * driver.c: give a better error message when the assembly to execute
15917 doesn't have an entry point.
15919 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
15921 * Makefile.am: added hack for automake
15923 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
15926 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
15928 22003-04-07 Martin Baulig <martin@ximian.com>
15930 * Makefile.am: Added Makefile.am.
15932 * debugger-main.c: Removed, this is now in the debugger where it
15935 * mini.pc.in: Call this package `mini' for the moment.