1 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
3 * mini-ops.h: Add dup low and dup high ops.
7 * mini-x86.c (mono_arch_output_basic_block): Same.
9 * simd-intrinsics.c (vector4f_intrinsics): Same.
11 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
13 * basic-simd.cs: Tests for recently added functionality.
15 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
17 * mini-ops.h: Add remaining sse1 fp ops.
19 * cpu-x86.md: Add remaining sse1 fp ops.
21 * mini-x86.c (mono_arch_output_basic_block): Same.
23 * mini.h: Add enum for simd FP compare conditions.
25 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
27 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
28 so the backed can generate the appropriate op.
30 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
31 This patch squeese one more byte from the SimdIntrinsc struct.
33 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
34 a a shift amount intead of simply or'ing it.
36 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
38 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
39 byte so we can have an aditional flags field without increasing struct size.
41 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
42 against the simd_supported_versions bitmask.
44 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
46 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
48 * mini.c: remove rawbuffer code (the only use here is unsafe because
49 it takes locks during signal handling and the kernel now provides much
50 better info in proc/pid/smaps these days).
52 2008-10-13 Zoltan Varga <vargaz@gmail.com>
54 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
55 OP_X86_PUSH_OBJ. Fixes #434620.
57 * objects.cs: Add a test.
59 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
61 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
62 that the packuswb/packusdw don't work with unsigned numbers for what
63 would be negative numbers in signed format.
65 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
66 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
68 * mini-ops.h: Add doubleword forms of many ops and packing ones.
70 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
72 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
74 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
76 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
79 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
80 version as the enum in mini.h.
82 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
83 for sse3 ops, check the simd_version field if present. This way the code
84 works with all versions of sse.
86 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
88 * simd-intrinsics.c: Fixed intrinsic name typo.
90 * mini.h: Added missing simd exported function.
92 * basic-simd.cs: Added tests for Vector4ui.
93 Fixed broken test for Vector16b.
95 2008-10-10 Zoltan Varga <vargaz@gmail.com>
97 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
100 2008-10-10 Mark Probst <mark.probst@gmail.com>
102 * method-to-ir.c: Only do the fast virtual generic method call for
105 * mini.h, mini-trampolines.c: The new generic virtual remoting
106 trampoline handles virtual method calls via the vtable (as done by
107 the fast virtual generic method calls) to remoting proxies.
109 * mini.c (mono_jit_create_remoting_trampoline): For generic
110 methods reate a generic virtual remoting trampoline.
112 * mini-amd64.h: Enable fast virtual generic method calls again.
114 2008-10-10 Mark Probst <mark.probst@gmail.com>
116 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
117 restore registers when doing tail calls.
119 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
121 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
124 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
126 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
128 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
130 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
132 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
134 * basic-simd.cs: Retrofit for API changes.
136 2008-10-10 Mark Probst <mark.probst@gmail.com>
138 * mini-ppc.c: Handle integer stack arguments for tail calls.
140 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
142 * optflags-def.h: Removed sse3 optimization.
146 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
149 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
151 * mini.h: Added enumeration with simd versions.
153 * simd-intrinsics.c (emit_intrinsics): Use the new static var
156 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
158 * mini.c (mini_init): Call mono_simd_intrinsics_init.
160 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
162 * basic-simd.cs: Added tests for Vector8u and Vector16u.
164 * basic-simd.cs: Fixed test naming.
166 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
168 * mini-ops.h: Added ops for packed and saturated math, shifts
169 and packing/unpacking.
171 * cpu-x86.md: Added descriptors for the above ops.
173 * mini-x86.c: Added code to emmit the above ops.
175 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
177 2008-10-08 Zoltan Varga <vargaz@gmail.com>
179 * aot-compiler.c (compile_method): Enable AOT for generic code.
181 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
183 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
185 * mini.c: add a workaround for a common screwup that ends up blamed
186 to mono (other processes blocking signal delivery).
188 2008-10-07 Zoltan Varga <vargaz@gmail.com>
190 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
191 in the LDFLD/STFLD opcodes. Fixes #432673.
193 * iltests.il.in: Add a new test.
195 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
197 * mini-arm.c: attach the thread in unmanaged->managed transitions
198 using delegates (bug #433148).
200 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
202 * basic-simd.cs: Use new ShuffleSel constants.
204 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
206 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
208 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
209 only disable simd intrinsics if no sse2 is detected.
211 * optflags-def.h: Added sse3.
213 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
216 2008-10-07 Zoltan Varga <vargaz@gmail.com>
218 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
219 when adding delegate-invoke wrappers.
221 2008-10-07 Zoltan Varga <vargaz@gmail.com>
223 * Makefile.am: Reenable the simd tests.
225 2008-10-07 Bill Holmes <billholmes54@gmail.com>
227 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
228 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
229 other vreg is allocated to that hreg.
231 Contributed under MIT/X11 license.
233 2008-10-07 Zoltan Varga <vargaz@gmail.com>
235 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
238 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
240 * basic-simd.cs: New test suite for SIMD intrinsics.
242 * Makefile.am: Added new tests.
244 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
246 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
250 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
252 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
253 using SSE2 aware opcodes.
255 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
256 is enabled, this code path is only reachable if conversion ops are emmited after
259 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
261 This optimization saves 6 bytes per conversion against the old version.
263 2008-10-06 Zoltan Varga <vargaz@gmail.com>
265 * aot-compiler.c (compile_method): Don't skip methods referencing
266 generic methods without a corresponding entry in token_info_hash, since
267 encode_method_ref () can handle all generic methods now.
269 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
270 generic context is set.
272 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
273 generic sharing of LDTOKEN.
275 2008-10-06 Mark Probst <mark.probst@gmail.com>
277 * mini-amd64.h: Temporarily disabled fast virtual generic method
278 calls because it breaks the System.Runtime.Remoting tests.
280 2008-10-06 Zoltan Varga <vargaz@gmail.com>
282 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
284 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
285 so inlining actually works.
286 (check_inline_caller_method_name_limit): Ditto.
288 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
290 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
291 64 bit safety (from Olaf Hering and Andreas Färber).
293 2008-10-06 Zoltan Varga <vargaz@gmail.com>
295 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
296 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
297 unused virtual call support code.
299 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
301 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
302 which can't use aot trampolines.
303 (decode_patch): Don't create aot trampolines for methods which can't use
306 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
309 * mini.h: Bump AOT image format version.
311 2008-10-05 Zoltan Varga <vargaz@gmail.com>
313 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
314 to save_token_info () since cmethod is inflated for constrained calls.
316 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
318 2008-10-04 Andreas Färber <andreas.faerber@web.de>
320 * Makefile.am: Add build rules for ppc64.
321 This avoids the build failing at pedump with unresolved symbols
322 due to lack of arch_sources. Instead it will now fail earlier
323 due to lack of cpu-ppc64.md.
325 Contributed under MIT/X11 license.
327 2008-10-04 Mark Probst <mark.probst@gmail.com>
329 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
332 * iltests.il.in: Add test case for tail call with many arguments.
334 2008-10-03 Zoltan Varga <vargaz@gmail.com>
336 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
337 to the fast virtual generic method code until the aot case is fixed.
339 2008-10-03 Mark Probst <mark.probst@gmail.com>
341 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
343 2008-10-03 Mark Probst <mark.probst@gmail.com>
345 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
348 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
350 * simd-intrinsics.c: Forgot to add this one.
352 * mini-codegen.c: Fix macro in case SIMD is not supported.
354 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
356 This patch land initial JIT support for simd intrinsics.
358 * mini-x86.h: Added new define to make --enable_minimal work on x86.
360 * Makefile.am: Added simd-intrinsics.c
362 * simd-intrinsics.c: New file with simd instrinsic related
365 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
367 * cpu-x86.md: Add simd related instructions.
369 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
371 * driver.c: Added two new --regression variants.
373 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
375 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
377 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
378 extract some complicated logic to helper functions.
380 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
382 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
384 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
385 the specialized simplification pass.
387 * method-to-ir.c (mono_spill_global_vars): Use new macro.
389 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
391 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
394 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
395 if MONO_ARCH_NEED_SIMD_BANK is defined.
397 * mini-ops.h: Added the new simd ops.
399 * mini-x86.c: Added mono_arch_xregname.
401 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
403 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
405 * mini-x86.h: Define simd related MONO_ARCH macros.
407 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
409 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
411 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
412 MONO_CLASS_IS_SIMD to deal with simd related IR.
414 * mini.h (MonoInst): Added spill_var to the backend union.
416 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
418 * mini.h: Added forward declarations of the new simd fuctions.
420 * optflags-def.h: Added new optimization names SIMD.
422 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
424 * regalloc.h: Added support for working with 3 register banks.
426 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
428 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
430 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
432 * mini-exceptions.c: remove 64 bit related ifdef clutter.
434 2008-10-03 Zoltan Varga <vargaz@gmail.com>
436 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
437 instead of one on 64 bit systems.
439 * method-to-ir.c: Remove unused includes.
441 2008-10-02 Zoltan Varga <vargaz@gmail.com>
443 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
444 cfg->used_int_regs, since the two are different on arm.
446 2008-10-02 Mark Probst <mark.probst@gmail.com>
448 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
449 mono_method_get_vtable_index() to get the vtable index.
451 2008-10-02 Mark Probst <mark.probst@gmail.com>
453 * method-to-ir.c (mono_method_to_ir2): Don't create native
454 wrappers for array methods, because they're never called (and if
455 they were called they wouldn't work).
457 2008-10-02 Mark Probst <mark.probst@gmail.com>
459 * method-to-ir.c (mono_method_to_ir2): Array methods are
460 special-cased and must not be invoked indirectly via the (M)RGCTX
461 when generic sharing is turned on. Fixes #431413.
463 2008-10-01 Mark Probst <mark.probst@gmail.com>
465 * method-to-ir.c: When generic sharing is active, call
466 non-interface virtual generic methods via the standard trampoline.
468 * mini-trampolines.c: Handle virtual generic shared methods.
470 * mini.h, mini-x86.c, mini-x86.h: New argument for
471 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
472 method thunks and which is the trampoline to call if the lookup
473 fails. Enable the virtual generic method thunk for x86.
475 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
476 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
477 argument but assert that it's NULL, because these archs don't yet
478 implement the virtual generic method thunk. Changes in the IMT
479 thunk data structures.
481 2008-10-01 Zoltan Varga <vargaz@gmail.com>
483 * aot-compiler.c (emit_globals): Avoid invalid characters in
484 the static linking symbol.
486 * objects.cs: Add a test for the range check optimization. Fix warnings.
488 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
489 optimization from the current JIT.
491 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
492 later in decompose_array_access_opts () to allow more optimizations.
494 * method-to-ir.c (mono_handle_soft_float): Rename this to
495 mono_decompose_soft_float () for consistency.
497 * mini-ops.h: Fix arguments of OP_STRLEN.
499 * method-to-ir.c (save_cast_details): Extract the cast details saving code
500 into a separate function.
501 (reset_cast_details): Ditto.
502 (handle_unbox): Save cast details. Fixes #431254.
504 * method-to-ir.c: Remove some obsolete FIXMEs.
506 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
508 * ir-emit.h (alloc_dreg): Write a warning before crashing.
510 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
512 * mini-codegen.c: More work on macros to make them
513 ready for multiple regbanks.
515 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
517 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
519 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
521 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
523 * mini-codegen.c (mono_spillvar_offset): Proper support for
526 2008-09-30 Zoltan Varga <vargaz@gmail.com>
528 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
529 the stack overflow changes.
531 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
533 * mini-codegen.c: Make all bank macros depend on reg_bank.
535 * mini-codegen.c (mono_local_regalloc): Make free mask
536 initialization regbank aware.
538 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
540 * mini-codegen.c (mono_local_regalloc): Extract callee
541 mask selection to a function and make it regbank aware.
543 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
545 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
546 code to deal with many regbanks.
548 2008-09-30 Zoltan Varga <vargaz@gmail.com>
550 * mini-codegen.c: More fp->regbank changes.
552 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
554 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
555 of a hardcoded constant.
557 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
559 * method-to-ir.c (type_from_stack_type): Fix typo.
561 2008-09-29 Zoltan Varga <vargaz@gmail.com>
563 * mini-ia64.c (emit_move_return_value): Convert float return values to
566 * objects.cs: Add a new test.
568 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
569 VARARG methods to fix an assert later.
571 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
572 end so it at least compiles.
574 2008-09-28 Zoltan Varga <vargaz@gmail.com>
576 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
578 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
580 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
581 optimization to a new function (emit_optimized_ldloca_ir) and enable
582 it for both ldloca and ldloca_s.
584 2008-09-28 Zoltan Varga <vargaz@gmail.com>
586 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
587 gshared CASTCLASS code.
589 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
590 amd64, where the libc stack unwinder encounters stack frames referring to
591 native code in unmapped memory.
593 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
596 * generics.cs: Add new test.
598 2008-09-27 Zoltan Varga <vargaz@gmail.com>
600 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
601 add a check that one of the ARM_FPU_ constants is defined.
603 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
605 * mini-exceptions.c: Fix build on non-altstack platforms.
607 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
610 * ir-emit.h: Add a comment to NEW_PCONST.
612 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
614 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
616 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
617 after the changes to MonoJitDomainInfo.
619 2008-09-27 Mark Probst <mark.probst@gmail.com>
621 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
623 2008-09-27 Mark Probst <mark.probst@gmail.com>
625 * mini-ppc.c: Compiler warning fixes.
627 2008-09-27 Mark Probst <mark.probst@gmail.com>
629 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
632 2008-09-27 Mark Probst <mark.probst@gmail.com>
634 * exceptions-ppc.c, mini-ppc.h: Compile
635 mono_arch_handle_altstack_exception() on Darwin, too.
637 2008-09-27 Mark Probst <mark.probst@gmail.com>
639 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
640 work on archs which don't have generic sharing implemented, only
641 without the vtable_arg.
643 2008-09-26 Mark Probst <mark.probst@gmail.com>
645 * mini.c: Added comment explaining why delegate ctor icall
646 wrappers are compiled.
648 2008-09-26 Mark Probst <mark.probst@gmail.com>
650 * mini.c: Don't produce trampolines to delegate ctor icall
651 wrappers but compile them upfront.
653 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
655 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
656 runtime-set function when going back to managed code. Currently this
657 is used to set back the protection on the soft ovf pages and/or to
658 throw the stack overflow exception that happened in unmanaged code.
660 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
662 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
663 runtime-set function when going back to managed code. Currently this
664 is used to set back the protection on the soft ovf pages and/or to
665 throw the stack overflow exception that happened in unmanaged code.
667 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
669 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
670 the support code for restoring stack protection after stack overflows
671 that happen in unmanaged code. Don't set the exec permission on the
674 2008-09-26 Zoltan Varga <vargaz@gmail.com>
676 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
677 delegate->method_ptr is set. Fixes #428054.
679 2008-09-25 Zoltan Varga <vargaz@gmail.com>
681 * tests.cs: Rename to ratests.cs.
683 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
684 emit_get_rgctx_... functions.
686 2008-09-25 Mark Probst <mark.probst@gmail.com>
688 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
690 2008-09-25 Mark Probst <mark.probst@gmail.com>
692 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
693 before asserting that method is sharable.
695 2008-09-25 Mark Probst <mark.probst@gmail.com>
697 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
698 whether method needs a static RGCTX wrapper used instead of
701 * generic-sharing.c, mini.h: A few functions moved to
702 metadata/generic-sharing.c.
704 2008-09-25 Mark Probst <mark.probst@gmail.com>
706 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
707 Generic code sharing for value types, which essentially means
708 treating value type methods like static methods. The RGCTX is
709 passed in the same way.
711 2008-09-25 Zoltan Varga <vargaz@gmail.com>
713 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
714 opcode when creating multi-dimensional arrays of open types.
716 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
719 * generics.cs: Add a test.
721 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
723 2008-09-24 Zoltan Varga <vargaz@gmail.com>
725 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
727 * mini.c (mini_method_compile): Set it when running under the debugger.
729 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
730 vreg optimization if the flag is set.
732 * driver.c (mono_main): Add --attach= option to pass options to
735 * mini.c (sigquit_signal_handler): Start the attach agent.
737 * ssapre.c: Disable this to save space since it is not yet ported to
740 * regalloc2.c: Disable this to save space.
742 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
744 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
746 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
747 the -v option useful again.
749 2008-09-24 Zoltan Varga <vargaz@gmail.com>
751 * mini-amd64.c (mono_arch_output_basic_block): Add support for
754 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
755 arrays of arrays. Fixes #428406.
757 * method-to-ir.c (mini_emit_castclass): Ditto.
759 * objects.cs: Add new test.
761 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
763 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
764 was wrong at it choked against target_type_is_incompatible for byref types.
766 2008-09-23 Zoltan Varga <vargaz@gmail.com>
768 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
771 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
773 * mini-exceptions.c: update a few more exceptions-related counters.
775 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
777 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
778 new functions to allocate from persistent mempools.
780 2008-09-23 Zoltan Varga <vargaz@gmail.com>
782 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
783 multiple register banks in the future.
785 * mini-codegen.c (mono_local_regalloc): Fix a warning.
787 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
789 * mini.c (type_to_eval_stack_type): Remove duplicated function.
791 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
793 * mini.h: Export type_to_eval_stack_type.
795 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
796 is only ins->klass of byref types.
798 2008-09-22 Zoltan Varga <vargaz@gmail.com>
800 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
801 (mini_emit_memcpy2): Ditto.
803 * mini-amd64.c: Fix a warning.
805 2008-09-21 Mark Probst <mark.probst@gmail.com>
807 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
810 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
812 * method-to-ir.c: Extract stloc micro-optimization to a
813 function and apply it to all cases.
815 2008-09-19 Mark Probst <mark.probst@gmail.com>
817 * method-to-ir.c: Don't fail generic code sharing in cases we
820 2008-09-18 Mark Probst <mark.probst@gmail.com>
822 * mini-ppc.c: Handle structs in tailcalls on Darwin.
824 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
826 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
829 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
831 * trace.c: make tracing more useful and correct, with per-thread
834 2008-09-15 Mark Probst <mark.probst@gmail.com>
836 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
837 doing a method call and the argument is an R4.
839 2008-09-14 Zoltan Varga <vargaz@gmail.com>
841 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
844 2008-09-13 Mark Probst <mark.probst@gmail.com>
846 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
848 2008-09-12 Zoltan Varga <vargaz@gmail.com>
850 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
851 (MONO_JUMP_TABLE_FROM_INS): Ditto.
853 2008-09-11 Zoltan Varga <vargaz@gmail.com>
855 * driver.c: Add a --agent argument (not supported yet) to load managed
856 agent assemblies before loading the main assembly, similarly to how the
857 Java VM handles agents.
859 2008-09-11 Mark Probst <mark.probst@gmail.com>
861 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
862 function to do stack layout of local variables.
864 2008-09-11 Mark Probst <mark.probst@gmail.com>
866 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
869 2008-09-11 Zoltan Varga <vargaz@gmail.com>
871 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
872 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
873 JIT if DISABLE_JIT is defined.
875 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
878 2008-09-10 Mark Probst <mark.probst@gmail.com>
880 * iltests.il.in: Disable the fconv test on PPC (the result is
881 undefined according to ECMA).
883 2008-09-10 Mark Probst <mark.probst@gmail.com>
885 * iltests.il.in: Enable tail call tests for PPC.
887 * mini.h: Add variable for storing incoming valuetype argument
888 addresses for tail calls.
890 * mini-ppc.c: Implement valuetype arguments and return values for
893 2008-09-09 Mark Probst <mark.probst@gmail.com>
895 * mini-ppc.c: Partially implement tail calls (struct arguments and
896 return values not supported).
898 * method-to-ir.c: Enable tail calls on PPC.
900 2008-09-08 Zoltan Varga <vargaz@gmail.com>
902 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
903 runtime-invoke wrappers to work around the problem of them getting
904 assigned to a random class.
906 * aot-runtime.c (mono_aot_get_method): Ditto.
908 2008-09-07 Zoltan Varga <vargaz@gmail.com>
910 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
911 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
913 2008-09-07 Mark Probst <mark.probst@gmail.com>
915 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
916 until they're implemented properly.
918 * exceptions-ppc.c: Use arch-independent exception-handling code
919 instead of custom one.
921 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
924 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
926 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
927 applies when __powerpc__ is defined.
929 2008-09-06 Zoltan Varga <vargaz@gmail.com>
931 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
932 methods to their code to avoid computing the full name of wrappers and
933 doing a lookup in a string hash table.
935 2008-09-05 Zoltan Varga <vargaz@gmail.com>
937 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
938 we identify bblocks before method_to_ir () is ran.
940 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
941 Also avoid optimizing branches pointing to themselves.
943 * mini.c (mini_method_compile): Ditto. Fixes #422947.
945 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
947 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
949 2008-09-05 Zoltan Varga <vargaz@gmail.com>
951 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
952 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
953 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
956 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
957 jumped to the same entry in plt_jump_table.
959 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
961 * method-to-ir.c (initialize_array_data): Handle field with RVA from
964 2008-08-31 Zoltan Varga <vargaz@gmail.com>
966 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
967 other assignment can be if converted. Saves 1.5% on corlib size and fixes
970 2008-08-29 Geoff Norton <gnorton@novell.com>
972 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
973 segment, and doesn't properly handle .space as .text. Fixes
976 2008-08-29 Geoff Norton <gnorton@novell.com>
978 * mini.c: Disable the mach exception handler when running on
981 2008-08-29 Geoff Norton <gnorton@novell.com>
983 * aot-compiler.c: Patch from Renaldas Zioma to properly register
984 globals on Darwin/ARM
986 2008-08-28 Zoltan Varga <vargaz@gmail.com>
988 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
989 since too many things depend on it. Instead, call
990 mono_runtime_set_no_exec ().
992 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
995 * aot-compiler.c: Add an 'asm-only' AOT option.
997 * mini.c: Avoid initializing the runtime when doing AOT compilation.
999 * aot-compiler.c (compile_method): Disable gshared support for now as it
1002 2008-08-27 Bill Holmes <billholmes54@gmail.com>
1004 * mini-amd64.h : Fix a compiler warning.
1006 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1007 Changed to use a callback function to retrieve the unwind info.
1008 This avoids problems observed when code blocks were removed by
1009 unloading an app domain.
1011 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
1012 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
1015 Contributed under MIT/X11 license.
1017 2008-08-27 Bill Holmes <billholmes54@gmail.com>
1019 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
1020 case to keep the stack aligned to 8.
1022 Contributed under MIT/X11 license.
1024 2008-08-26 Zoltan Varga <vargaz@gmail.com>
1026 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
1027 avoid repeated linear searches.
1029 2008-08-25 Zoltan Varga <vargaz@gmail.com>
1031 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
1032 methods it can't handle.
1034 * aot-compiler.c (add_method): Avoid adding a method twice.
1035 (add_wrappers): Add runtime invoke wrappers for all methods.
1037 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
1038 function to create an aot-compatible version of this trampoline.
1040 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
1042 2008-08-24 Zoltan Varga <vargaz@gmail.com>
1044 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
1046 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
1047 with a generic sharing failure.
1049 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
1051 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
1052 CEE_RETHROW. Fixes #419634.
1054 * mini.c (mono_method_to_ir): Ditto.
1056 * exceptions.cs: Add a new test.
1058 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
1059 to mono_type_stack_size_internal () since some callers might not pass in
1062 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
1063 instrument_prolog. Fixes #419878.
1065 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
1066 doubles in soft float mode volatile.
1068 2008-08-23 Zoltan Varga <vargaz@gmail.com>
1070 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
1072 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
1073 to handle soft float correctly.
1075 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
1078 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
1080 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
1081 to sp, since the generics catch code requires it.
1083 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
1086 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
1087 mono_arch_emit_imt_argument ().
1089 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
1091 * mini-arm.c tramp-arm.c: Generic sharing updates.
1093 2008-08-22 Zoltan Varga <vargaz@gmail.com>
1095 * mini-arm.c: Fix the arm build.
1097 * generic-sharing.c (mini_type_get_underlying_type): New helper function
1098 handling enums, generic instances and generic sharing.
1099 (mini_type_stack_size_full): Ditto.
1101 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
1103 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
1105 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
1107 * tramp-arm.c: Implement the rgctx fetch and the generic class init
1110 * mini-arm.c: Various small generic sharing changes.
1112 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
1114 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
1117 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
1118 helper function to return a generic class init trampoline.
1120 * method-to-ir.c mini.c: Use it.
1122 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
1123 arch-specfic function to return a generic class init trampoline.
1125 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
1126 the GENERIC_CLASS_INIT custom code.
1128 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
1129 a fatal error, not a sharing failure.
1131 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
1134 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
1135 trampoline argument from MONO_ARCH_VTABLE_REG.
1137 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1138 order of the arguments to the C trampoline: pass 'slot' as the trampoline
1139 argument, and pass the vtable in VTABLE_REG.
1141 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1142 order of the arguments to the C trampoline: pass 'slot' as the trampoline
1143 argument, and pass the vtable in VTABLE_REG.
1144 (mono_arch_create_trampoline_code_full): Remove some special casing for
1145 the rgctx fetch trampoline.
1147 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
1150 * iltests.il: Add a test for it.
1152 2008-08-21 Zoltan Varga <vargaz@gmail.com>
1154 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
1156 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
1159 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
1160 use mono_jit_info_table_find () to avoid recursion.
1161 (mono_delegate_trampoline): Add a sync wrapper here.
1163 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
1166 * mini.c (mono_method_to_ir): Ditto.
1168 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
1169 add_sync_wrapper argument. Don't add a sync wrapper here.
1170 (mono_create_jump_trampoline): Don't add a sync wrapper here.
1172 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
1174 2008-08-20 Bill Holmes <billholmes54@gmail.com>
1176 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
1177 of nonvolatile registers back from MonoContext to CONTEXT.
1179 Contributed under MIT/X11 license.
1181 2008-08-20 Bill Holmes <billholmes54@gmail.com>
1183 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
1184 arguments on Winx64 there are only 4 argument registers. For this
1185 logic to work the last argument must be pulled from the stack.
1187 Contributed under MIT/X11 license.
1189 2008-08-20 Zoltan Varga <vargaz@gmail.com>
1191 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1193 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
1194 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
1195 encode/decode_method_ref ().
1197 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
1199 * aot-runtime.c (decode_patch): Ditto.
1201 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
1202 MONO_PATCH_INFO_METHOD.
1204 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
1207 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
1210 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
1212 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
1213 one from the caller.
1215 * aot-runtime.c (decode_generic_inst): New function to decode and
1216 return a interned generic inst.
1217 (decode_klass_ref): Use it.
1218 (decode_method_ref): Ditto.
1220 * aot-compiler.c (emit_exception_debug_info): Save
1221 jinfo->has_generic_jit_info too.
1223 2008-08-19 Zoltan Varga <vargaz@gmail.com>
1225 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
1227 * iltests.il.in: Add a test for fconv_to_i.
1229 * liveness.c: Disable the liveness2 pass for now to save space.
1231 * regalloc2.c: Include mempool-internals.h to fix warnings.
1233 * aot-compiler.c (encode_method_ref): Encode the context of generic
1236 * aot-runtime.c (decode_method_ref): Inflate generic methods using
1237 the context saved in the aot file.
1239 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1241 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1243 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
1244 volatile so they won't be optimized away.
1246 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1252 * dominators.c: Remove duplicated functions that now are in
1253 mempool-internals.h.
1255 2008-08-19 Zoltan Varga <vargaz@gmail.com>
1257 * aot-compiler.c: Fix warnings.
1259 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
1261 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
1263 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
1266 * mini.c (mono_resolve_patch_target): Ditto.
1268 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
1269 (encode_klass_ref): Add support for encoding VARs/MVARs.
1271 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
1273 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
1274 the handling of the got entries into a separate 'decode_got_entry' function.
1275 Add support for RGCTX_FETCH.
1277 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
1278 clobbered by the trampoline code.
1280 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
1281 not clobbered by the indirect calling code.
1283 2008-08-18 Zoltan Varga <vargaz@gmail.com>
1285 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
1288 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1290 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
1291 signature using the compilation mempool otherwise we would leak it.
1293 2008-08-18 Zoltan Varga <vargaz@gmail.com>
1295 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
1296 mono_emit_abs_call ().
1298 * patch-info.h: Add GENERIC_CLASS_INIT.
1300 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
1302 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
1303 as their target as a near call.
1305 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
1307 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
1309 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
1310 call to a runtime function described by a patch.
1312 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
1313 mono_emit_abs_call, this has the advantage that the ABS handling code in
1314 mono_codegen () can handle them both, and can handle other stuff in the
1315 future without additional code.
1317 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
1319 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
1322 * mini.h: Add missing bblock related prototypes.
1324 * mini.h (MonoCompile): Remove unused reverse_inst_list and
1325 reverse_inst_list_len fields.
1327 * mini.c: Refactor this file a bit by moving branch optimizations to
1330 * method-to-ir.c: Merge generic sharing changes missed earlier.
1332 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
1334 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
1335 shared patches. Process METHODCONST as a shared patch.
1337 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1338 as it crashes on the 2.0 mscorlib.
1340 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1343 * aot-compiler.c: Use is_plt_patch () in a few additional places.
1344 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1347 * aot-compiler.c: Reorganize the got handling code to be a bit more
1350 2008-08-17 Zoltan Varga <vargaz@gmail.com>
1352 * aot-compiler.c: Make the patch_to_plt_offset hash table use
1353 mono_patch_info_equals/hash, and use it to massively simplify
1356 * mini.c (mono_patch_info_hash): Simplify this and add support for
1359 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1361 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1362 handling code, since an offset is not enough to identify a trampoline.
1364 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1366 2008-08-17 Mark Probst <mark.probst@gmail.com>
1368 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1370 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1372 * mini-ops.h: Argument and result types for OVF_CARRY ops.
1374 * decompose.c: PPC decompositions for various ops.
1376 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1378 2008-08-17 Zoltan Varga <vargaz@gmail.com>
1380 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1381 call the generic trampoline code using a call, instead of a jump, to
1382 remove some special casing from the generic trampoline code.
1384 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1385 (mono_codegen): Ditto.
1387 * aot-compiler.c aot-runtime.c: Ditto.
1389 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1391 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1392 helper function to find the offset corresponding to a lazy fetch trampoline.
1394 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1395 when doing generic sharing.
1397 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1400 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1401 mini-trampolines.c to be with the other trampoline creation functions.
1403 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1404 as it is equal to method->signature in most cases, add a
1405 mono_emit_method_call_full variant which takes a signature and an imt
1408 2008-08-16 Zoltan Varga <vargaz@gmail.com>
1410 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1411 to this function, since it could be computed easily from the method
1413 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1416 * method-to-ir.c mini.c: Remove references to
1417 compile_generic_method_wo_context.
1419 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1420 generic method calls.
1422 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1423 dimensional non-szarrays.
1425 * mini.c (mini_init): Register mono_array_new_1.
1427 * jit-icalls.c (mono_array_new_1): New jit icall.
1429 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1430 pointing to the method.
1432 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1433 method addresses belonging to METHOD_JUMP patches in the
1434 jump_target_got_slot_hash.
1435 (mono_aot_load_method): Ditto.
1437 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1438 METHOD_JUMP patches.
1440 * mini.c (mini_create_jit_domain_info): New helper function which
1441 initializes/frees domain->runtime_info.
1442 (mini_free_jit_domain_info): Ditto.
1443 (mini_init): Install the domain hook functions with the runtime.
1445 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1446 information maintained by the JIT.
1448 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1449 insertion into jump_table_hash into mono_codegen (), also implement proper
1452 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1453 tail calls, it is already done by the aot code.
1455 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1458 * iltests.il.in: Make the jmp test a bit more complex.
1460 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1461 generic instances which doesn't have a token.
1463 * aot-runtime.c (decode_method_ref): Ditto.
1465 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1466 can handle this case now.
1467 (handle_box): Ditto.
1469 2008-08-15 Geoff Norton <gnorton@novell.com>
1471 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1474 2008-08-15 Zoltan Varga <vargaz@gmail.com>
1476 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1477 calling generic methods.
1479 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1481 * aot-runtime.c (decode_patch_info): Ditto.
1483 * mini.c (mono_resolve_patch_target): Ditto.
1485 * patch-info.h: Add METHOD_RGCTX.
1487 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1489 2008-08-14 Zoltan Varga <vargaz@gmail.com>
1491 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1492 arguments in registers.
1494 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1495 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1497 * mini.c (mini_method_compile): Abort aot compilation for generic
1498 methods if generic sharing is disabled.
1500 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1503 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
1504 requiring an mrgctx.
1506 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1507 store instructions when converting a vcall to a normal call.
1509 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1510 mono_arch_find_jit_info.
1512 2008-08-13 Zoltan Varga <vargaz@gmail.com>
1514 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1515 avoid calling mono_method_full_name () for every method even if the
1517 (check_inline_caller_method_name_limit): Ditto.
1519 2008-08-12 Zoltan Varga <vargaz@gmail.com>
1521 * driver.c (main_thread_handler): Allow AOT compilation of multiple
1522 assemblies in one run.
1524 * aot-compiler.c (mono_compile_assembly): Only print out a count of
1525 skipped methods if it is not 0.
1527 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1529 2008-08-12 Bill Holmes <billholmes54@gmail.com>
1531 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
1532 MONO_ARCH_HAVE_UNWIND_TABLE.
1534 Contributed under MIT/X11 license.
1536 2008-08-12 Bill Holmes <billholmes54@gmail.com>
1538 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
1539 from default optimizaton list on Winx64.
1541 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
1543 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
1544 the LMF from the MonoJitTlsData structure.
1546 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
1548 Contributed under MIT/X11 license.
1550 2008-08-12 Zoltan Varga <vargaz@gmail.com>
1552 * mini.c (sigsegv_signal_handler): Fix the build.
1554 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
1555 assembly->aot_module.
1557 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1558 hash table. This simplifies and speeds up a lot of code, and fixes support
1561 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1564 * mini-exceptions.c: Ditto.
1566 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1567 'native_offset' argument, since these are computed in the
1568 mono_find_jit_info () function.
1570 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1571 is used by exceptions-ppc.c.
1573 * exceptions-ppc.c: Call mono_find_jit_info () instead of
1574 mono_arch_find_jit_info ().
1576 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1577 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1578 generic code in mini-exceptions.c.
1580 2008-08-11 Zoltan Varga <vargaz@gmail.com>
1582 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1584 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1586 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1587 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1588 called while holding the loader lock. Fixes #415608.
1589 (mono_aot_get_method_from_token_inner): Ditto.
1591 2008-08-09 Zoltan Varga <vargaz@gmail.com>
1593 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1594 to reduce differences between this and the generic implementation in
1596 (ves_icall_get_frame_info): Ditto.
1598 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1600 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1603 * exceptions-ppc.c (arch_get_call_filter): Rename this to
1604 mono_arch_get_call_filter () and make it non-static, for consistency with the
1605 other architectures.
1607 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
1610 * local-propagation.c:
1611 * mini-x86.c: Correct the name of arch defines.
1613 2008-08-09 Zoltan Varga <vargaz@gmail.com>
1615 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1616 NO_EMULATE_LONG_SHIFT_OPS define.
1618 2008-08-08 Zoltan Varga <vargaz@gmail.com>
1620 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1621 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1623 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1624 MACH fixes. Merged from the 2.0 branch.
1626 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1628 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1629 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1631 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1633 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1634 mono_marshal_get_native_wrapper () signature changes.
1636 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
1638 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1639 conversion bug under arm.
1641 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
1643 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1645 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1646 with overflow checking.
1648 2008-08-05 Marek Habersack <mhabersack@novell.com>
1650 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1651 to the genmdesc.pl file
1653 2008-08-05 Zoltan Varga <vargaz@gmail.com>
1655 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1656 arg_array in the soft-float versions of the LOAD/STORE macros.
1658 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1661 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1663 2008-08-02 Zoltan Varga <vargaz@gmail.com>
1665 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1666 a float HFA. Fixes #413621.
1668 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
1670 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1671 frame_size to args_size. Fixes build.
1673 2008-08-02 Zoltan Varga <vargaz@gmail.com>
1675 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1676 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1678 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1679 the stack are not unaligned. Fixes #413247.
1681 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1683 * mini.c: update jitted methods performance counters.
1685 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1687 * mini-exceptions.c: increase the exceptions thrown performance
1688 counter in mono_handle_exception ().
1690 2008-07-29 Zoltan Varga <vargaz@gmail.com>
1692 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1693 can work with netmodules.
1695 2008-07-28 Geoff Norton <gnorton@novell.com>
1697 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
1700 2008-07-28 Zoltan Varga <vargaz@gmail.com>
1702 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1705 2008-07-28 Bill Holmes <billholmes54@gmail.com>
1707 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1708 The float param registers and other param registers must be the
1709 same index on Windows x64.
1711 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
1712 ArgValuetypeAddrInIReg argument case. Setting the argument
1713 op to OP_VTARG_ADDR (OP_REGOFFSET)).
1715 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
1716 variable computed above as the copy length for arguments of storage
1717 type ArgValuetypeAddrInIReg.
1719 * mini-amd64.c (mono_arch_emit_call) : Implementing the
1720 ArgValuetypeAddrInIReg argument case. This case will rely on
1721 mono_arch_emit_outarg_vt to emit the correct code later in the process.
1723 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
1724 a 32 byte stack allocation for all calls. We will omit the adjustment for
1725 jump and tail call instructoins as they do not follow the typical call behavior.
1727 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
1728 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
1729 local variable and pass the local variable by reference to the called method.
1731 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1732 Implementing the ArgValuetypeAddrInIReg argument case. When the address
1733 of a struct is passed in a register it must be saved with the other
1734 volatile argument on the stack.
1736 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
1737 frame pointer the stack adjustment value must be saved to the unwind
1740 Contributed under MIT/X11 license.
1742 2008-07-28 Zoltan Varga <vargaz@gmail.com>
1744 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
1745 which got lost in the merge.
1747 2008-07-27 Zoltan Varga <vargaz@gmail.com>
1749 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
1752 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
1754 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
1755 icalls, since they won't be patched.
1757 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
1758 different code sequence when running under valgrind to prevent some valgrind
1761 * iltests.il.in: Add new regression test.
1763 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
1766 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
1767 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
1769 * iltests.il.in: Add new test.
1771 * aot-compiler.c: Fix some warnings.
1773 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
1776 2008-07-27 Zoltan Varga <vargaz@gmail.com>
1778 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
1779 (mini_usage_jitdeveloper): Add a missing --wapi option.
1781 2008-07-25 Zoltan Varga <vargaz@gmail.com>
1783 * mini-codegen.c: Simplify the is_fp macros.
1784 (free_up_ireg): Remove, use free_up_reg instead.
1785 (free_up_reg): Fix the fp case.
1787 2008-07-26 Zoltan Varga <vargaz@gmail.com>
1789 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
1792 * exceptions-x86.c: Merge some changes which seemed to have got lost
1793 in the linear-ir merge.
1795 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
1797 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
1798 long vreg volatile even if the variable was already created.
1800 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
1803 2008-07-26 Zoltan Varga <vargaz@gmail.com>
1805 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
1807 * mini.c (mono_jit_compile_method_inner): Add support for
1808 MONO_EXCEPTION_BAD_IMAGE.
1810 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
1811 mini_method_get_context () returns NULL. Fixes #356531.
1813 * mini.c (mono_method_to_ir): Ditto.
1815 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
1816 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
1818 2008-07-25 Zoltan Varga <vargaz@gmail.com>
1820 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
1821 in the LDFTN implementation.
1823 2008-07-25 Mark Probst <mark.probst@gmail.com>
1825 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
1826 code, patch calls to icalls, too, even if they're not in the
1827 shared generic code hash. Fixes #411962.
1829 2008-07-25 Zoltan Varga <vargaz@gmail.com>
1831 * cpu-x86.md: Increase the length of the fcall opcodes.
1833 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
1834 calls returning floats.
1836 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
1839 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
1842 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
1843 into the domain->method_code_hash.
1845 * aot-compiler.c: Fix win32 build.
1847 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
1849 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
1850 gshared NEWARR implementation.
1852 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
1854 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
1855 can be used outside of method_to_ir.
1857 * mini.h (MonoCompile): Add arg_types field.
1859 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
1861 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
1862 the values of the local arg_array and param_types array.
1864 2008-07-24 Zoltan Varga <vargaz@gmail.com>
1866 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
1867 got accesses might only get generated later when NEWOBJ is decomposed.
1869 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
1870 looking up the native code of the target method when a delegate is called
1873 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
1876 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
1878 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
1879 AOT work on platforms without a working dlsym implementation.
1881 * mini.h: Bump AOT image format version.
1883 2008-07-24 Mark Probst <mark.probst@gmail.com>
1885 * mini-exceptions.c: Free a MonoType with
1886 mono_metadata_free_type() instead of g_free().
1888 * aot-runtime.c: Free a MonoType.
1890 2008-07-24 Zoltan Varga <vargaz@gmail.com>
1892 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
1895 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
1898 2008-07-23 Massimiliano Mantione <massi@ximian.com>
1899 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
1902 2008-07-23 Zoltan Varga <vargaz@gmail.com>
1904 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
1905 NEWOBJ calls on valuetypes.
1907 * iltests.il.in: Add new test.
1909 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
1911 2008-07-22 Zoltan Varga <vargaz@gmail.com>
1913 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
1914 is no longer needed.
1916 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
1917 non register sized integer arguments.
1918 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
1919 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
1922 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
1925 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
1926 two a binop with different sized arguments is emitted.
1928 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
1929 instruction in the ins==NULL case.
1931 2008-07-23 Zoltan Varga <vargaz@gmail.com>
1933 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
1935 * mini-x86.c: Fix osx build.
1937 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
1940 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
1941 instruction for non int sized variables.
1943 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
1946 2008-07-23 Robert Jordan <robertj@gmx.net>
1948 * method-to-ir.c: Fix MSVC build.
1950 2008-07-22 Zoltan Varga <vargaz@gmail.com>
1952 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
1953 a non int sized type, widen it to an int since newer versions of gcc seem to
1954 generate code which needs this.
1956 * ssa2.c abcremoval2.c: Fix warnings.
1958 * *: Merge the Linear IR branch.
1960 The original branch is at trunk/branches/vargaz/mini-linear-il, and
1961 the ChangeLog file there describes all the changes done over the years.
1962 Further documentation can be found at www.mono-project.com/Linear_IL.
1964 2008-07-21 Bill Holmes <billholmes54@gmail.com>
1966 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1967 The float param registers and other param registers must be the
1968 same index on Windows x64.
1970 Contributed under MIT/X11 license.
1972 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
1974 * mini.c: Make the previous fix GC safe.
1976 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
1978 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
1980 2008-07-21 Bill Holmes <billholmes54@gmail.com>
1982 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
1983 on Winx64. This type will not be passed on the stack (ArgOnStack), but
1984 ArgValuetypeAddrInIReg instead.
1986 Contributed under MIT/X11 license.
1988 2008-07-21 Zoltan Varga <vargaz@gmail.com>
1990 * mini-codegen.c (get_register_spilling): Fix a warning.
1992 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
1994 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
1995 for types which the initialization fails. Raises the provided exception
1996 at the right stop after cleanup.
1998 2008-07-16 Zoltan Varga <vargaz@gmail.com>
2000 * aot-compiler.c: Free most of the memory allocated during compilation.
2002 * mini.c (mini_parse_debug_options): Fix a leak.
2004 * mini.c (mini_method_compile): Don't add the method to the jit info tables
2005 during aot compilation.
2007 2008-07-14 Zoltan Varga <vargaz@gmail.com>
2009 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
2010 it has too much register pressure.
2012 2008-07-13 Zoltan Varga <vargaz@gmail.com>
2014 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
2016 2008-07-12 Zoltan Varga <vargaz@gmail.com>
2018 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2021 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2022 on amd64 similar to the way it is done on arm.
2024 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2026 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
2027 consistency, normalize error messages, avoid loading aot-only modules in
2030 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
2033 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
2035 2008-07-11 Martin Baulig <martin@ximian.com>
2038 (MonoDebuggerInfo): Add `interruption_request'.
2040 2008-07-12 Zoltan Varga <vargaz@gmail.com>
2042 * aot-compiler.c (emit_plt): Remove some dead code.
2044 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
2046 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
2047 return the plt info offset belonging to a given plt entry.
2049 * mini-trampolines.c (mono_aot_plt_trampoline): Use
2050 mono_aot_get_plt_info_offset.
2052 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
2053 similar to the amd64 code by makeing jumps through a separate jump table
2054 instead of embedding the jump addresses into the code.
2056 2008-07-11 Zoltan Varga <vargaz@gmail.com>
2058 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
2061 2008-07-10 Martin Baulig <martin@ximian.com>
2063 * mini.c (mini_method_compile): Disable generics sharing when
2064 running in the debugger.
2066 2008-07-10 Zoltan Varga <vargaz@gmail.com>
2068 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
2070 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
2071 the local register allocator from running out of registers on x86 when
2074 2008-07-10 Bill Holmes <billholmes54@gmail.com>
2076 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
2077 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
2080 Contributed under MIT/X11 license.
2082 2008-07-10 Zoltan Varga <vargaz@gmail.com>
2084 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
2085 speed up the assembler.
2087 2008-07-09 Zoltan Varga <vargaz@gmail.com>
2089 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
2092 * mini.c: Move the soft float handling macros a bit earlier, add
2093 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
2096 * mini.h: Add prototype for mono_arch_fixup_jinfo.
2098 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
2099 read-only to help catch code allocation requests.
2101 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
2102 and turn it off when using --aot-only or when compiling with --aot=full.
2104 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
2105 jump table for switches from the normal domain mempool, not the code
2108 * mini-trampolines.c (get_unbox_trampoline): New function to return an
2109 unbox trampoline which handles aot-only mode too.
2111 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
2112 an AOTed unbox trampoline.
2114 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
2116 2008-07-09 Bill Holmes <billholmes54@gmail.com>
2118 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
2121 Contributed under MIT/X11 license.
2123 2008-07-09 Bill Holmes <billholmes54@gmail.com>
2125 * mini.c (mono_codegen): Allocate space at the end of the code block and store
2126 the unwind information for the method at the end of the allocated block.
2128 * mini-amd64.h: Added declarations for the unwind routines and adding field to
2129 MonoCompileArch to hold the unwind info for SEH on Winx64
2131 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
2132 frame pointer info for the method being compiled.
2134 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
2135 the call to mono_exception_from_token.
2137 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
2138 storing the method prolog information in a format that the Winx64 SEH can understand. This
2139 information is stored a the end of the method block because it is all 32-bit offset based.
2141 Contributed under MIT/X11 license.
2143 2008-07-09 Zoltan Varga <vargaz@gmail.com>
2145 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
2147 * wapihandles.c: Fix warnings.
2149 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
2152 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
2153 mono_jit_compile_method in aot-only mode since that calls the type
2156 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
2157 get_delegate_invoke_impl in aot-only mode.
2159 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
2161 2008-07-08 Zoltan Varga <vargaz@gmail.com>
2163 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
2165 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
2168 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
2170 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
2171 init trampoline from the AOT file as well.
2173 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
2174 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
2177 * mini.c (mini_init): Move the call to mono_exceptions_init () after
2180 * exceptions-amd64.c: Add _full variants for the remaining exception code
2181 creation functions as well, allow emission of relocatable code, remove
2182 caching since that is now done by the caller.
2184 * mini-exceptions.c: Add _full variants for the remaining exception code
2185 creation functions as well, add aot-only support.
2187 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
2188 if we can determine a proper token for them.
2189 (add_wrappers): Add a few more wrappers.
2190 (emit_method_code): Remove some dead code.
2191 (emit_trampolines): Emit exception code too.
2193 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
2195 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
2196 mono_array_new_va which avoids varargs.
2198 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
2200 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
2201 mono_arch_create_specific_trampoline () in all places.
2203 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
2204 a bit so it can be used for other things as well.
2206 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
2209 * exceptions-amd64.c: Rename the caching from the exception code creation
2210 functions, it is done by the caller instead.
2212 * exceptions-amd64.c: Change the signature of the exception code creation
2213 functions to allow the creation of relocatable code later.
2215 * mini-exceptions.c: Add a set of functions to query the various
2216 runtime-generated exception functions.
2218 * mini.c mini-exceptions.c: Use the newly added functions instead of the
2219 mono_arch_.. () functions.
2221 2008-07-07 Zoltan Varga <vargaz@gmail.com>
2223 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
2225 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
2227 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
2228 (mini_get_vtable_trampoline): Ditto.
2230 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
2231 code in the AOT case by returning the code size and a list of relocations to
2234 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
2236 2008-07-07 Bill Holmes <billholmes54@gmail.com>
2238 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
2241 Contributed under MIT/X11 license.
2243 2008-07-07 Zoltan Varga <vargaz@gmail.com>
2245 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
2246 so the buffer size can be computed correctly. Fixes #404735.
2248 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
2249 normally as cfg->debug_info is already freed.
2251 2008-07-06 Zoltan Varga <vargaz@gmail.com>
2253 * mini-amd64.c: For calls returning vtypes in registers, don't store
2254 the return address on the stack, instead allocate a separate local for
2257 2008-07-05 Mark Probst <mark.probst@gmail.com>
2259 * mini-trampolines.c, mini.h: Add an argument to
2260 mono_create_jit_trampoline_in_domain() for turning off the adding
2261 of the sync wrapper.
2263 * mini.c: Use the JIT trampoline without sync instead of
2264 ldftn_nosync in static RGCTX invoke wrappers so that the call can
2267 2008-07-04 Mark Probst <mark.probst@gmail.com>
2269 * driver.c: Turn on GSHARED optimization by default.
2271 2008-07-04 Zoltan Varga <vargaz@gmail.com>
2273 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
2274 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
2276 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
2277 create a variant of the generic trampoline code callable from AOTed trampolines.
2279 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
2280 trampoline code callable from AOTed trampolines.
2282 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
2284 2008-07-04 Mark Probst <mark.probst@gmail.com>
2286 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
2287 pass-through manner.
2289 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
2290 and don't fail sharing for them anymore.
2292 * mini-exceptions.c: Handle exceptions in shared generic methods.
2294 * generic-sharing.c: When checking the context of a generic
2295 method, also check its class's context. Don't treat wrappers as
2298 * mini-trampolines.c: Some code factored out to
2299 metadata/generic-sharing.c. Handle the MRGCTX case.
2301 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
2302 we must deal with the method being of another instantiation of the
2303 class. Add static rgctx invoke wrappers to generic methods.
2305 2008-07-04 Mark Probst <mark.probst@gmail.com>
2307 * mini.c: Provide all jit infos of generic shared methods with a
2310 * mini-exceptions.c: Handle the new situation that a generic info
2311 might be available, but not info about the this/vtable/mrgctx
2314 2008-07-03 Mark Probst <mark.probst@gmail.com>
2316 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
2319 2008-07-03 Zoltan Varga <vargaz@gmail.com>
2321 * dominators.c (check_dominance_frontier): Fix a warning.
2323 * mini.h: Add some missing prototypes.
2325 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
2327 * driver.c (mono_jit_init_version): Correct the comments since the first
2328 argument should be the name of the root domain, not a filename.
2330 * aot-runtime.c (make_writable): Error out if this is called while running
2332 (load_aot_module): Ditto.
2334 * aot-compiler.c: Really fix the computation of method indexes.
2336 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
2337 optimizations as this is no longer called frequently.
2339 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2340 method and the invoke impl code and pass it to the delegate trampoline instead of
2341 just the delegate class.
2343 2008-07-02 Zoltan Varga <vargaz@gmail.com>
2345 * aot-compiler.c: Fixup the computation of method indexes.
2346 (add_wrappers): Create the base methods of the runtime invoke wrappers using
2347 the method builder infrastructure.
2349 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2352 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2353 mode, load the method right away instead of creating a trampoline.
2355 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2357 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2360 2008-07-01 Zoltan Varga <vargaz@gmail.com>
2362 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2363 (mono_aot_load_method): Use method_index instead of method->token.
2365 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2366 can handle icalls etc. properly.
2368 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2370 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2372 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2373 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2374 JIT_ICALL_ADDR patch type.
2376 * patch-info.h: Add JIT_ICALL_ADDR patch type.
2378 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2380 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2382 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2384 2008-06-30 Zoltan Varga <vargaz@gmail.com>
2386 * mini.c: Use domain->jit_code_hash_lock for controlling access to
2387 domain->jit_code_hash.
2389 2008-06-29 Zoltan Varga <vargaz@gmail.com>
2391 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2393 2008-06-27 Zoltan Varga <vargaz@gmail.com>
2395 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2396 get_this_arg_from_call, let it compute it when needed.
2398 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2399 gsctx from code only when needed.
2401 * mini-trampolines.c (get_generic_context): Rename this to
2402 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2403 it can be called by the arch backends.
2405 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2407 2008-06-26 Zoltan Varga <vargaz@gmail.com>
2409 * driver.c (mono_main): Add experimental --aot-only command line option.
2411 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2414 2008-06-26 Kornél Pál <kornelpal@gmail.com>
2416 * driver.c (DllMain): Remove mono_module_handle.
2418 Contributed under MIT/X11 license.
2420 2008-06-25 Zoltan Varga <vargaz@gmail.com>
2422 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2423 for emitting methods which are not in the source assembly. Detect and report
2424 failure of assembling+linking.
2426 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2428 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2430 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2432 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2434 2008-06-24 Zoltan Varga <vargaz@gmail.com>
2436 * mini.h: Remove some obsolete prototypes.
2438 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2440 2008-06-24 Mark Probst <mark.probst@gmail.com>
2442 * mini.c (get_object_generic_inst): Variable-sized arrays are not
2443 supported by Visual Studio, so use alloca().
2445 2008-06-23 Zoltan Varga <vargaz@gmail.com>
2447 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2450 2008-06-23 Mark Probst <mark.probst@gmail.com>
2452 * mini.c: Fail sharing of a generic method if it contains an open
2453 catch clause (because we don't pass MRGCTXs yet).
2455 2008-06-23 Mark Probst <mark.probst@gmail.com>
2457 * mini.c: When compiling a method with generic sharing, insert the
2458 method instantiated with an all-Object generic context into the
2459 jit info table, instead of the context of the first instantiation
2460 of the method we happen to compile.
2462 2008-06-18 Martin Baulig <martin@ximian.com>
2464 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2465 `major_version' and `minor_version'.
2467 2008-06-17 Mark Probst <mark.probst@gmail.com>
2469 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2470 mono_method_is_generic_sharable_impl() takes an additional
2471 argument specifying whether to treat type variables as reference
2474 2008-06-17 Mark Probst <mark.probst@gmail.com>
2476 * mini.h: Removed obsolete prototypes.
2478 2008-06-17 Mark Probst <mark.probst@gmail.com>
2480 * mini.c: Don't fail generic sharing for initobj and sizeof - we
2481 already handle them.
2483 2008-06-17 Mark Probst <mark.probst@gmail.com>
2485 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2486 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2487 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2488 tramp-x86.c: Added a MonoGenericContext* argument to
2489 mono_arch_get_unbox_trampoline() so that it can call other
2490 functions which require it.
2492 2008-06-17 Mark Probst <mark.probst@gmail.com>
2494 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2495 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2496 mono_arch_get_this_arg_from_call() takes a
2497 MonoGenericSharingContext* as well.
2499 2008-06-17 Mark Probst <mark.probst@gmail.com>
2501 * mini.c: Factor out code for emitting unbox into emit_unbox() and
2502 implement generic sharing of unbox.
2504 2008-06-17 Mark Probst <mark.probst@gmail.com>
2506 * mini.c: Don't compute the vtable to determine whether a field is
2507 special static, because it might not work for open types.
2509 2008-06-17 Mark Probst <mark.probst@gmail.com>
2511 * mini.c: Removed the unused token_type and token_source arguments
2512 from get_runtime_generic_context_ptr().
2514 2008-06-17 Marek Habersack <mhabersack@novell.com>
2516 * mini.c (ADD_BINOP): fix the build
2518 2008-06-16 Zoltan Varga <vargaz@gmail.com>
2520 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2523 2008-06-16 Mark Probst <mark.probst@gmail.com>
2525 * mini.h: Removed class relations enum that's not used anymore.
2527 2008-06-16 Mark Probst <mark.probst@gmail.com>
2529 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2531 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2532 the lazy fetch trampoline access code.
2534 2008-06-15 Zoltan Varga <vargaz@gmail.com>
2536 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2538 2008-06-14 Zoltan Varga <vargaz@gmail.com>
2540 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2542 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2544 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2546 2008-06-13 Zoltan Varga <vargaz@gmail.com>
2548 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2551 * mini-ops.h: Add MIN/MAX_UN opcodes.
2553 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2556 * basic-math.cs: Add more min/max tests.
2558 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2560 2008-06-13 Mark Probst <mark.probst@gmail.com>
2562 * mini.c: Small fix in the prologue of emit_castclass.
2564 2008-06-13 Zoltan Varga <vargaz@gmail.com>
2566 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2568 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2569 do not work even for unsigned types. Fixes #400014.
2571 * basic-math.cs: Add regression tests for unsigned Min/Max.
2573 2008-06-13 Mark Probst <mark.probst@gmail.com>
2575 * mini.c: Added additional context_used argument to several
2576 functions, which will be needed for sharing generic methods. Use
2577 GET_RGCTX macro wherever appropriate. Declare only one
2578 context_used in mono_method_to_ir().
2580 2008-06-13 Mark Probst <mark.probst@gmail.com>
2582 * mini.c, generic-sharing.c: Removed generic class relations.
2584 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2585 functions due to MRGCTX changes.
2587 2008-06-13 Mark Probst <mark.probst@gmail.com>
2589 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2590 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2591 with calculated IMT.
2593 * mini.c: Generic sharing of calls via generic interfaces.
2595 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2596 generic method with non-constant MonoGenericContext*. Instead,
2597 the context is taken out of the method itself.
2599 2008-06-13 Mark Probst <mark.probst@gmail.com>
2601 * mini.c: Generic sharing of ldvirtftn.
2603 2008-06-13 Mark Probst <mark.probst@gmail.com>
2605 * mini.c: Generic sharing of ldftn.
2607 2008-06-13 Mark Probst <mark.probst@gmail.com>
2609 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2611 2008-06-13 Mark Probst <mark.probst@gmail.com>
2613 * mini.c: Generic sharing of the special case of ldtoken followed
2614 by a call to GetTypeFromHandle.
2616 2008-06-13 Mark Probst <mark.probst@gmail.com>
2618 * mini.c: Generic sharing of box for nullable types.
2620 2008-06-13 Zoltan Varga <vargaz@gmail.com>
2622 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2623 are passed on the stack. Fixes #324807.
2625 2008-06-12 Bill Holmes <billholmes54@gmail.com>
2627 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2628 for the ArgValuetypeAddrInIReg case.
2630 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
2631 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
2633 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
2634 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
2635 local variable and pass the local variable by reference to the called method.
2637 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
2638 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2640 Contributed under MIT/X11 license.
2642 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2644 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2646 * debug-mini.c (mono_debug_print_vars): Release memory after printing
2649 2008-06-10 Martin Baulig <martin@ximian.com>
2652 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2654 2008-06-09 Kornél Pál <kornelpal@gmail.com>
2656 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2657 possible error when no arguments are passed.
2659 Contributed under MIT/X11 license.
2661 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2663 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2664 where the file name is NULL.
2666 2008-06-09 Zoltan Varga <vargaz@gmail.com>
2668 * mini.c: Fix s390 build.
2670 2008-06-08 Zoltan Varga <vargaz@gmail.com>
2672 * trace.c (mono_trace_parse_options): Fix warnings.
2674 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2676 2008-06-07 Zoltan Varga <vargaz@gmail.com>
2678 * mini.c (remove_block_if_useless): Avoid printing the method name.
2680 * mini.c: Remove needless setting of ins->cil_code which is now done by
2683 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2686 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2687 translated code after it has been patched.
2689 2008-06-06 Zoltan Varga <vargaz@gmail.com>
2691 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2692 avoid problems during code patching on SMP systems.
2693 (emit_call): Avoid adding a patch info which is already added by
2695 (mono_arch_emit_exceptions): Ditto.
2697 2008-06-05 Zoltan Varga <vargaz@gmail.com>
2699 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2700 MONO_TYPE_ISSTRUCT already checks for it.
2702 2008-06-05 Bill Holmes <billholmes54@gmail.com>
2704 * mini-amd64.c:merge_argument_class_from_type: When marshaling
2705 structs with floats on Winx64 the float registers are not used.
2706 The integer registers are always used..
2707 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
2708 only one register will be used and only if the size of the struct
2709 is 1,2,4, or 8 bytes.
2711 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
2714 Contributed under MIT/X11 license.
2716 2008-06-05 Martin Baulig <martin@ximian.com>
2718 * debug-debugger.c (debugger_lookup_class): Also call
2719 mono_class_setup_methods() here; we're only called from RTI.
2721 2008-06-05 Andreas Färber <andreas.faerber@web.de>
2723 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2724 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2725 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2726 Post-process object files and add dtrace-generated object, if necessary.
2728 Contributed under MIT/X11 license.
2730 2008-06-04 Mark Probst <mark.probst@gmail.com>
2732 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2735 * mini.c: Generic sharing for unbox.any and castclass.
2737 2008-06-04 Mark Probst <mark.probst@gmail.com>
2739 * mini.c: Ignore tailcall prefix in shared generic code and when
2740 doing calls which require a vtable/rgctx argument.
2742 2008-06-04 Mark Probst <mark.probst@gmail.com>
2744 * mini.c: Don't free the JIT info.
2746 * driver.c: Changes in the JIT info table testing code.
2748 2008-06-03 Zoltan Varga <vargaz@gmail.com>
2750 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
2751 interruption. Fix some warnings.
2753 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
2754 interruption_checkpoint.
2756 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
2758 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
2759 from embedding applications.
2761 2008-06-02 William Holmes <billholmes54@gmail.com>
2763 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
2764 reserving 32 bytes on the stack when making calls.
2766 Contributed under MIT/X11 license.
2768 2008-06-01 Zoltan Varga <vargaz@gmail.com>
2770 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
2771 the linear IL branch.
2773 * driver.c: Print out more information for --version on arm.
2775 2008-05-30 Zoltan Varga <vargaz@gmail.com>
2777 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
2778 bb_exit instead, since out of line bblocks might not actually be emitted
2781 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
2782 maximum epilog size for out of line bblocks if tracing is enabled.
2784 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
2786 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
2788 * arrays.cs: Regression tests for allocating arrays with negative sizes.
2790 2008-05-28 Zoltan Varga <vargaz@gmail.com>
2792 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
2793 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
2796 2008-05-27 Zoltan Varga <vargaz@gmail.com>
2798 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
2799 the 'value' to store is a constant.
2801 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
2803 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
2804 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
2806 2008-05-26 Zoltan Varga <vargaz@gmail.com>
2808 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
2809 for accessing method->generic_container.
2811 2008-05-24 Zoltan Varga <vargaz@gmail.com>
2813 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
2815 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
2817 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
2819 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
2822 2008-05-23 Zoltan Varga <vargaz@gmail.com>
2824 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
2826 * mini.c: Handle the case when mono_class_vtable () fails.
2828 2008-05-23 Massimiliano Mantione <massi@ximian.com>
2829 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
2832 2008-05-22 Mark Probst <mark.probst@gmail.com>
2834 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
2835 together with domain sharing.
2837 2008-05-22 Mark Probst <mark.probst@gmail.com>
2839 * mini.c: Treat callvirts to final methods like non-virtual calls
2840 when doing generic sharing, i.e. look them up in the runtime
2843 2008-05-22 Mark Probst <mark.probst@gmail.com>
2845 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
2846 with computed types (for generic sharing).
2848 * mini.c: Generic sharing for mkrefany and refanyval.
2850 2008-05-22 Zoltan Varga <vargaz@gmail.com>
2852 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
2855 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
2856 the generic sharing code.
2858 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
2861 2008-05-21 Zoltan Varga <vargaz@gmail.com>
2863 * mini.h: Remove the declaration of mono_aot_init_vtable ().
2865 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
2867 * driver.c: updated copyright date
2869 2008-05-21 Zoltan Varga <vargaz@gmail.com>
2871 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
2874 2008-05-19 Martin Baulig <martin@ximian.com>
2876 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
2877 pointing to the new `_mono_debug_using_mono_debugger' variable.
2880 (mono_main): Check mono_debug_using_mono_debugger() rather than
2881 the `MONO_INSIDE_MDB' environment variable to check whether we're
2882 inside the debugger.
2884 2008-05-19 Zoltan Varga <vargaz@gmail.com>
2886 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
2889 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
2891 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
2893 * mini.c: Added mini_assembly_can_skip_verification. This
2894 function checks if the assembly requested to skip verification.
2895 Fixes part of #387274.
2897 2008-05-07 Zoltan Varga <vargaz@gmail.com>
2899 * mini.c (mini_get_method): Disable the check for open generic classes when
2900 using generic sharing.
2902 * generics.cs: Add a test for #387034.
2904 * mini.c (mini_get_method): Check whenever the method class is an open generic
2905 type, and return NULL in that case, causing a verification error. Fixes
2908 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2910 * driver.c (mono_main): Revert r102623. The right
2911 thing to do is to enable the verifier under verifiable
2912 unless a --security flag was passed.
2914 We need this non-trivial behavior for --verify-all otherwise
2915 mcs-compileall won't be able to use it. As it needs everything to
2916 be verified under validil.
2918 2008-05-06 Martin Baulig <martin@ximian.com>
2922 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
2923 (mono_debugger_thread_cleanup): Likewise.
2924 (mono_debugger_extended_notification): Likewise.
2926 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2928 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
2929 against both inflated and non-inflated methods. We need to check against the
2930 generic definition for cases where the instantiated method is not visible.
2931 We need to check against the inflated types for cases where the instantiation
2932 changes any super type. This fixes #382986.
2934 Note that this doesn't need to be applied to other parts of mono_method_to_ir
2935 that check for visibiliy as generic params only appears as the type subject
2936 of tokens on call opcodes. Field manipulation and ldftn must always
2937 target an exact type.
2939 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
2941 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
2942 if no related --security flag is passed.
2944 2008-05-05 Andreas Färber <andreas.faerber@web.de>
2946 * mini-arch.h: Prepare support for ppc64.
2948 Contributed under MIT/X11 license.
2950 2008-05-05 Andreas Färber <andreas.faerber@web.de>
2952 * aot-runtime.c: Prepare support for ppc64.
2954 Contributed under MIT/X11 license.
2956 2008-05-05 Andreas Färber <andreas.faerber@web.de>
2958 * mini-ops.h: Prepare support for ppc64.
2960 Contributed under MIT/X11 license.
2962 2008-05-04 Andreas Färber <andreas.faerber@web.de>
2964 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
2966 Contributed under MIT/X11 license.
2968 2008-05-03 Zoltan Varga <vargaz@gmail.com>
2970 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
2971 assemblies, since aot_name is not a full path, causing us to load MS.NET
2972 assemblies on windows.
2974 2008-04-28 Kornél Pál <kornelpal@gmail.com>
2976 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
2977 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
2978 * main.c: Use UTF-8 encoded command line instead of Windows default code
2979 page on Windows to support Unicode.
2980 * driver.c (DllMain): New function for mixed-mode assembly support.
2981 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
2982 export __stdcall functions without decoration.
2984 Contributed under MIT/X11 license.
2986 2008-04-28 Mark Probst <mark.probst@gmail.com>
2988 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
2989 saving it very early.
2991 2008-04-28 Mark Probst <mark.probst@gmail.com>
2993 * mini.h, mini.c: Lots of code for accessing the old RGCTX
2994 deleted. The only way to access the new RGCTX is via the
2997 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
2998 vtable instead of the RGCTX to static methods.
3000 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3001 accessing the new RGCTX.
3003 * generic-sharing.c: There is no separation between self, type
3004 arguments and other types in the RGCTX anymore.
3006 2008-04-25 Jonathan Chambers <joncham@gmail.com>
3008 * mini-amd64.c (add_general): Remove previous stack adjustment.
3009 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3010 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3011 for 32 bytes of stack space reserved for all calls.
3013 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
3014 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
3017 Code contributed under MIT/X11 license.
3019 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3021 * mini.c (mini_method_verify): Only verify non-inflated methods, check
3022 against the root definition, peeling out method and type instantiations.
3023 Cache verify success results, code that fails verification is still
3024 checked multiple times.
3026 2008-04-23 Zoltan Varga <vargaz@gmail.com>
3028 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
3030 2008-04-23 Jonathan Chambers <joncham@gmail.com>
3032 * mini-amd64.c (add_general): Always increment stack on Win64.
3033 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
3036 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
3037 stack based argument handling on Win64.
3039 Code contributed under MIT/X11 license.
3041 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
3043 * Makefile.am (version.h): Add support for git-svn.
3045 2008-04-22 Zoltan Varga <vargaz@gmail.com>
3047 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
3048 so instead of calling g_spawn_command_line_sync, we do everything by hand,
3049 avoiding allocations and libc functions which might deadlock.
3051 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
3052 'no-gdb-backtrace' option is set.
3054 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
3056 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
3058 2008-04-21 Martin Baulig <martin@ximian.com>
3060 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
3061 and `get_lmf_addr'; `notification_address' is no longer a pointer.
3063 2008-04-21 Martin Baulig <martin@ximian.com>
3065 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
3066 `thread_vtable', `event_handler_ptr' and `event_handler'.
3068 2008-04-21 Martin Baulig <martin@ximian.com>
3070 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
3071 allows delayed initialization of the `executable_code_buffer' when
3074 2008-04-21 Martin Baulig <martin@ximian.com>
3076 * mini.h (mono_debugger_create_notification_function): Removed.
3077 * tramp-*.c (mono_debugger_create_notification_function): Removed.
3079 * mdb-debug-info64.s
3080 (MONO_DEBUGGER__notification_function): Added this in the .text section.
3082 * mdb-debug-info32.s
3083 (MONO_DEBUGGER__notification_function): Added this in the .text section.
3085 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
3086 currently only works on x86 and x86_64, so don't create it on ppc.
3088 2008-04-21 Martin Baulig <martin@ximian.com>
3090 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
3093 (mini_method_compile): In the fp elimination check, check
3094 `debug_options.mdb_optimizations' in addition to
3095 mono_debug_using_mono_debugger().
3097 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
3098 disable some JIT optimizations which are only disabled when
3099 running inside the debugger.
3100 Added `--help-debug' option to describe the debugging options.
3101 (parse_debug_options): New static function to parse the `--debug'
3102 options, so we can easily add more stuff in future.
3104 2008-04-20 Zoltan Varga <vargaz@gmail.com>
3106 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
3107 the method has no body.
3109 2008-04-19 Jonathan Chambers <joncham@gmail.com>
3111 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
3112 assembly is not allowed in MSVC 64-bit compiler.
3113 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
3114 as we get floating point exceptions everywhere.
3116 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
3117 correctly align arguments for call to throw_exception.
3118 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
3120 Code contributed under MIT/X11 license.
3122 2008-04-19 Zoltan Varga <vargaz@gmail.com>
3124 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
3126 2008-04-17 Zoltan Varga <vargaz@gmail.com>
3128 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
3130 * mini-amd64.c (NEW_INS): Set cil_code.
3132 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
3133 from mini-amd64.c so all debugger related logic is in one place.
3135 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
3136 later won't have a random ip assigned to them.
3138 2008-04-16 Zoltan Varga <vargaz@gmail.com>
3140 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
3141 the arch specific function initializes code_size.
3142 (mono_create_delegate_trampoline): Ditto.
3144 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
3145 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
3148 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
3149 running under the debugger.
3151 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
3154 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
3155 debugger. Also move the disabling of optimizations here from driver.c.
3156 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
3159 * mini.h (MonoCompile): Add a few new flags.
3161 2008-04-15 Zoltan Varga <vargaz@gmail.com>
3163 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
3164 so the cil_code field of created MonoInst's is properly set.
3165 (mini_select_instructions): Ditto.
3167 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
3168 (MONO_INST_NEW_CALL): Ditto.
3170 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
3171 in many places so the ins->cil_code field is properly initialized.
3173 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
3176 2008-04-14 Zoltan Varga <vargaz@gmail.com>
3178 * mini.c (mini_method_compile): Print a different message when compiling a
3181 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
3184 2008-04-11 Zoltan Varga <vargaz@gmail.com>
3186 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
3189 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
3191 2008-04-11 Zoltan Varga <vargaz@gmail.com>
3193 * mini.c (handle_stack_args): Make this return void since its return value was
3194 never used. Also set cfg->unverifiable for invalid IL instead of calling
3197 2008-04-10 Mark Probst <mark.probst@gmail.com>
3199 * mini.c: Make sure "this" is live in catch clauses with type
3200 variables in shared generic code.
3202 2008-04-08 Mark Probst <mark.probst@gmail.com>
3204 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
3205 generic_class_is_reference_type() to ensure the proper behaviour
3206 when sharing generic code and the type in question is a type
3209 2008-04-08 Zoltan Varga <vargaz@gmail.com>
3211 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
3212 race conditions when printing thread dumps. Fixes #377738.
3214 2008-04-08 Massimiliano Mantione <massi@ximian.com>
3216 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
3217 shows up when both MonoInst arguments can cause aliasig.
3218 There is likely no way in the current JIT to trigger this problem, but
3219 it showed up in the development of generics sharing, when in a new
3220 opcode both args of an OP_GROUP can be aliases (addresses of a local).
3221 When the generics sharing code will be committed, its tests will be
3222 valid also for this bug.
3224 2008-04-08 Zoltan Varga <vargaz@gmail.com>
3226 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
3229 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
3232 2008-04-07 Zoltan Varga <vargaz@gmail.com>
3234 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
3235 use a more detailed exception message for InvalidCastException.
3237 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
3239 * driver.c (mono_main): Add --debug=casts option to turn on better
3240 InvalidCastException message details.
3242 * mini.c (mini_get_debug_options): New helper function to return the address of
3243 the debug_options variable.
3245 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
3246 the jit_tls TLS variable.
3248 * mini.c (mono_jit_tls): New TLS variable.
3250 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
3253 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3255 * mini.h: Removed verifer related stuff. This code was moved to verify.c
3257 * mini.c: Removed verifer related stuff, code moved to verify.c.
3259 * driver.c: Using code from verify.c instead of mini.c.
3261 2008-04-05 Zoltan Varga <vargaz@gmail.com>
3263 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
3266 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
3268 * mini.c (check_for_method_verify): Enabling verification of
3269 corlib if mono_verify_all is set. Bugs in the verifier preventing that
3272 2008-04-04 Zoltan Varga <vargaz@gmail.com>
3274 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
3275 caller saved registers as well.
3277 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
3278 saved registers as well.
3280 2008-03-30 Zoltan Varga <vargaz@gmail.com>
3282 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
3284 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
3287 2008-03-27 Zoltan Varga <vargaz@gmail.com>
3289 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
3291 (get_call_info): Take a gsctx argument instead of 'cfg'.
3293 2008-03-26 Zoltan Varga <vargaz@gmail.com>
3295 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
3296 mono_verify_all is set.
3298 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
3300 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
3302 2008-03-25 Zoltan Varga <vargaz@gmail.com>
3304 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
3307 * driver.c mini.c mini.h: Add a --verify-all development option to test the
3308 verifier and the code generated by the compiler.
3310 2008-03-25 Mark Probst <mark.probst@gmail.com>
3312 * mini.c: Generic sharing of the non-nullable case of the box
3315 2008-03-24 Zoltan Varga <vargaz@gmail.com>
3317 * inssel.brg: Fix the build.
3319 * iltests.il.in: Add a test for lconv.ovf.u8.un.
3321 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
3323 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
3324 Array:Address. Fixes #372410.
3326 * iltests.il.in: New tests for readonly prefix.
3328 2008-03-23 Zoltan Varga <vargaz@gmail.com>
3330 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
3333 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
3336 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3338 * mini.c (mono_decompose_op_imm): New helper function.
3340 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3341 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3344 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
3345 mono_arch_output_basic_block. Fix warnings.
3347 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3350 2008-03-22 Zoltan Varga <vargaz@gmail.com>
3352 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3353 since the extra frame is now detected automatically inside the loop.
3355 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
3356 opts which are now in mono_peephole_ins ().
3358 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3360 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3361 frames and skip duplicate managed-to-native frames. Fixes #367665.
3363 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3364 opts which are now in mono_peephole_ins ().
3365 (mono_arch_peephole_pass_2): Ditto.
3367 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3369 * mini-codegen.c (mono_peephole_ins): New helper function containing the
3370 arch independent peephole optimizations.
3372 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3373 opts which are now in mono_peephole_ins ().
3375 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3377 * mini-s390.c (mono_arch_output_basic_block): Fix build.
3379 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3382 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3383 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3386 2008-03-21 Zoltan Varga <vargaz@gmail.com>
3388 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3389 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3392 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
3393 mono_arch_output_basic_block. Fix warnings.
3395 2008-03-20 Zoltan Varga <vargaz@gmail.com>
3397 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3400 2008-03-20 Zoltan Varga <vargaz@gmail.com>
3402 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3405 * iltests.il: Add new tests.
3407 2008-03-20 Kornél Pál <kornelpal@gmail.com>
3409 * mini.c: Removed Windows version macros.
3411 2008-03-20 Mark Probst <mark.probst@gmail.com>
3413 * generic-sharing.c: Put reflection types in the extensible part
3414 of the runtime generic context.
3416 * mini.c: Generic sharing of the GetTypeHandle special case of the
3417 ldtoken instruction.
3419 2008-03-20 Zoltan Varga <vargaz@gmail.com>
3421 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3423 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3425 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
3426 consistency with the other version on the linear IR branch.
3428 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3430 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3432 * iltests.il.in: Add new tests.
3434 2008-03-19 Zoltan Varga <vargaz@gmail.com>
3436 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3438 * iltests.il.in: Add new tests.
3440 2008-03-19 Mark Probst <mark.probst@gmail.com>
3442 * mini.c: Two variables with the same name were declared in
3443 nesting contexts and one wasn't initialized. Fixed.
3445 2008-03-19 Mark Probst <mark.probst@gmail.com>
3447 * mini.c: Generic sharing of the initobj instruction.
3449 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3451 * mini.c: make the test to optimize ldtoken from typeof() more
3454 2008-03-18 Mark Probst <mark.probst@gmail.com>
3456 * mini.c: Generic sharing of the initobj instruction for reference
3459 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3461 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3462 the mono_breakpoint_clean_code() code to perform bound checks.
3464 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3466 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3467 mono_arch_patch_callsite() to include the start of the managed method
3468 to be able to perform bound checks.
3470 2008-03-17 Mark Probst <mark.probst@gmail.com>
3472 * mini.c: Generic sharing for the isinst instruction.
3474 2008-03-17 Mark Probst <mark.probst@gmail.com>
3476 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3477 inssel-long32-mips.brg: Added opcodes for doing indirect calls
3478 with the runtime generic context argument.
3480 * mini.c: Share calls to several types of unsharable methods by
3481 putting the address of the method code in the runtime generic
3482 context and doing an indirect call.
3484 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3487 2008-03-16 Mark Probst <mark.probst@gmail.com>
3489 * generic-sharing.c: Change due to a change in the runtime genric
3492 2008-03-15 Martin Baulig <martin@ximian.com>
3495 (mono_arch_nullify_class_init_trampoline): Add call to
3496 mono_breakpoint_clean_code() to make things work when running
3497 inside the debugger.
3500 (mono_arch_nullify_class_init_trampoline): Add call to
3501 mono_breakpoint_clean_code() to make things work when running
3502 inside the debugger.
3504 2008-03-14 Zoltan Varga <vargaz@gmail.com>
3506 * inssel-long.brg (reg): Fix 64 bit build.
3508 2008-03-14 Mark Probst <mark.probst@gmail.com>
3510 * mini.c, mini.h: Share static generic code by passing it an
3511 implicit argument pointing to the runtime generic context.
3513 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3514 inssel-long32-mips.brg: New opcodes for calling shared static,
3515 which need to be passed the runtime generic context.
3517 * mini-amd64.c, mini-x86.c: Save the runtime generic context
3518 argument on the stack in the prologue if needed. New function for
3519 finding the runtime generic context argument from the registers
3520 saved by the trampoline.
3522 * mini-amd64.h, mini-x86.h: Specify which register to use for the
3523 runtime generic context argument.
3525 * tramp-amd64.c: Also restore the register used for the runtime
3526 generic context argument.
3528 * mini-trampoline.c: Resolve shared static calls by consulting the
3529 runtime generic context via the new argument.
3531 * generic-sharing.c: Add an argument to sharability-checking
3532 functions that specifies whether type variables should be treated
3533 as sharable type arguments.
3535 * inssel-x86.brg: Removed a superfluous, buggy rule.
3537 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3540 2008-03-14 Martin Baulig <martin@ximian.com>
3542 * debug-debugger.c (main_thread_handler): Call
3543 mono_runtime_run_main() without sending any notifications.
3545 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3547 2008-03-14 Zoltan Varga <vargaz@gmail.com>
3549 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3551 2008-03-14 Mark Probst <mark.probst@gmail.com>
3553 * tramp-x86.c: Fixed register restore offsets in the trampoline
3554 code for ECX and EDX.
3556 2008-03-12 Geoff Norton <gnorton@novell.com>
3558 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3559 different ucontext_t implementations.
3560 * exceptions-arm.c: Use the above defines to get exceptions working on
3561 iPhone (based on a patch by Luke Howard lukeh@padl.com)
3562 * mini-arm.c: Implement iPhone icache support (based on a patch by
3563 Luke Howard lukeh@padl.com)
3565 2008-03-12 Mark Probst <mark.probst@gmail.com>
3567 * mini.c: Enable generic sharing of calls to non-static
3568 non-interface non-generic non-value-type methods.
3570 * mini-trampolines.c: Resolve calls from shared generic code.
3572 2008-03-11 Zoltan Varga <vargaz@gmail.com>
3574 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3576 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3578 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3580 * mini.c: some fixes for the AOT compiler.
3582 2008-03-07 Zoltan Varga <vargaz@gmail.com>
3584 * cpu-amd64.md: Add clob:1 to some float opcodes.
3586 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
3588 * mini.h: Added MiniVerifierMode enumeration.
3590 * mini.c: Added mini_verifier_set_mode to control
3591 the usage of the new verifier.
3593 * mini.c (mono_method): Integrated the new verifier.
3595 * driver.c: Extended --security option with validil and
3596 verifiable options to activate the new verifier.
3598 2008-03-07 Zoltan Varga <vargaz@gmail.com>
3600 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
3601 optimization to ctors taking 0 or 2 arguments too.
3603 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3606 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3608 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3610 2008-03-06 Zoltan Varga <vargaz@gmail.com>
3612 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3613 non-aot case as well.
3615 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3617 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3620 * aot-compiler.c (encode_patch): Ditto.
3622 * mini.h (G_MININT32): Fix the definition of this.
3624 2008-03-05 Zoltan Varga <vargaz@gmail.com>
3626 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3628 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3630 2008-03-04 Zoltan Varga <vargaz@gmail.com>
3632 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
3633 methods returning vtypes in registers.
3634 (mono_arch_allocate_vars): Ditto.
3636 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3638 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
3640 * generics.cs: Add a test from the linear IR branch.
3642 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3644 * mini.c (inline_method): Cache failed inline attempts.
3646 2008-03-04 Mark Probst <mark.probst@gmail.com>
3648 * mini.c: For shared methods of generic classes put the location
3649 of "this" into the MonoGenericJitInfo.
3651 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3652 register out of a MonoContext by register number. Add the generic
3653 sharing context as an argument to mono_arch_find_this_argument().
3655 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3656 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3657 for new arch function.
3659 * mini-exception.c: Handle open exception clauses in shared
3662 * mini-trampolines.c: Supply additional argument to
3663 mono_arch_find_this_argument().
3665 2008-03-04 Zoltan Varga <vargaz@gmail.com>
3667 * Makefile.am (regtests): Run the bench.exe tests last.
3669 2008-03-03 Zoltan Varga <vargaz@gmail.com>
3671 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3674 2008-03-02 Zoltan Varga <vargaz@gmail.com>
3676 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3679 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3681 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3683 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3684 whose class has no cctor.
3686 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3688 2008-03-01 Zoltan Varga <vargaz@gmail.com>
3690 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3693 2008-02-29 Zoltan Varga <vargaz@gmail.com>
3695 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3696 to be in sync with the code on the linear IR branch.
3698 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3700 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3702 2008-02-27 Zoltan Varga <vargaz@gmail.com>
3704 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3706 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3708 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3710 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3712 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3714 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3717 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
3719 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3720 OP_LOADR4_MEMBASE emission.
3722 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3723 (mono_spillvar_offset_float): Ditto.
3725 * mini-mips.c (mono_arch_emit_prolog): Ditto.
3727 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3730 * basic-long.cs: Add regression tests for them.
3732 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3734 (mono_arch_allocate_vars): Fix representation of single-precision float
3736 (mono_arch_output_basic_block): Ditto.
3738 * inssel-mips.brg: Ditto, remove duplicate items.
3740 * mini-mips.c (emit_load_volatile_arguments): New function to handle
3741 arguments of tail calls as on other platforms.
3742 (mono_arch_output_basic_block): Handle tail calls.
3744 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
3747 * objects.cs (test_5_pass_static_struct): Add test for it.
3749 Contributed under MIT/X11 license.
3751 2008-02-26 Zoltan Varga <vargaz@gmail.com>
3753 * Makefile.am: Use gmcs for compiling the regression tests.
3755 * *.2.cs *.2.il: Rename to *.cs and *.il.
3757 2008-02-24 Zoltan Varga <vargaz@gmail.com>
3759 * regalloc.h: Make the vassign array smaller.
3761 * mini.c (mini_method_compile): Remove an unused field in cfg.
3763 * mini-codegen.c: Add a bunch of micro optimizations.
3765 2008-02-23 Zoltan Varga <vargaz@gmail.com>
3767 * regalloc.h: Remove some unused fields.
3769 2008-02-22 Zoltan Varga <vargaz@gmail.com>
3771 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
3773 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
3775 2008-02-22 Mark Probst <mark.probst@gmail.com>
3777 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
3779 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
3780 trampoline: Fetch an entry from the runtime generic context. If
3781 it's NULL, jump to the actual trampoline to fill the runtime
3782 generic context. Otherwise, return it.
3784 * mini.c: Call the lazy fetch trampoline to get entries out of the
3785 runtime generic context.
3787 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
3788 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
3789 tramp-sparc.c: Stubs for the lazy fetch trampoline.
3791 2008-02-21 Mark Probst <mark.probst@gmail.com>
3793 * mini.c: Fetch data out of the extensible part of the runtime
3794 generic context instead of calling a helper function.
3796 * generic-sharing.c: Some functions moved into
3797 metadata/generic-sharing.c. Helper function for fetching other
3798 types now checks and asserts against extensible rgctx (just for
3799 debugging purposes - the helper function isn't called anymore
3800 unless for debugging).
3802 2008-02-21 Zoltan Varga <vargaz@gmail.com>
3804 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
3805 for tail calls up to the point that the tests in iltests.exe run. Also add a
3806 dummy CKFINITE implementation.
3807 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
3808 needed for trampoline LMF frames.
3810 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
3811 trampoline LMF frames.
3813 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
3815 * mini.c (inline_method): clean any pending loader error when inlining fail.
3816 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
3818 2008-02-21 Zoltan Varga <vargaz@gmail.com>
3820 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
3822 * aot-runtime.c (decode_patch_info): Ditto.
3824 * mini.c (mono_resolve_patch_target): Ditto.
3826 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
3829 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
3831 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
3832 if it references an icall address.
3834 2008-02-20 Zoltan Varga <vargaz@gmail.com>
3836 * cpu-s390x.md: Remove some more unused opcodes.
3838 * cpu-s390x.md: Remove some unused opcodes.
3840 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
3841 mono_op_imm_to_op ().
3843 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
3844 instead of a switch statement.
3846 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
3847 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
3849 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
3851 * mini-codegen.c: Remove unused mono_regstate2_... functions.
3853 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
3856 2008-02-19 Zoltan Varga <vargaz@gmail.com>
3858 * driver.c (mono_main): Improve error reporting when an assembly cannot be
3859 opened. Fixes #362607.
3861 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
3863 * iltests.il.in: Add a test for static methods in interfaces.
3865 2008-02-18 Zoltan Varga <vargaz@gmail.com>
3867 * genmdesc.c (build_table): Fix a crash on older glib versions.
3869 * cpu-sparc.md: Remove some unused opcodes.
3871 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
3872 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
3874 * cpu-amd64.md: Remove some unused opcodes.
3876 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
3877 like the other opcodes.
3879 2008-02-17 Zoltan Varga <vargaz@gmail.com>
3881 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
3883 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
3885 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
3886 variables 'cfg' instead of 'm' for consistency.
3888 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
3890 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
3891 argument holding the vtype return address, to avoid the ambigious use of
3892 cfg->ret for this purpose.
3894 * mini.c (NEW_RETLOADA): Use vret_addr if set.
3896 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
3898 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
3899 new mono_print_ins () function which only takes one argument.
3901 2008-02-15 Zoltan Varga <vargaz@gmail.com>
3903 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
3906 2008-02-14 Zoltan Varga <vargaz@gmail.com>
3908 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
3910 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
3912 * mini-x86.c: Sync with the version on the linear IR branch by adding new
3913 opcodes and other small changes.
3915 * mini-ops.h: Add some new opcodes from the linear IR branch.
3917 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
3919 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
3920 opcodes, use the REG_MEMBASE opcodes instead.
3922 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
3923 opcodes, use the REG_MEMBASE opcodes instead.
3925 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
3928 * mini.c (mono_op_imm_to_op): New helper function.
3930 * mini-ops.h: Add some opcodes from linear IR branch.
3932 2008-02-13 Zoltan Varga <vargaz@gmail.com>
3934 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
3937 2008-02-12 Zoltan Varga <vargaz@gmail.com>
3939 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
3942 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
3944 2008-02-09 Zoltan Varga <vargaz@gmail.com>
3946 * aot-compiler.c (emit_method_code): Add an assert.
3948 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
3949 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
3952 2008-02-08 Zoltan Varga <vargaz@gmail.com>
3954 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
3955 some load/store opcodes so they are consistent.
3956 (mono_arch_emit_prolog): Simplify some code.
3958 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
3960 * objects.cs: Add tests for large argument offsets on ARM.
3962 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
3963 stack offsets. Fixes #359651.
3965 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
3967 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
3969 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
3971 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
3973 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
3975 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
3976 rid of CEE_CONV_R_UN.
3978 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
3980 2008-02-07 Zoltan Varga <vargaz@gmail.com>
3982 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
3984 * mini.c (mono_normalize_opcodes): Add some more opcodes.
3986 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
3988 * cpu-amd64.md: Remove some unused opcodes.
3990 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
3992 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
3994 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
3995 arch specific functions for its parts. Call the peephole pass after local
3996 regalloc so the prolog can compute a more accurate max_offset.
3998 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
3999 the corresponding OP_I/OP_L opcodes.
4001 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4003 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4005 2008-02-06 Zoltan Varga <vargaz@gmail.com>
4007 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4008 as they are handled in mini.c.
4010 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4012 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
4013 case since it is handled in mini.c.
4015 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
4017 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
4019 * *.c: Use the new opcodes in the IR and back end code.
4021 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
4023 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
4025 2008-02-06 Mark Probst <mark.probst@gmail.com>
4027 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
4028 an assert because it has a race condition.
4030 2008-02-06 Zoltan Varga <vargaz@gmail.com>
4032 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
4034 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
4036 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
4038 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
4039 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
4041 2008-02-05 Zoltan Varga <vargaz@gmail.com>
4043 * cpu-amd64.md (move): Correct the maximum size of move.
4045 2008-02-05 Mark Probst <mark.probst@gmail.com>
4047 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
4048 the generic class init trampoline to return quickly if the class
4051 2008-02-04 Zoltan Varga <vargaz@gmail.com>
4053 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
4054 issues where an 32 bit callsite cannot be patched by a 64 bit address.
4056 2008-02-03 Zoltan Varga <vargaz@gmail.com>
4058 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
4061 2008-01-31 Zoltan Varga <vargaz@gmail.com>
4063 * objects.cs: Add some soft-float tests.
4065 * mini.c: Fix a couple more soft-float issues.
4067 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
4069 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
4072 2008-01-30 Zoltan Varga <vargaz@gmail.com>
4074 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
4075 exception happens while compiling a virtual method.
4077 2008-01-29 Zoltan Varga <vargaz@gmail.com>
4079 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
4081 * mini-sparc.c: Fix build.
4083 * mini-sparc.c (get_call_info): Add support for generic sharing.
4085 * mini-exceptions.c: Add a FIXME.
4087 2008-01-27 Zoltan Varga <vargaz@gmail.com>
4089 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
4090 altstack handling code.
4092 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
4094 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
4096 * mini-s390.c: Add support for generic sharing.
4098 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
4100 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4102 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
4104 * mini-s390x.c: Add support for generic sharing.
4106 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
4108 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4110 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
4111 can be used since it takes a 16 bit signed immediate.
4113 * inssel-s390x.brg: Fix OP_SETRET.
4115 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
4117 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
4119 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
4121 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
4123 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
4126 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
4129 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
4130 of the unused mono_arch_patch_delegate_trampoline stuff.
4132 2008-01-26 Zoltan Varga <vargaz@gmail.com>
4134 * basic-long.cs: Move the fp related tests to basic-float.cs.
4136 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
4138 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
4140 * basic-calls.cs: Add a test for proper float argument passing.
4142 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
4143 if the context corresponds to an exception received through a signal.
4145 * exceptions.cs: Add a test for nullref handling at the start of a try
4148 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
4150 * jit-icalls.c (mono_break): New JIT icall.
4152 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
4154 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
4156 2008-01-25 Zoltan Varga <vargaz@gmail.com>
4158 * cpu-*.md: Get rid of unused opcodes.
4160 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
4162 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
4165 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
4168 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
4169 the arch independent trampoline code in mini-trampolines.c.
4171 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
4173 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
4175 * mini-s390.h: Remove an unused define.
4177 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
4178 the arch independent trampoline code in mini-trampolines.c.
4180 * mini-arm.c (mono_arch_emit_prolog): Fix build.
4182 2008-01-24 Zoltan Varga <vargaz@gmail.com>
4184 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
4186 * mini-s390.c (mono_arch_emit_prolog): Fix build.
4188 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
4190 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
4192 * cpu-amd64.md: Use smaller sizes for int opcodes.
4194 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
4196 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
4199 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
4202 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
4203 instead of though a pointer to save an indirection when accessing elements of
4206 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
4208 (NOT_IMPLEMENTED): New helper macro.
4209 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
4212 * *.c: Use the new helper macro.
4214 2008-01-21 Zoltan Varga <vargaz@gmail.com>
4216 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
4218 2008-01-20 Zoltan Varga <vargaz@gmail.com>
4220 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
4223 2008-01-18 Zoltan Varga <vargaz@gmail.com>
4225 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
4226 profiling is enabled.
4228 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
4230 (mono_arch_emit_prolog): Add more first bblock optimizations.
4232 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
4233 in order if possible.
4234 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
4235 bblock, since the arguments are still in their original registers.
4237 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
4239 2008-01-17 Zoltan Varga <vargaz@gmail.com>
4241 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
4244 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
4247 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
4249 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
4250 process async exceptions received while in unmanaged code.
4252 * mini.c (mini_init): Install a callback with the runtime which will be called
4253 when a thread receives an async exception while in unmanaged code.
4255 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
4257 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
4259 2008-01-16 Wade Berrier <wberrier@novell.com>
4266 2008-01-16 Zoltan Varga <vargaz@gmail.com>
4268 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
4269 compilation with sun cc.
4271 * cpu-*.md: Fix the build.
4273 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
4275 * mini-amd64.h: Add some comments to the MonoLMF structure.
4277 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
4279 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
4280 in the LMF structure if possible. This saves two instructions in the
4281 managed->native wrappers.
4283 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
4285 2008-01-16 Mark Probst <mark.probst@gmail.com>
4287 * generic-sharing.c: New type argument lookup code which uses the
4288 runtime generic context template.
4290 2008-01-15 Zoltan Varga <vargaz@gmail.com>
4292 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
4294 * mini-arm.c (add_general): Fix arm eabi parameter passing.
4295 (mono_arch_output_basic_block): Fix localloc implementation.
4297 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
4299 * mini-ia64.c (peephole_pass): Fix ia64 build.
4301 * mini-amd64.c (peephole_pass): Fix a warning.
4303 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
4304 at a constant offset from sp/fp.
4306 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
4307 instead of obtaining it from *lmf in the managed method case.
4309 2008-01-14 Zoltan Varga <vargaz@gmail.com>
4311 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
4313 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
4315 * mini.h (MonoInstList): New type.
4316 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
4317 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
4318 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
4319 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
4320 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
4321 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
4322 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
4323 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
4324 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
4325 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
4326 MONO_INST_LIST_FOR_EACH_ENTRY,
4327 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
4328 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
4329 mono_inst_list_first, mono_inst_list_last,
4330 mono_inst_list_next, mono_inst_list_prev): New instruction
4331 list handling interfaces.
4332 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
4333 list head 'ins_list'.
4334 (MonoInst): Replace next pointer with list head 'node'.
4335 (MonoCallInst): Make 'out_args' a MonoInstList.
4336 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
4337 (MonoCompile): Delete reverse_inst_list and
4338 reverse_inst_list_len.
4339 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4340 mono_arch_lowering_pass, mono_arch_local_regalloc,
4341 mono_arch_output_basic_block, mono_arch_emit_prolog):
4342 Convert to new instruction lists.
4343 (insert_after_ins): Delete.
4344 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4346 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4347 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4348 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4349 mono_emulate_opcode, mono_emit_load_got_addr,
4350 inline_method, mono_method_to_ir, mono_print_bb_code,
4351 print_dfn, decompose_pass, nullify_basic_block,
4352 replace_out_block_in_code, remove_block_if_useless,
4353 merge_basic_blocks, move_basic_block_to_end,
4354 try_unsigned_compare, optimize_branches, mono_print_code,
4355 mini_select_instructions, remove_critical_edges): Likewise.
4356 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4357 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4358 mono_arch_output_basic_block, mono_arch_emit_prolog):
4360 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4361 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4362 mono_arch_output_basic_block): Likewise.
4363 (inst_list_prepend, insert_after_ins): Delete.
4364 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4365 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4367 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4368 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4369 mono_arch_emit_prolog): Likewise.
4370 * cfold.c (mono_constant_fold): Likewise.
4371 * liveness.c (visit_bb, mono_analyze_liveness,
4372 optimize_initlocals): Likewise.
4373 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4374 * graph.c (mono_draw_code_cfg): Likewise.
4375 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4376 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4377 mono_ssa_cprop): Likewise.
4378 * abcremoval (get_relations_from_previous_bb, process_block):
4380 * local-propagation (mono_cprop_invalidate_values,
4381 mono_local_cprop_bb): Likewise.
4382 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4383 peephole_pass, mono_arch_output_basic_block,
4384 mono_arch_emit_prolog): Likewise.
4385 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4386 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4387 mono_arch_emit_prolog): Likewise.
4388 (insert_after_ins): Delete.
4389 * aliasing.c (print_code_with_aliasing_information,
4390 mono_build_aliasing_information, mono_aliasing_deadce):
4391 Convert to new instruction lists.
4392 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4393 peephole_pass, NEW_INS, mono_arch_lowering_pass,
4394 mono_arch_local_regalloc, mono_arch_output_basic_block):
4396 (insert_after_ins): Delete.
4397 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4398 peephole_pass, mono_arch_output_basic_block): Convert to
4399 new instruction lists.
4400 * mini-codegen (InstList, inst_list_prepend,
4401 insert_after_ins): Delete.
4402 (insert_before_ins, get_register_force_spilling,
4403 get_register_spilling, free_up_ireg, free_up_reg,
4404 create_copy_ins, create_spilled_store, alloc_int_reg,
4405 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4406 to new instruction lists.
4407 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4408 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4409 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4410 (insert_after_ins): Delete.
4411 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4412 mono_arch_local_regalloc, mono_arch_output_basic_block,
4413 mono_arch_call_opcode): Convert to new instruction lists.
4414 (insert_after_ins): Delete.
4415 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4416 peephole_pass, mono_arch_output_basic_block,
4417 mono_arch_emit_prolog): Convert to new instruction lists.
4419 2008-01-11 Zoltan Varga <vargaz@gmail.com>
4421 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4423 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4426 * Makefile.am (version.h): Make this work with non-bash shells.
4428 2008-01-10 Zoltan Varga <vargaz@gmail.com>
4430 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4432 2008-01-08 Zoltan Varga <vargaz@gmail.com>
4434 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
4435 the InitializeArray optimization.
4437 2008-01-06 Zoltan Varga <vargaz@gmail.com>
4439 * mini.c driver.c: Don't include os/gc_wrapper.h.
4441 2008-01-05 Zoltan Varga <vargaz@gmail.com>
4443 * mini.c (print_jit_stats): Print GC statistics if available.
4445 2008-01-04 Zoltan Varga <vargaz@gmail.com>
4447 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4449 2007-12-29 Zoltan Varga <vargaz@gmail.com>
4451 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4453 2007-12-26 Zoltan Varga <vargaz@gmail.com>
4455 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4457 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4459 * driver.c (mono_main): Ditto.
4461 2007-12-23 Zoltan Varga <vargaz@gmail.com>
4463 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4465 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4466 in the vtable can't be encoded.
4467 (compile_method): Ditto.
4469 2007-12-21 Zoltan Varga <vargaz@gmail.com>
4471 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4474 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
4477 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4478 the top LMF entry belongs to the current method.
4480 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4482 2007-12-20 Zoltan Varga <vargaz@gmail.com>
4484 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4486 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4488 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4490 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4492 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4494 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
4497 * basic-float.cs: Add an ulong->double cast test.
4499 2007-12-15 Zoltan Varga <vargaz@gmail.com>
4501 * mini.c (mono_method_to_ir): Fix a warning.
4503 2007-12-14 Zoltan Varga <vargaz@gmail.com>
4505 * mini-ops.h: Add OP_SWITCH.
4507 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4508 CEE_SWITCH in back-end code, use OP_SWITCH instead.
4510 2007-12-11 Geoff Norton <gnorton@novell.com>
4512 * mini-s390x.c: Minor change to the MAX() define to allow
4513 it to compile with other gcc versions.
4515 2007-12-11 Geoff Norton <gnorton@novell.com>
4518 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4520 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
4522 exceptions-arm.c (mono_arch_get_restore_context): Restore
4525 exceptions-arm.c (throw_exception): Save the frame pointer.
4526 This is a partial fix for #323747. Only the client side is
4529 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
4531 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4532 was using an unrelated variable to log the class which
4533 needed the cctor to be called. This was crashing on arm.
4535 2007-12-09 Robert Jordan <robertj@gmx.net>
4537 * mini-x86.c (mono_arch_emit_epilog):
4538 Consider all kinds of 64-bit types. Fixes #323114.
4540 2007-12-08 Zoltan Varga <vargaz@gmail.com>
4542 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4544 2007-12-07 Zoltan Varga <vargaz@gmail.com>
4546 * mini-amd64.c (peephole_pass): Add a missing instruction check.
4548 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4550 * mini.c: run type ctor before allocating an object, not only
4551 when running it's constructor method (fixes at least part of bug #342507).
4553 2007-12-07 Zoltan Varga <vargaz@gmail.com>
4555 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4557 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4558 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
4561 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4562 mono_generic_class_init_trampoline () the same as it is done with the other
4565 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
4566 aot-runtime.c aot-compiler.c: Implement AOT support.
4568 2007-12-07 Mark Probst <mark.probst@gmail.com>
4570 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4571 build for archs which don't have the vtable trampoline defined
4574 2007-12-07 Zoltan Varga <vargaz@gmail.com>
4576 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4578 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4580 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4582 * tramp-<ARCH>.c: Use the new helper function.
4584 2007-12-07 Mark Probst <mark.probst@gmail.com>
4586 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4587 trampoline call, which takes a vtable argument.
4589 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4590 OP_TRAMPCALL_VTABLEs like other calls.
4592 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4593 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4594 call. Implemented a support function which fetches the vtable
4595 from a register set.
4597 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4598 Implemented a generic class init trampoline, using the
4599 OP_TRAMPCALL_VTABLE opcode.
4601 * mini.c: Implemented static field access when sharing generic
4602 code. This implies initing the class using the new
4603 OP_TRAMPCALL_VTABLE call.
4605 2007-12-07 Mark Probst <mark.probst@gmail.com>
4607 * mini.c: Don't compile methods with sharing enabled if their
4608 classes are disabled for sharing.
4610 2007-12-06 Zoltan Varga <vargaz@gmail.com>
4612 * inssel.brg: Add a missing sign extension to the GETCHR and array access
4613 opcodes. Fixes #346563.
4615 * objects.cs: Add a new test.
4617 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4619 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4620 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4622 2007-12-06 Zoltan Varga <vargaz@gmail.com>
4624 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4626 2007-12-03 Zoltan Varga <vargaz@gmail.com>
4628 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4631 2007-12-02 Zoltan Varga <vargaz@gmail.com>
4633 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4635 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
4636 optimization in the AOT case.
4638 2007-11-30 Zoltan Varga <vargaz@gmail.com>
4640 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4642 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4644 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4646 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4648 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4649 is created by the inlined delegate ctor.
4651 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4653 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4655 2007-11-29 Zoltan Varga <vargaz@gmail.com>
4657 * cpu-x86.md: Fix the length of ckfinite.
4659 2007-11-28 Zoltan Varga <vargaz@gmail.com>
4661 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4663 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4664 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4666 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4668 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
4669 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4671 2007-11-28 Martin Baulig <martin@ximian.com>
4674 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4675 after creating the trampoline.
4677 2007-11-27 Zoltan Varga <vargaz@gmail.com>
4679 * aot-runtime.c (load_aot_module): Check runtime version if needed.
4681 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4684 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4685 instead of the calling method to help AOT.
4687 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4689 2007-11-26 Zoltan Varga <vargaz@gmail.com>
4691 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4694 2007-11-23 Zoltan Varga <vargaz@gmail.com>
4696 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4698 * aot-compiler.c (compile_method): Correct check for generic method definitions.
4699 (encode_method_ref): No need to handle generic method definitions specially.
4701 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4703 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
4706 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4708 (compile_method): Enable generic sharing.
4710 2007-11-22 Zoltan Varga <vargaz@gmail.com>
4712 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4713 (mini_method_compile): Add preliminary support for AOTing shared generic code.
4715 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4718 * mini-trampolines.c: Fix a warning.
4720 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4722 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4723 (generic_class_is_reference_type): Remove unused function.
4725 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4726 in the generic vtable trampoline case.
4728 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4730 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4731 return an AOT method based on a vtable slot.
4733 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4735 * mini.c (mini_get_vtable_trampoline): Export this.
4737 2007-11-22 Martin Baulig <martin@ximian.com>
4740 (MonoDebuggerInfo): Move `debugger_version' up.
4742 2007-11-22 Martin Baulig <martin@ximian.com>
4745 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
4747 * mini-trampolines.c
4748 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
4749 after compiling the method.
4751 2007-11-20 Martin Baulig <martin@ximian.com>
4754 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
4755 (mono_debugger_remove_breakpoint): Likewise.
4756 (mono_debugger_check_breakpoints): Likewise.
4758 * debug-debugger.c: Implement the new breakpoint interface here.
4760 2007-11-18 Zoltan Varga <vargaz@gmail.com>
4762 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
4763 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
4765 * mini-x86.c (mono_arch_output_basic_block): Ditto.
4767 2007-11-17 Zoltan Varga <vargaz@gmail.com>
4769 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
4771 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
4774 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
4777 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
4778 returning a vtype in a register.
4780 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
4781 here from the arch specific code.
4783 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
4786 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
4787 (mono_arch_emit_prolog): Increment maximum prolog size.
4789 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
4790 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
4792 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
4793 MonoGenericSharingContext.
4795 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
4796 MonoGenericSharingContext. Allocate memory from the cfg mempool.
4798 2007-11-15 Mark Probst <mark.probst@gmail.com>
4800 * mini.c, mini.h, generic-sharing.c: Functions for producing code
4801 which extract fields out of the runtime generic context. Full
4802 sharing of the NEWARR opcode.
4804 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
4806 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
4807 --enable-minimal=ssa.
4809 2007-11-13 Zoltan Varga <vargaz@gmail.com>
4811 * mini-trampolines.c (mono_delegate_trampoline): Update after
4812 mono_marshal_get_delegate_invoke () signature change.
4814 2007-11-13 Mark Probst <mark.probst@gmail.com>
4816 * mini.c: Removed the shared context in favor of the generic
4817 sharing context. Allocate the MonoJitInfo structure with room for
4818 the generic sharing context if it's needed.
4820 * mini.h: Remove MonoGenericSharingContext declaration. It's in
4821 domain-internals.h now.
4823 * mini-x86.c: Pass the generic sharing context to get_call_info ().
4825 * generic-sharing.c: Several changes for working without a shared
4826 context and instead operating on open types instead.
4828 2007-11-12 David S. Miller <davem@davemloft.net>
4830 * inssel-sparc.brg: Fix double instruction emit.
4832 2007-11-12 Zoltan Varga <vargaz@gmail.com>
4834 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
4835 Get/Set/Address methods.
4837 * mini.c debug-debugger.c mini-trampolines.c: Update after
4838 mono_marshal_get_delegate_invoke signature change.
4840 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
4842 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
4843 This can happens with dynamic methods. Fixes the other bug in #322722.
4845 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
4847 * tramp-arm.c (mono_arch_patch_callsite): Support patching
4850 * mini-arm.c (arm_patch): Implement patching of BX call
4851 sequence. Fixes one of the bugs in #322722.
4853 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
4855 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
4856 under Linux. We only need to flush every 32-byte cache line.
4858 2007-11-07 Massimiliano Mantione <massi@ximian.com>
4861 move_basic_block_to_end: Add branches when needed, eventually creating
4863 optimize_branches: added a parameter that tells if it's ok to create
4864 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
4865 and avoid calling move_basic_block_to_end when it's not ok.
4868 2007-11-07 Mark Probst <mark.probst@gmail.com>
4870 * mini.c: Abort inlining call to InitializeArray if something
4871 looks wrong. Let the icall handle it, which now has proper safety
4874 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
4876 * mini.c (mono_spill_call): add support for soft-float.
4878 * mini.c (mono_method_to_ir): add support for soft-float
4879 to inlined functions that return float.
4881 * mini.c (mono_method_to_ir): add support for soft-float
4882 to cee_stsfld opcode on float fields.
4884 2007-11-05 Geoff Norton <gnorton@novell.com>
4886 * mini-x86.h: Fix the structure access for X86 Leopard.
4889 2007-11-05 Martin Baulig <martin@ximian.com>
4891 * mini-trampolines.c
4892 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
4893 after compiling the method to notify the debugger.
4895 2007-11-05 Martin Baulig <martin@ximian.com>
4897 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
4899 2007-11-02 Zoltan Varga <vargaz@gmail.com>
4901 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
4902 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
4904 2007-11-01 Zoltan Varga <vargaz@gmail.com>
4906 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
4907 native-to-managed wrappers.
4909 2007-11-01 Geoff Norton <gnorton@novell.com>
4911 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
4914 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
4916 * mini.c, mini-x86.c: when getting back from unmanaged code
4917 to managed via a marshaled delegate we also need to set the
4920 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4922 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
4925 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
4927 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
4928 let the debugger or other external agents to tell the JIT when
4929 a sw breakpoint has been inserted in the code that the JIT needs
4930 to be able to inspect.
4932 2007-10-31 Martin Baulig <martin@ximian.com>
4935 (MonoDebuggerInfo): Remove `runtime_class_init'.
4937 2007-10-30 Martin Baulig <martin@ximian.com>
4940 (mono_debugger_thread_created): Added `MonoThread *' argument.
4941 (mono_debugger_extended_notification): New public method.
4942 (mono_debugger_trampoline_compiled): New public method.
4945 (MonoDebuggerThreadInfo): Added `thread' and
4946 `extended_notifications' fields.
4949 (debugger_executable_code_buffer): New static variable.
4952 (MonoDebuggerInfo): Added `executable_code_buffer',
4953 `executable_code_buffer_size', `breakpoint_info_area',
4954 `breakpoint_table' and `breakpoint_table_size'.
4956 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
4958 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
4959 that IP either is an unused value or the vtable pointer. IMT
4960 calls use vtable + offset now. Reduced by almost half the size
4963 2007-10-26 Jonathan Chambers <joncham@gmail.com>
4965 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
4966 defines to access param registers. Replace long usage with
4967 gsize as sizeof(long) != sizeof(void*) on Win64.
4969 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
4970 on Win64. Fix intrinsic, use _AddressOfReturnAddress
4971 instead of non-existant _GetAddressOfReturnAddress.
4973 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
4974 param registers. Save/restore %rdi and %rsi in MonoLMF.
4976 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
4977 param registers. Modify (throw_exception) signature to take
4978 %rdi and %rsi on Win64.
4980 Code is contributed under MIT/X11 license.
4982 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4984 * helpers.c: unlink debugging output files.
4986 2007-10-25 Zoltan Varga <vargaz@gmail.com>
4988 * mini.c: Move mono_create_ftnptr () to object.c.
4990 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
4992 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
4993 optional. This function can now be used to disassemble code generated
4994 outside the JIT such as trampolines and IMT thunks.
4996 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
4998 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
4999 vtable pointer from a ldr instruction.
5001 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5002 new IMT call sequence.
5004 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5005 call sequence for interface invocations.
5007 * mini-arm.c (mono_arch_emit_imt_argument): added, required
5008 for imt support. This function is empty since IMT on ARM requires no
5009 special handling on the IR side.
5011 * mini-arm.c (mono_arch_find_imt_method): added, required for
5014 * mini-arm.c (mono_arch_find_this_argument): added, required
5017 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
5018 a ldr instruction to load a value stored in the code stream.
5020 * mini-arm.c (mono_arch_build_imt_thunk):added, required
5024 2007-10-23 Zoltan Varga <vargaz@gmail.com>
5026 * mini.c (mini_init): Install the jump trampoline callback.
5028 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5030 * mini-trampolines.c: handle synchronized methods with the common
5031 vtable trampoline (bug #335601).
5033 2007-10-17 Zoltan Varga <vargaz@gmail.com>
5035 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
5037 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
5040 * mini-ia64.h mini-ia64.c: Add support for IMT.
5042 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
5043 prolog. Fixes #331958.
5045 2007-10-15 Zoltan Varga <vargaz@gmail.com>
5047 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
5049 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5051 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
5054 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5056 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
5059 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
5061 * mini-x86.c, mini-x86.h: x86 support for the common vtable
5064 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5066 * mini-trampolines.c: changed the magic rampoline to understand
5067 the common vtable trampoline method: the method to invoke is
5068 determined by the vtable displacement of the call.
5070 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5072 * mini.c, mini.h: register the common vtable trampoline if the
5073 architecture supports it.
5075 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5077 * cpu-amd64.md: use the correct max length for tls_get.
5079 2007-10-14 Zoltan Varga <vargaz@gmail.com>
5081 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
5082 CEE_STELEM_ANY. Fixes #333696.
5084 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5086 * exceptions-x86.c: provide more graceful handling of the case where
5087 we followed a bogus function pointer from managed code (bug #332866).
5089 2007-10-11 Mark Probst <mark.probst@gmail.com>
5091 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
5092 replaces the generic_shared flag and will carry more information
5095 * generic-sharing.c: Added mini_type_stack_size() which allows
5096 allows open types if given a generic sharing context.
5097 mini_get_basic_type_from_generic() takes a
5098 MonoGenericSharingContext* instead of a MonoCompile* now.
5100 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
5101 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
5102 mini-sparc.c, mini-x86.c: Trivial changes required by the two
5103 changes above. Just passing arguments through to the right
5106 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5108 * mini-arm.c: unify the call emission to emit_code_seq().
5110 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
5112 * tramp-arm.c: reduced the trampoline size.
5114 2007-10-10 Mark Probst <mark.probst@gmail.com>
5116 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
5117 variable handling out of arch-specific code.
5119 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
5121 * mini-arm.c: implemented fast delegate dispatch.
5123 2007-10-09 Zoltan Varga <vargaz@gmail.com>
5125 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
5126 that fp elimination is turned off if the space required by locals is too
5129 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5131 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
5132 ARM to the new style trampoline.
5134 2007-10-09 Zoltan Varga <vargaz@gmail.com>
5136 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
5138 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
5140 2007-10-09 Martin Baulig <martin@ximian.com>
5143 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
5144 `field_info_offset_offset'.
5146 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
5148 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
5149 removed more internal usage of the r11 register and made it available
5150 to the register allocator.
5152 2007-10-08 Mark Probst <mark.probst@gmail.com>
5154 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
5155 when sharing generics and treat type variables as references.
5157 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5159 * mini-ppc.c: started removing the internal uses of register r11
5160 to eventually allow the register allocator to manage it as an
5161 additional available register.
5163 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5165 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
5167 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
5169 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
5170 specific trampolines as they are not performance critical as a jump
5171 target (maybe align as before only for AOT code?). This saves about
5172 200 KB of native code on x86 for monodevelop startup.
5174 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5176 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
5177 monodevelop startup.
5179 2007-10-06 Zoltan Varga <vargaz@gmail.com>
5181 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
5183 * mini-sparc.h mini-sparc.c: Implement IMT support.
5185 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
5186 its smaller and doesn't clobber sparc_g1.
5188 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
5190 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5192 * mini-ppc.c: optimized the size of the IMT thunks a bit.
5194 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5196 * mini-ppc.c: implemented fast delegate invocation.
5198 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5200 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
5202 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5204 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
5205 code to the new style trampoline in preparation for IMT support.
5207 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5209 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
5210 systems already. This also reduces the specific trampiline sizes and
5211 prepares for the use of r12 as the IMT identifier register.
5213 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5215 * mini-mips.h: endianess fix (simplified from a patch by
5216 Thomas Kunze <thommy@tabao.de>, bug #323737).
5218 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5220 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
5221 to access ucontext fields and enable netbsd support
5222 (partially from Magnus Henoch <mange@freemail.hu>).
5224 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5226 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
5227 use the preprocessor from the CPP env var if it is set.
5229 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5231 * mini-trampolines.c: fixed an assertion and moved it earlier in the
5232 code, before interface_offset gets used.
5234 2007-10-02 Zoltan Varga <vargaz@gmail.com>
5236 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
5237 mono_class_setup_vtable () before accessing klass->vtable.
5239 2007-10-01 Zoltan Varga <vargaz@gmail.com>
5241 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
5244 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5246 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
5247 IMT slots (this saves hundreds of KB of memory in programs like
5248 IronPython and Monodevelop).
5250 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5252 * mini.c: print the delegate counter.
5254 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
5256 * mini-x86.c: make it easier to enable the debugging code for IMT
5259 2007-09-28 Martin Baulig <martin@ximian.com>
5262 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
5263 `mono_method_klass_offset' and `mono_method_token_offset'.
5265 2007-09-20 Mark Probst <mark.probst@gmail.com>
5267 * mini.c: First generics sharing implementation. Can only share
5268 in very simple cases. If sharing doesn't work it falls back to
5269 dedicated compilation.
5271 * mini.h: Flag in MonoCompile to specify whether generic
5272 compilation is shared. Flags enum for marking which generic inst
5273 of a context is used. Prototypes for helper functions.
5275 * generic-sharing.c: Helper functions for generic method sharing.
5277 * optflags-def.h: Optimization flag (gshared) for enabling generic
5278 method sharing added.
5280 * Makefile.am: generic-sharing.c added.
5282 2007-09-19 Daniel Nauck <dna@mono-project.de>
5284 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
5286 2007-09-19 Massimiliano Mantione <massi@ximian.com>
5287 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
5290 2007-09-19 Martin Baulig <martin@ximian.com>
5292 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
5293 mono_debug_cleanup() is now part of mono_cleanup().
5295 2007-09-18 Zoltan Varga <vargaz@gmail.com>
5297 * driver.c (mono_main): Fix a warning.
5299 2007-09-17 Zoltan Varga <vargaz@gmail.com>
5301 * aot-compiler.c: Optimize various parts when processing large assemblies.
5304 * mini.c (mono_patch_info_hash): Improve hash function.
5306 2007-09-14 Jonathan Chambers <joncham@gmail.com>
5308 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
5310 Code is contributed under MIT/X11 license.
5312 2007-09-14 Zoltan Varga <vargaz@gmail.com>
5314 * mini.c (mini_init): Fix a leak.
5316 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
5318 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5320 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
5322 2007-09-14 Zoltan Varga <vargaz@gmail.com>
5324 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
5326 2007-09-13 Zoltan Varga <vargaz@gmail.com>
5328 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
5331 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
5333 * mini.c (handle_alloc): Enable managed allocators in AOT code.
5335 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
5337 * aot-runtime.c (decode_patch_info): Ditto.
5339 2007-09-12 Jonathan Chambers <joncham@gmail.com>
5341 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5342 static case. Cache delegates in architecture specific code,
5343 based on number of parameters.
5345 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5346 in architecture specific code, based on number of parameters.
5348 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
5349 caching happen in architecture specific code now.
5351 Code is contributed under MIT/X11 license.
5353 2007-09-12 Jonathan Chambers <joncham@gmail.com>
5355 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5356 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5357 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5359 Code is contributed under MIT/X11 license.
5361 2007-05-15 Massimiliano Mantione <massi@ximian.com>
5362 * mini.c: (mono_thread_abort) Fixed bug #82416.
5364 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5366 * mini.: hook the new managed GC allocation feature into the JIT.
5368 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5370 * mini.c: implementation for the new runtime tls opcode.
5372 2007-09-11 Martin Baulig <martin@ximian.com>
5375 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5376 `mono_method_inflated_offset'.
5378 2007-09-07 Zoltan Varga <vargaz@gmail.com>
5380 * driver.c mini.h mini.c: Add a new devel command line option for injecting
5381 async exceptions into a method.
5383 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5384 purpose of testing whenever the unwinder works at every instruction.
5386 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5388 * mini.c: check accessibility of method used in ldftn (fixes
5391 2007-09-04 Zoltan Varga <vargaz@gmail.com>
5393 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5395 * inssel.brg: Fix a warning.
5397 2007-09-03 Martin Baulig <martin@ximian.com>
5399 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5400 now takes the `main_method' as argument.
5402 2007-09-02 Zoltan Varga <vargaz@gmail.com>
5404 * cpu-sparc.md (endfilter): Add missing src1:i argument.
5406 2007-08-30 Jonathan Chambers <joncham@gmail.com>
5408 * driver.c: include the cil-coff.h header on Windows.
5410 Code is contributed under MIT/X11 license.
5412 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5414 * mini.c, driver.c: don't include the cil-coff.h header.
5416 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5418 * mini.c: flag places that needs fixes fo soft-float support.
5420 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5422 * mini.h, inssel-float.brg: fix soft-float constant loads on big
5423 endian systems (partially from Dean Jenkins, bug #81924).
5425 2007-08-28 Mark Probst <mark.probst@gmail.com>
5427 * mini.c (check_linkdemand): Remove embedded reference object in
5428 call to LinkDemandSecurityException.
5429 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5430 with an IntPtr instead of a reference object.
5432 2007-08-28 Zoltan Varga <vargaz@gmail.com>
5434 * mini.c (handle_initobj): Handle alignment properly.
5436 * inssel.brg (mini_emit_memset): Ditto.
5438 * inssel.brg (mini_emit_memcpy): Ditto.
5440 * inssel-sparc.brg: Ditto.
5442 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5444 2007-08-26 Zoltan Varga <vargaz@gmail.com>
5446 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5447 exceptions raised in unmanaged code. Fixes part of #82594.
5449 2007-08-24 Mark Probst <mark.probst@gmail.com>
5451 * mini.c (mono_method_to_ir), declsec.c
5452 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5454 2007-08-22 Martin Baulig <martin@ximian.com>
5457 (MonoDebuggerThreadInfo): New typedef.
5458 (mono_debugger_thread_table): New global variable.
5459 (mono_debugger_thread_created): New public function.
5460 (mono_debugger_thread_cleanup): New public function.
5464 - removed `get_current_thread' and `lookup_assembly'.
5465 - removed `data_table'.
5466 - added `thread_table'.
5469 (mono_thread_start_cb): Call mono_debugger_thread_created().
5470 (mono_thread_attach_cb): Likewise.
5471 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5472 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5475 * driver.c (mono_main): Move mono_debug_init() up, before calling
5476 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5478 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5480 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5481 together when passing several arguments of type double (gives a small
5482 speedup and saves a few bytes of generated code).
5484 2007-08-20 Jb Evain <jbevain@novell.com>
5486 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5488 2007-08-20 Jb Evain <jbevain@novell.com>
5490 * mini.c (mono_method_to_ir): throw MethodAccessException
5491 and FieldAccessException instead of InvalidProgramException.
5493 2007-08-20 Mark Probst <mark.probst@gmail.com>
5495 * mini.c: CoreCLR security checks.
5497 * mini.h: Removed MonoSecurityMode (moved to
5498 metadata/security-manager.h) and mono_security_mode global var
5499 (replaced by set/get functions in security-manager.h).
5501 * driver.c: Added "core-clr-test" security mode for testing. Used
5502 set-function for setting security mode.
5504 2007-08-17 Mark Probst <mark.probst@gmail.com>
5506 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
5507 the new jit_info_table.
5509 * driver.c: Test code for the new jit_info_table (enabled by the
5510 define MONO_JIT_INFO_TABLE_TEST).
5512 2007-08-14 Zoltan Varga <vargaz@gmail.com>
5514 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5515 detection of call <REG> instruction sequence. Fixes build on freebsd.
5517 2007-08-13 Zoltan Varga <vargaz@gmail.com>
5519 * mini-exceptions.c: Fix a warning.
5521 2007-08-11 Zoltan Varga <vargaz@gmail.com>
5523 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5524 stack overflow handling code on amd64 too.
5526 * mini-exceptions.c (mono_setup_altstack): Make this use
5527 mono_thread_get_stack_bounds ().
5529 * mini-x86.h: Disable sigaltstack on solaris x86.
5531 2007-08-10 Zoltan Varga <vargaz@gmail.com>
5533 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5535 2007-08-10 Geoff Norton <gnorton@customerdna.com>
5537 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
5539 2007-08-08 Zoltan Varga <vargaz@gmail.com>
5541 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5543 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5545 2007-08-03 Neale Ferguson <neale@sinenomine.net>
5547 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5550 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5552 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5553 to be emitted (bug #82281).
5555 2007-08-01 Martin Baulig <martin@ximian.com>
5557 Merged the `debugger-dublin' branch.
5559 * debug-debugger.h (MonoDebuggerInfo):
5560 Removed the `old_*' compatibility entries.
5561 Added `debugger_version' and `data_table'.
5562 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5563 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5566 (MiniDebugMethodBreakpointInfo): Add `address_list'.
5567 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5568 instead of a `gconstpointer'.
5569 (mono_debugger_insert_method_breakpoint): Return a
5570 `MonoDebugMethodAddressList *'.
5572 2007-06-28 Martin Baulig <martin@ximian.com>
5574 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5576 2007-08-01 Zoltan Varga <vargaz@gmail.com>
5578 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
5579 __builtin_frame_address () since it is broken on older gcc versions.
5581 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5583 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5584 on the stack overflow handling and made the managed stack overflows
5585 catchable in most cases using soft guard pages.
5586 * exceptions-x86.c: added code to restore the protection in the soft
5587 guard pages at the end of exception handling.
5589 2007-07-31 Zoltan Varga <vargaz@gmail.com>
5591 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5593 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5595 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5598 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5600 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5601 signal handling support until it has been ported to the new mechanism.
5602 * mini.c: fixed stack overflow detection and use the new
5603 architecture code to handle signals on the altstack.
5605 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5607 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5608 stack overflows on the alt stack.
5610 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5612 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5613 stack overflows on the alt stack.
5615 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5617 * exceptions-ppc.c: cleanup preparing for altstack support.
5619 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5621 * exceptions-arm.c: cleanup preparing for altstack support.
5623 2007-07-27 Mark Probst <mark.probst@gmail.com>
5625 * mini.c (print_jit_stats): Output hazard pointer stats.
5627 2007-07-26 Mark Probst <mark.probst@gmail.com>
5629 * driver.c, mini.c: Replaced security mode flags with a single
5632 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5634 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5636 2007-07-25 Mark Probst <mark.probst@gmail.com>
5638 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5639 (which doesn't do anything yet) for activating Core CLR
5640 (Silverlight) security.
5642 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5644 * mini-codegen.c: work around a possible gcc bug on arm.
5646 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5648 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5649 message for platforms that don't support AOT compilation.
5651 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5653 * mini.h, mini.c, driver.c: temporary smcs hack.
5655 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5657 * mini-arm.h, mini-arm.c: arm EABI fixes.
5659 2007-07-22 Zoltan Varga <vargaz@gmail.com>
5661 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5664 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5665 trampolines taking a method argument.
5667 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5669 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5670 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5672 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5673 JIT compilation throws an exception. Fixes #82050.
5675 2007-07-19 Mark Probst <mark.probst@gmail.com>
5677 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5678 with the MONO_EXCEPTION_ defines.
5680 2007-07-17 Zoltan Varga <vargaz@gmail.com>
5682 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5685 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5686 the cause of an assertion.
5688 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5690 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5693 2007-07-15 Zoltan Varga <vargaz@gmail.com>
5695 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5696 assert. Should fix #82103.
5698 2007-07-14 Zoltan Varga <vargaz@gmail.com>
5700 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5701 here too. Fixes #82095.
5703 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5706 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5708 * mini-amd64.h: Enable IMT for amd64.
5710 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5712 2007-07-12 Zoltan Varga <vargaz@gmail.com>
5714 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5716 2007-07-12 Mark Probst <mark.probst@gmail.com>
5718 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5719 as soon as check_linkdemand sets an exception_type.
5721 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5723 * mini-x86.c: fixed offsets for IMT call sequence.
5724 * mini-x86.h: enable IMT again.
5726 2007-07-11 Zoltan Varga <vargaz@gmail.com>
5728 * trace.c (mono_trace_enter_method): Decode MonoType too.
5730 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5732 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5734 * mini-amd64.c: Add preliminary IMT implementation.
5736 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5738 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
5739 understand the new IMT-base interface invocation (thanks to
5740 Daniel Nauck for the report and the remote debugging session).
5742 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5744 * mini-x86.c: size and speed optimizations for the IMT bsearch.
5746 2007-07-11 Zoltan Varga <vargaz@gmail.com>
5748 * Makefile.am (aotcheck): Make this actually use the AOTed code.
5750 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
5752 * mini-trampolines.c: implement AOT IMT support.
5753 * mini-x86.h: enable IMT support for wider testing.
5755 2007-07-10 Zoltan Varga <vargaz@gmail.com>
5757 * inssel.brg (emit_imt_argument): Add aot support here.
5759 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
5761 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5763 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
5764 of the IMT implementation, partially from massi, with my
5765 implementation of the bsearch sequence. Disabled by default until
5766 the AOT code is implemented.
5768 2007-07-10 Zoltan Varga <vargaz@gmail.com>
5770 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
5772 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
5774 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5776 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
5777 arch-independent IMT JIT code from Massimiliano
5778 Mantione (massi@ximian.com) with small cleanups from me.
5780 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5782 * Makefile.am: fix svn invocation to get the svn revision to be
5783 independent of the local language (build fix).
5785 2007-07-09 Mark Probst <mark.probst@gmail.com>
5787 * mini.c (inline_method): Reset cfg->exception_type if the
5788 inlining is aborted. Fixes: 82049.
5790 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
5792 * mini.c: remove assert from exception handling code when exception_ptr
5795 2007-07-05 Zoltan Varga <vargaz@gmail.com>
5797 * mini.c (mono_codegen): Add an assert.
5799 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
5800 enter and leave code.
5801 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
5803 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5805 * mini-ppc.c: fixed memory corruption for localloc(0)
5808 2007-07-05 Zoltan Varga <vargaz@gmail.com>
5810 * mini.c: Fix warnings.
5812 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
5814 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
5815 to emit better double->int conversions.
5817 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5819 * mini.c: the provided Min/Max optimizations are valid for unisgned
5822 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
5824 * 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
5826 2007-06-28 Miguel de Icaza <miguel@novell.com>
5828 * mini.c (mono_running_on_valgrind): Add support for reporting the
5829 method and its boundaries to valgrind.
5831 2007-06-28 Martin Baulig <martin@ximian.com>
5833 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5835 2007-06-25 Zoltan Varga <vargaz@gmail.com>
5837 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
5839 * generic.2.cs: Add new test case.
5841 2007-06-25 Martin Baulig <martin@ximian.com>
5843 Merged the `debugger-dublin' branch.
5846 (mono_debugger_insert_method_breakpoint): New public method.
5847 (mono_debugger_remove_method_breakpoint): Likewise.
5848 (mono_debugger_check_breakpoints): New static method.
5849 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
5851 * debug-debugger.h (MonoDebuggerInfo):
5852 Renamed (to keep backward compatibility in the vtable):
5853 `insert_breakpoint' -> `old_insert_breakpoint'.
5854 `remove_breakpoint' -> `old_remove_breakpoint'.
5855 `create_string' -> `old_create_string'.
5856 `lookup_class' -> `old_lookup_class'.
5857 `lookup_type' -> removed; changed into a dummy field.
5858 `lookup_assembly' -> `old_lookup_assembly'.
5859 Added (same functionality, but different signature):
5860 `create_string', `lookup_class', `lookup_assembly'
5862 `get_method_addr_or_bpt', `remove_method_breakpoint',
5863 `runtime_class_init'.
5865 * debug-debugger.c: Merged the `debugger-dublin' branch.
5867 2007-06-23 Zoltan Varga <vargaz@gmail.com>
5869 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
5871 (peephole_pass): Likewise.
5873 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
5875 * driver.c: hopefully make setaffinity work also for ancient
5878 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
5880 * driver.c : win32 build fix.
5882 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5884 * driver.c: check for the MONO_NO_SMP env var and bind to a single
5885 processor if it is set.
5887 2007-06-21 Martin Baulig <martin@ximian.com>
5889 * debug-mini.h: New file.
5892 (mono_debugger_insert_breakpoint_full): Moved here from
5893 ../metadata/mono-debug-debugger.c.
5894 (mono_debugger_remove_breakpoint): Likewise.
5895 (mono_debugger_breakpoint_callback): Likewise.
5897 2007-06-15 Raja R Harinath <rharinath@novell.com>
5899 * jit-icalls.c (mono_helper_compile_generic_method): Update to
5900 changes in MonoGenericClass.
5902 2007-06-14 Zoltan Varga <vargaz@gmail.com>
5904 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
5906 2007-06-14 Raja R Harinath <rharinath@novell.com>
5908 * jit-icalls.c (mono_helper_compile_generic_method): Update to
5909 removal of MonoGenericMethod.
5911 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5913 * mini-exceptions.c: hooks for the exception events profiling API.
5915 2007-06-14 Randolph Chung <tausq@debian.org>
5917 * Makefile.ma: Add hppa target.
5918 * mini-arch.h: Include mini-hppa.h
5919 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
5920 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
5921 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5923 2007-06-14 Randolph Chung <tausq@debian.org>
5925 * inssel.brg: Add rules for "chained" compare-branch operations so that
5926 a single compare op can affect multiple branches. Adjust cost for
5927 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
5928 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
5929 cost for some rules so that they can more easily be overridden by
5930 per-arch rules (with fixes from lupus).
5931 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5933 2007-06-13 Randolph Chung <tausq@debian.org>
5935 * mini-ops.h: Reorder branch ops so that they match the order of the
5936 corresponding CEE_* ops. The code expects them this way.
5937 Add new ops for HPPA target.
5938 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5940 2007-06-13 Randolph Chung <tausq@debian.org>
5942 * mini-exceptions.c: Handle cases where the stack grows towards
5944 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
5946 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5948 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
5950 * driver.c: explain where a non-matching corlib is found.
5952 2007-06-13 Mark Probst <mark.probst@gmail.com>
5954 * mini.c (print_jit_stats): Output dynamic code allocation stats.
5956 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
5958 * mini-exceptions.c: Generate a method profile leave event during
5959 an exception to ensure that the profiler gets notified.
5961 2007-06-07 Zoltan Varga <vargaz@gmail.com>
5963 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
5966 * cpu-amd64.md: Add long_and/or/xor opcodes.
5968 2007-06-06 Wade Berrier <wberrier@novell.com>
5970 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
5971 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
5972 length of instruction shr_imm (expected 8, got 10)
5974 2007-06-06 Zoltan Varga <vargaz@gmail.com>
5976 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
5978 2007-06-06 Mark Probst <mark.probst@gmail.com>
5980 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
5981 MonoInternalHashTable again (fixed bug in the internal hash table
5984 2007-06-06 Mark Probst <mark.probst@gmail.com>
5986 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
5987 Have to figure out what makes it crash the SWF regression.
5989 2007-06-05 Zoltan Varga <vargaz@gmail.com>
5991 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
5993 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5995 * mini.c: optimize out the type check when storing null in a
5998 2007-06-04 Mark Probst <mark.probst@gmail.com>
6000 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6001 MonoInternalHashTable.
6003 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6005 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6006 signed integer methods.
6008 2007-06-02 Zoltan Varga <vargaz@gmail.com>
6010 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
6011 permanently since the current approach doesn't work.
6013 2007-06-02 Zoltan Varga <vargaz@gmail.com>
6015 * inssel.brg (stmt): Only call delegate->invoke_impl if
6016 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
6018 2007-06-01 Zoltan Varga <vargaz@gmail.com>
6020 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
6021 the sreg2==rdx case.
6023 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
6024 account if it contains a rex prefix.
6025 (peephole_pass): Handle OP_FMOVE as well.
6027 2007-06-01 Zoltan Varga <vargaz@gmail.com>
6029 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
6030 as it causes regressions.
6032 2007-05-31 Zoltan Varga <vargaz@gmail.com>
6034 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
6035 static case as well.
6037 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
6039 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6040 (mono_arch_get_this_arg_from_call): Ditto.
6042 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
6044 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
6047 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6048 (mono_arch_get_this_arg_from_call): Ditto.
6050 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
6052 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
6053 try to create optimized invoke code and use that for further invocations.
6054 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
6056 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
6058 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
6060 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
6061 sealed classes or methods.
6062 *devirtualization.cs: tests for the new optimization
6064 2007-05-29 Zoltan Varga <vargaz@gmail.com>
6066 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
6067 by the update_volatile () function.
6069 2007-05-27 Zoltan Varga <vargaz@gmail.com>
6071 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
6074 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
6076 2007-05-24 Jonathan Chambers <joncham@gmail.com>
6078 * mini.c: Add configure checks for header files.
6079 * mini-x86.c: Add configure checks for header files.
6080 * trace.c: Add configure checks for header files.
6081 * aot-runtime.c: Add configure checks for header files.
6082 * aot-compiler.c: Add configure checks for header files.
6083 * driver.c: Add configure checks for header files.
6084 * mini-codegen.c: Add configure checks for header files.
6086 Code is contributed under MIT/X11 license.
6088 2007-05-22 Zoltan Varga <vargaz@gmail.com>
6090 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
6091 icompare_imm -128 + op_iclt. Fixes #81703.
6093 2007-05-19 Zoltan Varga <vargaz@gmail.com>
6095 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
6097 2007-05-15 Massimiliano Mantione <massi@ximian.com>
6099 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
6100 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
6101 so that all isinst checks now use "interface_bitmap".
6103 2007-05-15 Zoltan Varga <vargaz@gmail.com>
6105 * cpu-amd64.md (jmp): Fix a warning.
6107 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
6109 * basic.cs: Add new regression test.
6111 * basic.cs: Remove test which is now in basic-long.cs.
6113 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
6115 * basic-long.cs: Add new test.
6117 2007-05-13 Zoltan Varga <vargaz@gmail.com>
6119 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
6121 2007-05-12 Zoltan Varga <vargaz@gmail.com>
6123 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
6125 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
6128 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
6129 throwing code a bit.
6131 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
6132 the exception throwing code a bit.
6134 * mini-x86.c (get_call_info): Allocate result from a mempool.
6136 2007-05-11 Zoltan Varga <vargaz@gmail.com>
6138 * aot-compiler.c (find_typespec_for_class): Fix the assert.
6140 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
6142 * mini.h (MonoCompile): Add 'token_info_hash' field.
6144 * mini.c: Save token->method associations during compilation so the AOT
6145 compiler can use it.
6147 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
6148 which reference generic classes and methods.
6150 2007-05-10 Zoltan Varga <vargaz@gmail.com>
6152 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
6154 * aot-compiler.c (compile_method): Fix a typo in a comment.
6156 * aot-runtime.c (decode_cached_class_info): Skip generic types.
6158 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
6161 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
6163 2007-05-09 Zoltan Varga <vargaz@gmail.com>
6165 * mini.h (MonoCompile): Add 'args' field.
6167 * mini.c (mono_compile_create_vars): Store variables representing the arguments
6170 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
6172 2007-05-08 Zoltan Varga <vargaz@gmail.com>
6174 * mini.c (mono_compile_get_interface_var): Remove this unused function.
6176 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
6178 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
6179 opcodes for some opcodes.
6181 * mini.h *.brg *.c: Use the new opcodes.
6183 2007-05-08 Massimiliano Mantione <massi@ximian.com>
6185 * mini.h: Bumped aot revision.
6187 * inssel.brg: modified code generation of type checks for interfaces
6188 to use the new "MonoClass.interface_bitmap" instead of the old
6189 "MonoClass.interface_offsets".
6191 2007-04-30 Zoltan Varga <vargaz@gmail.com>
6193 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
6195 2007-04-29 Zoltan Varga <vargaz@gmail.com>
6197 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
6200 2007-04-27 Neale Ferguson <neale@sinenomine.net>
6202 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
6204 2007-04-27 Wade Berrier <wberrier@novell.com>
6206 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
6207 mini.h) to fix build.
6209 2007-04-26 Zoltan Varga <vargaz@gmail.com>
6211 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
6213 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
6214 causes the corlib unit tests to fail.
6216 2007-04-25 Zoltan Varga <vargaz@gmail.com>
6218 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
6220 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
6222 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
6223 opcodes to the comparison relations.
6225 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
6226 opcodes to their types.
6228 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
6230 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
6231 it in cfg->arch.cinfo.
6233 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
6235 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
6236 cfg->cil_offset_to_bb.
6238 2007-04-24 Zoltan Varga <vargaz@gmail.com>
6240 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
6241 created becase of initlocals.
6243 2007-04-23 Zoltan Varga <vargaz@gmail.com>
6245 * mini-alpha.c cpu-alpha.md: More alpha port work from
6246 Sergey Tikhonov <tsv@solvo.ru>.
6248 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
6250 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
6252 2007-04-19 Zoltan Varga <vargaz@gmail.com>
6254 * cpu-s390.md (break): Correct the length of break instruction.
6256 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6258 * mini.c: fix a couple of soft-float issues and comments.
6260 2007-04-15 Miguel de Icaza <miguel@novell.com>
6262 * trace.c (is_filenamechar): - is also a filename char.
6264 2007-04-15 Neale Ferguson <neale@sinenomine.net>
6266 * mini-s390.c: Correct checking for enum type in return value processing.
6268 2007-04-14 Raja R Harinath <rharinath@novell.com>
6270 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
6271 (version.h): Makefile is in the build directory.
6273 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
6275 * mini-amd64.h: fix for assertion failure on Solaris/amd64
6277 2007-04-11 Martin Baulig <martin@ximian.com>
6279 * mini.c (can_access_member): Fix handling of generic classes;
6282 2007-04-10 Zoltan Varga <vargaz@gmail.com>
6284 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
6286 2007-04-05 Zoltan Varga <vargaz@gmail.com>
6288 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
6290 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6292 * mini-codegen.c: make sure the right spill amount is
6293 used for fp or integer registers (fixes the float_sub_spill() on ppc).
6295 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
6297 * mini-ppc.c: fixes for the fp_branch_nan test.
6299 2007-03-23 Zoltan Varga <vargaz@gmail.com>
6301 * basic.cs: Comment out new test which still fails on ia64.
6303 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6305 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
6307 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6309 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
6311 2007-03-22 Zoltan Varga <vargaz@gmail.com>
6313 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
6314 on 64 bit machines. Fixes part of #80738.
6316 * basic.cs: Add regression test.
6318 2007-03-17 Zoltan Varga <vargaz@gmail.com>
6320 * inssel.brg basic.cs: Revert previous change to fix build.
6322 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
6325 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
6327 * basic.cs: Add new regression test.
6329 2007-03-17 Zoltan Varga <vargaz@gmail.com>
6331 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
6334 2007-03-16 Neale Ferguson <neale@sinenomine.net>
6336 * cpu-s390x.md: Correct length of break instruction.
6338 2007-03-16 Neale Ferguson <neale@sinenomine.net>
6340 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6341 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6343 2007-03-15 Jonathan Chambers <joncham@gmail.com>
6345 * *.c: Begin WIN64 port.
6346 * mini.c: Use correct register in profiler.
6347 * mini-amd64.c: No inline assembly on Win64.
6348 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6349 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6350 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6351 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6352 mono_arch_ip_from_context for Win64.
6354 Contributed under MIT/X11 license.
6356 2007-03-15 Zoltan Varga <vargaz@gmail.com>
6358 * exceptions-amd64.c (seh_handler): Ditto.
6360 * exceptions-x86.c (seh_handler): Fix a memory leak.
6362 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6364 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6365 mini-s390x.c: fixed peephole optimizations to deal
6366 correctly with 1 and 2 byte reload avoidance.
6368 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6370 * cpu-s390.md, cpu-s390x.md: update localloc length.
6372 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6374 * cpu-g4.md: added missing descriptions.
6376 2007-03-14 Miguel de Icaza <miguel@novell.com>
6378 * Makefile.am: Add support so the tail tests are not executed on
6379 PowerPC as that is a known limitation of the PowerPC port.
6381 2007-03-13 Jonathan Chambers <joncham@gmail.com>
6383 * runmdesc.bat: Move to msvc directory.
6385 2007-03-13 Jonathan Chambers <joncham@gmail.com>
6387 * runmdesc.bat: Run executable that was produced by the current
6388 target and sent via an argument.
6390 2007-03-11 Zoltan Varga <vargaz@gmail.com>
6392 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6395 * generics.2.cs: Add regression test.
6397 2007-03-09 Wade berrier <wberrier@novell.com>
6399 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6401 2007-03-09 Zoltan Varga <vargaz@gmail.com>
6403 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6404 AOT code depends on this.
6406 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6408 * mini.c: more precise tracking of types in the eval stack
6409 (part of fix for bug #81044).
6411 2007-03-07 Zoltan Varga <vargaz@gmail.com>
6413 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6415 * aot-compiler.c (encode_patch): Remove an obsolete comment.
6417 2007-03-06 Zoltan Varga <vargaz@gmail.com>
6419 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6421 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6423 2007-02-22 Zoltan Varga <vargaz@gmail.com>
6425 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6426 a pointer on 64 bit systems. Fixes #80190.
6428 * iltests.il: Add new regression test.
6430 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6432 * mini.c: inline a constant for Environment.IsRunningOnWindows.
6434 2007-02-19 Geoff Norton <gnorton@customerdna.com>
6436 * trace.c: Remove an erroneous alignemnt check when tracing.
6437 Fixes --trace on OSX86.
6439 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6441 * mini-$(arch).h: initialize SP in context for all the archs.
6443 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
6445 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6446 regressions in the thread tests.
6448 2007-02-14 Zoltan Varga <vargaz@gmail.com>
6450 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6451 - fixed implementation of LOCALLOC opcode
6452 - implemented non-un compare for floats
6454 - implementation of FDIV and CKFINITE opcodes
6455 - fixes for latest mono updates
6456 - additional arch opcodes
6458 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6460 * Makefile.am: simplify and merge rules for cross-compilation.
6462 2007-02-07 Massimiliano Mantione <massi@ximian.com>
6464 * local-propagation.c: Actually *apply* the fix for bug 80591...
6466 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6468 * mini-exceptions.c: backuot part of the last change
6469 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6471 2007-02-06 Massimiliano Mantione <massi@ximian.com>
6472 * inssel.brg: Fix bug 59286.
6475 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6477 * mini-exceptions.c: patch from Zoltan to correctly check for
6478 stack boundaries (using the stack register, not the frame register),
6479 fixes bugs #80724, #79717.
6481 2007-02-03 Zoltan Varga <vargaz@gmail.com>
6483 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6484 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6486 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6487 presence of frame pointer elimination.
6489 2007-02-01 Geoff Norton <gnorton@customerdna.com>
6491 * mini-x86.h: NetBSD UCONTEX_REG defines.
6493 2007-02-01 Zoltan Varga <vargaz@gmail.com>
6495 * inssel-amd64.brg: Fix amd64 build.
6497 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6499 * mini.h: remove extern to workaround what looks likes gcc bug 26905
6502 2007-01-31 Zoltan Varga <vargaz@gmail.com>
6504 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6507 * mini-<ARCH>.c: Use mono_is_regsize_var ().
6509 2007-01-30 Mark Mason <mason@broadcom.com>
6511 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6512 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6513 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6514 beginning support for CEE_JMP [not quite working yet]
6515 * tramp-mips.c: LMF handling now works
6517 2007-01-30 Zoltan Varga <vargaz@gmail.com>
6519 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6521 * mini.h (NULLIFY_INS): New macro.
6523 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6525 * mini.c: statistical profiler fix for windows, patch
6526 from Tor Lillqvist (tml@novell.com).
6528 2007-01-30 Massimiliano Mantione <massi@ximian.com>
6529 * local-propagation.c: Fix bug 80591.
6531 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6533 * Makefile.am: put back the --export-dynamic option as with
6534 the previous gmodule flags (thanks to Robert Jordan).
6536 2007-01-28 Zoltan Varga <vargaz@gmail.com>
6538 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6540 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6541 simplify and speed up the local register allocator. Also rename some fields
6542 like iassign->vassign.
6544 * regalloc.c: Remove some functions which are no longer used since their
6545 inlined version is in mini-codegen.c.
6547 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6549 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6551 2007-01-27 Zoltan Varga <vargaz@gmail.com>
6553 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
6554 narrowing. Fixes #80622.
6556 * iltests.il: Add new regresssion test.
6558 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6560 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6561 debug-debugger.c, debug-debugger.h: warning fixes.
6562 * driver.c: updated copyright year and made it fit in one line.
6564 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6566 * aot-runtime.c: updated to use mono-dl instead of gmodule.
6568 2007-01-25 Zoltan Varga <vargaz@gmail.com>
6570 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6572 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6574 * iltests.il: Add new test for bug #80507.
6576 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6578 * mini-arm.h: use soft-float also on vfp for now.
6580 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6582 * mini.c: fix some more soft-float issues.
6584 2007-01-24 Zoltan Varga <vargaz@gmail.com>
6586 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6588 2007-01-24 Massimiliano Mantione <massi@ximian.com>
6589 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6590 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6591 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6593 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6595 * mini-arm.c: typo fix.
6597 2007-01-23 Neale Ferguson <neale@sinenomine.net>
6599 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6601 2007-01-21 Zoltan Varga <vargaz@gmail.com>
6603 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6604 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6606 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6608 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
6610 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6612 * inssel.brg: Fix a warning.
6614 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6616 * abcremoval.c ssa.c ssapre.c: Update after this change.
6618 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6620 * dominators.c (df_set): Use mono_bitset_union_fast.
6622 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6624 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6625 mini-codegen.c: reduce relocations and memory usage for the cpu
6628 2007-01-20 Zoltan Varga <vargaz@gmail.com>
6630 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6632 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6633 to reduce their size.
6635 2007-01-19 Mark Mason <mason@broadcom.com>
6637 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6638 * mini-mips.c: more configuration macros, support long conditional branches, additional
6639 asserts, fix epilog instrumentation.
6640 * mini-mips.h: use standard stack walk
6641 * cpu-mips.md: increase size of div, rem and conditional branches
6643 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6645 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6648 2007-01-19 Zoltan Varga <vargaz@gmail.com>
6650 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6651 (compile_method): Ditto.
6653 * aot-runtime.c (decode_klass_info): Ditto.
6655 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6656 needed by the code generated by inssel.brg. Also fix a warning.
6658 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6660 * mini.c: deal with enums that become genericinsts by
6661 being nested in a generic class (bug #79956).
6663 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6665 * mini.c: match the generic definition to check for
6666 private access with generic types (bug #78431).
6668 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6670 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6671 to make life easier for people cross-compiling that insist on not
6674 2007-01-17 Mark Mason <mason@broadcom.com>
6676 * inssel-long.brg: patch to deal with mips missing flags
6677 * inssel-long32-mips.brg: implement overflow checks
6678 * insset-mips.brg: implement overflow checks
6679 * mini-mips.h: implement conditional exception handling
6680 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6681 Remove unused code, minor cleanups.
6682 * exceptions-mips.c: minor cleanups
6683 * mini-ops.h: add mips conditional exception ops
6684 * cpu-mips.md: add mips conditional exception ops
6687 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6689 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6690 to deal with mips missing of flags.
6692 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6694 * exceptions-ppc.c: execute fault handlers.
6696 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6698 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6700 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6702 * mini.c: handle also floating point values in initialize_array.
6704 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6706 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6707 array initialization and make it conditional on the intrins option.
6709 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6711 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6712 relocations and put the patch info names close to the enum definition.
6714 2007-01-15 Mark Mason <mason@broadcom.com>
6716 * basic.cs, exceptions.cs: break up large tests to increase debugability.
6718 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6720 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6722 2007-01-12 Raja R Harinath <rharinath@novell.com>
6724 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6726 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6728 * Makefile.am: distribute the mips sources.
6730 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6732 * mini-codegen.h: handle bug #80489 here, by excluding ecx
6735 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
6737 * cpu-x86.md: back out for now as this triggers other regressions.
6739 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6741 * cpu-x86.md: force src1 and dest regpair for long shift instructions
6742 to eax:edx, so ecx can't get allocated to them (bug #80489).
6744 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
6746 * mini.c, mini-exceptions.c: enabled running fault handlers
6749 2007-01-03 Miguel de Icaza <miguel@novell.com>
6751 * driver.c: If nothing fail, do not use the string "failed",
6752 because it makes it very annoying to view test result logs on the
6755 2006-12-30 Miguel de Icaza <miguel@novell.com>
6757 * debug-debugger.c (mono_debugger_main): Rename "main" to
6758 "main_method" to prevent a warning.
6760 Remove a warning for unused field.
6762 2006-12-28 Martin Baulig <martin@ximian.com>
6765 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
6767 2006-12-22 Martin Baulig <martin@ximian.com>
6769 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
6770 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
6771 seperate `.mdb_debug_info' section, so we can access it from the
6772 debugger even if the binary is stripped.
6774 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
6775 from the `.mdb_debug_info' here to prevent the linker from
6776 removing that section.
6778 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
6781 2006-12-19 Robert Jordan <robertj@gmx.net>
6783 * mini-x86: enable the code to return small structures in
6784 registers for FreeBSD as well. Fixes bug #80278.
6785 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
6787 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6789 * mini-x86.c: align the stack when calling the profiler
6790 function instrumenting the prolog (on OSX).
6792 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
6794 * mini.c: emit a break opcode where Debugger.Break () is called.
6796 2006-12-13 Miguel de Icaza <miguel@novell.com>
6798 * mini.c (mono_method_to_ir): Provide useful information on this
6799 assert, to prevent others from debugging like I did.
6801 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6803 * mini.c: enable code which was incorrectly commented
6806 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6808 * mini-x86.c: enable on OSX, too, the code to return small
6809 structures in registers.
6811 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6813 * mini-x86.c: remove the use of the dynamic code manager here, too.
6815 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6817 * mini.h, debug-debugger.c, tramp-*.c: fixed
6818 mono_debugger_create_notification_function() to use
6819 mono_global_codeman_reserve () instead of a dynamic code manager.
6821 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
6823 * mini.c, jit-icalls.h, jit-icalls.c: remove the
6824 ves_array_element_address() jit icall and use a generated
6825 managed method instead (which is about 4 times faster for a rank 3
6828 2006-11-29 Mark Mason <mason@broadcom.com>
6830 * basic-calls.cs: additional tests for passing
6831 structures as function arguments.
6833 2006-11-29 Mark Mason <mason@broadcom.com>
6835 * mini-mips.h: disable custom exception handling
6836 * mini-mips.c: throw/rethrow should use jalr to call
6837 exception stubs. Fixed bug with passing structures
6838 by value. More support for tracing floating point
6841 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6843 * mini.c: fixed typo in the soft-float ldind.r4 handling
6846 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6848 * mini.c, mini.h, driver.c: added --runtime command line
6849 option to select a different runtime than the autodetected one.
6850 * jit.h: added API for embedders to initialize with a specific
6853 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6855 * mini.c: handle also boxing of r4 values (bug #80024).
6857 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6859 * mini-ppc.c: force indirect calls until we reserve
6860 enough address space for all the generated code.
6862 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
6864 * exceptions-arm.c: workaround bugs in the libc definition
6867 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6869 * inssel.brg: fixes from me and Mark Mason.
6871 2006-11-23 Dick Porter <dick@ximian.com>
6873 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
6874 semaphore display now we've fixed the initial value
6876 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6878 * inssel.brg: partially revert the last change to fix the build.
6880 2006-11-21 Mark Mason <mason@broadcom.com>
6882 * inssel.brg: Add and use compare-and-branch macros to support
6883 architectures that do not have condition code registers (ie. MIPS).
6884 * *-mips.{c,brg,md}: Fix copyright statements
6886 2006-11-20 Mark Mason <mason@broadcom.com>
6888 * Makefile.am: remove mini-codegen.c from list of MIPS sources
6889 * mini.c: Allow GET_CONTEXT to be specified by the arch port
6890 * mini.h: Added declaration for mono_print_ins()
6891 * mini-codegen.c: added ins_spec initializer for MIPS
6892 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
6893 vreg to be virtual and hreg to be non-virtual.
6894 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
6895 is not yet working/implemented correctly.
6896 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
6897 non-static, fixup calls to print_ins() from other parts in the file.
6899 2006-11-20 Mark Mason <mason@broadcom.com>
6901 * basic-calls.cs: added tests for passing structures as arguments
6904 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6906 * inssel-long32.brg: optimize signed division by power of two.
6908 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
6910 * mini-arm.c: added support for interworking with thumb code
6911 (mono must be still be built using the ARM instruction encoding).
6913 2006-11-19 Miguel de Icaza <miguel@novell.com>
6915 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
6916 verifier has different rules for it. Fixes a few verifier issues
6919 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
6920 at the end, so people know what happened.
6922 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6924 * brach-opts.c: in optimize_exception_target() make sure we
6925 are in a catch clause (fixes bug #79871).
6927 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6929 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
6930 more soft-float support fixes.
6932 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
6934 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
6935 that are passed half on the stack and half in registers.
6937 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
6939 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
6940 more mips integration work from Mark E Mason
6941 <mark.e.mason@broadcom.com>.
6943 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
6945 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
6946 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
6947 tramp-mips.c: added sources for the mips port, not
6948 integrated in the build yet. Contributed by
6949 Mark E Mason <mark.e.mason@broadcom.com>.
6951 2006-11-14 Neale Ferguson <neale@sinenomine.net>
6953 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
6955 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
6957 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
6958 put the soft-float rules in its own file since it seems to
6959 break s390 compilation.
6961 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
6963 * mini-arm.c: fixed wrnings.
6965 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
6967 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
6968 inssel-arm.brg: ARM support for soft-float.
6970 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
6972 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
6973 loads and stores of 32 bit fp values.
6975 2006-11-10 Zoltan Varga <vargaz@gmail.com>
6977 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
6979 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
6980 works. Fixes #79852 and #79463.
6982 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
6984 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
6985 more soft-float support WIP and fixes.
6987 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
6989 * mini-arm.c: some VFP updates.
6991 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6993 * mini-exceptions.c: 0 is a valid local var offset in some
6994 architectures, don't assert (bug #78508).
6996 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
6998 * exceptions-arm.c: fixed off by one error in stack walk code.
7000 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7002 * mini.h, mini.c: more precise tracking of type load exceptions.
7004 2006-11-03 Robert Jordan <robertj@gmx.net>
7006 * Makefile.am: [WIN32] Add monow.exe target.
7007 * driver.c: [WIN32] Don't detach the console when debugging.
7010 2006-10-30 Miguel de Icaza <miguel@novell.com>
7012 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
7014 2006-10-23 Zoltan Varga <vargaz@gmail.com>
7016 * aot-compiler.c (emit_method_info): Add a case missed earlier.
7018 * driver.c (mini_regression): Fix --regression with AOT.
7020 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
7022 2006-10-17 Zoltan Varga <vargaz@gmail.com>
7024 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
7026 * mini-sparc.h: Don't use sigaction on sparc/linux.
7028 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
7030 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
7032 * mini-exceptions.c: Add proper include files for getpid ().
7034 2006-10-16 Zoltan Varga <vargaz@gmail.com>
7036 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
7037 address instead of a MonoJitInfo* to avoid decoding the exception info for the
7040 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
7041 name cache to reduce its size.
7043 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7045 2006-10-15 Zoltan Varga <vargaz@gmail.com>
7047 * mini-x86.c: Save/restore the current LMF structure more efficiently using
7048 the mono_lmf TLS variable.
7050 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
7051 trampoline lmf frames.
7053 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
7055 2006-10-14 Zoltan Varga <vargaz@gmail.com>
7057 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
7058 the mono_lmf TLS variable.
7060 * mini-exceptions.c: Access the LMF structure through accessors.
7062 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
7063 variable instead of in jit_tls->lmf.
7065 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
7067 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
7068 trampoline lmf frames.
7070 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
7072 2006-10-12 Zoltan Varga <vargaz@gmail.com>
7074 * mini.c trace.c mini-x86.c: Revert these too.
7076 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
7079 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
7081 * genmdesc.c: removed now dead code.
7083 2006-10-09 Robert Jordan <robertj@gmx.net>
7085 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
7087 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
7089 * mini.h: do not leave gaps in the opcode values.
7091 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
7093 * jit-icalls.h: flag functions as internal here, too.
7095 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
7097 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
7098 functions with the internal attribute.
7100 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
7102 * aot-compiler.c: fclose the file descriptor in the profile read loop.
7104 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7106 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
7109 2006-10-05 Zoltan Varga <vargaz@gmail.com>
7111 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
7112 tail calls as on other platforms.
7114 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
7116 * iltests.il: Add a few tailcall tests.
7118 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7120 * driver.c: fix loop for old compilers (bug #79521).
7122 2006-10-02 Zoltan Varga <vargaz@gmail.com>
7124 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
7126 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
7128 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
7129 metadata without any code.
7131 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
7132 more precise debugging information using gdb.
7134 2006-09-30 Zoltan Varga <vargaz@gmail.com>
7136 * inssel-ia64.brg: Make the helper methods static.
7138 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7140 * inssel-x86.brg: make the helper methods static.
7142 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
7144 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
7146 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7148 * mini.c: updates for monoburg changes.
7149 * inssel.brg: make a few helper functions static as they should.
7151 2006-09-27 Zoltan Varga <vargaz@gmail.com>
7153 * Makefile.am: Move mini-codegen.c to common_sources.
7155 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7157 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
7159 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
7160 mini-ppc.h: port to use the common local register allocator.
7162 2006-09-26 Zoltan Varga <vargaz@gmail.com>
7164 * mini.h: Remove the comment too then.
7166 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
7168 * mini.h: put back backend.data which is to be used shortly and
7169 doesn't increase the size of MonoInst. If any 64 bit arch aligned
7170 pointers on 4 byte boundaries it'd have much bigger issues running
7171 and you can ifdef it out anyway.
7173 2006-09-26 Zoltan Varga <vargaz@gmail.com>
7175 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
7176 MonoInst size by 4 bytes on 64 bit machines.
7178 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
7180 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
7181 replacement with more meaningful field names. Arch maintainers, please
7182 check the assigned names are good enough for your arch.
7184 2006-09-26 Zoltan Varga <vargaz@gmail.com>
7186 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
7187 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
7189 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
7191 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
7192 relocations and memory requirements, put the optimization flags
7193 definitions in their own file.
7195 2006-09-24 Zoltan Varga <vargaz@gmail.com>
7197 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
7199 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
7201 2006-09-22 Zoltan Varga <vargaz@gmail.com>
7203 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
7205 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
7207 * inssel.brg: use the correct function to get the size of an item
7208 in an array, given an element class.
7209 * aot-compiler.c: do not access class->class_size directly.
7211 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
7213 * mini.h, debug-mini.c: added a debugging function to print
7214 info about local variables and arguments in a jitted method.
7216 2006-09-20 Zoltan Varga <vargaz@gmail.com>
7218 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7220 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
7222 2006-09-19 Zoltan Varga <vargaz@gmail.com>
7224 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
7225 inner and outer loops when passing vtypes.
7227 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
7229 * mini-ppc.c: take into account the cpu errata for cache flushing
7230 which caused some random errors (bug #79381).
7232 2006-09-19 Zoltan Varga <vargaz@gmail.com>
7234 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
7235 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
7237 2006-09-17 Zoltan Varga <vargaz@gmail.com>
7239 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
7242 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
7245 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
7246 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
7248 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
7251 2006-09-13 Zoltan Varga <vargaz@gmail.com>
7253 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
7255 2006-09-12 Zoltan Varga <vargaz@gmail.com>
7257 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
7258 macro does not have to be changed during debugging.
7260 * 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>.
7262 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
7264 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
7266 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
7267 MONO_ARCH_NO_EMULATE_MUL is defined.
7269 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
7271 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
7273 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
7275 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
7277 2006-09-11 Zoltan Varga <vargaz@gmail.com>
7279 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
7280 stuff to mini-exceptions.c where it is used.
7282 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
7283 setup code, the real one is in mini-exceptions.c.
7285 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
7286 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
7287 some changes from the freebsd ports tree.
7289 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
7292 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
7294 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
7296 * mini.c: on Linux, check for /proc to be mounted
7297 (bug# 79351, novell bug#201204).
7299 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
7301 * mini.c: handle cases where pthread_attr_getstack() behaves
7302 incorrectly (bug #78096).
7304 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
7306 * mini-arm.c: support larger stack frames (bug #79272).
7308 2006-09-08 Zoltan Varga <vargaz@gmail.com>
7310 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
7312 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
7315 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
7316 mono_class_from_name () to find a class from its name.
7318 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
7320 2006-09-07 Zoltan Varga <vargaz@gmail.com>
7322 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
7324 2006-09-05 Kornél Pál <kornelpal@gmail.com>
7326 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
7328 2006-09-04 Zoltan Varga <vargaz@gmail.com>
7330 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
7331 callinfo->trampoline.
7333 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
7335 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7338 2006-09-03 Zoltan Varga <vargaz@gmail.com>
7340 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7342 2006-09-02 Zoltan Varga <vargaz@gmail.com>
7344 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7345 stats.method_trampolines, it is already done by the generic trampoline code.
7347 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7349 2006-09-01 Zoltan Varga <vargaz@gmail.com>
7351 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7353 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7355 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7357 * mini.c (print_jit_stats): Print mscorlib mempool size too.
7359 * mini.c (print_jit_stats): Print new stats.
7361 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7363 2006-08-31 Zoltan Varga <vargaz@gmail.com>
7365 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7366 Address on two dimensional arrays. Fixes #78729.
7368 * mini.h (MonoCompile): Add a 'skip_visibility' field.
7370 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7373 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7375 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7378 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7380 (mini_get_ldelema_ins): Ditto.
7382 2006-08-30 Zoltan Varga <vargaz@gmail.com>
7384 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7385 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
7388 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7390 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7391 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
7393 * exceptions-s390x.c: Cosmetic change.
7395 * tramp-s390.c: Fix warning.
7397 * cpu-s390.md: Correct length of mul_imm.
7399 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7401 * aot-compiler.c: added binary writer with ELF backend
7402 implementation (only on Linux/x86 for now).
7404 2006-08-18 Zoltan Varga <vargaz@gmail.com>
7406 * Makefile.am: Don't run net 2.0 AOT tests.
7408 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7409 (mono_compile_assembly): Skip net 2.0 assemblies as well.
7411 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7413 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7415 * aot-compiler.c: simplified and refactored the asm-writing code
7416 to allow different backends.
7418 2006-08-18 Zoltan Varga <vargaz@gmail.com>
7420 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7422 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
7423 little. Share patches of type TYPE_FROM_HANDLE as well.
7425 * mini.c (mono_patch_info_equal): New helper function.
7426 (mono_patch_info_hash): Ditto.
7428 * aot-compiler.c (emit_method_code): Fix s390 build.
7430 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7431 is not handled because it is stored as a flag and not as a type ctor. Fixes
7434 2006-08-17 Zoltan Varga <vargaz@gmail.com>
7436 * aot-compiler.c: Fix computation of GOT slot statistics.
7438 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7439 Also remove support for not PIC AOT.
7441 * mini.h: Bump AOT file format version.
7443 * objects.cs: Add a test for #78990.
7445 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7446 (peter.dettman@iinet.net.au). Fixes #79087.
7448 * basic-long.cs: Add a test for the above.
7450 2006-08-16 Zoltan Varga <vargaz@gmail.com>
7452 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7454 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7457 2006-08-15 Zoltan Varga <vargaz@gmail.com>
7459 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7462 2006-08-10 Jonathan Chambers <joncham@gmail.com>
7464 * mini.c: Don't verify COM proxy invoke calls
7467 2006-08-10 Dick Porter <dick@ximian.com>
7469 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7470 which process is holding semaphores locked.
7472 2006-08-08 Zoltan Varga <vargaz@gmail.com>
7474 * mini-ia64.c mini-amd64.c: Fix #79027.
7476 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7478 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7480 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7481 implicit arguments in a vararg call. Fixes #79027.
7483 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
7485 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7486 (mono_get_array_new_va_signature): Ditto.
7488 2006-08-05 Zoltan Varga <vargaz@gmail.com>
7490 * aot-runtime.c: Call init_plt lazily.
7492 * inssel-long.brg: Fix unsigned long->int conversion.
7494 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7496 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7497 that most data is now in the .rss/.data section.
7499 2006-08-04 Zoltan Varga <vargaz@gmail.com>
7501 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
7503 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7505 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7507 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7509 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7510 virtual call. Fixes #79010.
7512 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
7513 and use the result as the this argument in the real call.
7515 * generics.2.cs: Add a new test for #79010.
7517 2006-08-03 Zoltan Varga <vargaz@gmail.com>
7519 * mini-x86.c: Fix a warning.
7521 * aot-compiler.c: Add a bunch of statistics.
7523 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7525 2006-08-02 Zoltan Varga <vargaz@gmail.com>
7527 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7529 2006-08-01 Zoltan Varga <vargaz@gmail.com>
7531 * 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>.
7533 2006-07-13 Miguel de Icaza <miguel@novell.com>
7535 * mini.c (mono_method_to_ir): Obtain the original method in the
7536 CIL stream and use this to perform validation.
7540 2006-07-19 Zoltan Varga <vargaz@gmail.com>
7542 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7543 (mono_arch_call_opcode): Ditto.
7545 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7548 * mini.c (mono_patch_info_dup_mp): New helper function.
7550 * aot-compiler.c (compile_method): Fix some of the memory allocated during
7551 compilation. Fixes #78827.
7553 2006-07-18 Kornél Pál <kornelpal@gmail.com>
7555 * declsec.c: Use original security informations for
7556 MONO_WRAPPER_MANAGED_TO_MANAGED.
7558 2006-07-15 Jonathan Chambers <joncham@gmail.com>
7560 * mini.c: Allow Com Interop methods/classes and
7561 don't verify COM wrapper calls
7564 2006-07-13 Zoltan Varga <vargaz@gmail.com>
7566 * inssel-long32.brg: Fix long->i4 checked conversion.
7568 * exceptions.cs: Add a test for the above.
7570 2006-07-08 Zoltan Varga <vargaz@gmail.com>
7572 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7574 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
7577 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7580 2006-07-03 Zoltan Varga <vargaz@gmail.com>
7582 * mini.c: Fix solaris/x86 exception handling.
7584 * Makefile.am: Get rid of $(ICU_LIBS).
7586 2006-07-02 Zoltan Varga <vargaz@gmail.com>
7588 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7589 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7590 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7592 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7594 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7595 this function causes a SIGSEGV.
7597 2006-06-22 Zoltan Varga <vargaz@gmail.com>
7599 * mini.c: Remove unused solaris/x86 includes.
7601 2006-06-21 Zoltan Varga <vargaz@gmail.com>
7603 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7605 2006-06-20 Jb Evain <jbevain@gmail.com>
7607 * cpu-g4.md: fix max length of start_handler instruction.
7609 2006-06-20 Massimiliano Mantione <massi@ximian.com>
7610 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7612 2006-06-16 Massimiliano Mantione <massi@ximian.com>
7613 * ssa.c: Fixed bug 78653 for SSA based deadce.
7614 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7615 MonoInst.flags, used in SSA based deadce.
7616 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7617 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7619 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7621 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7622 it can end up using non executable memory on ppc64 systems
7623 running ppc32 userspace (fix from Johannes Berg).
7625 2006-06-14 Dick Porter <dick@ximian.com>
7627 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7630 2006-06-13 Massimiliano Mantione <massi@ximian.com>
7631 * mini.c: Made so that inline is locally disabled if it would
7632 trigger a .cctor, because too many apps depend on this behavior
7633 (which seems to be also the one of the MS CLR).
7635 2006-06-13 Zoltan Varga <vargaz@gmail.com>
7637 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7638 No idea why this worked before.
7640 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7641 which branch to outer exception clauses since they could skip the
7642 inner finally clauses. Fixes #78633.
7644 * exceptions.cs: Add a test for the above.
7646 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7649 * iltests.il: Add a test for the above.
7651 2006-06-12 Zoltan Varga <vargaz@gmail.com>
7653 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7654 after the end of a try bblock, to prevent asserts in mini_method_compile ().
7656 * iltests.il: Add a test for the above.
7658 2006-06-10 Zoltan Varga <vargaz@gmail.com>
7660 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7662 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7663 methods as instrinsics.
7665 2006-06-09 Wade Berrier <wberrier@novell.com>
7667 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7668 (simple-cee-ops.h ssapre-mini-ops.h)
7670 2006-06-09 Neale Ferguson <neale@sinenomine.net>
7672 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7673 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7675 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7676 * cpu-s390x.md: Fix max. length values for a couple of instructions.
7678 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
7680 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7682 2006-06-08 Massimiliano Mantione <massi@ximian.com>
7684 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7685 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7686 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7687 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7688 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7689 of opcodes, so that bug 78549 should not happen again.
7690 * ssapre.c: Updated to use the renamed files.
7692 2006-06-08 Zoltan Varga <vargaz@gmail.com>
7694 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
7695 in OP_ATOMIC_EXCHANGE_I4.
7697 2006-06-07 Wade Berrier <wberrier@novell.com>
7699 * tramp-s390.c: Fix s390 build (add missing pointer declarations
7700 in mono_debugger_create_notification_function)
7702 2006-06-06 Zoltan Varga <vargaz@gmail.com>
7704 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7706 * mini.c (type_from_stack_type): Disable some changes which do not
7709 * driver.c: Reenable opts.
7711 * mini.h (MonoStackSlot): New structure to keep track of the verification state
7712 of the evaluation stack.
7714 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7715 evaluation stack trace at entry to the bblock.
7717 * mini.c (merge_stacks): New function to perform verification of stack merges.
7718 Turned off by default.
7720 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7723 2006-06-06 Massimiliano Mantione <massi@ximian.com>
7725 * local-propagation.c: Fixed bug 78549.
7727 2006-06-04 Zoltan Varga <vargaz@gmail.com>
7729 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7731 2006-06-02 Miguel de Icaza <miguel@novell.com>
7733 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7734 tramp-arm.c, tramp-ia64.c
7735 (mono_debugger_create_notification_function): Update signature to
7736 new signature and use new protocol for creating the notification
7739 Should fix the build.
7741 2006-06-02 Geoff Norton <gnorton@customerdna.com>
7743 * exceptions-ppc.c (mono_jit_walk_stack)
7744 (ves_icall_get_frame_info): Fix the build
7746 2006-06-02 Zoltan Varga <vargaz@gmail.com>
7748 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
7750 2006-05-31 Raja R Harinath <rharinath@novell.com>
7752 * il2tests.2.il: New file for generics CIL tests. Add test for
7754 * Makefile.am: Update.
7757 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
7760 2006-05-30 Massimiliano Mantione <massi@ximian.com>
7762 * aliasing.c: Fixed bug 78311.
7764 2006-05-29 Martin Baulig <martin@ximian.com>
7766 * mini-exceptions.c (mono_find_jit_info): When computing the
7767 native offset, check whether we're actually inside the method's
7768 code; call mono_debug_print_stack_frame() to format the frame.
7769 (ves_icall_System_Exception_get_trace): Call
7770 mono_debug_print_stack_frame() to format the stack frame.
7771 (ves_icall_get_trace): Update to the new debugging API.
7772 (mono_jit_walk_stack_from_ctx): Likewise.
7773 (ves_icall_get_frame_info): Likewise.
7775 * mini.c (get_method_from_ip): Use the new debugging API.
7776 (mono_print_method_from_ip): Likewise.
7779 (mono_jit_walk_stack): Use the new debugging API.
7780 (ves_icall_get_frame_info): Likewise.
7782 2006-05-27 Zoltan Varga <vargaz@gmail.com>
7784 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
7786 2006-05-25 Massimiliano Mantione <massi@ximian.com>
7788 * mini.c: Added "limitator" to inline for debugging.
7790 2006-05-24 Martin Baulig <martin@ximian.com>
7792 * debug-debugger.c (mono_debugger_init): Create a private,
7793 malloc()-based code manager for the notification function and
7794 intentionally leak it on exit. This fixes the crash-on-exit race
7798 (mono_debugger_create_notification_function): Added
7799 `MonoCodeManager *' argument.
7802 (mono_debugger_create_notification_function): Added
7803 `MonoCodeManager *' argument.
7805 2006-05-23 Massimiliano Mantione <massi@ximian.com>
7807 * aliasing.c: Fixed 64 bit issue.
7808 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7809 default since all known bugs are fixed (one more time!).
7811 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7813 * mini.c: write barrier support.
7815 2006-05-23 Martin Baulig <martin@ximian.com>
7817 * debug-debugger.c: Revert Paolo's change. Add comment and #error
7818 check at the top of the file.
7820 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
7822 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
7823 reverting changes without reason and without changelog entries.
7825 2006-05-18 Zoltan Varga <vargaz@gmail.com>
7827 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
7828 to a few opcodes. Fixes #78439.
7830 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
7831 consistency with other archs.
7833 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
7835 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
7837 * debug-debugger.c: fix the build.
7839 2006-05-17 Martin Baulig <martin@ximian.com>
7842 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
7843 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
7844 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
7845 (debugger_attach): Call GC_mono_debugger_add_all_threads().
7847 2006-05-11 Zoltan Varga <vargaz@gmail.com>
7849 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
7851 2006-05-10 Zoltan Varga <vargaz@gmail.com>
7853 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
7854 MONO_TYPE_GENERICINST.
7856 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
7857 MONO_TYPE_GENERICINST.
7859 2006-05-09 Zoltan Varga <vargaz@gmail.com>
7861 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
7864 2006-05-08 Zoltan Varga <vargaz@gmail.com>
7866 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
7868 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
7870 2006-05-06 Zoltan Varga <vargaz@gmail.com>
7872 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
7873 mono_trace_cleanup ().
7875 * iltests.il: Fix problem with the newly added test.
7877 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
7878 due to register constraints, free up the previous hreg. Fixes #78314.
7880 * iltests.il: Add new test for #78314.
7882 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
7883 Interlocked.Add. Fixes #78312.
7885 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
7887 2006-05-05 Zoltan Varga <vargaz@gmail.com>
7889 * inssel.brg (mini_emit_virtual_call): Fix a warning.
7891 2006-05-05 Martin Baulig <martin@ximian.com>
7893 * debug-mini.c (mono_debug_open_block): New method.
7896 (mono_arch_output_basic_block): Call mono_debug_open_block() at
7897 the beginning of each basic block.
7900 (mono_arch_output_basic_block): Call mono_debug_open_block() at
7901 the beginning of each basic block.
7903 2006-05-04 Massimiliano Mantione <massi@ximian.com>
7905 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7906 default until I understand why they break the build on amd64.
7908 2006-05-04 Zoltan Varga <vargaz@gmail.com>
7910 * mini.c (mini_cleanup): Call mono_cleanup ().
7912 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
7915 2006-05-04 Massimiliano Mantione <massi@ximian.com>
7917 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
7918 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
7919 default since all known bugs are fixed, and I cannot reproduce bug
7920 77944... I'm asking Matt Hargett to test again after this commit.
7922 2006-04-28 Massimiliano Mantione <massi@ximian.com>
7924 * mini-codegen.c: Fixed typo that thrashed inline.
7926 2006-04-28 Zoltan Varga <vargaz@gmail.com>
7928 * dominators.c (compute_dominators): Avoid using a worklist since
7929 it is not correct in some cases. Instead, iterate over all bblocks as
7930 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
7932 2006-04-28 Miguel de Icaza <miguel@novell.com>
7934 * mini.c (mono_jit_compile_method_inner): Use
7935 mono_prepare_exception_from_error that resets the value
7938 2006-04-27 Miguel de Icaza <miguel@novell.com>
7940 * mini.c: Move the mini_loader_error_to_exception to metadata.
7942 2006-04-27 Massimiliano Mantione <massi@ximian.com>
7944 * aliasing.c: Fixed bug 78210.
7946 2006-04-27 Massimiliano Mantione <massi@ximian.com>
7948 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
7949 default until all their problems (or the ones they trigger) are fixed.
7951 2006-04-26 Zoltan Varga <vargaz@gmail.com>
7953 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
7955 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
7956 as loaded only after resolving patches since that could invoke the same method.
7958 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
7960 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
7963 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
7966 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
7969 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
7970 made from AOT code through the PLT table.
7972 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
7973 holding the plt offset when a call is made to the aot plt trampoline.
7975 2006-04-25 Zoltan Varga <vargaz@gmail.com>
7977 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
7980 * Makefile.am (common_sources): Fix build breakage.
7982 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
7983 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
7984 intra-assembly calls if possible.
7986 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
7988 * mini-trampolines.c: Handle PLT entries.
7990 * mini.c: Avoid creating a GOT var for calls.
7992 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
7995 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
7998 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8001 * mini.h: Bump AOT file format version.
8003 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8006 2006-04-25 Martin Baulig <martin@ximian.com>
8008 * driver.c: Disable copyprop, consprop and inline when running
8009 inside the debugger.
8011 2006-04-25 Martin Baulig <martin@ximian.com>
8013 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
8014 with `get_current_thread' and added `detach'.
8015 (MonoDebuggerMetadataInfo): Added `thread_size',
8016 `thread_tid_offset', `thread_stack_ptr_offset' and
8017 `thread_end_stack_offset'.
8019 2006-04-25 Zoltan Varga <vargaz@gmail.com>
8021 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
8024 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
8025 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
8027 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
8029 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
8031 * aot.c: Add support for ADJUSTED_IID.
8033 2006-04-24 Zoltan Varga <vargaz@gmail.com>
8035 * aot.c (emit_method_order): Don't align method_order_end.
8037 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
8038 the interface ID changes.
8040 2006-04-21 Dick Porter <dick@ximian.com>
8042 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
8043 cleaning up a thread. Fixes the new part of bug 77470.
8045 2006-04-20 Geoff Norton <gnorton@customerdna.com>
8047 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
8050 2006-04-19 Zoltan Varga <vargaz@gmail.com>
8052 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
8054 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
8055 SIGSEGV. Fixes #78072.
8057 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
8058 unregister our SIGABRT handler.
8060 2006-04-19 Massimiliano Mantione <massi@ximian.com>
8062 * mini.c: Disabled inline where it can alter the call stack in a
8063 way visible from managed code.
8064 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
8067 2006-04-16 Zoltan Varga <vargaz@gmail.com>
8069 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
8070 on other platforms. Fixes #78089.
8072 2006-04-13 Martin Baulig <martin@ximian.com>
8074 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
8075 determine whether we're inside the debugger.
8078 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
8080 2006-04-12 Zoltan Varga <vargaz@gmail.com>
8082 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
8083 handler clauses. Fixes #78024.
8085 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
8086 in the CALL_MEMBASE opcodes. Fixes #78088.
8087 (mono_arch_get_vcall_slot_addr): Ditto.
8089 2006-04-10 Martin Baulig <martin@ximian.com>
8091 * debug-debugger.c: The thread handling code has now been moved
8092 into ../metadata/threads.c.
8094 2006-04-10 Zoltan Varga <vargaz@gmail.com>
8096 * driver.c (mono_main): Fix --with-gc=none build.
8098 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
8099 (mono_spillvar_offset_float): Ditto.
8100 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
8101 hreg, not when its !global, since on ia64, there is a third category: stacked
8104 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
8106 * mini.c: set MonoInst->klass for load field address and a few other
8109 2006-04-10 Zoltan Varga <vargaz@gmail.com>
8111 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
8113 2006-04-07 Zoltan Varga <vargaz@gmail.com>
8115 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
8116 the branch opt changes.
8118 2006-04-06 Dick Porter <dick@ximian.com>
8120 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
8122 * wapihandles.c (mini_wapi_seminfo):
8123 * driver.c (mono_main): Add semaphore info option
8125 2006-04-05 Zoltan Varga <vargaz@gmail.com>
8127 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
8128 branch optimization changes. Fixes #78009.
8130 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8132 * mini.c: ignore accessibility of methods in managed->native wrappers.
8134 2006-04-04 Zoltan Varga <vargaz@gmail.com>
8136 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
8138 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
8140 2006-04-03 Zoltan Varga <vargaz@gmail.com>
8142 * mini.c: Modify the branch optimizations to preserve the invariant that
8143 the entries inside the in_bb and out_bb arrays are unique.
8144 (mono_unlink_bblock): Avoid creation of new arrays.
8146 2006-04-02 Zoltan Varga <vargaz@gmail.com>
8148 * mini.c (mono_unlink_bblock): Fix regression caused by previous
8151 2006-04-01 Zoltan Varga <vargaz@gmail.com>
8153 * mini.c (optimize_branches): Remove the "optimizations" in
8154 the cbranch1/cbranch2 -> branch cases which were causing several
8155 problems in the past. Fixes #77986.
8157 2006-03-31 Chris Toshok <toshok@ximian.com>
8159 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
8160 default optimizations :(
8162 2006-03-31 Zoltan Varga <vargaz@gmail.com>
8164 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
8167 2006-03-31 Massimiliano Mantione <massi@ximian.com>
8169 * local-propagation.c: Added comments to structs and removed
8170 "Mono" prefixes from local tree mover types.
8172 2006-03-30 Zoltan Varga <vargaz@gmail.com>
8174 * Makefile.am (arch_sources): Define this for each architecture so
8175 libmono_la_SOURCES is defined in one place.
8177 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8179 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
8182 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
8184 * driver.c: print the GC name supplied by configure.
8186 2006-03-29 Massimiliano Mantione <massi@ximian.com>
8188 * local-propagation.c: Added tree mover, and moved here all the
8189 local propagation code from mini.c
8190 * mini.c: Added support for treeprop, and moved all the local
8191 propagation code to local-propagation.c
8192 * mini.h: Added support for treeprop
8193 * driver.c: Added support for treeprop, enabled consprop, copyprop,
8194 treeprop, inline and deadce by default
8195 * Makefile.am: Added local-propagation.c
8197 2006-03-25 Zoltan Varga <vargaz@gmail.com>
8199 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
8201 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
8203 * debug-debugger.c: make it compile without the Boehm GC.
8205 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8207 * mini.c: fixed issue with mismatch when an icall is registered
8208 with multiple names but same address.
8210 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8212 * declsec.c, mini-exceptions.c: use write barrier to set reference
8213 fields of managed objects.
8215 2006-03-19 Zoltan Varga <vargaz@gmail.com>
8217 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
8218 (can_access_internals): Fix a warning.
8220 * mini.c (print_method_from_ip): Rename this to
8221 mono_print_method_from_ip so it gets exported.
8223 * trace.c: Deal with strings inside StringBuilder's containing garbage
8224 and fix memory leaks. Fixes #77848.
8226 2006-03-19 Zoltan Varga <vargaz@gmail.com>
8228 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
8231 2006-03-16 Neale Ferguson <neale@sinenomine.net>
8233 * mini-s390.c: Remove OP_X86_TEST_NULL.
8235 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8237 * mini.c: use the correct GetHashCode() for the moving collector.
8239 2006-03-16 Massimiliano Mantione <massi@ximian.com>
8241 * liveness.c: Regalloc spill cost tuning.
8243 2006-03-15 Neale Ferguson <neale@sinenomine.net>
8245 * mini-s390x.h: Correct S390_LONG macro.
8247 * mini-s390x.c: Cleanup unused code.
8249 2006-03-15 Zoltan Varga <vargaz@gmail.com>
8251 * jit-icalls.h: New file.
8253 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
8254 icalls and include that instead of including jit-icalls.c.
8256 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
8259 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
8261 * mini.c: when checking for member accessibility, also check for
8262 friend assemblies and for explicit interface implementations.
8264 2006-03-14 Zoltan Varga <vargaz@gmail.com>
8266 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
8268 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
8270 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8271 common cases are done first.
8273 * mini-ops.h: Only define platform specific opcodes on the given platform.
8275 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
8278 2006-03-14 Martin Baulig <martin@ximian.com>
8280 Revert Paolo's change from r57348:
8282 * mini.h: don't use gboolean for bitfields.
8283 * mini.c: verifier changes for fields and methods accessibility.
8285 2006-03-13 Neale Ferguson <neale@sinenomine.net>
8287 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
8289 * mini-s390x.c: Fix conv_r_un.
8291 * cpu-s390, cpu-s390x.md: Fix lengths.
8293 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8295 * mini.c: nested types have access to all the nesting
8296 levels, not just the enclosing types.
8298 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8300 * mini.c: added a few more verification checks.
8302 2006-03-12 Zoltan Varga <vargaz@gmail.com>
8304 * liveness.c: Merge optimizations from the linear-il branch.
8306 2006-03-11 Zoltan Varga <vargaz@gmail.com>
8308 * mini-ia64.c (emit_call): Add a comment.
8310 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
8312 * tramp-ia64.c: Fix some warnings.
8314 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8316 * mini.h: don't use gboolean for bitfields.
8317 * mini.c: verifier changes for fields and methods accessibility.
8319 2006-03-11 Zoltan Varga <vargaz@gmail.com>
8321 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
8322 lazy icall wrapper changes.
8324 * dominators.c: Replace all the dominator algorithms with faster
8325 ones from the linear-il branch.
8327 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
8330 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8331 common cases are done first.
8333 * mini-amd64.c: Fix some warnings.
8335 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8338 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8341 * mini.h: Add a missing prototype.
8343 2006-03-10 Zoltan Varga <vargaz@gmail.com>
8345 * mini.c: Compile icall wrappers lazily.
8347 * mini-codegen.c: Use printf instead of g_print since its much faster.
8349 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8352 * mini.c (optimize_branches): Cache the negative result from
8353 remove_block_if_useless ().
8355 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
8356 Also fix some bblock linking issues.
8358 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8361 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8363 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8364 accessed fields first, for better cache behavior.
8366 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8368 * mini.c: speedup IList<T> array accesses.
8370 2006-03-09 Zoltan Varga <vargaz@gmail.com>
8372 * mini.c (mono_method_to_ir): Handle large methods overflowing the
8373 inline_costs counter. Fixes #77190.
8375 2006-03-06 Zoltan Varga <vargaz@gmail.com>
8377 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8378 trace messages. Fixes #77706.
8380 2006-03-04 Martin Baulig <martin@ximian.com>
8382 * tramp-amd64.c, tramp-x86.c
8383 (mono_debugger_create_notification_function): Use
8384 mono_global_codeman_reserve() to allocate a buffer at runtime and
8387 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8389 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8390 notification function at runtime and then call `initialize' in the
8391 `MONO_DEBUGGER__debugger_info' vtable.
8393 2006-03-04 Zoltan Varga <vargaz@gmail.com>
8395 * iltests.il: Fix a visibility problem.
8397 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8399 * driver.c, mini.c: add hooks for the counters API.
8401 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8403 * driver.c: show disabled options.
8405 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8407 * linear-scan.c: always use cost-driven selection.
8409 2006-02-28 Raja R Harinath <rharinath@novell.com>
8411 * jit-icalls.c (helper_compile_generic_method): Revert change from
8414 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8416 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8418 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8420 * inssel.brg: style fixes, mostly to force the updated monoburg
8421 to run for people using svn.
8423 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8425 * mini.c: match monoburg changes.
8427 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8429 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8430 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8431 declaration in the header file.
8433 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8435 * helpers.c: reduce relocations and mem usage.
8437 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8439 * mini.h, mini-codegen.c: disable logging features if
8440 requested by configure.
8442 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8444 * mini.c: tiny verifier changes.
8446 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8448 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8449 cpu-pentium.md: stack alignment changes for osx/x86,
8450 partially from Geoff Norton <gnorton@customerdna.com>.
8452 2006-02-24 Raja R Harinath <harinath@gmail.com>
8454 * jit-icalls.c (helper_compile_generic_method): Update to changes
8455 in metadata/class.c.
8457 2006-02-24 Zoltan Varga <vargaz@gmail.com>
8459 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8461 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8462 interface calls with large offsets.
8464 2006-02-23 Raja R Harinath <rharinath@novell.com>
8466 * jit-icalls.c (helper_compile_generic_method): Document the
8467 special-case we depend on so that we can inflate the method twice
8468 with the same context with no bad side-effects.
8470 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8472 * mini-x86.c, mini-amd64.c: fix for case when xen support
8475 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8477 * mini-x86.c, mini-amd64.c: generate code to access tls items
8478 in a faster way for Xen systems.
8480 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8482 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8483 updates and compilation fixes for the OSX/x86 port, mostly from
8484 Geoff Norton <gnorton@customerdna.com>.
8486 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8488 * inssel.brg: faster interface call implementation
8489 to sync with the interface_offsets MonoVTable changes.
8491 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8493 * mini.c: more verification checks.
8495 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8497 * mini.c: added a few more verification checks.
8499 2006-02-17 Neale Ferguson <neale@sinenomine.net>
8501 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8502 facility on the processor and use it if available.
8504 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8506 * driver.c, aot.c, mini.c: throw exception if the IL code is
8507 invalid or unverifiable.
8509 2006-02-17 Raja R Harinath <rharinath@novell.com>
8511 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8514 2006-02-16 Zoltan Varga <vargaz@gmail.com>
8516 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8518 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8520 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8521 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8522 handling of instantiated generic valuetypes.
8524 2006-02-11 Zoltan Varga <vargaz@gmail.com>
8526 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
8527 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8530 * generics.2.cs: Revert the nullable reftypes tests.
8532 2006-02-10 Zoltan Varga <vargaz@gmail.com>
8534 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8535 using __builtin_frame_address (1) as it doesn't work in the presence
8536 of optimizations. Hopefully fixes #77273.
8538 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8539 -> generics.cs change as it doesn't work with some automake versions.
8541 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8543 * mini.c: handle systems that sue a different way to
8544 retrieve the stack address of the current thread.
8546 2006-02-09 Zoltan Varga <vargaz@gmail.com>
8548 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8549 it specially in the makefile.
8551 * generics.2.cs: Add tests for nullable reference types.
8553 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8555 * mini.c: always handle the case when mono_jit_init()
8556 is called in a thread different from the main thread,
8557 confusing libgc (bug #77309).
8559 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8561 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8563 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8565 * mini.c: change optimize_branches () to use a single loop
8566 and introduce a new optimization to simplify some range checks.
8568 2006-02-03 Martin Baulig <martin@ximian.com>
8570 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8571 and merged with debugger_thread_manager_add_thread().
8572 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8573 inform the debugger about the main thread.
8575 2006-02-03 Zoltan Varga <vargaz@gmail.com>
8577 * basic.cs: Add test for div.un/rem.un constant folding.
8579 2006-02-03 Neale Ferguson <neale@sinenomine.net>
8581 * cpu-s390x.md: correct int_xor_imm length
8583 2006-02-03 Zoltan Varga <vargaz@gmail.com>
8585 * generics.2.cs: New test for #77442.
8587 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8590 2006-02-02 Martin Baulig <martin@ximian.com>
8592 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8593 <mono/metadata/mono-debug-debugger.h>
8595 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8597 2006-02-02 Martin Baulig <martin@ximian.com>
8599 * debug-debugger.h: New header file for debug-debugger.c.
8601 * debug-debugger.c: Big API cleanup; don't run the managed Main()
8602 function is a separate thread anymore; add support for attaching.
8604 2006-02-01 Zoltan Varga <vargaz@gmail.com>
8606 * tramp-x86.c: Fix a warning.
8608 2006-01-31 Zoltan Varga <vargaz@gmail.com>
8610 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8611 on very large methods.
8613 * aot.c (load_patch_info): Fix a warning.
8615 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8617 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8618 mini-ops.h: alu membase optimizations.
8620 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8622 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8623 to speedup StringBuilder.
8625 2006-01-27 Zoltan Varga <vargaz@gmail.com>
8627 * dominators.c (mono_compute_natural_loops): Fix detection of
8628 loop body start blocks.
8630 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8632 2006-01-26 Zoltan Varga <vargaz@gmail.com>
8634 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8637 2006-01-25 Massimiliano Mantione <massi@ximian.com>
8639 * aliasing.c: Fixed aliasing issue on 64 bit archs.
8641 2006-01-25 Martin Baulig <martin@ximian.com>
8643 * debug-debugger.c: Moved the `MonoDebuggerManager' and
8644 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8645 started to cleanup this file a little bit.
8647 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8649 * mini.c: optimize a codepath frequently happening in generics code.
8651 2006-01-23 Martin Baulig <martin@ximian.com>
8653 * Makefile.am: Only compile debug-debugger.c on supported platforms.
8655 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8658 * driver.c: debug-debugger.c is only available if
8659 `MONO_DEBUGGER_SUPPORTED' is defined.
8661 2006-01-23 Martin Baulig <martin@ximian.com>
8663 * debug-debugger.c: Only enable this on platforms where the Mono
8664 Debugger is working (x86 and x86_64).
8666 2006-01-21 Martin Baulig <martin@ximian.com>
8668 The Mono Debugger is now using the normal `mono' instead of the
8669 `mono-debugger-mini-wrapper' when executing managed code.
8671 * debug-debugger.c: New file; previously known as
8672 debugger/wrapper/wrapper.c.
8674 * debug-mini.c (mono_init_debugger): Removed.
8676 * driver.c (mono_main): Added new `--inside-mdb' command line
8677 argument which is used when running inside the debugger.
8679 2006-01-20 Zoltan Varga <vargaz@gmail.com>
8681 * liveness.c (mono_analyze_liveness): Remove some unused data
8684 2006-01-17 Zoltan Varga <vargaz@gmail.com>
8686 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8688 2006-01-16 Zoltan Varga <vargaz@gmail.com>
8690 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8691 depends on implementation details of monobitset.
8693 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8696 2006-01-15 Zoltan Varga <vargaz@gmail.com>
8698 * liveness.c: Update after monobitset changes.
8700 2006-01-14 Zoltan Varga <vargaz@gmail.com>
8702 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8704 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8706 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8708 * mini-s390x.c: Remove warning messages.
8710 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
8712 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8714 2006-01-10 Zoltan Varga <vargaz@gmail.com>
8716 * generics.2.cs: Add ldelem/stelem_any test.
8718 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8720 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8722 2006-01-07 Zoltan Varga <vargaz@gmail.com>
8724 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8726 2006-01-06 Zoltan Varga <vargaz@gmail.com>
8728 * generics.2.cs: Reenable vtype tests.
8730 * inssel-x86.brg: Remove an icorrect valuetype rule.
8732 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8734 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8735 initial support for OP_ABS.
8737 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8739 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
8741 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8743 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
8744 conversion and implement LADD/LSUB.
8746 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
8749 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8751 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
8753 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
8756 2006-01-05 Neale Ferguson <neale@sinenomine.net>
8758 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
8759 localloc is encountered. Fixes crash in test-183.cs when using gmcs
8760 (stack walk problem).
8762 2006-01-04 Zoltan Varga <vargaz@gmail.com>
8764 * aot.c (mono_aot_load_method): Fix a warning.
8766 2006-01-03 Neale Ferguson <neale@sinenomine.net>
8768 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
8770 2006-01-03 Zoltan Varga <vargaz@gmail.com>
8772 * iltests.il: Add test for #77148.
8774 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
8777 2006-01-03 Neale Ferguson <neale@sinenomine.net>
8779 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
8781 2006-01-03 Neale Ferguson <neale@sinenomine.net>
8783 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
8784 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
8786 * basic-long.cs: Add lconv-to-r4/r8 tests.
8788 2006-01-03 Zoltan Varga <vargaz@gmail.com>
8790 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
8792 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
8793 here as on other archs.
8795 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8797 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
8799 2005-12-29 Neale Ferguson <neale@sinenomine.net>
8801 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
8803 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
8805 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
8806 instrument_prolog; Add memory_barrier instruction.
8808 2005-12-26 Zoltan Varga <vargaz@gmail.com>
8810 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
8812 2005-12-23 Zoltan Varga <vargaz@gmail.com>
8814 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
8816 * aliasing.c inssel.brg: Fix warnings.
8818 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
8819 could skip initialization of some parts of memory.
8821 * mini.c mini-ia64.c: Fix warnings.
8823 * inssel-sparc.brg: Add an implementation of lneg which actually works.
8825 2005-12-22 Zoltan Varga <vargaz@gmail.com>
8827 * aliasing.c (mono_build_aliasing_information): Add a workaround for
8828 a crash seen on sparc.
8830 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
8832 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
8834 2005-12-21 Neale Ferguson <neale@sinenomine.net>
8836 * mini-ops.h: Add s390_backchain instruction
8838 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
8840 * cpu-s390.md: Add s390_backchain instruction
8842 * mini-s390.c: Significant ABI changes
8844 * mini-s390.h: Cater for zero length structures
8846 2005-12-20 Neale Ferguson <neale@sinenomine.net>
8848 * mini-s390.c: ABI fixes
8850 * inssel-s390.brg: Remove debug statements
8852 * cpu-s390.md: Fix length of ATOMIC_xx operations
8854 2005-12-19 Zoltan Varga <vargaz@gmail.com>
8856 * basic-float.cs: Add float<->long conversion tests.
8858 2005-12-16 Neale Ferguson <neale@sinenomine.net>
8860 * mini-s390.c: Fix LOCALLOC processing.
8862 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
8864 2005-12-15 Zoltan Varga <vargaz@gmail.com>
8866 * iltests.il: Add tests for some opcodes not covered by the other
8869 2005-12-15 Neale Ferguson <neale@sinenomine.net>
8871 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
8872 register loading for Tail processing; Correct trace output.
8874 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
8876 * cpu-s390.md: Correct size of jmp instruction.
8878 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8880 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
8882 2005-12-13 Neale Ferguson <neale@sinenomine.net>
8884 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
8885 Bring s390 up to current level.
8887 2005-12-12 Zltan Varga <vargaz@gmail.com>
8889 * generics.2.cs: Disable the newly added tests as they do not work yet.
8891 * generics.2.cs: Add valuetype tests.
8893 2005-12-09 Zoltan Varga <vargaz@gmail.com>
8895 * basic-long.cs: Add i4->u8 test.
8897 * objects.cs: Add tests for JIT intrinsic.
8899 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
8900 optimizations lost by a mistake.
8902 2005-12-07 Zoltan Varga <vargaz@gmail.com>
8904 * basic-long.cs: Remove a test moved to objects.cs.
8906 * arrays.cs: Add more array tests.
8908 2005-12-06 Zoltan Varga <vargaz@gmail.com>
8910 * arrays.cs: Add new tests for multi-dimensional arrays.
8912 2005-12-06 Raja R Harinath <rharinath@novell.com>
8914 * Makefile.am (test_sources2): Add generics.2.cs.
8915 (EXTRA_DIST): Add test_sources2.
8917 2005-12-05 Ben Maurer <bmaurer@ximian.com>
8919 Support for boxing and unboxing nullable types as well as the
8920 isinst operation on nullables, per the CLI ammendment.
8922 * inssel.brg (CEE_ISINST): Special case for nullable
8924 * mini.c (handle_unbox_nullable): new method
8925 (handle_box): Special case for nullable types
8926 (mono_method_to_ir): Call handle_unbox_nullable in correct
8929 * generics.2.cs: New test suite
8931 * Makefile.am: Support for regression tests with generics.
8933 2005-12-03 Zoltan Varga <vargaz@gmail.com>
8935 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
8936 allocated to registers. Fixes #76800.
8938 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
8940 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
8942 2005-11-30 Zoltan Varga <vargaz@gmail.com>
8944 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
8947 2005-11-29 Zoltan Varga <vargaz@gmail.com>
8949 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
8952 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
8954 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
8955 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
8957 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
8958 single precision before storing to a single precision location.
8960 2005-11-28 Raja R Harinath <rharinath@novell.com>
8962 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
8964 2005-11-27 Zoltan Varga <vargaz@gmail.com>
8966 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
8969 * basic.cs: Remove test_0_byte_compares test which was moved to
8970 objects.cs a long time ago.
8972 2005-11-22 Massimiliano Mantione <massi@ximian.com>
8974 * aliasing.c: Fixed aliasing issue on 64 bit archs.
8976 2005-11-20 Zoltan Varga <vargaz@gmail.com>
8978 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
8979 handlers are called.
8981 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
8984 * mini-ia64.c: Add support for the throw->branch exception
8987 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
8989 2005-11-18 Massimiliano Mantione <massi@ximian.com>
8991 * mini.c: Enabled "fastpath" deadce :-)
8993 2005-11-18 Massimiliano Mantione <massi@ximian.com>
8995 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
8996 alias analysis pass to support it.
8999 * liveness.c: Likewise (liveness computation can use aliasing
9000 information to be more accurate).
9001 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9002 moreover made so that "--compile-all" uses the given optimization
9003 flags and not the default ones.
9004 * aliasing.c: Alias analysis (new file).
9005 * aliasing.h: Likewise.
9006 * Makefile.am: added "aliasing.c" and "aliasing.h".
9008 2005-11-17 Zoltan Varga <vargaz@gmail.com>
9010 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9013 2005-11-13 Zoltan Varga <vargaz@gmail.com>
9015 * mini-exceptions.c (mono_handle_exception_internal): Remove the
9016 fp >= end_of_stack exit condition, as it is not needed, and it might
9017 become true for fp eliminated frames.
9019 2005-11-11 Zoltan Varga <vargaz@gmail.com>
9021 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
9024 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
9026 * mini-arm.c: fixed alignment of doubles/longs to match
9027 the C ABI (bug #76635).
9029 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
9031 * aot.c: fix compilation with --enable-minimal=aot.
9033 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
9035 * mini-arm.c: fixed compatibility with the new
9036 floating point emulator package for compares.
9038 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
9040 * mini.c : reverted sig->pinvoke changes (r51396-51397).
9042 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
9044 * mini-exceptions.c (print_stack_frame): Output to stderr.
9045 (mono_handle_native_sigsegv): Ditto.
9047 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
9049 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
9050 OP_LCONV_TO_OVF_I implementation.
9052 * mini-amd64.c: Add support for the throw->branch exception
9055 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
9056 when the catch clause catches a more general exception, i.e. Object.
9058 2005-10-30 Zoltan Varga <vargaz@gmail.com>
9060 * cpu-ia64.md: Remove unused opcodes.
9062 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
9063 specific defines for architectures defining USE_SIGACTION.
9065 * mini-ia64.c: Fix some warnings.
9067 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
9068 version seemed to skip a frame.
9070 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
9072 * mini.c: Clean up the usage of sig->pinvoke flag. Now
9073 only calls which are made to native code use this flag.
9075 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
9077 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
9078 varargs methods as well.
9080 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
9081 which have save_lmf set. Reorganize methods prologs a bit.
9083 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
9084 debugger to the proper place.
9086 2005-10-29 Martin Baulig <martin@ximian.com>
9088 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
9089 when running inside the debugger until the debugger has support
9092 2005-10-26 Zoltan Varga <vargaz@gmail.com>
9094 * mini.h: Fix a warning.
9096 2005-10-24 Miguel de Icaza <miguel@novell.com>
9098 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
9099 we expose publicly, this returns the string.
9101 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
9103 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
9104 with fp elimination.
9106 2005-10-21 Zoltan Varga <vargaz@gmail.com>
9108 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
9109 native stacktrace using the glibc 'backtrace' function if available.
9111 2005-10-20 Zoltan Varga <vargaz@gmail.com>
9113 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
9115 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
9116 handle SIGSEGVs received while in native code.
9118 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
9119 code, call mono_handle_native_sigsegv which will abort the runtime
9120 after printing some diagnostics, instead of converting it into a
9121 confusing NullReferenceException.
9123 2005-10-18 Zoltan Varga <vargaz@gmail.com>
9125 * cpu-pentium.md: Remove unused opcodes.
9127 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
9129 * mini-amd64.h (MonoLMF): Add rsp field.
9131 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
9134 2005-10-17 Zoltan Varga <vargaz@gmail.com>
9136 * mini-codegen.c (get_register_spilling): Fix some warnings.
9138 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
9140 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
9141 elimination during exception handling. Enable fp elimination by
9144 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
9147 2005-10-16 Martin Baulig <martin@ximian.com>
9150 (mono_debugger_run_finally): New public method for the debugger.
9152 2005-10-10 Zoltan Varga <vargaz@gmail.com>
9154 * debug-mini.c (mono_debug_init_method): Fix warning.
9156 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
9157 the 'exname' parameter const to fix some warnings.
9159 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
9161 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
9162 introduced by the previous patch.
9164 2005-10-08 Zoltan Varga <vargaz@gmail.com>
9166 * basic-float.cs: Add test for precision of float arithmetic.
9168 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
9169 when loading/storing single values from/to memory.
9171 * mini.c (mono_jit_compile_method_with_opt): Create the function
9172 pointers in the correct domain.
9174 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
9176 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
9177 introduced by previous patch.
9179 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
9180 when out_filter_idx is NULL.
9182 * mini-exceptions.c: Don't run filter clauses twice during exception
9183 handling. Fixes #75755.
9185 2005-10-07 Zoltan Varga <vargaz@gmail.com>
9187 * aot.c: Add support for ldflda wrappers.
9189 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
9192 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
9194 * mini.c, mini.h: do not consider exception handlers blocks when
9195 setting up interface variables.
9197 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
9199 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
9201 2005-10-03 Zoltan Varga <vargaz@gmail.com>
9203 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
9204 causes a regression.
9206 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
9208 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
9210 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
9211 of the OP_P definitions.
9213 * TODO: Add a proposal for dealing with the CEE/OP mess.
9215 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
9216 optimizations from the x86 port.
9218 * cpu-amd64.md: Ditto.
9220 * basic.cs basic-long.cs: Add tests.
9222 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
9224 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
9225 Patrik Torstensson's implementation of my exception-handling
9226 optimization idea, when the exception object is not used
9229 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
9231 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
9232 of the mul_imm optimizations from the old jit.
9234 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
9236 * mini.c, liveness.c: patch by Patrik Torstensson and
9237 Zoltan Varga to improve performance in methods with
9240 2005-09-30 Zoltan Varga <vargaz@gmail.com>
9242 * driver.c: Remove 'Globalization' entry from --version.
9244 2005-09-28 Zoltan Varga <vargaz@gmail.com>
9246 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
9247 there is a profiler interested in JIT events.
9249 * aot.c: Load profile files produced by the AOT profiling module, and
9250 reorder methods based on the profiling info. Add a 'method_order' table
9251 to the AOT file to make mono_aot_find_jit_info work with the reordered
9254 * mini.h: Bump AOT file version info.
9256 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
9258 * mini-arm.h: work around what looks like a gcc bug when optimizations
9261 2005-09-28 Raja R Harinath <rharinath@novell.com>
9263 * Makefile.am (AM_CFLAGS): Don't use += to append inside
9264 conditionals. Use ...
9265 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
9267 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
9269 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
9270 to determine the amount of memory to copy when passing valuetypes.
9272 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
9273 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
9275 2005-09-27 Zoltan Varga <vargaz@gmail.com>
9277 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
9278 information about aot.
9280 2005-09-27 Ben Maurer <bmaurer@ximian.com>
9282 * *.c: Replace the use of {Enter,Leave}CriticalSection with
9283 macros. This will allow a deadlock debugger to easily be plugged
9286 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
9288 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
9290 2005-09-27 Raja R Harinath <rharinath@novell.com>
9292 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
9293 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
9294 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
9295 ($(arch_built)) [CROSS_COMPILING]: Error out.
9297 2005-09-26 Zoltan Varga <vargaz@gmail.com>
9299 * aot.c: Add support for the no_special_static flag for classes.
9301 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
9303 * Reapply reverted patches.
9305 * *: Revert r50174 as well.
9307 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
9309 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
9311 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
9313 2005-09-23 Miguel de Icaza <miguel@novell.com>
9315 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
9316 part of the SIG_HANDLER_SIGNATURE.
9318 2005-09-23 Zoltan Varga <vargaz@gmail.com>
9320 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
9323 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
9324 introduced by previous patch.
9326 2005-09-21 Zoltan Varga <vargaz@gmail.com>
9328 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
9329 saved registers too.
9331 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
9332 upon the information returned by get_call_info ().
9334 * mini-x86.c (add_float): Fix stack size calculation.
9335 (mono_arch_call_opcode): Rewrite this so it works based up the
9336 information returned by get_call_info ().
9337 (mono_arch_get_this_vret_args): Ditto.
9339 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
9341 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9342 in cinfo to determine the registers which need to be used.
9344 2005-09-20 Miguel de Icaza <miguel@novell.com>
9346 * driver.c (mono_main): Add --server and --desktop flags.
9348 2005-09-16 Zoltan Varga <vargaz@gmail.com>
9350 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9351 registers as global registers.
9353 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
9354 longer needed with the new register allocator.
9356 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9358 * cpu-ia64.md: Remove unused opcodes.
9360 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9362 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
9364 * cpu-amd64.md: Remove unused opcodes.
9366 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9367 needed with the new register allocator.
9369 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9372 2005-09-16 Raja R Harinath <rharinath@novell.com>
9374 * Makefile.am (check-local): Don't invoke semdel-wrapper.
9376 2005-09-16 Martin Baulig <martin@ximian.com>
9378 * exceptions-amd64.c
9379 (throw_exception): Don't call mono_debugger_throw_exception() if
9380 we're a rethrow - see the FIXME in the code.
9382 2005-09-15 Geoff Norton <gnorton@customerdna.com>
9384 * mini.c (mono_init_exceptions): This only works on some architectures.
9386 2005-09-15 Zoltan Varga <vargaz@gmail.com>
9388 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9391 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9393 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9394 now in mini-exceptions.c.
9396 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
9398 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9399 now in mini-exceptions.c.
9401 2005-09-15 Zoltan Varga <vargaz@gmail.com>
9403 * exceptions-x86.c: Applied patch from Patrik Torstensson
9404 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9406 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9407 code into mini-exceptions.c. Add some assertions to it.
9409 2005-09-12 Zoltan Varga <vargaz@gmail.com>
9411 * aot.c (emit_section_change): Applied patch from "The Software Team"
9412 (<software@solmersa.com>). Fix as errors on windows.
9414 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
9416 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9417 method info into the LMF.
9419 2005-09-11 Zoltan Varga <vargaz@gmail.com>
9421 * mini-ia64.c: Add proper unwind info for method epilogs.
9423 * exceptions-ia64.c: Add some code to help debugging.
9425 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9427 * mini-exceptions.c: Fix warning.
9429 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
9431 * mini.c: Really fix build.
9433 * mini-x86.c mini-amd64.c: Fix build.
9435 2005-09-11 Zoltan Varga <vargaz@gmail.com>
9437 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9439 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9440 some Interlocked methods as intrinsics.
9442 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9443 for Thread methods as well.
9445 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9447 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9449 * mini-ia64.c mini-x86.c mini-amd64.c
9450 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
9453 * mini.c (mono_init_exceptions): Fix build breakage.
9455 2005-09-10 Zoltan Varga <vargaz@gmail.com>
9457 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9458 of instructions. Use the new ia64_unw_op macros for emitting unwind
9461 * mini.c (mono_init_exceptions): Initialize exception handling
9462 related trampolines at startup.
9464 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9466 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9468 2005-09-09 Zoltan Varga <vargaz@gmail.com>
9470 * mini.c: Handle type loading errors gracefully during compilation and
9471 throw the appropriate exception.
9473 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9475 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9476 for the mono binary.
9478 2005-09-09 Martin Baulig <martin@ximian.com>
9480 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9483 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9485 * mini-arm.h: use emulation for conv.r.un for the release.
9487 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9489 * mini-arm.c, objects.cs: more fixes and tests for them.
9491 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9493 * mini-arm.c: align structures to at least 4 bytes to be able
9494 to keep our current optimized memcpy.
9496 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9498 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9500 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9502 * mini.c: ignore SIGPIPE.
9504 2005-09-04 Zoltan Varga <vargaz@gmail.com>
9506 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9508 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9510 2005-09-02 Zoltan Varga <vargaz@gmail.com>
9512 * mini.h: Add prototype for mono_allocate_stack_slots_full.
9514 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9516 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9517 exception handling support.
9518 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9519 patch by Brian Koropoff <briank@marakicorp.com>).
9521 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9523 * mini.c: revert another 'optimization' which breaks when
9524 items on the eval stack need to be saved at a basic block end
9527 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9529 * jit-icalls.c: for arrays, ensure we always provide
9532 2005-08-30 Zoltan Varga <vargaz@gmail.com>
9534 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9536 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9538 2005-08-29 Zoltan Varga <vargaz@gmail.com>
9540 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9541 arguments in their original register.
9543 2005-08-28 Zoltan Varga <vargaz@gmail.com>
9545 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9548 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9549 when ssapre is enabled.
9551 * inssel-long.brg: Fix bug in previous patch.
9553 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
9554 multiplication by a constant.
9556 2005-08-27 Zoltan Varga <vargaz@gmail.com>
9558 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9561 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9564 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9566 * inssel-arm.brg: apply changes tested by Brian Koropoff
9567 <briank@marakicorp.com>.
9569 2005-08-25 Zoltan Varga <vargaz@gmail.com>
9571 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9573 2005-08-24 Zoltan Varga <vargaz@gmail.com>
9575 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9576 to the same register if dreg is just a base register.
9577 (print_ins): Improve printing of membase opcodes.
9579 * inssel-x86.brg: Add optimized ldind(reg) rules.
9581 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9583 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9585 * mini.c: when running under valgrind, set the stack bottom for
9586 the GC at the actual approximate stack for the app (fixes running
9587 mono with valgrind).
9589 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9591 * mini.c: do no break at the first valuetype to init found
9594 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9596 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9598 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9600 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9602 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
9604 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9606 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
9608 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9610 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9613 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9616 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9619 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9621 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9623 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
9625 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9626 in the tail recursion optimization.
9628 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
9629 debug info into the assembly file.
9631 * iltests.il: Add test for filter regions.
9633 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9634 initial stack of filter regions. Fixes #75755.
9636 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9638 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9641 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
9643 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9644 the check for an already compiled method on non-ia64 platforms.
9645 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9648 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9650 * inssel-x86.brg: Add some optimized call rules.
9652 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
9654 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9657 * mini.h mini-trampolines.c: Pass the trampoline argument to
9658 mono_arch_patch_delegate_trampoline.
9660 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9662 * mini-trampolines.c: Fix build.
9664 * mini-amd64.h: Add delegate trampolines.
9666 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9668 * inssel-amd64.brg: Add optimized call rules.
9670 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9672 * inssel-ia64.brg: Add optimized ldind(reg) rules.
9674 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
9676 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9679 * mini-ia64.c: Remove LMF fixmes.
9681 * mini-ia64.h: Remove most fields from LMF.
9683 * inssel-ia64.brg (stmt): Fix unaligned access errors.
9685 * mini-trampolines.c: Add support for IA64 function descriptors.
9687 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9688 for IA64 function descriptors.
9690 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9692 * tramp-arm.c: patch the vtable for virtual calls. Added
9693 support code to register/unregister the LMF.
9694 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9697 2005-08-19 Dick Porter <dick@ximian.com>
9699 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9700 bit value if needed.
9702 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
9704 * mini.c (mini_get_method): Move handling of wrapper data here.
9706 * mini.c (mono_method_to_ir): Add support for dynamic methods.
9708 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9711 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
9712 bblock->code does not remain empty.
9714 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
9716 * arrays.cs: Add regression test for #75832.
9718 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9719 rules. Fixes #75832.
9721 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9722 instruction scheduling.
9724 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
9726 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9728 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
9730 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9732 * mini-codegen.c: Fix VC build.
9734 * cpu-pentium.md: Increase length of atomic_exhange_i4.
9736 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9738 * mini.h: fix signature for mono_register_opcode_emulation.
9740 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
9742 * mini.c: Get rid of most of the helper_sig_... constants using
9743 mono_create_icall_signature ().
9745 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
9747 * jit-icalls.c (helper_ldstr): New helper function.
9749 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
9751 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
9752 throw, load the string using a helper call instead of creating a string object.
9754 * aot.c: Update after LDSTR changes.
9756 * mini.h: Bump AOT file version.
9758 * aot.c: Save class size info into the AOT file. Print more statistics during
9761 * mini.h: Bump AOT file version.
9763 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
9764 ordering of disasm cases. Fixes #74957.
9766 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
9768 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
9769 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
9770 the generic code needed for the ARM port.
9772 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
9774 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
9775 inssel-arm.brg: more ARM features and fixes.
9777 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
9779 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
9780 ARM port work in progress.
9782 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
9784 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
9786 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
9788 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
9790 * inssel.brg (mini_emit_memset): Add support for unaligned access.
9792 * *-ia64.*: Ongoing IA64 work.
9794 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
9796 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
9798 * TODO: Remove out-of-data todo stuff.
9800 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
9803 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
9805 * mini.h: Bump corlib version.
9807 2005-07-27 Martin Baulig <martin@ximian.com>
9810 (create_copy_ins): Added `const unsigned char *ip' argument; set
9811 `copy->cil_code' from it.
9813 2005-07-27 Martin Baulig <martin@ximian.com>
9815 * mini-exceptions.c (mono_handle_exception): Don't call
9816 mono_debugger_handle_exception() for filters.
9818 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
9820 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
9823 2005-07-26 Martin Baulig <martin@ximian.com>
9825 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
9827 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
9828 helper_compile_generic_method() if the method is actually virtual
9831 2005-07-26 Martin Baulig <martin@ximian.com>
9834 (trampoline_code): Renamed to `mono_trampoline_code' and made it
9835 public; this is now accessed directly by the debugger.
9836 (mono_generic_trampoline_code): Removed.
9839 (mono_debug_init_method): Also add interncalls and wrappers.
9841 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
9843 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
9845 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
9847 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
9849 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
9851 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
9853 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
9855 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
9856 getting TLS offsets on AMD64 too.
9858 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
9860 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
9862 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
9864 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
9865 inssel-arm.brg, mini-arm.h: ARM port work in progress.
9867 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
9869 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
9871 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
9874 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
9875 mono_sparc_is_virtual_call ().
9877 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
9879 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
9880 trampoline parameters.
9882 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
9884 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
9885 to mono_arch_get_vcall_slot_addr.
9887 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
9890 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
9892 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
9894 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
9896 2005-07-19 Martin Baulig <martin@ximian.com>
9898 * exceptions-amd64.c (throw_exception): Call
9899 mono_debugger_throw_exception() here like we're doing it on i386.
9901 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
9903 * mini-ia64.c: Add optimized TLS access support.
9905 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
9907 * mini-exceptions.c: Ongoing IA64 work.
9909 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
9911 * mini.c: Use the default optimization set when embedding. Fixes
9914 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
9916 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
9917 of trampolines to a separate file.
9919 * mini-trampolines.c: New file.
9921 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
9924 * tramp-x86.c: Reorganize the trampoline code to be similar to the
9927 * mini-codegen.c: Fix cygwin build.
9929 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
9931 * mini.c: Add some minor changes needed by the IA64 port.
9933 * *-ia64.*: Ongoing IA64 work.
9935 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
9937 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
9938 trampolines into arch-independent and arch-dependent parts.
9940 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
9942 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
9944 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
9946 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
9947 the xp-regalloc-branch for amd64.
9949 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
9950 xp-regalloc-branch for x86.
9952 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
9954 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
9956 2005-07-06 Martin Baulig <martin@ximian.com>
9959 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
9960 (mono_jit_runtime_invoke): Likewise.
9962 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
9964 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
9967 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
9968 without loading their metadata. Reorganize the file format so exception handling+
9969 debug info is kept separate from normal method info. Create MonoJitInfo
9970 structures for methods lazily.
9972 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
9974 (x86_class_init_trampoline): Patch AOT class init trampolines too.
9976 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
9978 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
9981 * mini.h: Bump AOT file version.
9983 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
9985 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9987 2005-07-01 Raja R Harinath <rharinath@novell.com>
9989 * Makefile.am (check-local): Call semdel-wrapper.
9991 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
9993 * mini-x86.c: Revert the last change as it seems to break the build..
9995 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
9997 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
9999 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10001 2005-06-27 Ben Maurer <bmaurer@ximian.com>
10003 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10004 outside of the macro, so strange stuff doesn't happen with gcc4
10005 (NEW_AOTCONST_TOKEN): Likewise.
10007 2005-06-28 Martin Baulig <martin@ximian.com>
10009 * mini.c (mini_class_is_system_array): New static method; use this
10010 instead of `klass->parent == mono_defaults.array_class' everywhere
10011 since this also works for the new generic array class.
10013 2005-06-26 Ben Maurer <bmaurer@ximian.com>
10015 * inssel.brg: Remove warnings.
10017 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
10019 * mini-ia64.c: Ongoing IA64 work.
10021 * basic-float.cs: Add float->i1 conversion test.
10023 * iltests.il: Add conv.u4 test.
10025 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
10027 * inssel-long.brg: Fix bug caused by last change.
10029 2005-06-23 Geoff Norton <gnorton@customerdna.com>
10031 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
10032 BSDs. Allows the x86 JIT to work on OSX86
10034 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
10036 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
10039 * mini-ia64.c: Ongoing IA64 work.
10041 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
10043 * mini-ia64.c: Ongoing IA64 work.
10045 * driver.c: Clean up jit_code_hash as well when using --regression.
10047 * inssel-long.brg: Fix long->i4/u4 conversion rules.
10049 * basic-long.cs: Add tests for long->u4 conversion.
10051 2005-06-18 Ben Maurer <bmaurer@ximian.com>
10053 * mini.c: Take mono_get_domainvar out of macros. This makes sure
10054 that we do not depend on undefined C behavior: the order stuff
10055 gets evaluated within an expression. Fixes mono when compiled on
10058 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
10060 * *-ia64.*: Ongoing IA64 work.
10062 * aot.c: Lower memory usage while loading AOT methods.
10064 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
10066 * mini.h: Bump AOT file format version.
10068 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
10070 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
10072 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
10074 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
10075 not on callee assembly). Fixed some comments.
10077 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
10079 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
10080 it gets proper disassembly.
10081 (emit_method_info): Remove some dead code.
10083 * mini.c (mini_method_compile): Allways allocate the GOT var in
10084 mono_method_to_ir for emulating opcodes.
10086 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
10088 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
10089 before freeing the code memory. Fixes #74990.
10091 * objects.cs: Add regression test for #74992.
10093 * liveness.c: Extend live ranges of arguments to the beginning of the
10094 method. Fixes #74992.
10096 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
10097 so it points into the faulting instruction.
10099 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
10101 * jit-icalls.c (mono_imul_ovf): Add exception handling.
10103 * *-ia64.*: Ongoing IA64 work.
10105 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
10107 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
10109 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
10111 * *-ia64.*: Ongoing IA64 work.
10113 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
10115 * basic-long.cs: Add tests for add/sub.ovf.
10117 * basic.cs: Add tests for sub.ovf.
10119 * *-ia64.*: Ongoing IA64 work.
10121 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
10123 * *-ia64.*: Ongoing IA64 work.
10125 * basic.cs: Add conv.ovf.i4.un test.
10127 2005-06-09 Massimiliano Mantione <massi@ximian.com>
10129 * mini.c: (remove_block_if_useless) Fixed bug 75061.
10131 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10133 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
10135 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
10137 * *-ia64.*: Ongoing IA64 work.
10139 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10142 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
10144 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
10146 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
10148 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
10150 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
10152 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
10153 of a call is callable by a near call.
10155 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
10157 * mini-ia64.c: Ongoing IA64 work.
10159 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
10161 * genmdesc.c: Make the generated array non-static.
10163 * inssel-long.brg: Fix LSHR_IMM rule.
10165 * *-ia64.*: Ongoing IA64 work.
10167 * *-ia64.*: Ongoing IA64 work.
10169 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
10171 * *-ia64.*: Ongoing IA64 work.
10173 * *-ia64.*: Ongoing IA64 work.
10175 * mini-ia64.c: Ongoing IA64 work.
10177 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
10179 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
10181 * objects.cs basic-calls.cs: Move some tests to objects.cs.
10183 * objects.cs basic-long.cs: Move some tests to objects.cs.
10185 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
10187 * *-ia64.*: Ongoing IA64 work.
10189 * iltests.il: Add a new test.
10191 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
10192 newobj. Fixes #75042.
10194 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
10196 * *-ia64.*: Ongoing IA64 work.
10198 * *-ia64.*: Ongoing IA64 work.
10200 * *-ia64.*: Ongoing IA64 work.
10202 * basic.cs objects.cs: Move tests accessing static variables as well.
10204 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
10206 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
10208 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
10210 * driver.c: Always print failed tests.
10212 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
10215 * *ia64*: Ongoing IA64 work.
10217 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
10219 * basic.cs: Add tests for add.ovf. Fix warnings.
10221 2005-05-18 Miguel de Icaza <miguel@novell.com>
10223 * driver.c (mono_main): Avoid crash if no argument is passed to
10224 --break; Do not use g_error, but f_printf. And fix all other
10225 ocurrences of the same crash.
10227 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
10229 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
10230 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
10233 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
10235 * *-ia64.*: Add beginnings of IA64 backend.
10237 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
10239 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
10241 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
10244 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
10246 * mini-amd64.c: Fix a warning.
10248 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
10250 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
10251 in float_neg. Fixes #74897.
10253 * mini-amd64.c (emit_call): Fix another near call bug.
10255 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
10257 * declsec.c: Keep the appdomain information in the structure. Added a
10258 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
10259 value gets overwritten).
10260 * declsec.h: Set the default MonoArray for the the stack to 6. Added
10261 an MonoAppDomain member to MonoSecurityFrame.
10262 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
10263 used in the stack walk. Now use a MonoArray which grow (double) when
10266 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
10268 * mini.c: Re-enabled runtime cleanup, since running threads should
10269 now properly stop when exiting.
10271 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
10273 * mini-codegen.c: New file contaning the arch-independent local
10274 register allocator. Not used by any architectures yet.
10276 * mini.h linear-scan.c: Merge some changes from the
10277 mini-xp-local-regalloc branch.
10279 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
10281 * mini-amd64.c (emit_call): Fix calls to native functions when the
10282 runtime is compiled as a shared library. Fixes #74756.
10284 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
10285 on a literal field. Fixes #74751.
10287 2005-04-25 Raja R Harinath <rharinath@novell.com>
10289 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
10291 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
10293 * objects.cs: Add missing null casting test.
10295 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
10297 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
10298 in wrapper methods. Also rename 'address' variable to 'offset'.
10300 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
10302 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
10305 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
10307 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
10310 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10312 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
10314 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
10316 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
10317 just the last bytes.
10319 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
10321 * aot.c (mono_compile_assembly): Fix warning.
10323 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
10324 by the _MSC_VER stuff.
10326 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
10328 * inssel-long.brg: Fix #74588.
10330 * cpu-amd64.md: Fix #74591.
10332 * iltests.il: Add new regression tests.
10334 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
10336 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10339 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
10341 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10343 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
10344 from Bill Middleton <flashdict@gmail.com>.
10346 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
10348 * arrays.cs: Add new regression test. Fix warnings.
10350 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
10352 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10353 and leakage in CKFINITE.
10355 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10356 this to a null op since it is called on amd64 too.
10358 * exceptions-amd64.c (get_throw_trampoline): Align stack.
10360 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10361 body since this is not used on amd64.
10363 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10365 * mini-amd64.c: Remove obsolete fixmes.
10367 * mini.c (print_method_from_ip): Fix debugging support.
10369 2005-2-1 Massimiliano Mantione <massi@ximian.com>
10371 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10372 so that expressions that don't give much gain are not reduced.
10373 * ssapre.h: Likewise.
10375 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
10377 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10379 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10381 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10383 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
10385 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10387 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10389 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
10391 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10394 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10396 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10398 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10400 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
10401 MONO_ARCH_USE_SIGACTION. Fixes #74252.
10403 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10405 * mini-x86.c: Fix up stack overflow handling.
10407 * exceptions.cs: Add new regression test.
10409 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
10411 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10412 mono_jit_thread_attach.
10414 * mini.c (mono_method_to_ir): Verify called method is not abstract.
10416 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
10418 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10419 avoid calling constructors using callvirt.
10421 * inssel.brg: Fix #74073.
10423 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
10425 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
10426 compilation with non-GCC compilers.
10427 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10428 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10430 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10432 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10433 klass->interface_offsets (will likely fix bug#74073).
10435 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
10437 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10439 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
10441 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10442 to amd64_div_reg_size ().
10444 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10446 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
10448 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10450 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
10452 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10454 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
10456 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10458 * mini.c (mono_precompile_assembly): Load and precompile referenced
10459 assemblies as well. Fixes #74015.
10461 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
10463 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10465 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
10467 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10468 a lot of checks and (anyway) permissions cannot work until corlib is
10471 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10473 * mini-ppc.c: fixed ABI issue on sysv/ppc.
10475 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10477 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10478 calls (fixes bug#72824).
10480 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10482 * mini.c: fix tail recursion elimination (see test in bug#73936).
10484 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
10486 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10487 some fp functions in sse2 mode.
10489 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
10491 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10493 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
10495 * mini.h mini.c: Add mono_get_jit_tls_key ().
10497 * mini-x86.c: Enable fast TLS support on windows.
10499 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
10501 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10502 * mini.c: Check for p/invoke method when generating code. If a
10503 p/invoke method, or it's class, isn't decorated with [Suppress
10504 UnmanagedCodeSecurity] then generate code to call System.Security.
10505 UnmanagedDemand (only if the security manager is active).
10507 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
10509 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
10510 last change as it seems to cause strange crashes.
10512 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10514 * *.c: handle unsafe function pointers where needed.
10516 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
10518 * mini.c (mono_jit_free_method): Remove the fixme too.
10520 2005-03-15 Miguel de Icaza <miguel@novell.com>
10522 * mini.c: As discussed, make the code actually free the delegate
10523 thunk now, to enable the debugging of delegate problems, use
10524 MONO_DEBUG=1 when running Mono.
10526 This takes also care of parts of the leaks as seen by Joe.
10528 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
10530 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
10531 thread_tls_offset calculation.
10533 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
10535 * declsec.c: Reworked linkdemand checks for icall. The previous code
10536 was using the declaration code (untrusted) and didn't work as expected
10537 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10540 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
10542 * iltests.il: Add new localloc test.
10544 * mini-amd64.c: Handle large stack allocations the same way as on
10545 windows if stack overflow handling is working.
10547 * mini-amd64.c: Allocate the signal stack using mmap.
10549 * mini.c (sigsegv_signal_handler): Fix reading of context.
10551 * mini-exceptions.c: Fix up stack overflow handling.
10553 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10555 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10557 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10559 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10561 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10562 tramp_init functions as they are no longer needed.
10564 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
10566 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10568 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10570 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10572 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10575 * mini-ops.h: Add OP_LMUL_IMM.
10577 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10578 long mul/div opcodes as intrinsic.
10580 * mini-amd64.c (emit_call): Handle the case when the callee might be
10583 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
10585 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10588 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10590 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10592 2005-03-09 Ben Maurer <bmaurer@ximian.com>
10594 * mini.c (mono_codegen): Don't leak here, to help people running
10597 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
10599 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
10600 conversions in sse2 mode.
10602 * basic-float.cs: Add regression test.
10604 * mini-amd64.c: Reenable sse2.
10606 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
10608 * mini-amd64.c: Disable sse2 until some regressions are fixed.
10610 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
10612 * driver.c: Copyright text should include 2005.
10614 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
10616 * cpu-amd64.md (load_membase): Fix more max lengths.
10618 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
10620 * cpu-amd64.md (load_membase): Fix max length.
10622 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10624 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10626 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10627 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10629 * basic-float.cs: Add rounding regression test.
10631 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10633 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
10635 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10636 structures in registers for pinvoke wrappers.
10638 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
10640 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10642 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
10644 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10645 wrapper to mono_jit_thread_attach.
10647 * mini.c (mini_jit_thread_attach): New jit icall.
10649 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
10650 native->managed wrappers.
10652 * exceptions.cs: Add new regression test.
10654 * mini.c (optimize_branches): Check regions in the cbranch to throw
10655 block case as well. Fixes #73242.
10657 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10659 * mini.c: thread safety fixes.
10661 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
10663 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10664 patching stuff, since delegates use jump trampolines so there is
10667 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
10670 * tramp-amd64.c: Fix build.
10672 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10673 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10675 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10676 Rename this to mono_arch....
10677 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10679 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10681 * mini-amd64.c (emit_call): If both the caller and the callee is
10682 guaranteed to have 32 bit addresses, emit a normal call.
10684 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10686 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
10687 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10688 method_ptr inside delegates.
10690 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
10692 * mini.c (mono_jit_free_method): Free the method info even if the native code is
10693 invalidated. Fixes #73001.
10695 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10697 * mini-x86.c: Only use stdcall for pinvokes on windows.
10699 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10701 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10702 * mini-x86.c: remove unreliable __thread var offset detection,
10703 use the correct accessors and enable by default.
10705 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
10707 * mini.c (mono_jit_free_method): Fix memory leak.
10709 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
10711 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
10713 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
10715 * cpu-amd64.md: Fix lengths of atomic opcodes.
10717 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10719 * driver.c: try to not imply using ICU is any good.
10721 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
10723 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
10724 functions as inline ops.
10726 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10727 some Interlocked functions as inline ops.
10729 * mini.c (move_basic_block_to_end): Fix bug in last patch.
10731 * mini.h (MonoBasicBlock): Reorganize fields a bit.
10733 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10735 * mini.c: Add support for OP_NOT_TAKEN.
10737 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
10738 structures in registers for pinvoke wrappers.
10740 * mini-amd64.c: Fix warnings.
10742 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
10744 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
10746 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
10748 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
10749 address instead of loading the address from it.
10751 * mini-x86.c: Add support for returning small structs in registers
10752 on Win32. Fixes part of #70864.
10754 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
10756 * trace.c (get_token): Improve error checking.
10758 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
10760 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
10762 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
10764 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
10765 it can be reused for MonoClass.
10766 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
10769 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
10771 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
10772 instead of a MonoReflectionMethod. The method information wasn't used
10773 when displaying SecurityException details (but will be now).
10775 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
10777 * Makefile.am : windows build fix.
10779 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
10781 * iltests.il: Add new regression test.
10783 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
10786 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
10788 * mini.c: Moved linkdemand check into helper function check_linkdemand
10789 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
10792 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
10794 * declsec.c: Added statistics counter for different kinds of
10796 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
10797 (and commented) declaration.
10798 * mini.c: Added statistics counter for security Demand code
10799 generation. Added display of security statistics.
10801 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
10803 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
10804 Fix compilation errors under gcc-2.95.
10806 2005-02-12 Ben Maurer <bmaurer@ximian.com>
10808 * mini.c, driver.c: Use the new jit trampoline hashtable
10810 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10812 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
10814 2005-02-11 Martin Baulig <martin@ximian.com>
10816 * debug-mini.c (mono_debug_close_method): Free the line number array.
10818 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
10820 * aot.c: Break up large methods into smaller ones. Share GOT slots for
10823 * mini.h: Bump AOT file format version.
10825 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
10827 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
10829 * declsec.h: Added macros to get/set lazyly initialized security
10830 informations about assemblies. Added new enum for different type of
10831 possible LinkDemand violation. Added function to check LinkDemands.
10832 * mini.h: Added a field to MonoCompile to hold any security violation
10833 detected when JITting a method (so it can be thrown later).
10834 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
10835 and CEE_CALLVIRT. Added code to throw exception at the end of
10836 mini_method_compile (note: the exception is unhandled right now).
10838 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
10840 * mini.c, jit-icalls.c: use the managed implementation of
10841 memset for initobj and memset, to avoid managed <-> unmanaged
10844 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
10846 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
10847 optimization if it would need a GOT var.
10849 * basic.cs: Add tests for constant propagation and switch statements.
10851 * ssa.c: Fix out-of-range constant propagation and switch statements.
10853 2005-02-09 <vargaz@freemail.hu>
10855 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
10857 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
10859 * cpu-amd64.md (load_membase): Fix max length of load_membase.
10861 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10863 * mini.c: update to new signature of mono_class_get_allocation_ftn().
10865 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
10867 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
10868 arithmetic operations.
10870 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
10872 * mini-ppc.c: add a workaround for broken user code that
10873 DllImports vararg functions with non-vararg signatures.
10875 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
10877 * mini.c (mono_jit_compile_method_inner): Add detection and a
10878 meaningfull error message for assemblies written in Managed C++.
10880 * tramp-amd64.c mini-amd64.h: Add support for
10881 create_trampoline_from_token ().
10883 * aot.c mini-x86.c abcremoval.c: Applied patch from
10884 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
10886 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
10888 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
10889 which takes a MonoImage/token as parameter instead of a MonoMethod.
10891 * aot.c: Use the new trampoline for initializing vtables.
10893 * aot.c: Add support for ldfld/stfld_remote wrappers.
10895 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
10896 rules for compare <MEM>, IMM.
10898 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
10900 * aot.c: Handle inherited finalizers correctly.
10902 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
10904 * inssel.brg (stmt): Add a missing _setup_... ().
10906 * aot.c: Save some parts of the class state to the AOT file and use it
10907 to recompute that state when a class is initialized.
10909 * mini.c: Install AOT hooks into the runtime.
10911 * mini.h: Bump AOT file format version.
10913 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
10916 * iltests.il: Add new test.
10918 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
10920 * mini.c: fix typo.
10922 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
10924 * mini.c: setup the statistical profiler in the thread attach
10925 callback to cope with the new single thread code.
10927 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
10929 * mini-ppc.c: ensure we have enough room for the profiler
10930 calls (fixed bug#72084).
10932 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
10934 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
10937 2005-2-1 Massimiliano Mantione <massi@ximian.com>
10939 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
10941 2005-2-1 Massimiliano Mantione <massi@ximian.com>
10943 * ssapre.c: Fixed an issue with down safety (this allows IronPython
10944 to succesfully execute parrotbench).
10945 * ssapre.h: Likewise.
10947 2005-2-1 Massimiliano Mantione <massi@ximian.com>
10949 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
10950 variable for stores to method arguments (fixes a SSAPRE issue).
10952 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
10954 * mini.c: handle value types in dup, fixes gen-112.cs.
10956 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
10958 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
10959 sequence for calls in dynamic methods to avoid thunks.
10961 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
10963 * mini.c: correctly remove dynamic methods from the hashtable.
10965 2005-1-20 Massimiliano Mantione <massi@ximian.com>
10967 * driver.c: Disabled SSAPRE until fix the bug that appears
10968 in IronPython's parrotbench.
10970 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
10972 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
10974 * mini.c (mono_method_to_ir): Revert the previous change.
10976 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
10977 when AOT compiling.
10979 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
10980 mono_jit_info_table_find () etc. when running under valgrind.
10982 * inssel.brg: Fix warnings.
10984 * mini-exceptions.c: Fix warnings.
10986 2005-01-31 Martin Baulig <martin@ximian.com>
10988 * driver.c (compile_all_methods_thread_main): Don't try to compile
10989 generic methods or anything which has type parameters.
10991 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
10993 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
10995 * TestDriver.cs: Add --verbose flags.
10997 * graph.c ssa.c: Fix 64 bit warnings.
10999 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
11000 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11001 Fix 64 bit warnings.
11003 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11004 variable not spotted by gcc.
11006 * mini-amd64.c inssel-amd64.brg: Applied patch from
11007 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
11008 X86_COMPARE_MEMBASE opcodes.
11010 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11012 2005-01-29 Ben Maurer <bmaurer@ximian.com>
11014 * *: MonoMethod->signature might be NULL now. You *MUST* use
11015 mono_method_signature.
11017 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
11019 * driver.c (compile_all_methods_thread_main): Compile the methods
11020 without invoking cctors.
11022 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11024 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
11025 * basic-calls.cs: test for the above.
11027 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
11029 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
11030 MonoJitInfo changes.
11032 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
11034 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
11035 eagerly if it contains dynamic methods.
11037 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
11039 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
11040 trace, it is now computed by an icall from trace_ips.
11042 * mini-exceptions.c: Fix a warning.
11044 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
11046 * mini-exceptions.c: don't bother getting stack trace info if
11047 it's not going to be used.
11049 2005-01-27 Raja R Harinath <rharinath@novell.com>
11051 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
11054 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
11056 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
11058 * aot.c: Avoid calling mono_method_get_header () if not needed.
11060 * mini.h: Bump AOT file format version.
11062 * mini.c (mono_emit_native_call): Allocate a GOT var here.
11064 * mini.c (mono_print_tree): Print more info for calls.
11066 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
11068 * declsec.h: Remove warning by adding missing include for marshal.h
11070 2005-01-26 Martin Baulig <martin@ximian.com>
11072 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
11075 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
11077 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
11080 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
11082 * aot.c (mono_compile_assembly): Fix a warning.
11084 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
11086 * declsec.c: Look for security attributes on the original MonoMethod
11087 (and not the wrapped one). This fix permissions on icalls.
11089 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
11091 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11093 * mini.c (mono_allocate_stack_slots): Add a fixme.
11095 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11097 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11099 * inssel.brg: optimize casts of sealed types (more
11100 optimizations waiting for fixes in remoting).
11102 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
11104 * inssel.brg (stmt): Add another dummy rule.
11106 * driver.c: Fix warnings.
11108 * driver.c (mono_main): If running under valgrind, instruct glib to use
11109 the system allocation functions so valgrind can track the memory
11110 allocated by the g_... functions.
11112 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
11114 * mini-ops.h: Add OP_DUMMY_STORE opcode.
11116 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
11118 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
11119 variables in try regions.
11121 * mini.c (mini_method_compile): Don't disable optimizations on large
11122 methods when AOT compiling.
11124 * mini.c (mono_allocate_stack_slots): New arch independent method to
11125 allocate stack slots. Not yet used.
11127 2005-01-22 Ben Maurer <bmaurer@ximian.com>
11129 * debug-mini.c (mono_debug_close_method): Plug some leaks.
11131 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
11133 * mini-ppc.c: make the branch info relative as the code
11134 buffer can be reallocated.
11136 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
11138 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
11139 * driver.c: Removed the AOT/security restriction. Now initialize the
11140 security manager (in metadata) if --security is used.
11141 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
11142 rather than the pointer to declarative security, when AOT is used.
11144 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
11146 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
11147 basic blocks, reduced intrinsic exception throwing code size.
11149 2005-01-22 Miguel de Icaza <miguel@ximian.com>
11151 * driver.c (mini_usage): Reorder the usage screen.
11153 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
11155 * mini.c (mono_resolve_patch_target): Fix warning.
11157 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
11159 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
11162 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
11164 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
11165 breaks the amd64 build.
11167 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
11168 register allocation. Fixes #71454.
11170 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
11172 * arrays.cs: Add new regression test.
11174 2005-1-20 Massimiliano Mantione <massi@ximian.com>
11176 * ssapre.c: Turned usage of snprintf to GString.
11177 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
11178 (I left it on by mistake in my previous commit).
11180 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
11182 * mini.c, cfold.c, basic-calls.cs: preserve side effects
11183 on cond branch optimization (fixes bug# 71515).
11185 2005-1-20 Massimiliano Mantione <massi@ximian.com>
11187 * abcremoval.c: Fixed bug 71062.
11188 * abcremoval.h: Likewise.
11190 2005-1-20 Massimiliano Mantione <massi@ximian.com>
11192 * mini.c: Added a new functionality to optimize_branches, the removal
11193 of useless basic blocks, and fixed some problem in the removal of
11194 critical edges; some utility functions added for both purposes.
11195 * ssapre.c: Added complex expression support, and fixed bug 70637.
11196 * ssapre.h: Likewise.
11197 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
11199 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
11200 * driver.c: Re-enabled SSAPRE.
11202 2005-01-19 Martin Baulig <martin@ximian.com>
11204 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
11205 the result of mono_get_method_constrained().
11207 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
11209 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
11212 2005-01-18 Geoff Norton <gnorton@customerdna.com>
11214 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
11215 be detected. Fixes #59296.
11217 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
11219 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
11220 which can happen. Fixes #71361.
11222 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
11224 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
11227 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
11229 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
11230 appdomain-unload.exe to fail.
11232 * mini.c: Fix some memory leaks.
11234 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
11236 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
11237 Fixed bug and sped up some codepaths.
11239 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
11241 * mini.c: Fix some memory leaks.
11243 * exceptions.cs basic-long.cs: Add test for checked ulong->int
11246 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
11248 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
11251 * iltests.il: Add regression test for #71320.
11253 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
11255 * mini.c (mono_codegen): Fix installation of profiler hooks.
11257 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
11259 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11261 * mini.h, mini.c, cfold.c: optimize access to enum
11262 readonly fields, too. Eval conditional branches if possible
11263 to perform unreachable code removal in more cases.
11265 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
11267 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
11269 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
11272 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
11273 WinXP DEP. Fixes #71244.
11275 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
11277 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
11279 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
11281 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
11283 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
11285 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
11288 * mini.h: Bump AOT version.
11290 * mini.h (MonoCompile): Change exvar to a hash table.
11292 * mini.c: Allocate a separate exvar for each handler block.
11294 * mini.c: Get rid of the computation of filter_lengths, its not needed.
11296 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
11297 ex var with the pending exception and only throw if the two are equal.
11300 * exceptions.cs: Add tests for rethrow and nested catch clauses.
11302 * mini-x86.c: Fix warnings.
11304 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
11305 used by all the ports now.
11307 * aot.c: Add write-symbols and save-temps options.
11309 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
11311 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
11313 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
11315 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
11318 * tramp-s390.c: Check vtable slot belongs to the domain.
11320 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
11321 as per other platforms.
11323 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
11325 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
11327 * driver.c: we don't run the Main() code in a subthread anymore.
11329 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
11331 * mini.c: added experimental rtc support in the statistical
11332 profiler: if the user has the permission, more accurate statistics
11333 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
11334 The MONO_RTC value must be restricted to what the linux rtc allows:
11335 power of two from 64 to 8192 Hz.
11337 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
11339 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11341 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11343 * mini-ppc.c: better icache flush for smp.
11345 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
11347 * mini-amd64.c (emit_move_return_value): Fix memory leak.
11349 * mini-x86.c (get_call_info): Add the get_call_info () code from the
11350 amd64 port, not yet used.
11352 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
11354 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11357 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
11359 * driver.c: Added --security option to activate the security manager.
11360 Right now this will allow code generation for declarative demands and
11361 is disabled when AOT is specified.
11362 * mini.c: Add code generation for declarative security demands.
11363 * mini.h: Add mono_use_security_manager as an extern gboolean.
11365 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
11367 * aot.c (mono_compile_assembly): Speed up compilation a bit by
11368 emitting more dense assembly code.
11370 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11371 exception throwing stuff.
11373 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
11375 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11378 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11379 left in by mistake.
11381 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
11384 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11386 * tramp-*.c: Only patch vtable slots if the object is in the current
11387 domain. Fixes appdomain-unload.exe.
11389 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11391 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11394 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
11396 * mini.c (reverse_branch_op): New helper function.
11398 * mini.c (optimize_branches): Run the new optimization only on
11399 platforms which support it. Also reverse all kinds of branches.
11401 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11403 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11406 * mini.c (optimize_branches): Reverse not-equals branches if the false
11407 bblock is a throw. This happens a lot of time with argument checking in
11410 * mini.c (mono_codegen): Add support for placing basic blocks after
11411 the function epilogue.
11413 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11416 2005-01-05 Miguel de Icaza <miguel@ximian.com>
11418 * mini.c (setup_stat_profiler): Only set this up if the platform
11419 supports ITIMER_PROF.
11421 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
11423 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11426 * inssel.brg: Fix a warning.
11428 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11430 * mini.c: added support for statistical profiler
11431 (run with: --profile=default:stat).
11433 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
11435 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11437 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11439 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
11440 related to global registers from the amd64 port.
11442 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
11444 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11446 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11447 with global registers.
11448 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11450 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11452 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
11454 * debug-mini.c (encode_value): Fix off-by-one.
11456 * aot.c (encode_value): Likewise.
11458 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11460 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
11462 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
11465 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11467 * aot.c (emit_method_info): Increase size of temp buffer.
11469 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
11472 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
11474 * aot.c (emit_method_info): Fix build.
11476 * aot.c: Further rework of the AOT file format to reduce the size of
11477 the method info data.
11479 * mini.h: Bump AOT file format version.
11481 2004-12-27 Martin Baulig <martin@ximian.com>
11483 * mini.c (mini_get_method): New static method; call
11484 mono_get_method_full() and mono_get_inflated_method().
11485 (mono_method_to_ir): Use mini_get_method() instead of
11486 mono_get_method_full().
11488 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
11490 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
11492 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
11494 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11496 * inssel-amd64.brg: Add some optimization rules.
11498 2004-12-24 Ben Maurer <bmaurer@ximian.com>
11500 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11501 standard not GC'd stuff is fine.
11503 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
11505 * aot.c: Rework the AOT file format to get rid of most of the global
11506 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11508 * mini.h: Bump AOT file format version.
11510 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
11512 * mini.h: Bump AOT file format version.
11514 * aot.c (mono_aot_is_got_entry): New function to determine if an
11515 address is inside a GOT.
11517 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11519 * cpu-pentium.md: Increase the maximum size of some instructions which
11520 might involve a got access.
11522 * mini.c (get_method_from_ip): Another debug helper function.
11524 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11525 when got var accesses are created during the decompose phase.
11527 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11529 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11530 argument mini_compile_method and to MonoCompile, and use this to
11531 determine whenever a given method is compiled for AOT. This allows the
11532 other methods compiled during AOT compilation to be free of AOT stuff,
11533 so the backends does not need to add special support for them by
11534 creating a fake GOT etc.
11536 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11539 2004-12-21 Ben Maurer <bmaurer@ximian.com>
11541 * mini.c (mono_method_to_ir): It turns out that some of the
11542 x-appdomain wrappers are lax with types, so just ignore this for
11545 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11546 at the vtable->klass. If it is non-shared code we can just use the
11549 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11551 * mini-ppc.c: access MonoDomain from tls, too.
11553 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
11555 * declsec.c: Removed unused variable (and related warning ;-)
11557 2004-12-21 Ben Maurer <bmaurer@ximian.com>
11559 * iltests.il: New test for LDELEMA on an array of ref types.
11561 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11562 all ldelema's on reftypes.
11563 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11564 it was the wrong place to put it.
11566 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11567 register to pop to make this cleaner, at the request of Paolo.
11569 2004-12-20 Ben Maurer <bmaurer@ximian.com>
11571 * mini-ops.h (OP_GETHASHCODE): New op.
11573 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11575 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11578 For a microbenchmark, this reduces the cost of Hashtable.get_Item
11581 * mini-x86.c (mono_arch_output_basic_block): Rather than
11589 The first is 3 bytes while the second is 1. This saves 36 kb on
11590 mscorlib, quite a big saving. When bootstraping mcs, I was able to
11591 see a small boost because of icache locality.
11593 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11595 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11597 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11598 started code sharing with the generic code.
11600 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11602 * mini-ppc.c, cpu-g4.md: added code for direct access to
11605 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11607 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11608 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11611 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
11613 * declsec.c|h: Added functions to cache the declarative stack modifiers
11614 in MonoJitInfo and to create a security frame from a MonoJitInfo
11616 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11617 created. Register internal calls for System.Security.SecurityFrame::
11618 _GetSecurityFrame and _GetSecurityStack.
11619 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11620 the definitions for the new stack walk/callback mechanism.
11621 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
11622 first security frame for LinkDemands and InheritanceDemands) and
11623 GetSecurityStack for Demands. Both use the new mono_walk_stack code
11625 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11626 walk initialization (lupus).
11628 2004-12-20 Ben Maurer <bmaurer@ximian.com>
11630 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11632 (handle_loaded_temps): Do not create a temporary variable for
11633 things that we know are temps. They will never be modified.
11634 (mono_spill_call): Set MONO_INST_IS_TEMP
11635 (mono_emulate_opcode): ditto
11637 (mono_method_to_ir.CEE_DUP): ditto
11639 2004-12-19 Ben Maurer <bmaurer@ximian.com>
11641 * mini.c (type_to_eval_stack_type): Make this handle the void type
11642 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11643 (emit_tree): use ip_in_bb to special case some common idioms
11644 Update all callers to pass in the IP.
11645 (mono_method_to_ir): Make CEE_CALL* do the above as well.
11647 This gives us a nice 2% speedup in mcs bootstrap.
11649 * mini-x86.c (peephole_pass): Peephole pass to make
11658 * mini.c (ip_in_bb): new method.
11659 (mono_method_to_ir): use this method rather than doing the hash
11662 * linear-scan.c (mono_linear_scan): When expiring actives, you
11663 don't need to keep around variables that expire on this
11664 instruction. This makes it so that:
11667 store (ebx add (ebx, 1))
11671 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
11673 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
11674 combination to avoid doing two copies. Fix up problems with previous
11677 * mini.c: Fix 64 bit warnings.
11679 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11681 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
11683 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11684 changes from the x86 code.
11686 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11688 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
11690 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11691 throwing code to reduce its size, unify the AOT and non-aot code and
11692 get rid of relocations in the AOT case.
11694 * mini-x86.h mini.c exceptions-x86.c
11695 (mono_arch_get_throw_corlib_exception): New arch specific function to
11696 raise corlib exceptions which doesn't require relocations in the
11699 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11701 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
11703 * mini.c (mono_emit_method_call): Only allocate the got var when it is
11706 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11709 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
11711 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11712 with add function when used from Inc/dec atomic
11713 functions. Re-enabled optimization on x86.
11714 * mini-ops.h: renamed atomic_add functions to
11715 allow _add to match the Interlocked::Add and
11716 _add_next to match Interlocked::Inc/Dec.
11718 2004-12-15 Massimiliano Mantione <massi@ximian.com>
11720 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11721 linking of BBs to the end BB, and enabled SSAPRE also with
11722 consprop and copyprop (which was prevented by that bug).
11724 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
11726 * mini-x86.c: disabling the Interlocked optimizing code.
11728 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
11730 * aot.c (load_aot_module): Move reading of got_addr after the AOT
11731 file version check.
11733 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
11735 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
11736 interlocked optimization due lack of support on x86, rewrote
11737 exchange to take into account that base may be in eax.
11739 xsp works again; activated Interlocked optimizing code.
11741 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
11743 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
11745 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
11747 * mini-ops.h: Add new opcodes.
11749 * mini.h: Add new patch types. Add got_var to MonoCompile.
11751 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
11752 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
11753 make it work with all kinds of patchable code.
11755 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
11756 address of the GOT, and referencing entries in the GOT.
11758 * mini.c: Add code to load the GOT address if needed by an opcode.
11760 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
11761 independent AOT code on the x86 using an elf-style Global Offset Table.
11763 2004-12-14 Raja R Harinath <rharinath@novell.com>
11765 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
11767 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11769 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
11772 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
11774 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
11775 of Interlocked:Increment/Decrement/Add as inline ops.
11776 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
11778 2004-12-12 Geoff Norton <gnorton@customerdna.com>
11780 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
11781 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
11783 2004-12-12 Duncan Mak <duncan@ximian.com>
11785 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
11786 again. `patch_info->table_size' is no longer valid after Zoltan's
11789 2004-12-12 Martin Baulig <martin@ximian.com>
11791 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
11792 if we are the "real" method, ie. not an inlined method inside it.
11794 2004-12-11 Ben Maurer <bmaurer@ximian.com>
11796 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
11797 before we look in the special fields table. This fixes
11798 ../tests/thread-static-init.cs.
11800 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11802 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
11803 for Array get_Rank and get_Length. Fixes bug #70465.
11805 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
11807 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
11808 separate structure to reduce the size of MonoJumpInfo.
11810 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
11812 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
11814 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
11816 * mini.c (mini_get_inst_for_method): Changed to allow ports
11817 to return a MonoInst instead of opcode
11818 (renamed mini_get_opcode_for_method to better reflect the new functionality)
11820 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
11821 Allow ports to return a created MonoInst instead of op-code, will enable
11823 (renamed mini_get_opcode_for_method to better reflected the functionality)
11825 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
11827 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
11829 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
11831 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
11834 2004-12-08 Martin Baulig <martin@ximian.com>
11836 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
11837 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
11839 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
11841 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
11844 * exceptions.cs: Disable some tests which depend on properties of x86 fp
11847 2004-12-08 Raja R Harinath <rharinath@novell.com>
11849 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
11851 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
11853 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
11854 bug introduced by the previous patch.
11856 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11858 * mini-ppc.c, objectc.cs: handle large structs passed by value
11859 (fixes bug #69972).
11861 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
11863 * mini-ppc.c: OP_ARGLIST implementation from
11864 Geoff Norton <gnorton@customerdna.com>.
11866 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
11868 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
11869 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
11871 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
11873 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
11875 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11877 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
11880 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
11882 * mini-sparc.c: Zero out localled-ed memory.
11884 * iltests.il: Add tests for zeroing out localloc-ed memory.
11886 2004-12-04 Martin Baulig <martin@ximian.com>
11888 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
11889 mono_method_get_signature_full().
11891 2004-12-03 Massimiliano Mantione <massi@ximian.com>
11893 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
11894 and some utility functions (always for SSAPRE), integrated SSAPRE.
11895 * mini.h: Likewise.
11896 * driver.c: Added ssapre option.
11897 * ssa.c: Small fix on OP_ARG handling.
11898 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
11899 * Makefile.am: Likewise.
11901 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
11903 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
11904 now in the xp code.
11906 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
11909 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11911 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
11913 * cpu-s390.md : Increase instruction length of oparglist.
11915 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
11917 2004-11-30 Martin Baulig <martin@ximian.com>
11919 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
11920 virtual generic methods. We call a special helper_compile_generic_method()
11921 icall to retrieve the method from the vtable, inflate and compile
11922 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
11924 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
11926 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
11928 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
11930 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
11932 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
11935 2004-11-27 Ben Maurer <bmaurer@ximian.com>
11937 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
11938 platforms with PIC aot.
11940 2004-11-28 Martin Baulig <martin@ximian.com>
11942 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
11945 2004-11-28 Martin Baulig <martin@ximian.com>
11947 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
11948 the result of mono_type_get_underlying_type() to check whether
11951 2004-11-26 Martin Baulig <martin@ximian.com>
11954 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
11957 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
11959 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
11960 the same way as the other arguments so they won't get clobbered.
11962 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
11963 calls through R11 since it is clobbered by the trampoline code.
11965 2004-11-26 Raja R Harinath <rharinath@novell.com>
11967 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
11968 pick up in-tree mscorlib.dll.
11970 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
11972 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
11974 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
11975 runtime data/code are now stored in a table similar to the GOT in ELF.
11976 This allows the code itself to be position independent.
11978 * aot.c: Fix loading of referenced assemblies after the lazy assembly
11981 * aot.c: Attach ELF type (object/function) directives to all global
11984 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
11986 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
11988 * mini-amd64.h: Turn on PIC AOT code.
11990 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
11991 returning the offset within an OP_AOTCONST instruction where the GOT
11992 offset needs to be added.
11994 * mini.h: Bump AOT file format version.
11996 2004-11-25 Martin Baulig <martin@ximian.com>
11998 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
11999 uninflated generic methods.
12001 2004-11-25 Martin Baulig <martin@ximian.com>
12003 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12005 2004-11-24 Martin Baulig <martin@ximian.com>
12007 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12008 original klass (this only applies for generic instances).
12010 2004-11-24 Martin Baulig <martin@ximian.com>
12012 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
12013 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
12016 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
12018 * mini.c (mono_method_to_ir): Disable inlining for methods containing
12019 localloc. Fixes #69678.
12021 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
12023 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
12025 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
12026 used SSE registers on pinvoke calls. Fixes #69774.
12028 2004-11-23 Geoff Norton <gnorton@customerdna.com>
12030 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
12031 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
12033 2004-11-23 Raja R Harinath <rharinath@novell.com>
12035 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
12036 Refer directly to the mcs/ tree.
12038 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12040 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
12041 Check if a trampoline for a synchronized method is required.
12043 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
12045 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
12046 with localloc if needed. Throe arithmetric exception in
12047 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
12048 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
12050 2004-11-19 Geoff Norton <gnorton@customerdna.com>
12052 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
12053 types before switching on type. Fixes #69622.
12055 2004-11-19 Raja R Harinath <rharinath@novell.com>
12057 * Makefile.am (check-local): New. Integrate into 'make check'.
12058 (MCS,RUNTIME): Define using in-tree mono and mcs.
12060 (%.exe): Use $(ILASM).
12062 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
12064 * mini-ppc.c: adjust initial prolog size (bug #69691).
12066 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
12068 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
12071 2004-11-17 Raja R Harinath <rharinath@novell.com>
12073 * Makefile.am (clean-local): Rename from 'clean'.
12075 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12077 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
12078 to mono_arch_is_int_overflow.
12079 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
12082 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
12084 * declsec.c|h: New files to support declarative security attributes.
12085 Added function to check if a method has (applicable) security.
12086 * mini.c|h: Add check for declarative security attributes in
12087 mono_method_check_inlining.
12088 * Makefile.am: Added declsec.c and declsec.h to the build.
12090 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
12092 * mini.c, mini.h: update to keep dynamic code info per-domain.
12094 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
12096 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
12097 (mini_init): Get rid of it from here too.
12099 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
12101 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
12102 implemented OP_RETHROW (patch by Geoff Norton
12103 <gnorton@customerdna.com>).
12105 2004-11-10 Geoff Norton <gnorton@customerdna.com>
12107 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
12108 between appdomains. Fixes appdomain-unload on PPC.
12110 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
12112 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12113 mini-exceptions.c: handle the new wrapper types.
12114 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
12115 token value as a MonoClass* when compiling a wrapper.
12116 mono_jit_create_remoting_trampoline now takes an additional
12117 MonoRemotingTarget parameter.
12119 2004-11-10 Martin Baulig <martin@localhost>
12121 * mini.c (mono_method_to_ir): Use `generic_container->context'
12122 rather than creating a new one.
12124 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12126 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
12128 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
12130 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
12132 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
12133 the experimental aot cache stuff.
12135 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12137 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12138 mini-exceptions.c: update to exception clause structure changes.
12140 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
12142 * exceptions-x86.c (throw_exception): Fix warnings.
12144 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
12147 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
12149 * exceptions-sparc.c (get_throw_exception): Really fix this.
12151 2004-11-07 Ben Maurer <bmaurer@ximian.com>
12153 * tramp-*.c: we no longer support icalls without wrappers, so
12154 a bit of code can be removed here
12156 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
12158 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
12161 * cpu-sparc.md: Add op_rethrow.
12163 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
12165 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
12167 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
12168 * mini-ops.h: Add OP_RETHROW.
12170 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
12172 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
12174 2004-11-05 Geoff Norton <gnorton@customerdna.com>
12176 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
12177 Makes the output much easier to read
12179 2004-11-05 Ben Maurer <bmaurer@ximian.com>
12181 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
12182 prevents another huge leak when compiling with ssa. Secondly, the
12183 performance of doing this rather than freeing the lists is much
12184 better. GList does a lock every time you allocate a list link,
12185 so that it can use a memory pool. So, it is better to just use
12186 a memory pool of our own.
12188 * ssa.c, linear-scan.c: replace g_list_remove_link with
12189 g_list_delete. The remove one does not free the GList, so we were
12190 leaking memory. On -O=all --compile-all with corlib, this cut down
12191 3 MB of allocations.
12193 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
12195 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
12197 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
12199 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
12200 into a new function mono_create_jit_trampoline ().
12202 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
12204 * trace.c (get_spec): Allow tracing of classes without a namespace.
12206 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
12208 * mini.c: Fix pointer overwrite in mini_method_compile.
12210 2004-11-2 Geoff Norton <gnorton@customerdna.com>
12212 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
12213 The darwin ABI needs some special handling for 1 and 2 byte structs
12214 Lets use lbz/lhz instead of lwz everywhere.
12215 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
12216 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
12217 Use stb/sth for the former, and put the latter always on stack instead of in
12218 argument registers.
12220 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
12222 * trace.c (is_filenamechar): Add '_'.
12224 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12226 * mini-s390.c: Fix prolog length to allow for large trace requirements.
12228 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
12230 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
12232 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
12233 depends on libmonogc. Fixes #68805.
12235 2004-10-26 Miguel de Icaza <miguel@ximian.com>
12237 * mini.c (mono_jit_free_method): Provide extra information for
12238 this error. Currently this leaks, but will be turned into a
12239 developer option in the future.
12241 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
12243 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
12245 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
12247 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
12248 boundary. Fixes reading of PATCH_INFO_R4 and R8.
12249 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
12251 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
12253 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
12254 trampolines for AOT code.
12256 2004-10-22 <vargaz@freemail.hu>
12258 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
12259 constructed types. Fixes #68136.
12261 2004-10-21 Martin Baulig <martin@ximian.com>
12263 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
12264 if it returns true, unwind the stack to the call instruction.
12266 2004-10-21 <vargaz@freemail.hu>
12268 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
12270 * mini.h: Bump AOT version number.
12272 * objects.cs: Add another test for unbox trampolines.
12274 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
12277 2004-10-20 <vargaz@freemail.hu>
12279 * driver.c: Add SHARED to the set of optimizations tested.
12281 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
12283 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
12284 used by CEE_NEWARR.
12286 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
12288 2004-10-20 Martin Baulig <martin@ximian.com>
12290 * mini-exceptions.c (mono_handle_exception): Call
12291 mono_debugger_handle_exception() to tell the debugger about
12292 catch/finally clauses.
12294 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
12296 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
12298 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
12301 2004-10-15 Geoff Norton <gnorton@customerdna.com>
12303 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
12304 methods as their native size, fixed bug #57543, #57545.
12305 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
12306 This saves a temporary register and mullw call down into 1 (minor perf
12307 increase for cases like sum = sum * 5; This use to translate into:
12310 It now translates to
12313 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
12315 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
12318 2004-10-11 Martin Baulig <martin@ximian.com>
12320 * mini.c (mono_method_to_ir): If we're a generic method, get the
12321 MonoGenericContainer from our MonoMethodNormal and create a
12322 MonoGenericContext from it.
12324 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
12326 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
12328 * basic-long.cs: Add test for checked i8->i2 cast.
12330 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12332 * inssel-ppc.brg: added a couple of speedup rules.
12334 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
12336 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
12337 to speed up rebuilds.
12339 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12341 * mini-s390.c: Minor fix to OP_OR_IMM.
12343 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
12345 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12346 better. Fixes appdomain-unload.exe on sparc.
12348 2004-10-02 Massimiliano Mantione <massi@ximian.com>
12350 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12351 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12354 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
12356 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12358 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
12360 * mini.c: Always generate a field read/write wrapper for members
12361 of the class MarshalByRefObject since the actual instance could
12364 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
12366 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12368 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
12370 * driver.c mini.h trace.c: Move the setting of the main assembly into
12371 a separate function called mono_trace_set_assembly () and call it after
12372 actually loading the main assembly. Fixes #66872.
12374 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
12376 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12377 using the code manager.
12379 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
12381 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12383 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
12385 * cpu-amd64.md: Fix bug in previous patch.
12387 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12390 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12392 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12393 mini-exceptions.c: updates for changed stack walk interface.
12395 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12397 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12399 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
12401 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12403 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
12405 * driver.c (mini_regression_list): Do not call mono_assembly_close
12406 since assemblies can't be unloaded.
12408 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
12410 * cpu-amd64.md: Fix more instruction lengths.
12412 * cpu-amd64.md: Fix lengths of some instructions.
12414 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
12416 * inssel.brg: Make the array ldelema check aot friendly.
12418 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
12420 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12422 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12424 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
12426 * mini-x86.c: Fix build.
12428 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
12429 mono_type_get_underlying_type () helper function to simplify code.
12431 2004-09-09 Martin Baulig <martin@ximian.com>
12433 * mini-amd64.c: Don't access `type->data.klass' directly, call
12434 mono_class_from_mono_type() instead since the type may be a
12437 2004-09-09 Martin Baulig <martin@ximian.com>
12439 * mini-amd64.c (get_call_info): Fix support for generic instances.
12440 (add_valuetype): Use mono_class_from_mono_type() to get the class
12441 since we can be a generic instance.
12443 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12445 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12447 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
12449 * liveness.c: reset spill costs on each scan: bug 62107
12451 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
12453 * exceptions-sparc.c (mono_arch_find_jit_info): remove
12454 unnecessary line that doesn't compile
12456 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12458 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12459 trampolines, make them call an error function so people can fix their
12462 2004-09-06 Martin Baulig <martin@ximian.com>
12464 * mini.c (mono_method_to_ir): When initializing locals, handle a
12465 generic instances like a valuetype if it's a valuetype and like a
12466 class if it's a class.
12468 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12470 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12471 stack. Fixes #64674.
12473 * exceptions.cs: Add test for unwinding of call arguments.
12475 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12477 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12478 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12479 set the carry/borrow flag). The sparc and s390 implementations
12480 can now use optimized versions (and simplify the code). ppc bugfixes.
12482 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12484 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12486 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
12488 * inssel-amd64.brg: Remove leftover 32 bit rule.
12490 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12492 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
12494 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12495 mono_arch_find_jit_info functions into a new function. Fix a memory
12498 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12501 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
12503 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12506 * exceptions.cs: Add array size tests.
12508 * mini.c: Allocate a separate icall wrapper for each arity of
12509 mono_array_new_va. Fixes #59509.
12511 * exceptions.cs: Add testcase for 64578.
12513 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12515 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12517 2004-09-02 Martin Baulig <martin@ximian.com>
12519 * mini.c (mono_method_to_ir): When initializing the locals, call
12520 handle_initobj() on the generic instance itself, not its
12523 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
12525 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
12526 MonoJitInfo for dynamic methods.
12528 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12530 * mini.c: Add support for freeing JIT data for dynamic methods.
12532 2004-09-01 Martin Baulig <martin@ximian.com>
12534 * mini-x86.c (is_regsize_var): Added support for generic
12536 (mono_arch_emit_prolog): Make this compile again, use
12537 `x86_push_imm_template (code)'.
12539 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
12541 * mini-x86.c: make all push_imm instructions that get
12542 patched always emit the long form
12544 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
12546 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
12547 in a per-domain hash.
12549 * mini-amd64.c (merge_argument_class_from_type): Handle generic
12552 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
12554 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12557 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12560 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12561 Beginnings of SSE2 support.
12563 * exceptions.cs: Add more tests for checked int<->uint casts.
12565 2004-08-28 Martin Baulig <martin@ximian.com>
12567 * mini-x86.c (mono_arch_instrument_epilog): Added support for
12571 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12572 Handle generic instances recursively.
12574 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
12576 * iltests.il: test for conv.u8 on a constant
12578 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
12580 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12581 LCONV_x4 (shrun_32 (membase)).
12583 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
12585 * inssel-x86.brg: c&p rules for push/setret of long
12587 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
12589 * inssel-x86.brg: c&p rules for compare (base, regvar) and
12590 compare (regvar, base)
12592 * inssel-x86.brg: more burg love
12594 * inssel.brg: more cleanup
12596 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12598 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
12600 * basic-long.cs, basic-calls.cs: new tests for optimization.
12602 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
12604 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12607 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
12609 * mini-amd64.c (read_tls_offset_from_method): Add another case.
12611 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
12613 * inssel.brg (mini_emit_memcpy): use
12614 NO_UNALIGNED_ACCESS to disable memcpy optimization
12616 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
12618 * mini-amd64.c: Handle generic types in various places.
12620 * mini.c (mono_method_to_ir): Handle generic types in init locals.
12622 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
12624 * mini.c (handle_box): Fix warning.
12626 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12628 * mini-amd64.h: Enable the emit_state optimization.
12630 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12632 * mini-amd64.c: Add some new 64 bit peephole opts.
12634 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12636 * cpu-amd64.md: sreg1 of div instructions must be %rax.
12638 * mini-amd64.c: Register allocator fixes.
12640 * mini.c: Add an optimization to emit_state to avoid allocation of new
12641 registers on some platforms.
12643 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
12645 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12647 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12648 allocation. Fixes #63085.
12650 * basic-long.cs: Add new regression test.
12652 * mini-amd64.c: Register allocator improvements.
12654 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
12656 * mini-amd64.c (read_tls_offset_from_method): Add another code
12659 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12660 instruction sequence for nullifying class init trampolines.
12662 * objects.cs: Add new regalloc test.
12664 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12666 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
12668 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12670 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12673 * driver.c: Fix profiling after TLS changes.
12675 * driver.c (mono_main): Set mono_stats.enabled if needed.
12677 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12680 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
12682 * mini-x86.c: use a 1 op rather than a 2 op tls access
12683 instruction -> faster.
12685 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
12687 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12690 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12692 * exceptions-sparc.c (throw_exception): fix typo
12694 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
12696 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12697 set tree->dreg correctly with tls. Allow any
12698 register to be used.
12700 * mini-x86.c (read_tls_offset_from_method): add new code
12701 generation pattern seen with GCC.
12704 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12706 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12707 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12708 exceptions-sparc.c: fix some performance issues in exception
12709 handling and setting of the stack trace for exceptions that were
12712 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
12714 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12717 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
12720 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
12722 This patch inlines tls access, when possible.
12724 * mini.h: new arch functions for TLS intrinsics.
12725 All platforms updated with a stub.
12727 * mini.c: use the new intrinsics
12729 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12730 arch specific intrinsic for tls variables
12732 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
12734 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
12737 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
12739 * mini.c: thread local allocation
12741 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
12743 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
12745 * Makefile.am: Link against the static version of libmonogc.
12747 * Makefile.am: Link the static versions of the convenience libraries
12748 into the mono executable.
12750 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
12752 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
12754 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
12755 on integer overflow.
12757 * mini-amd64.c: Reorganize function call code.
12759 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
12761 2004-08-14 Ben Maurer <bmaurer@ximian.com>
12763 * inssel-x86.brg: use xor eax,eax.
12765 * basic.cs: new tests
12767 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
12769 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
12770 in exception throwing code.
12772 2004-08-14 Ben Maurer <bmaurer@ximian.com>
12774 * inssel-x86.brg: use xor esi,esi.
12776 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
12778 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
12779 can trace methods compiled during mini_init () too.
12781 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
12784 2004-08-14 Ben Maurer <bmaurer@ximian.com>
12786 * Makefile.am: static link on x86 (r=zoltan)
12788 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
12790 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
12791 code since it causes some programs to fail.
12793 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
12795 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
12797 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
12799 * mini.c: ovfops_op_map - add STACK_OBJ case for
12801 * basic.cs: add test_0_pin_string as test
12804 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
12806 * Makefile.am: build C# if srcdir != builddir
12808 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12810 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
12811 fall-through blocks.
12813 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12815 * driver.c: enable loop by default again and include abcrem in -O=all.
12817 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
12819 * iltests.il: Add some localloc tests.
12821 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
12823 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
12826 * inssel-amd64.brg: Add some optimizations.
12828 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
12831 * Makefile.am: Statically link mono against libmono on AMD64.
12833 * mini-amd64.c inssel-amd64.brg: Optimizations.
12835 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
12837 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
12839 * tramp-amd64.c: Patch calling code in trampolines.
12841 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
12843 * mini-amd64.c: pinvoke struct passing fixes.
12845 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
12847 * mini-sparc.c: redo change, make mono_arch_cpu_init call
12848 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
12850 2004-08-05 Duncan Mak <duncan@ximian.com>
12852 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
12855 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
12857 * mini-amd64.c (emit_move_return_value): Move return value for normal
12860 2004-08-05 Martin Baulig <martin@ximian.com>
12862 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
12863 `type->type'; just modify `type' itself when dealing with enums
12864 and generic instances.
12865 (check_call_signature): Make `simple_type' a `MonoType *'.
12867 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
12869 * mini.c: Use OP_PADD to add offsets to addresses.
12871 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
12873 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
12875 * mini-sparc.c (mono_arch_emit_epilog): fix check
12876 for folding last op into restore instruction
12878 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
12880 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
12881 helper methods using the code manager.
12883 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
12885 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
12887 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12889 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
12890 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
12892 * mini-s390.c: fix tail processing
12894 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
12896 * mini-ppc.c: mul.ovf.un exception name fix.
12898 2004-08-03 Martin Baulig <martin@ximian.com>
12900 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
12901 instances; before jumping to `handle_enum', also modify `ptype'.
12903 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
12905 * cpu-sparc.md: fcall maximal length too small.
12907 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
12909 * mini-amd64.c mini.h: Add initial support for passing/returning
12910 structures to/from pinvoked methods.
12912 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
12914 * mini-ppc.c: reg allocator fix.
12916 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
12918 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
12920 * inssel.brg: Optimize memset on 64 bit machines.
12922 * mini-amd64.c: Fix some vararg cases.
12924 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12926 * mini-s390.c: Corrected macro in emit_float_to_int
12928 * s390-abi.cs: Tests to exercise the s390 ABI
12930 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
12932 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
12935 * basic.cs: Add a test for add.ovf.un.
12937 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
12939 * mini-sparc.c: add case for OP_IDIV_UN
12941 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
12943 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
12945 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
12947 2004-07-30 Ben Maurer <bmaurer@ximian.com>
12949 * basic.cs: regression tests.
12951 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
12954 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
12956 * basic.cs: Add a new test.
12958 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
12959 and AOT. Various fixes and optimizations.
12961 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
12963 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
12965 * mini-ppc.c: make sure temp regs are not used for global reg
12968 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
12970 * cpu-sparc.md: conv_i8 fix for 64bits
12972 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
12974 2004-07-29 Ben Maurer <bmaurer@ximian.com>
12976 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
12977 add opcode for cmp BYTE PTR [eax], imm.
12979 * inssel.brg: Make memcpy and memset takes bases.
12981 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
12983 * *-amd64.*: More AMD64 work.
12985 2004-07-28 Ben Maurer <bmaurer@ximian.com>
12987 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
12988 add a compare-not-equal opcode.
12990 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
12992 * mini.c: Use mono_init_from_assembly instead of mono_init.
12994 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
12996 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
12998 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13000 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13002 * inssel.brg: 64 bit fixes.
13004 * mini.h (MonoCallInst): Add some AMD64 specific data.
13006 * mini.h: Add some OP_P opcodes.
13008 2004-07-28 Ben Maurer <bmaurer@ximian.com>
13010 * basic.cs: tests for 61797 and 61740
13012 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13014 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
13015 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
13017 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
13019 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
13021 * *-amd64*.*: Ongoing AMD64 work.
13023 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
13025 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
13027 * *-amd64*: Ongoing AMD64 work.
13029 * mini-arch.h: Add AMD64 support.
13031 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
13033 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
13035 * mini-ops.h: Add new opcodes.
13037 * Makefile.am: Add AMD64 support.
13039 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
13040 rules into the inssel-long*.brg files.
13042 * *-amd64.*: Add beginnings of AMD64 backend.
13044 2004-07-22 Ben Maurer <bmaurer@ximian.com>
13046 * mini.c (print_dfn): commenting out the code that prints
13047 the cil. With -O=deadce, this makes -v -v crash.
13049 * cpu-pentium.md: make checkthis have a length of 2
13051 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
13053 * mini-sparc.h: fix implementations of __builtin
13054 functions for Sun compiler for V9.
13056 2004-07-16 Ben Maurer <bmaurer@ximain.com>
13058 * mini.c: use the new stelem.ref wrapper
13059 * exceptions.cs, arrays.cs: new stelem.ref tests
13061 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13063 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
13064 new XSP should work with these changes).
13066 2004-07-14 Ben Maurer <bmaurer@ximain.com>
13068 * inssel-{long32,x86,}.brg: trivial optimizations.
13070 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13072 * mini.c: load value when emitting box operation in
13075 2004-07-12 Ben Maurer <bmaurer@ximian.com>
13077 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
13078 is one byte shorter than cmp DWORD PTR [eax], 0.
13080 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13082 * inssel-ppc.brg: arguments on the stack are always
13083 relative to the stack pointer (spotted by Neale Ferguson).
13085 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13087 * exceptions-x86.c: delay appending the method name to the trace until
13088 after mono_jit_info_table_find is called, as this gets the real
13091 2004-07-09 Ben Maurer <bmaurer@ximian.com>
13093 * aot.c: register roots
13095 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
13097 * aot.c : I could just use PLATFORM_WIN32 flag.
13099 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
13101 * aot.c : Reverting the previous fix. This time it broke linux build.
13103 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
13105 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
13107 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
13109 * mini.c (handle_stack_args): Remove some more debugging code.
13111 * mini.c (handle_stack_args): Remove debug output left in by mistake.
13113 * driver.c mini.h aot.c: Allow additional options to be specified with
13114 --aot and pass them to mono_compile_assembly.
13116 * aot.c: Add experimental code to AOT compile all loaded assemblies
13117 on demand and save the code into a cache in the filesystem.
13119 * aot.c: Add support for more wrapper methods.
13121 * mini.c (handle_stack_args): Handle some corner cases. Fixes
13124 * cpu-*.md: Remove removed opcodes.
13126 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
13127 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
13128 related icalls to marshal.c.
13130 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
13132 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
13134 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
13136 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
13138 2004-07-06 Ben Maurer <bmaurer@ximian.com>
13139 * liveness.c: If liveness is recomputated we need to reset the information
13140 for each variable. This way, if the liveness range has been narrowed
13141 by optimizations that happened after the last computation, we can return
13144 For example, if you have
13149 // Tons of code that does not affect i
13155 i = 0 is dead code and will be removed by SSA. However, when
13156 linear scan gets to the code, i will still appear to be live
13157 throughout the entire block. This prevents good register allocation.
13159 2004-07-06 Martin Baulig <martin@ximian.com>
13161 * debug-mini.c (mono_debug_init_method): Allow
13162 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
13163 (mono_debug_add_icall_wrapper): New method.
13165 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
13167 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
13169 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
13172 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
13174 * aot.c (mono_aot_load_method): Fix loading of debug info.
13176 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
13178 * aot.c: Add logging support.
13180 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
13182 * mini.h: Add prototype for mono_print_method_from_ip.
13184 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
13186 * inssel.brg: 64 bit fixes.
13188 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
13191 * Makefile.am: Add SPARC64 support.
13193 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
13195 * aot.c: Fix alignment problems on 32 bit platforms.
13197 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
13199 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
13202 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
13205 * mini.h: Bump AOT file version. Some 64 bit fixes.
13207 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
13209 * inssel-sparc.brg: Add new rule to avoid register moves.
13211 * inssel.brg: Add ldind_to_load_membase helper function.
13213 2004-06-30 Ben Maurer <bmaurer@ximian.com>
13215 * mini.c: OffsetToStringData intrinsic.
13217 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
13219 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
13221 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
13224 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
13225 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13227 * mini.c: reinstated mono_compile_get_interface_var()
13228 on x86, too, since the change breaks the Gtk# build there as well.
13230 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13232 * driver.c: remove loop from the default optimizations: it seems to
13233 interact badly with some of the other options (see bug #60613).
13235 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
13237 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
13238 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
13240 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
13242 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
13243 vararg-using methods.
13245 2004-06-21 Martin Baulig <martin@ximian.com>
13247 * mini/mini-exceptions.c
13248 (mono_handle_exception): Added `gpointer original_ip' argument.
13249 After calling mono_unhandled_exception(), call
13250 mono_debugger_unhandled_exception() and if that returns true,
13251 restore the context and return.
13253 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13255 * mini-ppc.c: prefer the use of relative branches so
13256 they won't need to be patched in aot code (patch from Patrick Beard).
13258 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13260 * aot.c: patch from Patrick Beard to make the output assembly
13261 more correct for the MacOSX assembler. Small tweak to
13262 generate sane images on Linux/PPC, too.
13264 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13266 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
13267 case until bug #59509 is fixed (shows up in #60332).
13269 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13271 * mini.c: make sure the needed wrappers are compiled, too, with
13274 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
13276 * driver.c: remove NPTL reference in --version output.
13278 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13280 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
13281 generate valid assembly for the Mach-O assembler.
13283 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13285 * driver.c: don't include abcrem in the all optimization specifier
13286 since it slows down jit compilation too much for now.
13288 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
13290 * mini.c: use BIGMUL only if both operands have the same signage.
13291 * iltests.il: Test for bug 60056. (errors related to signage in
13296 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
13298 * mini.c, aot.c: memory leak fixes.
13300 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13302 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
13304 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
13306 * Makefile.am: remove the -static hack completely, it links in
13307 statically glib as well.
13309 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
13311 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
13312 * exceptions.cs: make it compile with new mcs/csc.
13314 2004-06-03 Massimiliano Mantione <massi@ximian.com>
13315 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
13316 and added relevant test case.
13318 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13320 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
13321 regressions in gtk-sharp.
13323 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
13325 * exceptions.cs: New regression tests.
13327 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
13329 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13331 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
13333 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
13335 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
13337 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13339 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
13341 * mini.c (mono_jit_runtime_invoke): Init class in this
13342 method instead of trusting mono_jit_compile_method to
13343 do the work (because wrappers can be in object class)
13345 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
13347 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13349 * basic-long.cs: New regression test.
13351 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13353 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13354 and div/rem checks.
13356 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13358 * Makefile.am: fix miguel's change to build mono statically against
13359 libmono (track build dependencies).
13361 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
13363 * cfold.c: Some glib versions do not have G_MININT32.
13365 2004-05-26 Massimiliano Mantione <massi@ximian.com>
13367 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13368 with precision of tan, atan, sin and cos, and implemented related
13369 regressions tests (fixes bug 54467, but one new problem appeared and
13372 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
13374 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13376 * exceptions.cs: Add test for constant folding && division by zero.
13378 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13379 since driver.c is in libmono too, so the optimization was useless.
13381 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
13382 variable to driver.c so the compiler can emit more efficient code to
13385 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13387 * Makefile.am: don't distribute generated inssel.[ch] files.
13389 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
13391 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13392 into the default appdomain. Fixes #58707.
13394 * jit-icalls.c: Remove the broken approximation for truncl, doing
13395 no conversion is better.
13397 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13400 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13402 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13403 of the mcrxr instruction which is not available on some processors
13404 even if it's documented to be. Implement add and sub overflow correctly
13405 (still not complete for long unsigned). Speed up icalls a bit.
13407 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13409 * mini.c (mono_jit_compile_method_with_opt): Make sure that
13410 we run .cctor in the current domain instead of target_domain.
13412 Fixes bug #58558, .cctor not being called in -O=shared.
13414 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13416 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13418 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
13420 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13421 which can be done with an imm8, do it that way.
13422 (mono_arch_output_basic_block): ditto for a jmp
13423 (mono_arch_emit_prolog): Computate maximum offset of a label.
13425 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13427 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13428 now tries to allocate prefered physical reg's for virtual
13429 regs. This reduces the number of emited spills/loads with
13430 20-30% on our core assemblies.
13432 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13434 * jit-icalls.c: truncl() is not needed and trunc() is
13435 the correct thing to do anyway (bug #58287).
13437 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
13439 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13442 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13444 * driver.c: enable loop optimizations by default.
13446 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13448 * mini-x86.c: fix calc of max loop size when aligning loops start.
13450 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
13452 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13455 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
13457 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13460 * basic-long.cs: Add tests for add/subtract of immediates with carry.
13462 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13464 * mini.c (inline_method): Allways inline some wrappers even if the cost
13465 is too large. Fixes #58785.
13467 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13469 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
13471 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13472 (crichton@gimp.org). Beginning of support for sparc/linux.
13474 * mini-sparc.c: Optimize retrieval of LMF address.
13476 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13478 * exceptions-ppc.c: handle alloca in methods with clauses.
13480 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13482 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13484 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
13486 * mini.c: Delegate most of the abort signal work to
13487 mono_thread_request_interruption, which also handles Stop and Suspend
13490 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
13492 * mini.c mini.h: Allow inlining of icall wrappers if the backend
13493 supports the save/restore lmf opcodes.
13495 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
13497 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13498 by gcc-3.4 as well.
13500 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13502 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
13504 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
13505 methods which contain array accesses.
13507 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13508 boundaries. Fixes #58537.
13510 * iltests.il: Add regression test for #58537.
13512 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
13514 * mini-x86.c (mono_arch_local_regalloc): Last part of
13515 fix for bug #58633 (releasing register to early).
13517 2004-05-18 Miguel de Icaza <miguel@ximian.com>
13519 * basic-long.cs: Add new regression test.
13521 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
13523 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13524 register too early on the chain.
13526 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
13528 * mini.c (create_helper_signature): Use a helper function to reduce
13529 the code which needs to be written. Also set the calling convention of
13530 icalls on windows. Fixes #57840.
13532 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13534 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13535 exceptions-ppc.c: added helper function to get the instruction address
13536 from a signal handler context.
13538 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
13540 * helpers.c: use g_get_tmp_dir. Invokes happyness
13543 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
13545 * helpers.c: Add new env variable to pass args to objdump.
13546 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13548 2004-05-17 Radek Doulik <rodo@ximian.com>
13550 * Makefile.am (common_sources): added abcremoval.h so it get
13551 disted and daily mono packages on go-mono.com will build again
13553 2004-05-17 Massimiliano Mantione <massi@ximian.com>
13555 * abcremoval.c: Fixed coding style, added copyright header.
13557 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13559 * mini.h: Added prototype for abc removal main function.
13561 * build_relations_propagation_table.pl: Added copyright header.
13563 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
13565 * basic-long.cs: reg test for complex ceq_long bug.
13567 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
13569 * mini-x86.c (mono_arch_local_regalloc): Correctly free
13570 reg in long and clob case (bug #58343). Fixed/added comments.
13572 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
13574 * mini.c (mono_jit_runtime_invoke): Follow new convention
13575 of calling the invoke method with an function pointer.
13577 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
13579 * ChangeLog: Fix author of memory leak patch.
13581 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13583 * Makefile.am: fix make dist as well...
13586 2004-05-14 Massimiliano Mantione <massi@ximian.com>
13588 * cfold.c: Made so that conversions from pointer to int4 are no-ops
13589 on archs where pointers are 4 bytes long.
13591 * Makefile.am: Added abcremoval.c source file.
13593 * abcremoval.c: Added abcremoval.c.
13595 * abcremoval.h: Added abcremoval.h.
13597 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13599 * inssel.brg: Enabled bounds check removal.
13601 * mini.c: Added support for abcrem optimization.
13603 * mini.h: Added abcrem optimization label.
13605 * driver.c: Added support for abcrem optimization.
13607 * propagated_relations_table.def: Added propagated_relations_table.def.
13609 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13611 * mini.c, cfold.c: fix style.
13613 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13615 * mini.c: handle issue with the low-level implementation of
13616 some long opcodes (bug #54209).
13618 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
13620 * basic.cs: test for my new cmov stuff.
13622 2004-05-13 Patrik Torstensson
13624 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13625 opt and added peephole documentation.
13627 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13629 * tramp-ppc.c: rewrote the generic trampoline code.
13631 2004-05-11 Patrik Torstensson
13633 * mini-x86.c: optimize long shl/shr asm code (one less branch)
13635 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
13637 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13639 * mini.h mini.c dominators.c: Applied patch from Derek Woo
13640 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13642 * mini.c: Add new icalls for AsAny marshalling.
13644 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13646 * tramp-ppc.c, mini-ppc.c: more cleanups.
13648 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13650 * mini.c: no warnings.
13652 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13654 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13656 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
13658 * mini.c: In the thread abort signal handler, if the thread is in the
13659 process of being stoped, don't throw the Abort exception, just stop the
13662 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13664 * tramp-ppc.c: removed old code.
13666 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13668 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13669 do some simple speed optimizations on ppc.
13671 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13673 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13674 and large offsets in load/store.
13676 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
13678 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13679 it causes regressions.
13681 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
13683 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13686 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13688 * jit-icalls.c: remove warnings.
13689 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13690 speedups for unsafe code.
13692 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
13694 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13696 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
13698 * basic-calls.cs: Add new regression test.
13700 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13703 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13705 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13708 2004-05-06 Patrik Torstensson
13710 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13711 long reg allocation in any reg (not only eax:edx) and implemented
13712 long shl/shr ops in asm instead of helpers.
13714 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
13716 * mini-sparc.h: Fix warnings.
13718 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13721 * mini-exceptions.c (mono_handle_exception): Call the filter in a
13722 separate statement for clarity.
13724 * mini-sparc.c: Update status.
13726 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
13728 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13731 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13733 * inssel-ppc.brg: another small pre-release workaround:
13734 we don't do overflow detection for long_sub_un.
13736 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13738 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
13739 (also works around a weird ppc bug: 57957).
13741 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
13743 * tramp-ppc.c: trampoline fixes.
13745 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
13747 * mini-ppc.c: fixed typos.
13749 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13751 * mini-ppc.c, exceptions-ppc.c: more code saves registers
13752 at the top of the stack. Fixed typos. Use a frame registers
13753 for all the methods with exception clauses.
13755 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13757 * exceptions-ppc.c: restore fp registers.
13759 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13761 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
13762 order from the stack top (moved the stack room to save the
13763 return value for trace after the param area). Fixed corruption
13764 in restoring registers on unwind.
13766 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13768 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
13770 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13772 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
13773 and prolog/epilog for methods that use it. Allow
13774 enough param area room for varargs methods. Fix miguel's
13775 breakage in exception handling.
13777 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13779 * Makefile.am: run genmdesc only on current arch.
13781 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13783 * exceptions-x86.c:
13784 * mini-x86.h: fix the build on windows.
13786 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
13788 * 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.
13790 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
13792 * mini-exceptions.c: New file.
13794 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
13795 Move some parts of the x86 exception handling code to an
13796 arch-independent file so it can be shared with other ports.
13798 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
13800 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
13802 2004-04-26 David Waite <mass@akuma.org>
13804 * driver.c: remove comma from end of enumeration declaration
13806 2004-04-26 Jackson Harper <jackson@ximian.com>
13808 * driver.c: parse config file before loading first assembly. This
13809 allows the user gac to be enabled/disabled.
13811 2004-04-23 Miguel de Icaza <miguel@ximian.com>
13813 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
13814 simpler mechanism: we do not care what is encoded initially
13815 (branch absolute or relative), we care about the code and its
13816 target. I kept the old code for reference for now.
13818 The new code tries first to determine if the jump is anywhere in
13819 the -/+32 absolute meg range, if it succeeds, it encodes using the
13820 absolute branch; If not, it tried to find something in the
13821 relative range, if not, it uses the handle_thunk code.
13823 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
13825 * exceptions-ppc.c: use the correct ip register on macosx.
13827 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
13829 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
13831 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
13833 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
13834 Raise exception on integer divide by zero by hand since the hw
13835 doesn't support it. Handle NaNs in FP compares.
13837 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
13839 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
13840 code reducing duplication between the platforms and enabled
13841 signal exception handling (on linux for now).
13843 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
13845 * exceptions-ppc.c: more macosx support.
13847 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13849 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
13851 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
13853 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
13855 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
13857 * iltests.il: more tests.
13859 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
13861 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
13864 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13866 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
13868 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
13870 * liveness.c: Mark variables as volatile in all basic blocks reachable
13871 from exception clauses.
13873 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
13875 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
13878 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
13880 * iltests.il, basic.cs: more tests for regalloc.
13882 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
13884 * iltests.il: Some tests for register allocation modifications
13887 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
13889 * exceptions.cs: Add regression test for bug #56782.
13891 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
13892 original stack trace if an exception is rethrown. Fixes #56782. Oh,
13893 the beauty of fixing the same thing in 5 different files...
13895 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
13897 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
13900 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
13902 * mini.c: Add support for STRWLPARRAY marshalling convention.
13904 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13906 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
13907 to init the context to setup the regs pointer).
13909 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13911 * exceptions-ppc.c: more exceptions work.
13913 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13915 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
13918 2004-04-13 Miguel de Icaza <miguel@ximian.com>
13920 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
13921 can use the memory directly.
13923 * cpu-pentium.md: Update documentation from a post from Zoltan.
13925 add x86_add_membase, x86_sub_membase, x86_mul_membase
13927 2004-04-13 Miguel de Icaza <miguel@ximian.com>
13929 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
13930 GENERAL_REGS they were also hardcoded for all PPC ports.
13932 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
13934 Remove hard-coded limit for floating point registers, use
13935 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
13937 Notice that in MacOS X calling conventions you can fit a lot more
13938 floating point values in registers, so I should update the PInvoke
13939 test to excercise the passing of floating point values on the
13940 stack (currently broken).
13942 2004-04-06 Miguel de Icaza <miguel@ximian.com>
13944 * tramp-ppc.c (create_trampoline_code): Added
13945 JUMP_TRAMPOLINE_SIZE.
13946 (ppc_magic_trampoline): Follow the pattern from
13947 x86_magic_trampoline: if code is set to zero, return.
13948 (create_trampoline_code): Always pass MonoMethod to the jump
13949 trampoline, before it was passing a null.
13950 (mono_arch_create_jump_trampoline): Implement the jump stub, could
13951 share the code with mono_arch_create_jit_trampoline.
13953 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
13955 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
13958 * cpu-g4.md: Added length for jmp instruction, the worst case
13959 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
13962 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
13964 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
13966 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
13968 * mini.c: Only set bblock->real_offset when adding a new bblock, and
13969 before each IL instruction.
13971 * mini.c (CEE_BOX): Fix warnings.
13973 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13975 * mini.c: removed a few unused vars and extra whitespace.
13977 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
13979 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
13981 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
13983 (OP_GETCHR): use the above
13984 (CEE_LDELEMA): use the above.
13986 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
13987 version of the generic impl.
13988 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
13989 (CEE_LDELEMA): use the above.
13991 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
13993 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
13996 * iltests.il: Added new regression test for #56317.
13998 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
14000 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14001 under NetBSD. Fixes #56450.
14003 * liveness.c (update_gen_kill_set): Fix previous patch.
14005 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14007 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14009 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
14011 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
14012 ldsfld and ldsflda.
14014 * inssel-sparc.brg: Add more optimizations.
14016 * mini-sparc.c: Replace multiply/divide with shifts if possible.
14018 2004-04-01 Martin Baulig <martin@ximian.com>
14020 * mini.c (handle_box): New static function; moved the
14021 implementation of CEE_BOX here.
14022 (mono_method_to_ir): Added `constrained_call' variable.
14023 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
14024 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
14025 mono_method_get_constrained() to get the method.
14027 2004-04-01 Martin Baulig <martin@ximian.com>
14029 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
14030 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
14031 (mono_method_to_ir): We don't need these macros anymore since
14032 mono_class_get_full() already takes care of it.
14034 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14036 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
14037 use @function (as doesn't accept #function here) and check the return
14038 value of system and stop if fails.
14040 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14042 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
14044 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
14046 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
14048 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
14050 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
14053 * basic-long.cs: Add test for negation of Int64.MinValue.
14055 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
14057 * mini-sparc.c: Update status.
14059 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
14061 * exceptions-sparc.c: Fix return value in filters.
14063 * inssel-sparc.brg: Fix register allocation in some rules.
14065 2004-03-28 Martin Baulig <martin@ximian.com>
14067 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
14070 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
14072 * mini-x86.c (mono_arch_patch_code): Fix warnings.
14074 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
14075 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
14076 remove unused conv_u4 opcode.
14078 * mini-x86.c: Remove valgrind workaround since it slows down things
14079 even when mono is not run under valgrind.
14081 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
14083 * mini-sparc.c: Update status.
14085 * inssel-sparc.brg: Add some optimizations.
14087 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
14088 future delay slot filling. Add support for varargs, tail calls and JMP.
14090 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
14091 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
14093 * inssel.brg: Fix register allocation in OP_ARGLIST.
14095 * inssel.brg: Fix warnings.
14097 2004-03-25 Martin Baulig <martin@ximian.com>
14099 * mini.c (inflate_generic_field): Removed.
14100 (mini_get_method): Removed, use mono_get_method_full(),
14101 (mini_get_class): Removed, use mono_class_get_full().
14102 (mono_method_to_ir): Pass our generic context to
14103 mono_field_from_token().
14105 2004-03-25 Martin Baulig <martin@ximian.com>
14107 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
14108 of a `MonoMethod *'.
14109 (mini_get_method): Take a `MonoGenericContext *' instead
14110 of a `MonoMethod *'.
14111 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
14112 a new local variable called `generic_context' which holds the
14113 current `MonoGenericContext *'; use it to lookup things.
14115 2004-03-24 Martin Baulig <martin@ximian.com>
14117 * mini.c (mini_get_class): New static method; if we're inside a
14118 generic instance, inflate the class if neccessary.
14119 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
14121 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
14123 * iltests.il: New regression test for #55976.
14125 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
14128 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
14130 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
14133 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
14135 * liveness.c: Consider SSA stores as well as loads when making vars
14138 * exceptions.cs: New regression tests for register allocation.
14140 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
14142 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
14143 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
14144 domain lock only to protect puntual access to data structures.
14145 Added access lock for sighash, jit_icall_hash_name,
14146 jit_icall_hash_addr and domain->code_mp.
14148 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
14150 * driver.c: Print SIGSEGV handling method.
14152 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
14154 * mini.c (setup_jit_tls_data): Handle case when this is called
14155 multiple times for a thread.
14157 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
14158 is different from fbxx_un. Fixes #54303. Also use constants instead of
14159 magic numbers in a lot of places.
14161 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
14163 * exceptions.cs: Fix cctor test when --regression is used.
14165 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
14167 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
14170 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14172 * inssel-ppc.brg: fixed register assignments for some rules.
14174 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
14176 * exceptions.cs: Add test for exceptions in static constructors.
14178 * mini.c (mono_jit_compile_method_with_out): Move the calling of
14179 static constructors outside the domain lock. Fixes #55720.
14181 2004-03-17 Martin Baulig <martin@ximian.com>
14183 * mini.c (get_generic_field_inst): Removed, this'll never happen.
14184 (inflate_generic_field): Take the `MonoMethod *' instead of the
14185 `MonoClass *' and added support for generic method.
14186 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
14187 have a `field->parent->gen_params', only inflate the field if it's
14188 an open constructed type.
14190 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
14192 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
14193 exception object instead of the preconstructed ones.
14195 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14197 * mini.c: reverted changed to sigsegv_signal_handler commited
14198 accidentally in the previous patch.
14200 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14203 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
14204 running --aot with an old assembly.
14206 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
14208 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
14211 * mini-sparc.c: Add support for v9 branches with prediction.
14213 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
14215 * mini.c (mini_init): #warning is GNUC only
14217 * mini-sparc.h: implement __builtin_frame_address
14218 and __builtin_return_address for Sun C compiler
14220 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
14222 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
14224 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
14226 * basic-calls.cs: Add test for unaligned byref long argument passing.
14228 * mini-ops.h: Add sparcv9 compare and branch instructions.
14230 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
14231 v9 instructions if we have a v9 cpu.
14233 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
14234 registers for global allocation.
14236 * exceptions-sparc.c: Fixes.
14238 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
14240 * liveness.c (mono_analyze_liveness): Optimized version.
14242 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
14244 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
14247 * basic-float.cs basic-calls.cs: New regression tests.
14249 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
14251 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
14252 sigaltstack implementation.
14254 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
14256 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
14257 stuff if SIGSEGV_ON_ALTSTACK is not defined.
14259 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
14261 * mini.c: Fix warnings.
14263 * mini.c (mono_resolve_patch_target): New function which contains the
14264 arch independent part of the patching process.
14266 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
14267 patching code to a separate function.
14269 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
14271 * mini.c (add_signal_handler): ifdef out on Windows
14273 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
14275 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
14276 cpu-sparc.md: Add exception handling support + other fixes.
14278 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
14279 typed GC detection in --version.
14281 * basic.cs exceptions.cs: New regression tests.
14283 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
14284 the arch specific code can store data during a compilation.
14286 * mini-ops.h: Add OP_SETFRET.
14288 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
14289 function, register a separate icall for each arity, so the icalls can
14292 * mini.c (mono_print_tree): Print negative offsets in a more readable
14295 * mini.c: Make signal handling work on sparc.
14297 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
14299 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
14301 * jit-icalls.c: Emulate truncl by aintl on solaris.
14303 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
14305 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
14307 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
14309 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
14311 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
14312 a MarshalByRef type, inline a method that performs the check, taking into
14313 account that the object can be a proxy. Also implemented tow new opcodes:
14314 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14315 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
14316 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14318 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14320 * mini-ppc.c: if a relative branch displacement is too big
14321 but it points to and area reachable with an absolute branch,
14324 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14326 * mini.c: optimize small copies in cpblk.
14328 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
14330 * basic-calls.cs basic-float.cs: New regression tests.
14332 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
14333 negative offsets from %fp. Implement localloc. Fix local register
14334 allocation. Fix the case when the this argument needs to be saved to
14335 the stack. Implement some missing opcodes.
14337 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
14339 * mini.c (mini_method_compile): Reenable global regalloc in methods
14340 with exception handlers.
14342 * linear-scan.c (mono_varlist_sort): Fix warning.
14344 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14346 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14349 * liveness.c: Make all variables uses in exception clauses volatile, to
14350 prevent them from being allocated to registers. Fixes #42136.
14352 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
14354 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14355 causes regressions.
14357 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14358 argument to mono_arch_regalloc_cost.
14360 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
14363 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
14365 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
14366 Make the cost of allocating a variable to a register arch dependent.
14368 * basic-calls.cs: Fix compilation of tests.
14370 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14371 helper function to cut back on the number of #ifdefs needed.
14373 * mini-ppc.c: Fix compilation.
14375 * basic-calls.cs: New regression tests.
14377 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14379 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14380 of l0 since that is callee saved.
14382 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14385 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
14386 of delay instruction.
14388 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14390 * mini.h (MonoCallInst): Add 'virtual' flag.
14392 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14394 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
14396 * *.cs: New regression tests.
14398 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
14401 * mini.c (mono_runtime_install_handlers): Fix build.
14403 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14404 'signal_stack_size' members.
14406 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
14407 alternate signal stack.
14409 * exceptions-x86.c: Add stack overflow handling.
14411 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
14412 functions to arch independent code.
14414 * mini.c (mono_print_tree): Print more detailed info for load_membase
14417 2004-02-23 Martin Baulig <martin@ximian.com>
14419 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14421 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14423 * mini-x86.c: fixed reg allocation for div/rem.
14425 2004-02-22 Miguel de Icaza <miguel@ximian.com>
14427 * driver.c (mono_main): Report some configuratio options on --version.
14429 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14431 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14432 low in the address space. Correctly flush memory in thunks where we
14433 output native code.
14435 2004-02-20 Martin Baulig <martin@ximian.com>
14437 * mini.c (mini_get_method): New static method; inflate all generic
14438 methods and methods in open generic instances.
14439 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14440 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14442 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
14444 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14446 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14448 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
14450 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14452 * mini-sparc.c (flushi mono_arch_output_basic_block): make
14453 it compile using Sun's compiler.
14455 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
14457 * 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.
14459 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14461 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14463 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14465 * mini-ppc.c: handle calls outside of the allowed range with thunks
14466 allocated using the code manager.
14467 * tramp-ppc.c: use the code manager to hold generated native code.
14468 Fixed the magic trampoline to just patch vtable entries.
14470 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
14472 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14475 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
14477 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14480 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14481 if we have a working __thread implementation.
14483 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
14484 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14486 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
14488 * mini-x86.c: Fix compilation under gcc 2.
14490 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
14492 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14493 contains a call to the wrapped function.
14495 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
14496 OP_<CALL>_IMM opcodes, and use them under X86.
14498 * mini.c (mono_jit_find_compiled_method): Fix warning.
14500 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14502 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14504 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14505 functionality to mini.c.
14507 * mini.c (mono_create_jump_trampoline): New function to create a jump
14508 trampoline. Return a compiled method instead of a trampoline if it
14509 exists. Add a cache for jump trampolines.
14511 * mini.c (mono_jit_find_compiled_method): New function to return a
14512 compiled method if it exists.
14514 * mini-x86.c: Call mono_create_jump_trampoline instead of
14515 mono_arch_create_jit_trampoline.
14517 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14518 a jump trampoline. Fixes #52092.
14520 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
14522 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14523 which is not up-to-date. Add check_corlib_version () instead.
14525 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
14528 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14529 since newer valgrind versions do not need it.
14531 * mini.c (mono_jit_compile_method_with_opt): New helper function to
14532 compile a method with a given set of optimizations.
14534 * mini.c: Compile icall wrappers on-demand instead of at startup.
14536 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14537 wrapper for an icall.
14539 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
14541 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14544 * iltests.il: Add test for non-empty stack before switch instruction.
14546 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
14548 * mini.c: Add support for new stringbuilder marshalling conventions.
14550 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14552 2004-02-01 Martin Baulig <martin@ximian.com>
14554 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14555 in `ginst->mtype_argv'.
14557 2004-01-31 Miguel de Icaza <miguel@ximian.com>
14559 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14560 facilitate grepping.
14562 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14564 * mini.c: fixed buglet in initobj generic implementation for references.
14566 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14568 * Makefile.am: make the version script conditional.
14569 * jit-icalls.c: handle missing truncl().
14571 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
14573 * exceptions.cs: Add more tests for double->int conversion.
14575 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14576 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14578 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14580 * driver.c: make --verbose --version emit an error
14581 if the loaded corlib doesn't match the runtime version.
14583 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14585 * mini-ppc.h: export ppc_patch().
14586 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14587 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14588 on par or better than on MacOSX.
14590 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
14592 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14593 mono_lookup_pinvoke_call.
14595 * mini-x86.c: Under windows, the default pinvoke calling convention is
14596 stdcall. Fixes #52834.
14598 * mini.c (optimize_branches): Add an upper bound to the number of
14599 iterations to prevent infinite loops on strange loops. Fixes #53003.
14601 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
14603 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14604 and ISINST. Fixes #52093.
14606 * objects.cs (test_0_vector_array_cast): New tests.
14608 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
14610 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14611 checking in Array.Set ().
14613 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14616 * object.cs (test_0_multi_array_cast): New regression test.
14618 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14620 * exceptions-ppc.c: fix build on Linux/PPC.
14622 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
14624 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14625 running under valgrind.
14626 (x86_magic_trampoline): Fix build bustage.
14628 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14629 negative values as well. This is needed for the encoding of the line number
14630 info, since sometimes the line numbers are not in increasing order.
14632 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
14634 * cpu-pentium.md (localloc): Increase the size of the localloc
14635 instruction since it is a loop under Win32.
14637 * debug-mini.c (record_line_number): Get rid of unneccesary memory
14640 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
14642 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
14643 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
14644 Max Horn (max@quendi.de). Fix file names in comments.
14646 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
14648 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14649 avoid stack overflow.
14650 (replace_usage): Avoid uninitialized variable warnings.
14652 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14653 and taking the address of valuetype variables.
14655 2004-01-03 Patrik Torstensson
14657 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14658 for other purposes than FP later on.
14660 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
14662 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14665 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14667 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14669 2003-12-30 Patrik Torstensson <p@rxc.se>
14671 * mini-x86.h: Decreased number of availiable fp regs.
14672 Solves corner cases with FP spilling.
14674 2003-12-23 Patrik Torstensson <p@rxc.se>
14676 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14677 for floating point stack tracking / spilling on x86.
14680 * basic-float.cs: added float mul overflow test.
14682 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
14684 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14686 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14688 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14689 supports for cond branches that overflow the immediate
14690 overflow offset. mcs can compile simple programs.
14692 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14694 * exceptions-ppc.c: exception handling support wip:
14695 finally handlers get run on exception.
14697 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
14699 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
14702 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14704 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14705 initial support for stack walking and unwinding.
14707 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
14709 * driver.c (mono_main): Make corlib-out-of-sync message more
14710 descriptive. Also remove verify_corlib call.
14712 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14714 * mini.c: make CEE_NEWARR calls and other emulated opcodes
14715 not overlap with other call's arguments, too.
14717 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14719 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
14720 move to arch-specific code the choice of arch-specific
14721 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14722 * mini.c: ensure emulation calls will not interleave
14725 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14727 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14728 the magic trampoline stack frame is dropped before executing
14731 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14733 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14734 and integer to fp conversions. Added support for overflowing
14735 arguments on the stack. Reserve a couple more registers as temps.
14736 Added support for aot compilation (as output still needs to be
14739 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14741 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
14742 Don't overwrite return register in some corner cases.
14744 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
14746 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
14747 static constructors when AOT compiling.
14749 * driver.c (mono_main): Call mono_check_corlib_version.
14751 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14753 * cpu-g4.md, basic.cs: fixed div target register.
14755 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
14757 * mini-ppc.c, basic.cs: shl_imm fix with test.
14759 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14761 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
14762 structures by value. Misc fixes.
14763 * objects.cs: more tests.
14765 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
14767 * mini-ppc.c: lconv.ovf.i implemented.
14769 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14772 (mini_init): don't error out if someone already called g_thread_init.
14774 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
14776 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
14777 to be any type per the spec. Fix abnormal memory usage when
14778 the same object is repeatedly thrown.
14780 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
14782 * mini.c: check for overruns in IL code.
14784 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
14786 * TODO: Add/remove some todo entries.
14788 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
14790 * driver.c (mono_main): Call mono_verify_corlib.
14792 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
14794 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
14795 This has been moved to mini.c
14796 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
14797 type being casted is marshalbyref it could be a proxy, so instead of
14798 emitting the type check code, emit a call to a runtime method that will
14799 perform the check by calling CanCastTo if needed.
14801 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
14803 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
14804 methods with large stack frames under Win32.
14806 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
14808 * Makefile.am: Distribute regression tests.
14810 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
14811 at the end instead of inserting each variable into the sorted list.
14813 * linear-scan.c (mono_varlist_sort): New helper function.
14815 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14817 * mini.c: ensure arguments and locals are within bounds.
14819 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
14821 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
14824 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
14826 * mini.c (mono_cprop_copy_values): Fix crash.
14828 * aot.c: Set verbosity back to 0.
14830 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14832 * regalloc.c: complete memory leak fix by Laurent Morichetti
14835 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
14837 * driver.c (main_thread_handler): Revert the previous patch.
14839 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
14842 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
14843 memory from the memory pool.
14845 * driver.c (main_thread_handler): Turn on all optimizations when
14848 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
14849 an array for better performance.
14851 * regalloc.c (mono_regstate_assign): Fix memory leak.
14853 * debug-mini.c (mono_debug_serialize_debug_info): New function to
14854 serialize the debug info.
14856 * debug-mini.c (mono_debug_add_aot_method): New function to load the
14857 debug info from the serialized representation.
14859 * aot.c: Save debug info into the generated file and load it when
14862 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
14864 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14866 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
14867 More FP-related fixes.
14869 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
14871 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
14872 and register allocation buglet. Hello world now runs.
14874 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
14876 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
14877 * tramp-ppc.c: fixed class init trampoline.
14878 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
14880 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14882 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
14883 mini.c: more ppc changes/fixes.
14885 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
14887 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
14888 Also optimize the case when the arguments are the same in the caller
14891 * iltests.il: Add tests for tail calls with valuetype arguments.
14893 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14895 * mini-ppc.c: fixes for struct return type.
14897 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
14899 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14900 mono_spillvar_offset() to arch-specific code.
14902 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
14904 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
14906 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
14908 * exceptions-x86.c: Fix stack space leaks.
14910 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
14911 registers from the lmf if the method has save_lmf set.
14913 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
14915 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
14916 of icall wrappers into InvokeInDomain, since these are now per-domain.
14918 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
14920 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
14921 make some opcode emulation and intrinsic ops enabled/disabled
14922 according to the architecture. More fixes.
14924 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
14926 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
14928 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
14930 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
14931 arch-specific handling for 'this' and struct return type to
14932 arch-specific code.
14934 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14936 * aot.c: prevent divide by zero error when reporting (it happened with
14937 Accessibility.dll).
14939 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
14941 * mini.h (inst_switch): Remove unused macro.
14943 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14946 (load_aot_module): free 'info->methods' and 'info' properly. No more
14947 "free(): invalid pointer blah" messages when you have an old aot
14950 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
14952 * jit-icalls.c, mini.c: Added support for context static fields.
14954 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
14956 * mini.c (mono_method_blittable): Methods which set LastError are not
14957 blittable either. Fixes #51108.
14959 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
14961 * mini.c: flush icache.
14962 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
14964 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
14966 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
14968 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
14970 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
14973 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
14976 * inssel.brg (CEE_MKREFANY): Fix AOT case.
14978 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
14980 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
14981 instruction when the result is discarded.
14983 * iltests.il (test_0_div_regalloc): New regression test.
14985 * arrays.cs: Fix compilation error.
14987 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
14989 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
14990 float rules to inssel-x86.brg: sane architectures with FP registers
14991 don't need to implement these rules.
14993 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
14995 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
14997 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
14999 * mini.h, inssel-long32.brg: fixed endianess issues in int64
15000 implementation of 32 bit systems.
15002 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15004 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15005 (Jeroen Zwartepoorte).
15007 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
15009 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15010 the caller and the callee matches.
15012 * mini.c (mono_method_to_ir): Add comment.
15014 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
15015 signbit is missing on some platforms.
15017 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
15019 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
15021 * mini.c (setup_jit_tls_data): Call the new function.
15023 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
15025 * mini-x86.c: Add experimental support for fast access to the lmf
15026 structure under NPTL/Linux 2.6.x.
15028 2003-11-06 Martin Baulig <martin@ximian.com>
15030 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
15031 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
15034 2003-11-02 Martin Baulig <martin@ximian.com>
15036 * mini.c (inflate_generic_field): New static method.
15037 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
15038 generic instance and the field is declared in a generic type, call
15039 inflate_generic_field() to inflate it. Fixes gen-28.cs.
15041 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
15043 * mini.h mini.c (mono_method_same_domain): New function to return
15044 whenever the caller and the callee are in the same domain.
15046 * tramp-x86.c (x86_magic_trampoline): Use the new function.
15048 2003-10-30 Martin Baulig <martin@ximian.com>
15050 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
15051 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
15053 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
15054 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
15056 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
15058 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
15061 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
15062 object here, so it is in the correct appdomain etc.
15064 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
15066 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
15068 (mono_method_to_ir): Avoid freeing the type created returned from
15069 mono_type_create_from_typespec, since it is put into an internal cache
15070 by the function. Fixes pointer.exe.
15072 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
15073 trampolines for icalls and pinvokes as well. Fixes #33569.
15075 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
15077 * mini.c: Update after appdomain changes.
15079 * mini.c (mono_jit_compile_method_inner): Allways compile native
15080 method wrappers in the root domain, since there can only be one
15081 instance of them, whose address is stored in method->info.
15083 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
15085 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
15086 environment variable. Instead detect automatically whenever running
15087 under valgrind using the magic macro RUNNING_ON_VALGRIND from
15090 2003-10-16 Miguel de Icaza <miguel@ximian.com>
15092 * trace.c, trace.h: New files that implement the new trace option
15095 * driver.c: Document new --trace options.
15097 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
15100 - if (mono_jit_trace_calls)
15101 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
15103 * mini.h: prototypes.
15105 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
15107 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
15109 * mini.c inssel.brg: Implement typedefbyref opcodes.
15111 * mini.c (mono_jit_compile_method): Remove unused local variable.
15113 * mini.c (mono_jit_compile_method_inner): Ditto.
15115 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
15117 * tramp-x86.c (x86_class_init_trampoline): Fix build.
15119 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
15121 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
15123 * mini.c (mono_no_aot): Remove unused global variable.
15125 * mini.c: Thread safety fixes.
15127 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
15129 * mini.c (mono_create_class_init_trampoline): Add a lock around
15130 class_init_hash_addr.
15132 * arrays.cs (test_0_newarr_emulation): Add new regression test for
15135 * mini.c: Decompose the NEWARR instruction before decomposing its
15136 arguments. Fixes #30073.
15138 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
15140 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
15143 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
15145 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
15147 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
15149 * driver.c: Add support for compiling icall wrappers to --compile.
15151 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
15153 * inssel.brg: The empty value in class->interface_offsets is -1, not
15156 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
15158 * objects.cs: New test for 'is' operator on an array of interfaces.
15160 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15162 * tramp-ppc.c: update trampoline code to support jumps
15163 and class initialization.
15165 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
15167 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
15169 * inssel.brg (OP_UNBOXCAST): Fix #46027.
15171 * inssel.brg (OP_UNBOX): Remove unused rule.
15173 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
15174 region instead of one for each method. Fixes #47813.
15176 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
15178 * exceptions.cs (test_0_nested_finally): New regression test for
15179 nested exception handlers.
15181 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
15183 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
15185 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
15188 * mini.c (mono_method_check_inlining): Make the inlining limit
15189 configurable by an environment variable.
15191 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
15193 * mini.h: Bump AOT file version.
15195 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
15196 token, store the image along with the token, since the token might not
15197 refer to the same image as the method containing the relocation,
15198 because of inlining.
15200 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
15202 * mini.c (mono_precompile_assemblies): New function to compile
15203 all methods in all loaded assemblies.
15205 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
15207 * regalloc.h regalloc.c (MonoRegState): Change the type of
15208 iassign and fassign to int*, since they can contain large negative
15209 values if the register is spilled. Also added some comments. Fixes
15212 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
15213 under Win32. Fixes #42964.
15215 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
15217 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
15219 * aot.c: Added support for AOT compiling methods which contain calls
15220 to wrappers. Currently, only remoting-invoke-with-check wrappers are
15223 * driver.c (compile_all_methods): Run the compilation in a thread
15224 managed by mono. Fixes #44023.
15226 * mini.c (mono_codegen): Print full method name in verbose output.
15228 * mini-x86.c (mono_arch_patch_code): Fix warning.
15230 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
15231 jumps, since the method we are jumping to might be domain-specific.
15233 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
15235 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15237 * inssel.brg: string chars are unsigned.
15239 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
15241 * TODO: New todo item.
15243 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
15244 which calls mono_runtime_class_init and patches the call site to
15245 avoid further calls.
15246 (mono_arch_create_class_init_trampoline): New arch specific function
15247 to create a class init trampoline.
15248 (create_trampoline_code): Generalized so it can create
15249 class init trampolines as well.
15251 * mini.c (helper_sig_class_init_trampoline): New helper variable.
15252 (mono_create_class_init_trampoline): New function to create and cache
15253 class init trampolines.
15254 (mono_find_class_init_trampoline_by_addr): New function to lookup the
15255 vtable given the address of a class init trampoline. Used by the
15257 (mono_codegen): Generate a call to a trampoline instead of
15258 mono_runtime_class_init in LDSFLD[A].
15259 (mono_codegen): Add relocations for the new trampoline.
15261 * mini.h mini-x86.c aot.c: Added a new relocation type:
15262 MONO_PATCH_INFO_CLASS_INIT.
15264 * mini.h: Bump AOT version number.
15266 * aot.c: Create a copy of the loaded code instead of using the original
15267 so methods which call each other will be close in memory, improving
15270 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
15271 patch since it breaks the regression tests.
15273 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
15274 for the register saving instruction sequence since the
15275 frame_state_for function in glibc 2.3.2 don't seem to detect it.
15277 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
15279 * TODO: Fix todo item && remove another.
15281 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
15283 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
15286 * aot.c: Moved the check for MONO_LASTAOT into the initialization
15287 function of the module.
15289 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
15290 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
15291 --no-aot command line option.
15293 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
15295 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
15296 by Bernie Solomon (bernard@ugsolutions.com).
15298 * inssel.brg: Refactor the interface offset table related code into
15299 its separate functions and add support for the AOT case.
15301 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
15303 * aot.c (mono_aot_get_method_inner): Fix memory leak.
15305 * aot.c: Added mono_aot_verbose variable and made all debugging
15306 output depend on the value of this variable.
15308 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
15309 method_label and info_label.
15311 * mini.h mini-x86.c aot.c: Added a new relocation type
15312 MONO_PATCH_INFO_IID for klass->interface_id.
15314 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
15315 the MonoJitInfo structure.
15317 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
15318 a non-root appdomain in shared mode.
15320 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15322 * aot.c: make aot loader less verbose. Remove free of unused variable.
15324 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
15326 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
15328 * .cvsignore: Added *.dll.
15330 * mini.c (mono_print_tree_nl): New function callable while debugging.
15332 * mini.c (mono_print_code): Export this.
15334 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
15337 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
15339 * mini.h (MonoCompile): Added 'jit_info' field.
15341 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15342 the cfg structure, since it is needed by the AOT compiler.
15344 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15346 * aot.c: A major rewrite. Changes include:
15347 - save exception tables for methods which have them.
15348 - cache failed lookups in aot_get_method () to avoid the (slow) calls
15349 to g_module_symbol.
15350 - reworked the file format so it is now much smaller and needs
15351 fewer relocation entries.
15353 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
15355 * aot.c (load_aot_module): Fix build bustage on platforms without
15358 2003-09-04 Martin Baulig <martin@ximian.com>
15360 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15362 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
15364 * TODO: Some new optimization ideas.
15366 * aot.c: Move AOT module loading logic here from mono_assembly_open.
15368 * aot.c: Save the optimization flags used to compile the code into
15371 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15372 support emitting domain specific code.
15374 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
15375 no longer domain neutral. It can be made domain neutral by compiling
15376 with --optimize=shared.
15378 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15379 between appdomains.
15381 * driver.c mini.h mini.c: New --no-aot debugging option which disables
15382 loading of AOT code.
15384 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15386 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15387 if there is no domain neutrality information.
15389 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
15391 * aot.c (mono_compile_assembly): Emit a symbol containing the file
15392 format version into the generated library.
15394 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15395 callee method into the caller since one of them could be shared.
15397 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15398 system exceptions from AOT code now works.
15400 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
15401 method if it is domain neutral and the callee is not.
15403 * graph.c (cfg_emit_one_loop_level): Fix warning.
15405 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
15407 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15410 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
15412 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15413 is needed by code which is executed before mono_runtime_init ().
15414 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15416 * mini.c (mono_thread_abort): Fix warning.
15417 (mono_jit_compile_method): Call static constructor in the AOT case too.
15419 * aot.c (mono_compile_assembly): Fix warning.
15421 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15423 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15425 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
15427 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15429 * cpu-pentium.md: Fix the length of call opcodes so they include the
15430 ESP restoring instruction. Fixes #47968.
15432 2003-08-28 Martin Baulig <martin@ximian.com>
15434 * mini-x86.c (mono_arch_call_opcode): Added support for
15435 MONO_TYPE_GENERICINST.
15437 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
15439 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
15441 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15442 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15444 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15447 2003-08-26 Martin Baulig <martin@ximian.com>
15449 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15450 when reporting an error, set this to the actual error location.
15451 (mono_method_to_ir): Report the correct error location if
15452 get_basic_blocks() returned an error.
15454 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
15456 * mini.c (mono_type_blittable): OBJECT is not blittable.
15457 (mono_method_blittable): Methods which have marshalling descriptors
15458 are not blittable either. Fixes #47842.
15460 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
15462 * driver.c mini.c: Use an environment variable instead of a global
15463 variable. Also fix the build.
15465 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
15466 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
15469 * driver.c mini.c: Added --with-valgrind option to turn off some
15470 code which prevents mono from running under valgrind.
15472 * mini.c (mono_emit_call_args): Fixed warning.
15474 * mini.c (mono_emulate_opcode): Fixed warning.
15476 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15478 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15479 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15480 regalloc.c, regalloc.h: specify available registers in arch-specific
15481 code and support floats in the regallocator (patch by Laurent Morichetti
15484 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15486 * mini.c: mono_thread_current() can be called only after
15487 mono_runtime_init(): rearrange code to not call it early on.
15489 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15491 * mini.c: allocate jump tables in the code mempools.
15493 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15495 * mini.c, mini.h: make sure per-thread data allocated by the jit is
15498 2003-08-10 Miguel de Icaza <miguel@ximian.com>
15500 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15501 12 to 16. This fixes bug #47453.
15504 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15506 * mini-ppc.c: fixed indexed load and unsigned compares.
15508 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
15510 * mini.c: reenabled installation of handler for
15511 thread abort signal.
15513 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15515 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15516 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15517 until it's fixed and actually useful.
15519 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15521 * inssel-long32.brg: couple more opcodes implemented.
15523 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15525 * mini-sparc.c: Even more opcodes implemeted.
15527 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15529 * mini-sparc.c: More opcodes implemented.
15531 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15533 * mini-sparc.c: More opcodes implemented.
15535 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15537 * inssel-sparc.brg: Add some needed rules. Direct
15539 * Makefile.am: Use inssel-sparc.brg
15540 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15541 an assert happy for now.
15543 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15545 * mini-sparc.c: Fixed compile errors.
15546 * exceptions-sparc.c: Same. We now produce a mono binary
15547 on sparc-linux. Yea.
15549 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15551 * mini-sparc.c: Renamed registers. Also some macro cleanups.
15552 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15553 They compile, but do not work.
15555 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15557 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15558 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15559 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15562 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15564 * mini.c: more opcodes implemented and better support for generics.
15566 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15568 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15569 * mini.c, mini.h: first cut at generics support: some new instructions
15570 added and changed the behaviour of some of the existing ones.
15572 2003-07-21 Miguel de Icaza <miguel@ximian.com>
15574 * mini.c: Removed definition of metadata_shared mutex here.
15576 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15578 * mini-x86.c: make vararg calls work for instance methods.
15580 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15582 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15583 returns the arguments in a separte list, now.
15585 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15587 * aot.c, mini.c: updates for array type representation changes.
15589 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15591 * mini.c: register function to perform jit shutdown.
15593 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15595 * mini.c: use a faster allocator if possible.
15597 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15599 * aot.c: some cleanups and portability changes.
15601 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15603 * mini.c: use faster allocation for CEE_BOX if possible.
15605 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15607 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15608 Moved inlined mempcy code to its own function so that is can be
15609 reused. Added an inline memset function as well (optimized initobj).
15610 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15612 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15614 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15616 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15618 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15619 arch code can setup the cpu for CLR execution, if needed.
15620 We use it on x86 to set the precision of FP operations.
15622 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15624 * mini.c: disable some optimizations if we can guess they'll cost too
15625 much for a given method.
15627 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
15629 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15631 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
15632 * mini.h mini.c mini-x86.c: Added instruction level coverage
15633 info collection support.
15635 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15637 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15638 is now implemented in the profiling API. Get rid of a couple of
15639 unnecessary global variables.
15641 2003-06-15 Nick Drochak <ndrochak@gol.com>
15643 * basic-long.cs: tests for negative values for bigmul, and unsigned.
15644 * cpu-g4.md: add op_bigmul and op_bigmul_un
15645 * cpu_pentium.md: add op_bigmul_un
15646 * inssel-long32.brg: add rule for unsigned bigmul
15647 * mini-ops.h: define OP_BIGMUL_UN
15648 * mini-x86.c: THE BUG: handle (un)signed properly
15649 * mini.c: choose unsigned opcode if needed.
15650 This set of patches fixes bug #44291
15652 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
15654 * mini.c (optimize_branches): improved to handle all kinds of
15655 conditional branches.
15657 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15659 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15660 don't raise exceptions.
15662 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15664 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15665 to arch-specific files.
15667 2003-06-09 Martin Baulig <martin@ximian.com>
15669 * Makefile.am (libs): Added $(LIBGC_LIBS).
15671 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15673 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15674 and OP_ATAN (fixes bug#44293).
15676 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15678 * Makefile.am, mini-x86.c: rename cpu description array to
15679 pentium_desc, since some compilers define the 'pentium' preprocessor
15682 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
15684 * mini.c (mini_select_instructions): add explicit branch if the
15685 following block is not the false target of a conditional branch -
15686 we need this with any optimization that reorder or remove bblocks
15688 * mini.c (optimize_branches): bug fixes
15690 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
15692 * mini.c (mono_method_to_ir): inline static readonly fields
15694 * ssa.c (fold_tree): start cfold support for long (very simple
15697 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15699 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15701 * inssel.brg: fixed memcpy (bug #44219).
15703 2003-06-05 Dick Porter <dick@ximian.com>
15705 * driver.c: Set the glib log levels to not abort if g_message
15708 g_set_prgname() has to happen before mini_init() so that the
15709 process handle gets the info.
15711 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15713 * driver.c: add intrins to the default optimizations to get wider
15716 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15718 * mini.h: some large basic blocks will overflow a 16-bit
15719 integers for symbolic registers.
15721 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
15723 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15724 (mono_arch_output_basic_block): fix bug 43499
15726 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15728 * mini.c: kill duplicated definition of mono_debug_format.
15730 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15732 * mini-x86.c, arrays.cs: fixed register allocation bug.
15734 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
15736 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
15738 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
15740 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15743 (print_method_from_ip): also print source location information if
15746 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
15748 * mini.c (mono_find_block_region): bug fix in region code
15749 (mini_method_compile): enable removing unreachable code again, but
15750 only in methods without exception clauses.
15752 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15754 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
15755 Implemented arglist opcode and handling of TypedReference type.
15756 Fixed x86 call convention when a structure is returned.
15757 Minimal support for calling static vararg methods.
15759 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
15761 * mini.c (mini_method_compile): always remove unreachable code,
15762 because the code in them may be inconsistent (access to dead
15763 variables for example).
15765 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
15767 * driver.c, debug-mini.c: warning fixes.
15769 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
15771 * Makefile.am, jit.h, mini.h: install header for embedding mono.
15773 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
15775 * mini.c: thread-static fields are registered in mono_class_vtable(),
15776 so ensure the function is called before checking for them.
15778 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
15780 * mini.c (optimize_branches): fix for bug 43586
15782 * jit-icalls.c (mono_llmult_ovf): added an additional check for
15783 overflow (fixes Bug #43639)
15785 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15787 * mini.c, objects.cs: allow the use of stobj for primitive types.
15789 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15791 * mini.c: be less strict about argument checking until we support
15792 running the verifier.
15794 2003-05-27 Nick Drochak <ndrochak@gol.com>
15796 * basic-long.cs: tests for (ulong)int * (ulong)int also
15797 * mini.c: use the same trick for (ulong)int * (ulong)int
15799 2003-05-27 Nick Drochak <ndrochak@gol.com>
15801 * basic-long.cs: add regression test for (long)int * (long)int
15802 * cpu-pentium.md: add op_bigmul specification
15803 * inssel-long32.brg: add OP_BIGMUL rule
15804 * mini-ops.h: add OP_BIGMUL
15805 * mini-x86.c: register allocator: handle case where src1 needs to be
15807 * mini.c: substitute special BIGMUL opcode in the tree for
15808 (long)int * (long)int
15810 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
15812 * jit-icalls.c: call the type ctor on field access if needed.
15814 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
15816 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
15817 to a method (including results of ldelema, bug#43207).
15819 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
15821 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
15822 colors to show exception handler blocks.
15824 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
15825 (fix for pinvoke7.cs).
15827 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15829 * mini.h, mini.c: ensure correct initialization order for types that
15830 require it. Prepare for lazy compilation of jit icall wrappers.
15831 Provide a name for opcode emulation to reduce unneeded mallocing.
15833 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
15835 * mini-x86.c: better register restoring code and profiling
15836 support for tail calls.
15838 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15840 * mini.h, driver.c: prepare for leaf methods optimization.
15842 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
15844 * mini.c: get targets of branches before converting a method.
15846 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
15848 * mini.c (optimize_branches): added some experimental code (disbaled)
15850 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
15852 * mini.c (optimize_branches): fix branch to branch optimization
15854 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
15856 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
15858 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
15860 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
15863 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
15865 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
15866 enable use of interface variables again.
15868 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
15869 I1 to registers because there is no simply way to sign extend 8bit
15870 quantities in caller saved registers on x86.
15872 * inssel-float.brg: set costs of some rules to 2 so
15873 that monobure always select the arch. specific ones if supplied,
15874 regardless of the order we pass the files to monoburg.
15876 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
15878 * mini.c, mini-x86.c: since the magic trampoline for jumps
15879 can't patch the code directly, we do it as soon as the
15880 method gets compiled.
15882 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15884 * mini-x86.c, mini.h: introduce a new patching method
15885 to support CEE_JMP and tail calls.
15886 * mini.c: obey tail.call. Don't precompile methods target
15888 * tramp-x86.c: new trampoline code to handle methods
15889 reached through a jump.
15891 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
15893 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
15894 bit values to registers
15896 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
15898 * mini.c (mono_compile_get_interface_var): share interface
15899 variables if possible.
15901 2003-05-16 Martin Baulig <martin@ximian.com>
15903 * debug-mini.c (mono_init_debugger): New function to initialize
15904 the debugger. This is not in the debugger since it needs to
15905 access some of mini's internals.
15907 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
15909 * mini.c (mono_method_to_ir): inlining fixes/cleanups
15911 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
15913 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
15914 for value type handling.
15916 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
15918 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
15919 (mono_method_check_inlining): enable inlining of all kinds of wrappers
15921 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
15923 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
15924 the constructor through a proxy.
15926 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15928 * jit-icalls.c, inssel.brg: fixes to array element address
15931 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
15933 * mini-x86.c (is_regsize_var): allocate pointer to registers
15935 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15937 * driver.c: fixed typo, added intrins to the set of optimizations
15938 tested with regressions.
15940 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
15942 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
15943 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
15946 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
15948 * inssel.brg: remove some common pop instructions without side effects
15950 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15952 * inssel-x86.brg: fixed thinko in int to double conversions.
15954 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
15956 * mini.c, jit-icalls.c: added runtime thread-static variable support.
15958 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15960 * inssel-long32.brg: two more missing instructions.
15962 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
15964 * mini.c (mono_emit_call_args): set the cil_code for all arguments
15965 if not already set.
15967 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
15969 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
15972 * basic-float.cs: Added tests for negative zero.
15974 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15976 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
15977 a couple of missing operations for long casts, with test cases.
15979 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15981 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
15983 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
15985 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
15986 code size estimation.
15988 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
15990 * mini.c (mono_jit_create_remoting_trampoline): make it work with
15991 abstract methods (fix bug 42542)
15993 * aot.c: add ability to handle array types
15995 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
15997 * mini.c: Call the _specific versions of the object allocation
15998 functions if possible.
16000 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16002 * driver.c: call setlocale ().
16004 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16006 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16009 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
16011 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
16013 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
16014 wrappers (fix bug 42122)
16016 2003-05-04 Martin Baulig <martin@ximian.com>
16018 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
16020 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
16021 s/mini_set_defaults/mono_set_defaults/g.
16023 2003-05-04 Martin Baulig <martin@ximian.com>
16025 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
16027 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16029 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
16030 (reported by Don Roberts).
16032 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16034 * mini.c: temporarily work around two bugs for this release.
16036 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16038 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
16039 that contains -export-dynamic and it makes using the ld script
16041 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
16043 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16045 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
16048 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16050 * mini.c: make sure leave calls all the needed finally blocks,
16051 even when the target jumps out of multiple exception clauses.
16053 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16055 * ldscript, Makefile.am: add linker script to reduce the number of
16056 exported symbols (should also fix the issues with libwine defining
16057 some of the same symbols in io-layer).
16059 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
16061 * driver.c (mini_main): Avoid assertion when no file name is given on
16064 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
16066 * driver.c: added --version/-V command line option.
16067 Added the inline optimization in the regression tests.
16069 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16071 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
16072 to the type in the method signature (fixes bug#42134).
16074 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
16076 * mini.c: when inlining, check this is not null only when needed (bug #42135).
16078 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
16080 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
16082 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16084 * driver.c: fixed bug #42100.
16086 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
16088 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
16090 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16092 * mini.c: moved most of the code required to do inlining to its own
16093 function so it can be reused. Inline also ctors if appropriate.
16095 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
16097 * Makefile.am: Link with -export-dynamic so shared libs loaded by
16098 the runtime can call mono API functions.
16100 2003-04-27 Martin Baulig <martin@ximian.com>
16102 * debug-mini.c (mono_debug_init_method): Added
16103 `guint32 breakpoint_id' argument; if the method has a breakpoint,
16104 send a notification to the debugger.
16106 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
16107 running in the Mono Debugger, just pass the breakpoint number to
16108 mono_debug_init_method().
16110 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
16112 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
16114 * mini.c: allow some more unsafe compares.
16116 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16118 * mini-x86.c, Makefile.am: make distcheck works (partially from
16119 a patch by Richard Lee <r.h.lee@attbi.com>).
16120 * regset.c, regset.h: removed, they are unused.
16122 2003-04-25 Dick Porter <dick@ximian.com>
16124 * driver.c: Usage reports the name as 'mono' not 'mini'
16125 * exceptions-x86.c: Build and run on freebsd
16127 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
16129 * Makefile.am: install the program with the 'mono' name and
16130 the library as libmono instead of mini and libmini.
16132 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16134 * driver.c: provide the APIs for the embedding interface of the old jit.
16136 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
16138 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
16140 2003-04-23 Martin Baulig <martin@ximian.com>
16142 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
16144 * driver.c: Added `--debug' command line argument to enable
16147 2003-04-23 Martin Baulig <martin@ximian.com>
16149 * debug.[ch]: Removed. The code is now in
16150 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
16152 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
16155 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
16157 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
16159 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16162 (mini_cleanup): moved mono_runtime_cleanup call after the call to
16163 mono_domain_finalize.
16164 (mini_method_compile): use mono_method_profile* if the the option is
16167 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
16169 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16170 methods with their wrapper.
16172 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16173 methods with their wrapper.
16175 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
16178 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
16181 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
16184 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
16186 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
16188 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
16190 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
16191 of the mempool. This is slightly faster and uses less memory
16193 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16195 * mini.c: avoid O(n) allocation for variables.
16197 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16199 * mini.c: handle items on the stack after inlining methods.
16201 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16203 * mini.c: make the method->opcode optimization dependent
16204 on MONO_OPT_INSTRINS and do it lazily.
16206 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16208 * driver.c: print overall results at the end of regression run.
16210 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16212 * inssel.brg: don't overwrite symbolic registers.
16214 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16216 * inssel-x86.brg: fix conversion from long to float.
16218 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
16220 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
16222 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
16224 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
16226 * driver.c: Added --print-vtable option as in the old JIT.
16228 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16230 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
16232 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16234 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
16236 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
16238 * mini.c regalloc.c regalloc.h: Fix memory leak.
16240 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
16242 * aot.c (mono_aot_get_method): register all used strings
16244 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16246 * mini.c: always intern strings references with ldstr at compile time.
16248 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16250 * Makefile.am: add BUILT_SOURCES.
16252 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16254 * driver.c: give a better error message when the assembly to execute
16255 doesn't have an entry point.
16257 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
16259 * Makefile.am: added hack for automake
16261 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
16264 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
16266 22003-04-07 Martin Baulig <martin@ximian.com>
16268 * Makefile.am: Added Makefile.am.
16270 * debugger-main.c: Removed, this is now in the debugger where it
16273 * mini.pc.in: Call this package `mini' for the moment.