1 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
3 * basic-simd.cs: Tests for new methods in Vector8us.
5 2008-10-20 Rodrigo Kumpera <rkumpera@novell.com>
7 * mini-ops.h: Add multiply and store high.
11 * mini-x86.c (mono_arch_output_basic_block): Same.
13 * simd-methods.h: Same.
15 * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
18 2008-10-19 Zoltan Varga <vargaz@gmail.com>
20 * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
21 mono_class_setup_vtable ().
23 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
24 mono_class_get_vtable_entry () for accessing klass->vtable.
26 * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
28 * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
31 * method-to-ir.c (mono_save_token_info): Don't save references made from
34 * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
37 * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
39 2008-10-19 Mark Probst <mark.probst@gmail.com>
41 * cpu-ppc.md, mini-ppc.c: The length of the code generated for
42 OP_JMP depends on the method signature. Calculate it properly.
44 2008-10-19 Zoltan Varga <vargaz@gmail.com>
46 * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
49 * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
51 (emit_extra_methods): Add another table mapping method indexes to
52 offsets in the extra_method_info table.
54 * mini.h: Bump AOT file format version.
56 * aot-runtime.c: Merge most of the code from mono_aot_get_method
57 and mono_aot_get_method_from_token () into one function.
59 2008-10-19 Mark Probst <mark.probst@gmail.com>
61 * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
64 2008-10-18 Zoltan Varga <vargaz@gmail.com>
66 * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
69 * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
72 * mini.c (mono_patch_info_equal): Compare the generic context as well.
74 * mini.h: Bump aot file format version.
76 * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
77 AOT file can contain native code for methods which are not in the METHOD
78 table. Generate code for non-sharable generic instances of generic methods
79 found in the METHODSPEC table.
81 * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
82 encoding generic type handles.
84 * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
85 (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
87 * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
88 macros + MONO_ADD_INS.
90 * mini.c (mono_jump_info_token_new2): New function which takes a generic
93 * mini.h (MonoJumpInfoToken): Include fields for a generic context.
95 * mini.h: Bump aot file format version.
97 * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
99 2008-10-17 Mark Probst <mark.probst@gmail.com>
101 * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
102 platforms, with definable stack alignment value. Set to 16 now
105 * mini.c, mini.h, driver.c: Command line option for disabling
108 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
110 * basic-simd.cs: Tests for new methods in Vector4ui.
112 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
114 * mini-ops.h: Add packed int shuffle.
118 * mini-x86.c (mono_arch_output_basic_block): Same.
120 * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
121 extract mask, max, min, shuffle.
123 * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
125 2008-10-17 Rodrigo Kumpera <rkumpera@novell.com>
127 * basic-simd.cs: Tests for new methods in Vector8us.
129 2008-10-17 Mark Probst <mark.probst@gmail.com>
131 * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
132 RuntimeTypeHandle, not a TypedReference.
134 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
136 * simd-intrinsics.c: remove relocations.
138 2008-10-17 Zoltan Varga <vargaz@gmail.com>
140 * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM
141 optimizations from the x86 backend.
143 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
145 * simd-methods.h, simd-intrinsics.c: debloat method names and
146 prepare for no relocations.
148 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
150 * mini-ops.h: Add packed min/equal and sum of absolute differences.
154 * mini-x86.c (mono_arch_output_basic_block): Same.
156 * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
157 extract mask, max, min and sum of absolute differences.
159 * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
162 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
164 * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
165 Renamed one test for consistency.
167 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
169 * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
170 fix to the code that deal with other blocks.
172 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
174 * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
176 2008-10-16 Rodrigo Kumpera <rkumpera@novell.com>
178 * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
179 that deals with vreg interference. Explicitly check for OP_LDADDR to be
180 able to process the source reg.
182 2008-10-16 Martin Baulig <martin@ximian.com>
184 * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
186 * inssel.brg: Add `OP_HARD_NOP'.
188 * mini.h (MonoCompile): Added `keep_cil_nops' flag.
190 * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
191 `OP_HARD_NOP' instruction when running inside the debugger.
193 * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
194 `OP_HARD_NOP' instruction when running inside the debugger.
196 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
198 * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
199 now works. The issue with the regalloc tripping up no longer
202 * simd-intrinsics.c (load_simd_vreg): Same.
204 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
206 * basic-simd.cs: Tests for new Vector8ui methods.
208 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
210 * simd-intrinsics.c (get_simd_vreg): Simplify code and test
211 only for type. This fixes crashes where MonoInst::klass is checked
212 for ops of type != VTYPE or OBJ.
214 * simd-intrinsics.c (load_simd_vreg): Same.
216 2008-10-15 Rodrigo Kumpera <rkumpera@novell.com>
218 * mini-ops.h: Add ops for packed shuffle/max/avg and
223 * mini-x86.c (mono_arch_output_basic_block): Same.
225 * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
228 * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
229 to emit extract mask op.
231 * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
232 to emit word shuffles.
234 2008-10-15 Mark Probst <mark.probst@gmail.com>
236 * mini.c (mono_allocate_stack_slots_full): Align stack frame to
237 the largest alignment needed by a variable, but at least
240 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
242 * basic-simd.cs: Tests for the fixes in the last commit.
244 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
246 * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
247 no longer handles STACK_PTR input.
249 * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
251 * simd-intrinsics.c (load_simd_vreg): New function that works like
252 get_simd_vreg but handles STACK_PTR input.
254 * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
255 as the input can be an arbitrary pointer.
257 * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
258 LDADDR local optimization directly otherwise use a store op.
260 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
262 * basic-simd.cs: Tests for dup low and dup high.
264 2008-10-14 Rodrigo Kumpera <rkumpera@novell.com>
266 * mini-ops.h: Add dup low and dup high ops.
270 * mini-x86.c (mono_arch_output_basic_block): Same.
272 * simd-intrinsics.c (vector4f_intrinsics): Same.
274 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
276 * basic-simd.cs: Tests for recently added functionality.
278 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
280 * mini-ops.h: Add remaining sse1 fp ops.
282 * cpu-x86.md: Add remaining sse1 fp ops.
284 * mini-x86.c (mono_arch_output_basic_block): Same.
286 * mini.h: Add enum for simd FP compare conditions.
288 * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
290 * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
291 so the backed can generate the appropriate op.
293 2008-10-13 Rodrigo Kumpera <rkumpera@novell.com>
294 This patch squeese one more byte from the SimdIntrinsc struct.
296 * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
297 a a shift amount intead of simply or'ing it.
299 * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
301 * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
302 byte so we can have an aditional flags field without increasing struct size.
304 * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
305 against the simd_supported_versions bitmask.
307 * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
309 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
311 * mini.c: remove rawbuffer code (the only use here is unsafe because
312 it takes locks during signal handling and the kernel now provides much
313 better info in proc/pid/smaps these days).
315 2008-10-13 Zoltan Varga <vargaz@gmail.com>
317 * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
318 OP_X86_PUSH_OBJ. Fixes #434620.
320 * objects.cs: Add a test.
322 2008-10-12 Rodrigo Kumpera <rkumpera@novell.com>
324 * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
325 that the packuswb/packusdw don't work with unsigned numbers for what
326 would be negative numbers in signed format.
328 * cpu-x86.md: Add doubleword forms of many ops and packing ones.
329 Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
331 * mini-ops.h: Add doubleword forms of many ops and packing ones.
333 * mini-x86.c: Emit doubleword forms of many ops and packing ones.
335 * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
337 * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
339 * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
342 * simd-intrinsics.c (simd_version_name): New function, returns the name of the
343 version as the enum in mini.h.
345 * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
346 for sse3 ops, check the simd_version field if present. This way the code
347 works with all versions of sse.
349 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
351 * simd-intrinsics.c: Fixed intrinsic name typo.
353 * mini.h: Added missing simd exported function.
355 * basic-simd.cs: Added tests for Vector4ui.
356 Fixed broken test for Vector16b.
358 2008-10-10 Zoltan Varga <vargaz@gmail.com>
360 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
361 the max length to 64.
363 2008-10-10 Mark Probst <mark.probst@gmail.com>
365 * method-to-ir.c: Only do the fast virtual generic method call for
368 * mini.h, mini-trampolines.c: The new generic virtual remoting
369 trampoline handles virtual method calls via the vtable (as done by
370 the fast virtual generic method calls) to remoting proxies.
372 * mini.c (mono_jit_create_remoting_trampoline): For generic
373 methods reate a generic virtual remoting trampoline.
375 * mini-amd64.h: Enable fast virtual generic method calls again.
377 2008-10-10 Mark Probst <mark.probst@gmail.com>
379 * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
380 restore registers when doing tail calls.
382 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
384 * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
387 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
389 * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
391 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
393 * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
395 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
397 * basic-simd.cs: Retrofit for API changes.
399 2008-10-10 Mark Probst <mark.probst@gmail.com>
401 * mini-ppc.c: Handle integer stack arguments for tail calls.
403 2008-10-10 Rodrigo Kumpera <rkumpera@novell.com>
405 * optflags-def.h: Removed sse3 optimization.
409 * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
412 * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
414 * mini.h: Added enumeration with simd versions.
416 * simd-intrinsics.c (emit_intrinsics): Use the new static var
419 * simd-intrinsics.c: Added mono_simd_intrinsics_init.
421 * mini.c (mini_init): Call mono_simd_intrinsics_init.
423 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
425 * basic-simd.cs: Added tests for Vector8u and Vector16u.
427 * basic-simd.cs: Fixed test naming.
429 2008-10-09 Rodrigo Kumpera <rkumpera@novell.com>
431 * mini-ops.h: Added ops for packed and saturated math, shifts
432 and packing/unpacking.
434 * cpu-x86.md: Added descriptors for the above ops.
436 * mini-x86.c: Added code to emmit the above ops.
438 * simd-intrinsics.c: Added support for Vector16u and Vector8u.
440 2008-10-08 Zoltan Varga <vargaz@gmail.com>
442 * aot-compiler.c (compile_method): Enable AOT for generic code.
444 * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
446 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
448 * mini.c: add a workaround for a common screwup that ends up blamed
449 to mono (other processes blocking signal delivery).
451 2008-10-07 Zoltan Varga <vargaz@gmail.com>
453 * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
454 in the LDFLD/STFLD opcodes. Fixes #432673.
456 * iltests.il.in: Add a new test.
458 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
460 * mini-arm.c: attach the thread in unmanaged->managed transitions
461 using delegates (bug #433148).
463 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
465 * basic-simd.cs: Use new ShuffleSel constants.
467 2008-10-07 Rodrigo Kumpera <rkumpera@novell.com>
469 * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
471 * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
472 only disable simd intrinsics if no sse2 is detected.
474 * optflags-def.h: Added sse3.
476 * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
479 2008-10-07 Zoltan Varga <vargaz@gmail.com>
481 * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
482 when adding delegate-invoke wrappers.
484 2008-10-07 Zoltan Varga <vargaz@gmail.com>
486 * Makefile.am: Reenable the simd tests.
488 2008-10-07 Bill Holmes <billholmes54@gmail.com>
490 * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
491 add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
492 other vreg is allocated to that hreg.
494 Contributed under MIT/X11 license.
496 2008-10-07 Zoltan Varga <vargaz@gmail.com>
498 * Makefile.am: Disable the simd tests for now as Mono.Simd is not
501 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
503 * basic-simd.cs: New test suite for SIMD intrinsics.
505 * Makefile.am: Added new tests.
507 2008-10-06 Rodrigo Kumpera <rkumpera@novell.com>
509 * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
513 * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
515 * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
516 using SSE2 aware opcodes.
518 * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
519 is enabled, this code path is only reachable if conversion ops are emmited after
522 * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
524 This optimization saves 6 bytes per conversion against the old version.
526 2008-10-06 Zoltan Varga <vargaz@gmail.com>
528 * aot-compiler.c (compile_method): Don't skip methods referencing
529 generic methods without a corresponding entry in token_info_hash, since
530 encode_method_ref () can handle all generic methods now.
532 * method-to-ir.c (mono_save_token_info): Don't save the token info if a
533 generic context is set.
535 * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
536 generic sharing of LDTOKEN.
538 2008-10-06 Mark Probst <mark.probst@gmail.com>
540 * mini-amd64.h: Temporarily disabled fast virtual generic method
541 calls because it breaks the System.Runtime.Remoting tests.
543 2008-10-06 Zoltan Varga <vargaz@gmail.com>
545 * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
547 * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
548 so inlining actually works.
549 (check_inline_caller_method_name_limit): Ditto.
551 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
553 * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
554 64 bit safety (from Olaf Hering and Andreas Färber).
556 2008-10-06 Zoltan Varga <vargaz@gmail.com>
558 * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
559 mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
560 unused virtual call support code.
562 * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
564 * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
565 which can't use aot trampolines.
566 (decode_patch): Don't create aot trampolines for methods which can't use
569 * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
572 * mini.h: Bump AOT image format version.
574 2008-10-05 Zoltan Varga <vargaz@gmail.com>
576 * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
577 to save_token_info () since cmethod is inflated for constrained calls.
579 * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
581 2008-10-04 Andreas Färber <andreas.faerber@web.de>
583 * Makefile.am: Add build rules for ppc64.
584 This avoids the build failing at pedump with unresolved symbols
585 due to lack of arch_sources. Instead it will now fail earlier
586 due to lack of cpu-ppc64.md.
588 Contributed under MIT/X11 license.
590 2008-10-04 Mark Probst <mark.probst@gmail.com>
592 * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
595 * iltests.il.in: Add test case for tail call with many arguments.
597 2008-10-03 Zoltan Varga <vargaz@gmail.com>
599 * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
600 to the fast virtual generic method code until the aot case is fixed.
602 2008-10-03 Mark Probst <mark.probst@gmail.com>
604 * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
606 2008-10-03 Mark Probst <mark.probst@gmail.com>
608 * mini-amd64.c, mini-amd64.h: Implement generic virtual method
611 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
613 * simd-intrinsics.c: Forgot to add this one.
615 * mini-codegen.c: Fix macro in case SIMD is not supported.
617 2008-10-03 Rodrigo Kumpera <rkumpera@novell.com>
619 This patch land initial JIT support for simd intrinsics.
621 * mini-x86.h: Added new define to make --enable_minimal work on x86.
623 * Makefile.am: Added simd-intrinsics.c
625 * simd-intrinsics.c: New file with simd instrinsic related
628 * cfold.c (mono_constant_fold_ins2): Fold XZERO.
630 * cpu-x86.md: Add simd related instructions.
632 * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
634 * driver.c: Added two new --regression variants.
636 * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
638 * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
640 * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
641 extract some complicated logic to helper functions.
643 * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
645 * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
647 * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
648 the specialized simplification pass.
650 * method-to-ir.c (mono_spill_global_vars): Use new macro.
652 * mini-codegen.c: Added SIMD constants to all regbanks arrays.
654 * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
657 * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
658 if MONO_ARCH_NEED_SIMD_BANK is defined.
660 * mini-ops.h: Added the new simd ops.
662 * mini-x86.c: Added mono_arch_xregname.
664 * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
666 * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
668 * mini-x86.h: Define simd related MONO_ARCH macros.
670 * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
672 * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
674 * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
675 MONO_CLASS_IS_SIMD to deal with simd related IR.
677 * mini.h (MonoInst): Added spill_var to the backend union.
679 * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
681 * mini.h: Added forward declarations of the new simd fuctions.
683 * optflags-def.h: Added new optimization names SIMD.
685 * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
687 * regalloc.h: Added support for working with 3 register banks.
689 * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
691 * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
693 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
695 * mini-exceptions.c: remove 64 bit related ifdef clutter.
697 2008-10-03 Zoltan Varga <vargaz@gmail.com>
699 * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
700 instead of one on 64 bit systems.
702 * method-to-ir.c: Remove unused includes.
704 2008-10-02 Zoltan Varga <vargaz@gmail.com>
706 * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
707 cfg->used_int_regs, since the two are different on arm.
709 2008-10-02 Mark Probst <mark.probst@gmail.com>
711 * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
712 mono_method_get_vtable_index() to get the vtable index.
714 2008-10-02 Mark Probst <mark.probst@gmail.com>
716 * method-to-ir.c (mono_method_to_ir2): Don't create native
717 wrappers for array methods, because they're never called (and if
718 they were called they wouldn't work).
720 2008-10-02 Mark Probst <mark.probst@gmail.com>
722 * method-to-ir.c (mono_method_to_ir2): Array methods are
723 special-cased and must not be invoked indirectly via the (M)RGCTX
724 when generic sharing is turned on. Fixes #431413.
726 2008-10-01 Mark Probst <mark.probst@gmail.com>
728 * method-to-ir.c: When generic sharing is active, call
729 non-interface virtual generic methods via the standard trampoline.
731 * mini-trampolines.c: Handle virtual generic shared methods.
733 * mini.h, mini-x86.c, mini-x86.h: New argument for
734 mono_arch_build_imt_thunk() which is non-NULL for virtual generic
735 method thunks and which is the trampoline to call if the lookup
736 fails. Enable the virtual generic method thunk for x86.
738 * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
739 mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
740 argument but assert that it's NULL, because these archs don't yet
741 implement the virtual generic method thunk. Changes in the IMT
742 thunk data structures.
744 2008-10-01 Zoltan Varga <vargaz@gmail.com>
746 * aot-compiler.c (emit_globals): Avoid invalid characters in
747 the static linking symbol.
749 * objects.cs: Add a test for the range check optimization. Fix warnings.
751 * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
752 optimization from the current JIT.
754 * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
755 later in decompose_array_access_opts () to allow more optimizations.
757 * method-to-ir.c (mono_handle_soft_float): Rename this to
758 mono_decompose_soft_float () for consistency.
760 * mini-ops.h: Fix arguments of OP_STRLEN.
762 * method-to-ir.c (save_cast_details): Extract the cast details saving code
763 into a separate function.
764 (reset_cast_details): Ditto.
765 (handle_unbox): Save cast details. Fixes #431254.
767 * method-to-ir.c: Remove some obsolete FIXMEs.
769 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
771 * ir-emit.h (alloc_dreg): Write a warning before crashing.
773 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
775 * mini-codegen.c: More work on macros to make them
776 ready for multiple regbanks.
778 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
780 * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
782 * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
784 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
786 * mini-codegen.c (mono_spillvar_offset): Proper support for
789 2008-09-30 Zoltan Varga <vargaz@gmail.com>
791 * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
792 the stack overflow changes.
794 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
796 * mini-codegen.c: Make all bank macros depend on reg_bank.
798 * mini-codegen.c (mono_local_regalloc): Make free mask
799 initialization regbank aware.
801 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
803 * mini-codegen.c (mono_local_regalloc): Extract callee
804 mask selection to a function and make it regbank aware.
806 2008-09-30 Rodrigo Kumpera <rkumpera@novell.com>
808 * mini-codegen.c (mono_local_regalloc): Changed the cloberring
809 code to deal with many regbanks.
811 2008-09-30 Zoltan Varga <vargaz@gmail.com>
813 * mini-codegen.c: More fp->regbank changes.
815 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
817 * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
818 of a hardcoded constant.
820 2008-09-29 Rodrigo Kumpera <rkumpera@novell.com>
822 * method-to-ir.c (type_from_stack_type): Fix typo.
824 2008-09-29 Zoltan Varga <vargaz@gmail.com>
826 * mini-ia64.c (emit_move_return_value): Convert float return values to
829 * objects.cs: Add a new test.
831 * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
832 VARARG methods to fix an assert later.
834 * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
835 end so it at least compiles.
837 2008-09-28 Zoltan Varga <vargaz@gmail.com>
839 * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
841 2008-09-28 Rodrigo Kumpera <rkumpera@novell.com>
843 * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
844 optimization to a new function (emit_optimized_ldloca_ir) and enable
845 it for both ldloca and ldloca_s.
847 2008-09-28 Zoltan Varga <vargaz@gmail.com>
849 * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
850 gshared CASTCLASS code.
852 * driver.c (mono_main): Add a workaround for shutdown crashes seen on
853 amd64, where the libc stack unwinder encounters stack frames referring to
854 native code in unmapped memory.
856 * method-to-ir.c (mini_emit_check_array_type): Add support for generic
859 * generics.cs: Add new test.
861 2008-09-27 Zoltan Varga <vargaz@gmail.com>
863 * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
864 add a check that one of the ARM_FPU_ constants is defined.
866 * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
868 * mini-exceptions.c: Fix build on non-altstack platforms.
870 * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
873 * ir-emit.h: Add a comment to NEW_PCONST.
875 * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
877 * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
879 * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
880 after the changes to MonoJitDomainInfo.
882 2008-09-27 Mark Probst <mark.probst@gmail.com>
884 * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
886 2008-09-27 Mark Probst <mark.probst@gmail.com>
888 * mini-ppc.c: Compiler warning fixes.
890 2008-09-27 Mark Probst <mark.probst@gmail.com>
892 * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
895 2008-09-27 Mark Probst <mark.probst@gmail.com>
897 * exceptions-ppc.c, mini-ppc.h: Compile
898 mono_arch_handle_altstack_exception() on Darwin, too.
900 2008-09-27 Mark Probst <mark.probst@gmail.com>
902 * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
903 work on archs which don't have generic sharing implemented, only
904 without the vtable_arg.
906 2008-09-26 Mark Probst <mark.probst@gmail.com>
908 * mini.c: Added comment explaining why delegate ctor icall
909 wrappers are compiled.
911 2008-09-26 Mark Probst <mark.probst@gmail.com>
913 * mini.c: Don't produce trampolines to delegate ctor icall
914 wrappers but compile them upfront.
916 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
918 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
919 runtime-set function when going back to managed code. Currently this
920 is used to set back the protection on the soft ovf pages and/or to
921 throw the stack overflow exception that happened in unmanaged code.
923 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
925 * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
926 runtime-set function when going back to managed code. Currently this
927 is used to set back the protection on the soft ovf pages and/or to
928 throw the stack overflow exception that happened in unmanaged code.
930 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
932 * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
933 the support code for restoring stack protection after stack overflows
934 that happen in unmanaged code. Don't set the exec permission on the
937 2008-09-26 Zoltan Varga <vargaz@gmail.com>
939 * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
940 delegate->method_ptr is set. Fixes #428054.
942 2008-09-25 Zoltan Varga <vargaz@gmail.com>
944 * tests.cs: Rename to ratests.cs.
946 * method-to-ir.c: Merge the emit_get_rgctx () calls into the
947 emit_get_rgctx_... functions.
949 2008-09-25 Mark Probst <mark.probst@gmail.com>
951 * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
953 2008-09-25 Mark Probst <mark.probst@gmail.com>
955 * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
956 before asserting that method is sharable.
958 2008-09-25 Mark Probst <mark.probst@gmail.com>
960 * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
961 whether method needs a static RGCTX wrapper used instead of
964 * generic-sharing.c, mini.h: A few functions moved to
965 metadata/generic-sharing.c.
967 2008-09-25 Mark Probst <mark.probst@gmail.com>
969 * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
970 Generic code sharing for value types, which essentially means
971 treating value type methods like static methods. The RGCTX is
972 passed in the same way.
974 2008-09-25 Zoltan Varga <vargaz@gmail.com>
976 * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
977 opcode when creating multi-dimensional arrays of open types.
979 * generic-sharing.c (mono_method_check_context_used): Handle arrays of
982 * generics.cs: Add a test.
984 * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
986 2008-09-24 Zoltan Varga <vargaz@gmail.com>
988 * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
990 * mini.c (mini_method_compile): Set it when running under the debugger.
992 * method-to-ir.c (mono_handle_global_vregs): Disable global->local
993 vreg optimization if the flag is set.
995 * driver.c (mono_main): Add --attach= option to pass options to
998 * mini.c (sigquit_signal_handler): Start the attach agent.
1000 * ssapre.c: Disable this to save space since it is not yet ported to
1003 * regalloc2.c: Disable this to save space.
1005 * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1007 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1009 * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1010 the -v option useful again.
1012 2008-09-24 Zoltan Varga <vargaz@gmail.com>
1014 * mini-amd64.c (mono_arch_output_basic_block): Add support for
1017 * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1018 arrays of arrays. Fixes #428406.
1020 * method-to-ir.c (mini_emit_castclass): Ditto.
1022 * objects.cs: Add new test.
1024 2008-09-23 Rodrigo Kumpera <rkumpera@novell.com>
1026 * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1027 was wrong at it choked against target_type_is_incompatible for byref types.
1029 2008-09-23 Zoltan Varga <vargaz@gmail.com>
1031 * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most
1034 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1036 * mini-exceptions.c: update a few more exceptions-related counters.
1038 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1040 * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1041 new functions to allocate from persistent mempools.
1043 2008-09-23 Zoltan Varga <vargaz@gmail.com>
1045 * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow
1046 multiple register banks in the future.
1048 * mini-codegen.c (mono_local_regalloc): Fix a warning.
1050 2008-09-22 Rodrigo Kumpera <rkumpera@novell.com>
1052 * mini.c (type_to_eval_stack_type): Remove duplicated function.
1054 * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1056 * mini.h: Export type_to_eval_stack_type.
1058 This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1059 is only ins->klass of byref types.
1061 2008-09-22 Zoltan Varga <vargaz@gmail.com>
1063 * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
1064 (mini_emit_memcpy2): Ditto.
1066 * mini-amd64.c: Fix a warning.
1068 2008-09-21 Mark Probst <mark.probst@gmail.com>
1070 * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
1073 2008-09-19 Rodrigo Kumpera <rkumpera@novell.com>
1075 * method-to-ir.c: Extract stloc micro-optimization to a
1076 function and apply it to all cases.
1078 2008-09-19 Mark Probst <mark.probst@gmail.com>
1080 * method-to-ir.c: Don't fail generic code sharing in cases we
1083 2008-09-18 Mark Probst <mark.probst@gmail.com>
1085 * mini-ppc.c: Handle structs in tailcalls on Darwin.
1087 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1089 * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
1092 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
1094 * trace.c: make tracing more useful and correct, with per-thread
1097 2008-09-15 Mark Probst <mark.probst@gmail.com>
1099 * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
1100 doing a method call and the argument is an R4.
1102 2008-09-14 Zoltan Varga <vargaz@gmail.com>
1104 * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
1107 2008-09-13 Mark Probst <mark.probst@gmail.com>
1109 * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
1111 2008-09-12 Zoltan Varga <vargaz@gmail.com>
1113 * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
1114 (MONO_JUMP_TABLE_FROM_INS): Ditto.
1116 2008-09-11 Zoltan Varga <vargaz@gmail.com>
1118 * driver.c: Add a --agent argument (not supported yet) to load managed
1119 agent assemblies before loading the main assembly, similarly to how the
1120 Java VM handles agents.
1122 2008-09-11 Mark Probst <mark.probst@gmail.com>
1124 * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1125 function to do stack layout of local variables.
1127 2008-09-11 Mark Probst <mark.probst@gmail.com>
1129 * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1132 2008-09-11 Zoltan Varga <vargaz@gmail.com>
1134 * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1135 abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1136 JIT if DISABLE_JIT is defined.
1138 * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1141 2008-09-10 Mark Probst <mark.probst@gmail.com>
1143 * iltests.il.in: Disable the fconv test on PPC (the result is
1144 undefined according to ECMA).
1146 2008-09-10 Mark Probst <mark.probst@gmail.com>
1148 * iltests.il.in: Enable tail call tests for PPC.
1150 * mini.h: Add variable for storing incoming valuetype argument
1151 addresses for tail calls.
1153 * mini-ppc.c: Implement valuetype arguments and return values for
1156 2008-09-09 Mark Probst <mark.probst@gmail.com>
1158 * mini-ppc.c: Partially implement tail calls (struct arguments and
1159 return values not supported).
1161 * method-to-ir.c: Enable tail calls on PPC.
1163 2008-09-08 Zoltan Varga <vargaz@gmail.com>
1165 * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1166 runtime-invoke wrappers to work around the problem of them getting
1167 assigned to a random class.
1169 * aot-runtime.c (mono_aot_get_method): Ditto.
1171 2008-09-07 Zoltan Varga <vargaz@gmail.com>
1173 * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1174 the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1176 2008-09-07 Mark Probst <mark.probst@gmail.com>
1178 * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1179 until they're implemented properly.
1181 * exceptions-ppc.c: Use arch-independent exception-handling code
1182 instead of custom one.
1184 * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1187 * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1189 * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1190 applies when __powerpc__ is defined.
1192 2008-09-06 Zoltan Varga <vargaz@gmail.com>
1194 * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1195 methods to their code to avoid computing the full name of wrappers and
1196 doing a lookup in a string hash table.
1198 2008-09-05 Zoltan Varga <vargaz@gmail.com>
1200 * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1201 we identify bblocks before method_to_ir () is ran.
1203 * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1204 Also avoid optimizing branches pointing to themselves.
1206 * mini.c (mini_method_compile): Ditto. Fixes #422947.
1208 2008-09-05 Rodrigo Kumpera <rkumpera@novell.com>
1210 * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1212 2008-09-05 Zoltan Varga <vargaz@gmail.com>
1214 * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1215 (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1216 (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1219 * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all
1220 jumped to the same entry in plt_jump_table.
1222 2008-09-02 Rodrigo Kumpera <rkumpera@novell.com>
1224 * method-to-ir.c (initialize_array_data): Handle field with RVA from
1227 2008-08-31 Zoltan Varga <vargaz@gmail.com>
1229 * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1230 other assignment can be if converted. Saves 1.5% on corlib size and fixes
1233 2008-08-29 Geoff Norton <gnorton@novell.com>
1235 * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1236 segment, and doesn't properly handle .space as .text. Fixes
1239 2008-08-29 Geoff Norton <gnorton@novell.com>
1241 * mini.c: Disable the mach exception handler when running on
1244 2008-08-29 Geoff Norton <gnorton@novell.com>
1246 * aot-compiler.c: Patch from Renaldas Zioma to properly register
1247 globals on Darwin/ARM
1249 2008-08-28 Zoltan Varga <vargaz@gmail.com>
1251 * mini.c: Avoid not initializing the runtime when doing AOT compilation,
1252 since too many things depend on it. Instead, call
1253 mono_runtime_set_no_exec ().
1255 * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1258 * aot-compiler.c: Add an 'asm-only' AOT option.
1260 * mini.c: Avoid initializing the runtime when doing AOT compilation.
1262 * aot-compiler.c (compile_method): Disable gshared support for now as it
1265 2008-08-27 Bill Holmes <billholmes54@gmail.com>
1267 * mini-amd64.h : Fix a compiler warning.
1269 * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1270 Changed to use a callback function to retrieve the unwind info.
1271 This avoids problems observed when code blocks were removed by
1272 unloading an app domain.
1274 * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole
1275 and branch excludes for Winx64. The fix in exceptions-amd64.c allows them
1278 Contributed under MIT/X11 license.
1280 2008-08-27 Bill Holmes <billholmes54@gmail.com>
1282 * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
1283 case to keep the stack aligned to 8.
1285 Contributed under MIT/X11 license.
1287 2008-08-26 Zoltan Varga <vargaz@gmail.com>
1289 * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
1290 avoid repeated linear searches.
1292 2008-08-25 Zoltan Varga <vargaz@gmail.com>
1294 * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
1295 methods it can't handle.
1297 * aot-compiler.c (add_method): Avoid adding a method twice.
1298 (add_wrappers): Add runtime invoke wrappers for all methods.
1300 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
1301 function to create an aot-compatible version of this trampoline.
1303 * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
1305 2008-08-24 Zoltan Varga <vargaz@gmail.com>
1307 * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
1309 * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
1310 with a generic sharing failure.
1312 * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
1314 * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
1315 CEE_RETHROW. Fixes #419634.
1317 * mini.c (mono_method_to_ir): Ditto.
1319 * exceptions.cs: Add a new test.
1321 * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
1322 to mono_type_stack_size_internal () since some callers might not pass in
1325 * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
1326 instrument_prolog. Fixes #419878.
1328 * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
1329 doubles in soft float mode volatile.
1331 2008-08-23 Zoltan Varga <vargaz@gmail.com>
1333 * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
1335 * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
1336 to handle soft float correctly.
1338 * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
1341 * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
1343 * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
1344 to sp, since the generics catch code requires it.
1346 * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
1349 * method-to-ir.c (emit_imt_argument): Pass imt_arg to
1350 mono_arch_emit_imt_argument ().
1352 * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
1354 * mini-arm.c tramp-arm.c: Generic sharing updates.
1356 2008-08-22 Zoltan Varga <vargaz@gmail.com>
1358 * mini-arm.c: Fix the arm build.
1360 * generic-sharing.c (mini_type_get_underlying_type): New helper function
1361 handling enums, generic instances and generic sharing.
1362 (mini_type_stack_size_full): Ditto.
1364 * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
1366 * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
1368 * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
1370 * tramp-arm.c: Implement the rgctx fetch and the generic class init
1373 * mini-arm.c: Various small generic sharing changes.
1375 * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
1377 (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
1380 * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
1381 helper function to return a generic class init trampoline.
1383 * method-to-ir.c mini.c: Use it.
1385 * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
1386 arch-specfic function to return a generic class init trampoline.
1388 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
1389 the GENERIC_CLASS_INIT custom code.
1391 * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
1392 a fatal error, not a sharing failure.
1394 * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
1397 * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
1398 trampoline argument from MONO_ARCH_VTABLE_REG.
1400 * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1401 order of the arguments to the C trampoline: pass 'slot' as the trampoline
1402 argument, and pass the vtable in VTABLE_REG.
1404 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1405 order of the arguments to the C trampoline: pass 'slot' as the trampoline
1406 argument, and pass the vtable in VTABLE_REG.
1407 (mono_arch_create_trampoline_code_full): Remove some special casing for
1408 the rgctx fetch trampoline.
1410 * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
1413 * iltests.il: Add a test for it.
1415 2008-08-21 Zoltan Varga <vargaz@gmail.com>
1417 * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
1419 * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
1422 * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
1423 use mono_jit_info_table_find () to avoid recursion.
1424 (mono_delegate_trampoline): Add a sync wrapper here.
1426 * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
1429 * mini.c (mono_method_to_ir): Ditto.
1431 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
1432 add_sync_wrapper argument. Don't add a sync wrapper here.
1433 (mono_create_jump_trampoline): Don't add a sync wrapper here.
1435 * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
1437 2008-08-20 Bill Holmes <billholmes54@gmail.com>
1439 * exceptions-amd64.c (seh_handler): For Winx64 adding missing copy
1440 of nonvolatile registers back from MonoContext to CONTEXT.
1442 Contributed under MIT/X11 license.
1444 2008-08-20 Bill Holmes <billholmes54@gmail.com>
1446 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): When shifting the
1447 arguments on Winx64 there are only 4 argument registers. For this
1448 logic to work the last argument must be pulled from the stack.
1450 Contributed under MIT/X11 license.
1452 2008-08-20 Zoltan Varga <vargaz@gmail.com>
1454 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1456 * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
1457 MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
1458 encode/decode_method_ref ().
1460 * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
1462 * aot-runtime.c (decode_patch): Ditto.
1464 * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
1465 MONO_PATCH_INFO_METHOD.
1467 * aot-runtime.c (decode_exception_debug_info): Decode the contents of
1470 * aot-compiler.c (emit_exception_debug_info): Emit the contents of
1473 * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
1475 * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
1476 one from the caller.
1478 * aot-runtime.c (decode_generic_inst): New function to decode and
1479 return a interned generic inst.
1480 (decode_klass_ref): Use it.
1481 (decode_method_ref): Ditto.
1483 * aot-compiler.c (emit_exception_debug_info): Save
1484 jinfo->has_generic_jit_info too.
1486 2008-08-19 Zoltan Varga <vargaz@gmail.com>
1488 * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
1490 * iltests.il.in: Add a test for fconv_to_i.
1492 * liveness.c: Disable the liveness2 pass for now to save space.
1494 * regalloc2.c: Include mempool-internals.h to fix warnings.
1496 * aot-compiler.c (encode_method_ref): Encode the context of generic
1499 * aot-runtime.c (decode_method_ref): Inflate generic methods using
1500 the context saved in the aot file.
1502 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1504 * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
1506 * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
1507 volatile so they won't be optimized away.
1509 2008-08-19 Rodrigo Kumpera <rkumpera@novell.com>
1515 * dominators.c: Remove duplicated functions that now are in
1516 mempool-internals.h.
1518 2008-08-19 Zoltan Varga <vargaz@gmail.com>
1520 * aot-compiler.c: Fix warnings.
1522 * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
1524 * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
1526 * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
1529 * mini.c (mono_resolve_patch_target): Ditto.
1531 * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
1532 (encode_klass_ref): Add support for encoding VARs/MVARs.
1534 * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
1536 * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
1537 the handling of the got entries into a separate 'decode_got_entry' function.
1538 Add support for RGCTX_FETCH.
1540 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
1541 clobbered by the trampoline code.
1543 * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
1544 not clobbered by the indirect calling code.
1546 2008-08-18 Zoltan Varga <vargaz@gmail.com>
1548 * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
1551 2008-08-18 Rodrigo Kumpera <rkumpera@novell.com>
1553 * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
1554 signature using the compilation mempool otherwise we would leak it.
1556 2008-08-18 Zoltan Varga <vargaz@gmail.com>
1558 * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
1559 mono_emit_abs_call ().
1561 * patch-info.h: Add GENERIC_CLASS_INIT.
1563 * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
1565 * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
1566 as their target as a near call.
1568 * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
1570 (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
1572 * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
1573 call to a runtime function described by a patch.
1575 * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
1576 mono_emit_abs_call, this has the advantage that the ABS handling code in
1577 mono_codegen () can handle them both, and can handle other stuff in the
1578 future without additional code.
1580 * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
1582 (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
1585 * mini.h: Add missing bblock related prototypes.
1587 * mini.h (MonoCompile): Remove unused reverse_inst_list and
1588 reverse_inst_list_len fields.
1590 * mini.c: Refactor this file a bit by moving branch optimizations to
1593 * method-to-ir.c: Merge generic sharing changes missed earlier.
1595 * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
1597 * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
1598 shared patches. Process METHODCONST as a shared patch.
1600 * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
1601 as it crashes on the 2.0 mscorlib.
1603 * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
1606 * aot-compiler.c: Use is_plt_patch () in a few additional places.
1607 (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
1610 * aot-compiler.c: Reorganize the got handling code to be a bit more
1613 2008-08-17 Zoltan Varga <vargaz@gmail.com>
1615 * aot-compiler.c: Make the patch_to_plt_offset hash table use
1616 mono_patch_info_equals/hash, and use it to massively simplify
1619 * mini.c (mono_patch_info_hash): Simplify this and add support for
1622 * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
1624 * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
1625 handling code, since an offset is not enough to identify a trampoline.
1627 * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
1629 2008-08-17 Mark Probst <mark.probst@gmail.com>
1631 * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
1633 * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
1635 * mini-ops.h: Argument and result types for OVF_CARRY ops.
1637 * decompose.c: PPC decompositions for various ops.
1639 * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
1641 2008-08-17 Zoltan Varga <vargaz@gmail.com>
1643 * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
1644 call the generic trampoline code using a call, instead of a jump, to
1645 remove some special casing from the generic trampoline code.
1647 * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
1648 (mono_codegen): Ditto.
1650 * aot-compiler.c aot-runtime.c: Ditto.
1652 * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
1654 * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
1655 helper function to find the offset corresponding to a lazy fetch trampoline.
1657 * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
1658 when doing generic sharing.
1660 * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
1663 * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
1664 mini-trampolines.c to be with the other trampoline creation functions.
1666 * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
1667 as it is equal to method->signature in most cases, add a
1668 mono_emit_method_call_full variant which takes a signature and an imt
1671 2008-08-16 Zoltan Varga <vargaz@gmail.com>
1673 * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
1674 to this function, since it could be computed easily from the method
1676 (mono_helper_compile_generic_method_wo_context): Removed, not needed any
1679 * method-to-ir.c mini.c: Remove references to
1680 compile_generic_method_wo_context.
1682 * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
1683 generic method calls.
1685 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
1686 dimensional non-szarrays.
1688 * mini.c (mini_init): Register mono_array_new_1.
1690 * jit-icalls.c (mono_array_new_1): New jit icall.
1692 * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
1693 pointing to the method.
1695 * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
1696 method addresses belonging to METHOD_JUMP patches in the
1697 jump_target_got_slot_hash.
1698 (mono_aot_load_method): Ditto.
1700 * aot-compiler.c (compile_method): Allow AOT compilation of methods with
1701 METHOD_JUMP patches.
1703 * mini.c (mini_create_jit_domain_info): New helper function which
1704 initializes/frees domain->runtime_info.
1705 (mini_free_jit_domain_info): Ditto.
1706 (mini_init): Install the domain hook functions with the runtime.
1708 * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
1709 information maintained by the JIT.
1711 * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
1712 insertion into jump_table_hash into mono_codegen (), also implement proper
1715 * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
1716 tail calls, it is already done by the aot code.
1718 * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
1721 * iltests.il.in: Make the jmp test a bit more complex.
1723 * aot-compiler.c (encode_method_ref): Handle references to normal methods of
1724 generic instances which doesn't have a token.
1726 * aot-runtime.c (decode_method_ref): Ditto.
1728 * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
1729 can handle this case now.
1730 (handle_box): Ditto.
1732 2008-08-15 Geoff Norton <gnorton@novell.com>
1734 * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
1737 2008-08-15 Zoltan Varga <vargaz@gmail.com>
1739 * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
1740 calling generic methods.
1742 * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
1744 * aot-runtime.c (decode_patch_info): Ditto.
1746 * mini.c (mono_resolve_patch_target): Ditto.
1748 * patch-info.h: Add METHOD_RGCTX.
1750 * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
1752 2008-08-14 Zoltan Varga <vargaz@gmail.com>
1754 * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
1755 arguments in registers.
1757 * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
1758 OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
1760 * mini.c (mini_method_compile): Abort aot compilation for generic
1761 methods if generic sharing is disabled.
1763 * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
1766 * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls
1767 requiring an mrgctx.
1769 * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
1770 store instructions when converting a vcall to a normal call.
1772 * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
1773 mono_arch_find_jit_info.
1775 2008-08-13 Zoltan Varga <vargaz@gmail.com>
1777 * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
1778 avoid calling mono_method_full_name () for every method even if the
1780 (check_inline_caller_method_name_limit): Ditto.
1782 2008-08-12 Zoltan Varga <vargaz@gmail.com>
1784 * driver.c (main_thread_handler): Allow AOT compilation of multiple
1785 assemblies in one run.
1787 * aot-compiler.c (mono_compile_assembly): Only print out a count of
1788 skipped methods if it is not 0.
1790 * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
1792 2008-08-12 Bill Holmes <billholmes54@gmail.com>
1794 * mini.c (mono_codegen): Changing a preprocessor check from WIN64 to
1795 MONO_ARCH_HAVE_UNWIND_TABLE.
1797 Contributed under MIT/X11 license.
1799 2008-08-12 Bill Holmes <billholmes54@gmail.com>
1801 * mini-amd64.c (mono_arch_cpu_optimizazions): Remove peephole and branch
1802 from default optimizaton list on Winx64.
1804 * mini-amd64.c (emit_tls_get): Added Winx64 specific implementation for GetTLS.
1806 * mini-amd64.c (mono_arch_emit_prolog): Adding an offset on Winx64 to get
1807 the LMF from the MonoJitTlsData structure.
1809 * mini-amd64.c (mono_arch_setup_jit_tls_data): Added Winx64 implementation.
1811 Contributed under MIT/X11 license.
1813 2008-08-12 Zoltan Varga <vargaz@gmail.com>
1815 * mini.c (sigsegv_signal_handler): Fix the build.
1817 * mini-amd64.c (emit_call_body): Use image->aot_module instead of
1818 assembly->aot_module.
1820 * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
1821 hash table. This simplifies and speeds up a lot of code, and fixes support
1824 * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
1827 * mini-exceptions.c: Ditto.
1829 * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
1830 'native_offset' argument, since these are computed in the
1831 mono_find_jit_info () function.
1833 * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
1834 is used by exceptions-ppc.c.
1836 * exceptions-ppc.c: Call mono_find_jit_info () instead of
1837 mono_arch_find_jit_info ().
1839 * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
1840 mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
1841 generic code in mini-exceptions.c.
1843 2008-08-11 Zoltan Varga <vargaz@gmail.com>
1845 * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
1847 * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
1849 * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
1850 the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
1851 called while holding the loader lock. Fixes #415608.
1852 (mono_aot_get_method_from_token_inner): Ditto.
1854 2008-08-09 Zoltan Varga <vargaz@gmail.com>
1856 * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
1857 to reduce differences between this and the generic implementation in
1859 (ves_icall_get_frame_info): Ditto.
1861 * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
1863 * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
1866 * exceptions-ppc.c (arch_get_call_filter): Rename this to
1867 mono_arch_get_call_filter () and make it non-static, for consistency with the
1868 other architectures.
1870 2008-08-09 Rodrigo Kumpera <rkumpera@novell.com>
1873 * local-propagation.c:
1874 * mini-x86.c: Correct the name of arch defines.
1876 2008-08-09 Zoltan Varga <vargaz@gmail.com>
1878 * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
1879 NO_EMULATE_LONG_SHIFT_OPS define.
1881 2008-08-08 Zoltan Varga <vargaz@gmail.com>
1883 * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
1884 now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
1886 * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
1887 MACH fixes. Merged from the 2.0 branch.
1889 * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
1891 * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
1892 (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
1894 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
1896 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
1897 mono_marshal_get_native_wrapper () signature changes.
1899 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
1901 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
1902 conversion bug under arm.
1904 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
1906 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
1908 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
1909 with overflow checking.
1911 2008-08-05 Marek Habersack <mhabersack@novell.com>
1913 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
1914 to the genmdesc.pl file
1916 2008-08-05 Zoltan Varga <vargaz@gmail.com>
1918 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
1919 arg_array in the soft-float versions of the LOAD/STORE macros.
1921 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
1924 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
1926 2008-08-02 Zoltan Varga <vargaz@gmail.com>
1928 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
1929 a float HFA. Fixes #413621.
1931 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
1933 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
1934 frame_size to args_size. Fixes build.
1936 2008-08-02 Zoltan Varga <vargaz@gmail.com>
1938 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
1939 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
1941 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
1942 the stack are not unaligned. Fixes #413247.
1944 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
1946 * mini.c: update jitted methods performance counters.
1948 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1950 * mini-exceptions.c: increase the exceptions thrown performance
1951 counter in mono_handle_exception ().
1953 2008-07-29 Zoltan Varga <vargaz@gmail.com>
1955 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
1956 can work with netmodules.
1958 2008-07-28 Geoff Norton <gnorton@novell.com>
1960 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
1963 2008-07-28 Zoltan Varga <vargaz@gmail.com>
1965 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
1968 2008-07-28 Bill Holmes <billholmes54@gmail.com>
1970 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
1971 The float param registers and other param registers must be the
1972 same index on Windows x64.
1974 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
1975 ArgValuetypeAddrInIReg argument case. Setting the argument
1976 op to OP_VTARG_ADDR (OP_REGOFFSET)).
1978 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
1979 variable computed above as the copy length for arguments of storage
1980 type ArgValuetypeAddrInIReg.
1982 * mini-amd64.c (mono_arch_emit_call) : Implementing the
1983 ArgValuetypeAddrInIReg argument case. This case will rely on
1984 mono_arch_emit_outarg_vt to emit the correct code later in the process.
1986 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
1987 a 32 byte stack allocation for all calls. We will omit the adjustment for
1988 jump and tail call instructoins as they do not follow the typical call behavior.
1990 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
1991 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
1992 local variable and pass the local variable by reference to the called method.
1994 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
1995 Implementing the ArgValuetypeAddrInIReg argument case. When the address
1996 of a struct is passed in a register it must be saved with the other
1997 volatile argument on the stack.
1999 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
2000 frame pointer the stack adjustment value must be saved to the unwind
2003 Contributed under MIT/X11 license.
2005 2008-07-28 Zoltan Varga <vargaz@gmail.com>
2007 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2008 which got lost in the merge.
2010 2008-07-27 Zoltan Varga <vargaz@gmail.com>
2012 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2015 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2017 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2018 icalls, since they won't be patched.
2020 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2021 different code sequence when running under valgrind to prevent some valgrind
2024 * iltests.il.in: Add new regression test.
2026 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2029 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2030 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2032 * iltests.il.in: Add new test.
2034 * aot-compiler.c: Fix some warnings.
2036 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2039 2008-07-27 Zoltan Varga <vargaz@gmail.com>
2041 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2042 (mini_usage_jitdeveloper): Add a missing --wapi option.
2044 2008-07-25 Zoltan Varga <vargaz@gmail.com>
2046 * mini-codegen.c: Simplify the is_fp macros.
2047 (free_up_ireg): Remove, use free_up_reg instead.
2048 (free_up_reg): Fix the fp case.
2050 2008-07-26 Zoltan Varga <vargaz@gmail.com>
2052 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2055 * exceptions-x86.c: Merge some changes which seemed to have got lost
2056 in the linear-ir merge.
2058 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2060 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2061 long vreg volatile even if the variable was already created.
2063 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
2066 2008-07-26 Zoltan Varga <vargaz@gmail.com>
2068 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
2070 * mini.c (mono_jit_compile_method_inner): Add support for
2071 MONO_EXCEPTION_BAD_IMAGE.
2073 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
2074 mini_method_get_context () returns NULL. Fixes #356531.
2076 * mini.c (mono_method_to_ir): Ditto.
2078 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
2079 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
2081 2008-07-25 Zoltan Varga <vargaz@gmail.com>
2083 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
2084 in the LDFTN implementation.
2086 2008-07-25 Mark Probst <mark.probst@gmail.com>
2088 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
2089 code, patch calls to icalls, too, even if they're not in the
2090 shared generic code hash. Fixes #411962.
2092 2008-07-25 Zoltan Varga <vargaz@gmail.com>
2094 * cpu-x86.md: Increase the length of the fcall opcodes.
2096 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
2097 calls returning floats.
2099 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
2102 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
2105 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
2106 into the domain->method_code_hash.
2108 * aot-compiler.c: Fix win32 build.
2110 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
2112 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
2113 gshared NEWARR implementation.
2115 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
2117 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
2118 can be used outside of method_to_ir.
2120 * mini.h (MonoCompile): Add arg_types field.
2122 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
2124 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2125 the values of the local arg_array and param_types array.
2127 2008-07-24 Zoltan Varga <vargaz@gmail.com>
2129 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2130 got accesses might only get generated later when NEWOBJ is decomposed.
2132 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2133 looking up the native code of the target method when a delegate is called
2136 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2139 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2141 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2142 AOT work on platforms without a working dlsym implementation.
2144 * mini.h: Bump AOT image format version.
2146 2008-07-24 Mark Probst <mark.probst@gmail.com>
2148 * mini-exceptions.c: Free a MonoType with
2149 mono_metadata_free_type() instead of g_free().
2151 * aot-runtime.c: Free a MonoType.
2153 2008-07-24 Zoltan Varga <vargaz@gmail.com>
2155 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2158 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2161 2008-07-23 Massimiliano Mantione <massi@ximian.com>
2162 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2165 2008-07-23 Zoltan Varga <vargaz@gmail.com>
2167 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2168 NEWOBJ calls on valuetypes.
2170 * iltests.il.in: Add new test.
2172 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2174 2008-07-22 Zoltan Varga <vargaz@gmail.com>
2176 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2177 is no longer needed.
2179 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2180 non register sized integer arguments.
2181 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2182 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
2185 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2188 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2189 two a binop with different sized arguments is emitted.
2191 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2192 instruction in the ins==NULL case.
2194 2008-07-23 Zoltan Varga <vargaz@gmail.com>
2196 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2198 * mini-x86.c: Fix osx build.
2200 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2203 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2204 instruction for non int sized variables.
2206 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2209 2008-07-23 Robert Jordan <robertj@gmx.net>
2211 * method-to-ir.c: Fix MSVC build.
2213 2008-07-22 Zoltan Varga <vargaz@gmail.com>
2215 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2216 a non int sized type, widen it to an int since newer versions of gcc seem to
2217 generate code which needs this.
2219 * ssa2.c abcremoval2.c: Fix warnings.
2221 * *: Merge the Linear IR branch.
2223 The original branch is at trunk/branches/vargaz/mini-linear-il, and
2224 the ChangeLog file there describes all the changes done over the years.
2225 Further documentation can be found at www.mono-project.com/Linear_IL.
2227 2008-07-21 Bill Holmes <billholmes54@gmail.com>
2229 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2230 The float param registers and other param registers must be the
2231 same index on Windows x64.
2233 Contributed under MIT/X11 license.
2235 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
2237 * mini.c: Make the previous fix GC safe.
2239 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
2241 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2243 2008-07-21 Bill Holmes <billholmes54@gmail.com>
2245 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2246 on Winx64. This type will not be passed on the stack (ArgOnStack), but
2247 ArgValuetypeAddrInIReg instead.
2249 Contributed under MIT/X11 license.
2251 2008-07-21 Zoltan Varga <vargaz@gmail.com>
2253 * mini-codegen.c (get_register_spilling): Fix a warning.
2255 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
2257 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2258 for types which the initialization fails. Raises the provided exception
2259 at the right stop after cleanup.
2261 2008-07-16 Zoltan Varga <vargaz@gmail.com>
2263 * aot-compiler.c: Free most of the memory allocated during compilation.
2265 * mini.c (mini_parse_debug_options): Fix a leak.
2267 * mini.c (mini_method_compile): Don't add the method to the jit info tables
2268 during aot compilation.
2270 2008-07-14 Zoltan Varga <vargaz@gmail.com>
2272 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
2273 it has too much register pressure.
2275 2008-07-13 Zoltan Varga <vargaz@gmail.com>
2277 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
2279 2008-07-12 Zoltan Varga <vargaz@gmail.com>
2281 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2284 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2285 on amd64 similar to the way it is done on arm.
2287 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2289 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
2290 consistency, normalize error messages, avoid loading aot-only modules in
2293 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
2296 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
2298 2008-07-11 Martin Baulig <martin@ximian.com>
2301 (MonoDebuggerInfo): Add `interruption_request'.
2303 2008-07-12 Zoltan Varga <vargaz@gmail.com>
2305 * aot-compiler.c (emit_plt): Remove some dead code.
2307 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
2309 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
2310 return the plt info offset belonging to a given plt entry.
2312 * mini-trampolines.c (mono_aot_plt_trampoline): Use
2313 mono_aot_get_plt_info_offset.
2315 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
2316 similar to the amd64 code by makeing jumps through a separate jump table
2317 instead of embedding the jump addresses into the code.
2319 2008-07-11 Zoltan Varga <vargaz@gmail.com>
2321 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
2324 2008-07-10 Martin Baulig <martin@ximian.com>
2326 * mini.c (mini_method_compile): Disable generics sharing when
2327 running in the debugger.
2329 2008-07-10 Zoltan Varga <vargaz@gmail.com>
2331 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
2333 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
2334 the local register allocator from running out of registers on x86 when
2337 2008-07-10 Bill Holmes <billholmes54@gmail.com>
2339 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
2340 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
2343 Contributed under MIT/X11 license.
2345 2008-07-10 Zoltan Varga <vargaz@gmail.com>
2347 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
2348 speed up the assembler.
2350 2008-07-09 Zoltan Varga <vargaz@gmail.com>
2352 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
2355 * mini.c: Move the soft float handling macros a bit earlier, add
2356 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
2359 * mini.h: Add prototype for mono_arch_fixup_jinfo.
2361 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
2362 read-only to help catch code allocation requests.
2364 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
2365 and turn it off when using --aot-only or when compiling with --aot=full.
2367 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
2368 jump table for switches from the normal domain mempool, not the code
2371 * mini-trampolines.c (get_unbox_trampoline): New function to return an
2372 unbox trampoline which handles aot-only mode too.
2374 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
2375 an AOTed unbox trampoline.
2377 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
2379 2008-07-09 Bill Holmes <billholmes54@gmail.com>
2381 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
2384 Contributed under MIT/X11 license.
2386 2008-07-09 Bill Holmes <billholmes54@gmail.com>
2388 * mini.c (mono_codegen): Allocate space at the end of the code block and store
2389 the unwind information for the method at the end of the allocated block.
2391 * mini-amd64.h: Added declarations for the unwind routines and adding field to
2392 MonoCompileArch to hold the unwind info for SEH on Winx64
2394 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
2395 frame pointer info for the method being compiled.
2397 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
2398 the call to mono_exception_from_token.
2400 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
2401 storing the method prolog information in a format that the Winx64 SEH can understand. This
2402 information is stored a the end of the method block because it is all 32-bit offset based.
2404 Contributed under MIT/X11 license.
2406 2008-07-09 Zoltan Varga <vargaz@gmail.com>
2408 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
2410 * wapihandles.c: Fix warnings.
2412 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
2415 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
2416 mono_jit_compile_method in aot-only mode since that calls the type
2419 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
2420 get_delegate_invoke_impl in aot-only mode.
2422 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
2424 2008-07-08 Zoltan Varga <vargaz@gmail.com>
2426 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
2428 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
2431 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
2433 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
2434 init trampoline from the AOT file as well.
2436 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
2437 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
2440 * mini.c (mini_init): Move the call to mono_exceptions_init () after
2443 * exceptions-amd64.c: Add _full variants for the remaining exception code
2444 creation functions as well, allow emission of relocatable code, remove
2445 caching since that is now done by the caller.
2447 * mini-exceptions.c: Add _full variants for the remaining exception code
2448 creation functions as well, add aot-only support.
2450 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
2451 if we can determine a proper token for them.
2452 (add_wrappers): Add a few more wrappers.
2453 (emit_method_code): Remove some dead code.
2454 (emit_trampolines): Emit exception code too.
2456 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
2458 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
2459 mono_array_new_va which avoids varargs.
2461 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
2463 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
2464 mono_arch_create_specific_trampoline () in all places.
2466 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
2467 a bit so it can be used for other things as well.
2469 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
2472 * exceptions-amd64.c: Rename the caching from the exception code creation
2473 functions, it is done by the caller instead.
2475 * exceptions-amd64.c: Change the signature of the exception code creation
2476 functions to allow the creation of relocatable code later.
2478 * mini-exceptions.c: Add a set of functions to query the various
2479 runtime-generated exception functions.
2481 * mini.c mini-exceptions.c: Use the newly added functions instead of the
2482 mono_arch_.. () functions.
2484 2008-07-07 Zoltan Varga <vargaz@gmail.com>
2486 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
2488 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
2490 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
2491 (mini_get_vtable_trampoline): Ditto.
2493 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
2494 code in the AOT case by returning the code size and a list of relocations to
2497 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
2499 2008-07-07 Bill Holmes <billholmes54@gmail.com>
2501 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
2504 Contributed under MIT/X11 license.
2506 2008-07-07 Zoltan Varga <vargaz@gmail.com>
2508 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
2509 so the buffer size can be computed correctly. Fixes #404735.
2511 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
2512 normally as cfg->debug_info is already freed.
2514 2008-07-06 Zoltan Varga <vargaz@gmail.com>
2516 * mini-amd64.c: For calls returning vtypes in registers, don't store
2517 the return address on the stack, instead allocate a separate local for
2520 2008-07-05 Mark Probst <mark.probst@gmail.com>
2522 * mini-trampolines.c, mini.h: Add an argument to
2523 mono_create_jit_trampoline_in_domain() for turning off the adding
2524 of the sync wrapper.
2526 * mini.c: Use the JIT trampoline without sync instead of
2527 ldftn_nosync in static RGCTX invoke wrappers so that the call can
2530 2008-07-04 Mark Probst <mark.probst@gmail.com>
2532 * driver.c: Turn on GSHARED optimization by default.
2534 2008-07-04 Zoltan Varga <vargaz@gmail.com>
2536 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
2537 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
2539 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
2540 create a variant of the generic trampoline code callable from AOTed trampolines.
2542 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
2543 trampoline code callable from AOTed trampolines.
2545 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
2547 2008-07-04 Mark Probst <mark.probst@gmail.com>
2549 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
2550 pass-through manner.
2552 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
2553 and don't fail sharing for them anymore.
2555 * mini-exceptions.c: Handle exceptions in shared generic methods.
2557 * generic-sharing.c: When checking the context of a generic
2558 method, also check its class's context. Don't treat wrappers as
2561 * mini-trampolines.c: Some code factored out to
2562 metadata/generic-sharing.c. Handle the MRGCTX case.
2564 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
2565 we must deal with the method being of another instantiation of the
2566 class. Add static rgctx invoke wrappers to generic methods.
2568 2008-07-04 Mark Probst <mark.probst@gmail.com>
2570 * mini.c: Provide all jit infos of generic shared methods with a
2573 * mini-exceptions.c: Handle the new situation that a generic info
2574 might be available, but not info about the this/vtable/mrgctx
2577 2008-07-03 Mark Probst <mark.probst@gmail.com>
2579 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
2582 2008-07-03 Zoltan Varga <vargaz@gmail.com>
2584 * dominators.c (check_dominance_frontier): Fix a warning.
2586 * mini.h: Add some missing prototypes.
2588 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
2590 * driver.c (mono_jit_init_version): Correct the comments since the first
2591 argument should be the name of the root domain, not a filename.
2593 * aot-runtime.c (make_writable): Error out if this is called while running
2595 (load_aot_module): Ditto.
2597 * aot-compiler.c: Really fix the computation of method indexes.
2599 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
2600 optimizations as this is no longer called frequently.
2602 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
2603 method and the invoke impl code and pass it to the delegate trampoline instead of
2604 just the delegate class.
2606 2008-07-02 Zoltan Varga <vargaz@gmail.com>
2608 * aot-compiler.c: Fixup the computation of method indexes.
2609 (add_wrappers): Create the base methods of the runtime invoke wrappers using
2610 the method builder infrastructure.
2612 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
2615 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
2616 mode, load the method right away instead of creating a trampoline.
2618 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
2620 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
2623 2008-07-01 Zoltan Varga <vargaz@gmail.com>
2625 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
2626 (mono_aot_load_method): Use method_index instead of method->token.
2628 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
2629 can handle icalls etc. properly.
2631 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2633 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
2635 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
2636 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
2637 JIT_ICALL_ADDR patch type.
2639 * patch-info.h: Add JIT_ICALL_ADDR patch type.
2641 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
2643 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
2645 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
2647 2008-06-30 Zoltan Varga <vargaz@gmail.com>
2649 * mini.c: Use domain->jit_code_hash_lock for controlling access to
2650 domain->jit_code_hash.
2652 2008-06-29 Zoltan Varga <vargaz@gmail.com>
2654 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
2656 2008-06-27 Zoltan Varga <vargaz@gmail.com>
2658 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
2659 get_this_arg_from_call, let it compute it when needed.
2661 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
2662 gsctx from code only when needed.
2664 * mini-trampolines.c (get_generic_context): Rename this to
2665 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
2666 it can be called by the arch backends.
2668 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
2670 2008-06-26 Zoltan Varga <vargaz@gmail.com>
2672 * driver.c (mono_main): Add experimental --aot-only command line option.
2674 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
2677 2008-06-26 Kornél Pál <kornelpal@gmail.com>
2679 * driver.c (DllMain): Remove mono_module_handle.
2681 Contributed under MIT/X11 license.
2683 2008-06-25 Zoltan Varga <vargaz@gmail.com>
2685 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
2686 for emitting methods which are not in the source assembly. Detect and report
2687 failure of assembling+linking.
2689 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
2691 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
2693 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
2695 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
2697 2008-06-24 Zoltan Varga <vargaz@gmail.com>
2699 * mini.h: Remove some obsolete prototypes.
2701 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
2703 2008-06-24 Mark Probst <mark.probst@gmail.com>
2705 * mini.c (get_object_generic_inst): Variable-sized arrays are not
2706 supported by Visual Studio, so use alloca().
2708 2008-06-23 Zoltan Varga <vargaz@gmail.com>
2710 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
2713 2008-06-23 Mark Probst <mark.probst@gmail.com>
2715 * mini.c: Fail sharing of a generic method if it contains an open
2716 catch clause (because we don't pass MRGCTXs yet).
2718 2008-06-23 Mark Probst <mark.probst@gmail.com>
2720 * mini.c: When compiling a method with generic sharing, insert the
2721 method instantiated with an all-Object generic context into the
2722 jit info table, instead of the context of the first instantiation
2723 of the method we happen to compile.
2725 2008-06-18 Martin Baulig <martin@ximian.com>
2727 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
2728 `major_version' and `minor_version'.
2730 2008-06-17 Mark Probst <mark.probst@gmail.com>
2732 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
2733 mono_method_is_generic_sharable_impl() takes an additional
2734 argument specifying whether to treat type variables as reference
2737 2008-06-17 Mark Probst <mark.probst@gmail.com>
2739 * mini.h: Removed obsolete prototypes.
2741 2008-06-17 Mark Probst <mark.probst@gmail.com>
2743 * mini.c: Don't fail generic sharing for initobj and sizeof - we
2744 already handle them.
2746 2008-06-17 Mark Probst <mark.probst@gmail.com>
2748 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
2749 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
2750 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
2751 tramp-x86.c: Added a MonoGenericContext* argument to
2752 mono_arch_get_unbox_trampoline() so that it can call other
2753 functions which require it.
2755 2008-06-17 Mark Probst <mark.probst@gmail.com>
2757 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
2758 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
2759 mono_arch_get_this_arg_from_call() takes a
2760 MonoGenericSharingContext* as well.
2762 2008-06-17 Mark Probst <mark.probst@gmail.com>
2764 * mini.c: Factor out code for emitting unbox into emit_unbox() and
2765 implement generic sharing of unbox.
2767 2008-06-17 Mark Probst <mark.probst@gmail.com>
2769 * mini.c: Don't compute the vtable to determine whether a field is
2770 special static, because it might not work for open types.
2772 2008-06-17 Mark Probst <mark.probst@gmail.com>
2774 * mini.c: Removed the unused token_type and token_source arguments
2775 from get_runtime_generic_context_ptr().
2777 2008-06-17 Marek Habersack <mhabersack@novell.com>
2779 * mini.c (ADD_BINOP): fix the build
2781 2008-06-16 Zoltan Varga <vargaz@gmail.com>
2783 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
2786 2008-06-16 Mark Probst <mark.probst@gmail.com>
2788 * mini.h: Removed class relations enum that's not used anymore.
2790 2008-06-16 Mark Probst <mark.probst@gmail.com>
2792 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
2794 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
2795 the lazy fetch trampoline access code.
2797 2008-06-15 Zoltan Varga <vargaz@gmail.com>
2799 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
2801 2008-06-14 Zoltan Varga <vargaz@gmail.com>
2803 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
2805 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
2807 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
2809 2008-06-13 Zoltan Varga <vargaz@gmail.com>
2811 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
2814 * mini-ops.h: Add MIN/MAX_UN opcodes.
2816 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
2819 * basic-math.cs: Add more min/max tests.
2821 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2823 2008-06-13 Mark Probst <mark.probst@gmail.com>
2825 * mini.c: Small fix in the prologue of emit_castclass.
2827 2008-06-13 Zoltan Varga <vargaz@gmail.com>
2829 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
2831 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
2832 do not work even for unsigned types. Fixes #400014.
2834 * basic-math.cs: Add regression tests for unsigned Min/Max.
2836 2008-06-13 Mark Probst <mark.probst@gmail.com>
2838 * mini.c: Added additional context_used argument to several
2839 functions, which will be needed for sharing generic methods. Use
2840 GET_RGCTX macro wherever appropriate. Declare only one
2841 context_used in mono_method_to_ir().
2843 2008-06-13 Mark Probst <mark.probst@gmail.com>
2845 * mini.c, generic-sharing.c: Removed generic class relations.
2847 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
2848 functions due to MRGCTX changes.
2850 2008-06-13 Mark Probst <mark.probst@gmail.com>
2852 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
2853 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
2854 with calculated IMT.
2856 * mini.c: Generic sharing of calls via generic interfaces.
2858 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
2859 generic method with non-constant MonoGenericContext*. Instead,
2860 the context is taken out of the method itself.
2862 2008-06-13 Mark Probst <mark.probst@gmail.com>
2864 * mini.c: Generic sharing of ldvirtftn.
2866 2008-06-13 Mark Probst <mark.probst@gmail.com>
2868 * mini.c: Generic sharing of ldftn.
2870 2008-06-13 Mark Probst <mark.probst@gmail.com>
2872 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
2874 2008-06-13 Mark Probst <mark.probst@gmail.com>
2876 * mini.c: Generic sharing of the special case of ldtoken followed
2877 by a call to GetTypeFromHandle.
2879 2008-06-13 Mark Probst <mark.probst@gmail.com>
2881 * mini.c: Generic sharing of box for nullable types.
2883 2008-06-13 Zoltan Varga <vargaz@gmail.com>
2885 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
2886 are passed on the stack. Fixes #324807.
2888 2008-06-12 Bill Holmes <billholmes54@gmail.com>
2890 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
2891 for the ArgValuetypeAddrInIReg case.
2893 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
2894 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
2896 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
2897 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
2898 local variable and pass the local variable by reference to the called method.
2900 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
2901 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
2903 Contributed under MIT/X11 license.
2905 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
2907 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
2909 * debug-mini.c (mono_debug_print_vars): Release memory after printing
2912 2008-06-10 Martin Baulig <martin@ximian.com>
2915 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
2917 2008-06-09 Kornél Pál <kornelpal@gmail.com>
2919 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
2920 possible error when no arguments are passed.
2922 Contributed under MIT/X11 license.
2924 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
2926 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
2927 where the file name is NULL.
2929 2008-06-09 Zoltan Varga <vargaz@gmail.com>
2931 * mini.c: Fix s390 build.
2933 2008-06-08 Zoltan Varga <vargaz@gmail.com>
2935 * trace.c (mono_trace_parse_options): Fix warnings.
2937 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
2939 2008-06-07 Zoltan Varga <vargaz@gmail.com>
2941 * mini.c (remove_block_if_useless): Avoid printing the method name.
2943 * mini.c: Remove needless setting of ins->cil_code which is now done by
2946 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
2949 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
2950 translated code after it has been patched.
2952 2008-06-06 Zoltan Varga <vargaz@gmail.com>
2954 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
2955 avoid problems during code patching on SMP systems.
2956 (emit_call): Avoid adding a patch info which is already added by
2958 (mono_arch_emit_exceptions): Ditto.
2960 2008-06-05 Zoltan Varga <vargaz@gmail.com>
2962 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
2963 MONO_TYPE_ISSTRUCT already checks for it.
2965 2008-06-05 Bill Holmes <billholmes54@gmail.com>
2967 * mini-amd64.c:merge_argument_class_from_type: When marshaling
2968 structs with floats on Winx64 the float registers are not used.
2969 The integer registers are always used..
2970 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
2971 only one register will be used and only if the size of the struct
2972 is 1,2,4, or 8 bytes.
2974 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
2977 Contributed under MIT/X11 license.
2979 2008-06-05 Martin Baulig <martin@ximian.com>
2981 * debug-debugger.c (debugger_lookup_class): Also call
2982 mono_class_setup_methods() here; we're only called from RTI.
2984 2008-06-05 Andreas Färber <andreas.faerber@web.de>
2986 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
2987 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
2988 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
2989 Post-process object files and add dtrace-generated object, if necessary.
2991 Contributed under MIT/X11 license.
2993 2008-06-04 Mark Probst <mark.probst@gmail.com>
2995 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
2998 * mini.c: Generic sharing for unbox.any and castclass.
3000 2008-06-04 Mark Probst <mark.probst@gmail.com>
3002 * mini.c: Ignore tailcall prefix in shared generic code and when
3003 doing calls which require a vtable/rgctx argument.
3005 2008-06-04 Mark Probst <mark.probst@gmail.com>
3007 * mini.c: Don't free the JIT info.
3009 * driver.c: Changes in the JIT info table testing code.
3011 2008-06-03 Zoltan Varga <vargaz@gmail.com>
3013 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
3014 interruption. Fix some warnings.
3016 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3017 interruption_checkpoint.
3019 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3021 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3022 from embedding applications.
3024 2008-06-02 William Holmes <billholmes54@gmail.com>
3026 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
3027 reserving 32 bytes on the stack when making calls.
3029 Contributed under MIT/X11 license.
3031 2008-06-01 Zoltan Varga <vargaz@gmail.com>
3033 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3034 the linear IL branch.
3036 * driver.c: Print out more information for --version on arm.
3038 2008-05-30 Zoltan Varga <vargaz@gmail.com>
3040 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3041 bb_exit instead, since out of line bblocks might not actually be emitted
3044 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3045 maximum epilog size for out of line bblocks if tracing is enabled.
3047 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3049 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
3051 * arrays.cs: Regression tests for allocating arrays with negative sizes.
3053 2008-05-28 Zoltan Varga <vargaz@gmail.com>
3055 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3056 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
3059 2008-05-27 Zoltan Varga <vargaz@gmail.com>
3061 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3062 the 'value' to store is a constant.
3064 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
3066 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
3067 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
3069 2008-05-26 Zoltan Varga <vargaz@gmail.com>
3071 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
3072 for accessing method->generic_container.
3074 2008-05-24 Zoltan Varga <vargaz@gmail.com>
3076 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
3078 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
3080 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
3082 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
3085 2008-05-23 Zoltan Varga <vargaz@gmail.com>
3087 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
3089 * mini.c: Handle the case when mono_class_vtable () fails.
3091 2008-05-23 Massimiliano Mantione <massi@ximian.com>
3092 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
3095 2008-05-22 Mark Probst <mark.probst@gmail.com>
3097 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
3098 together with domain sharing.
3100 2008-05-22 Mark Probst <mark.probst@gmail.com>
3102 * mini.c: Treat callvirts to final methods like non-virtual calls
3103 when doing generic sharing, i.e. look them up in the runtime
3106 2008-05-22 Mark Probst <mark.probst@gmail.com>
3108 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
3109 with computed types (for generic sharing).
3111 * mini.c: Generic sharing for mkrefany and refanyval.
3113 2008-05-22 Zoltan Varga <vargaz@gmail.com>
3115 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
3118 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
3119 the generic sharing code.
3121 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
3124 2008-05-21 Zoltan Varga <vargaz@gmail.com>
3126 * mini.h: Remove the declaration of mono_aot_init_vtable ().
3128 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
3130 * driver.c: updated copyright date
3132 2008-05-21 Zoltan Varga <vargaz@gmail.com>
3134 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3137 2008-05-19 Martin Baulig <martin@ximian.com>
3139 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3140 pointing to the new `_mono_debug_using_mono_debugger' variable.
3143 (mono_main): Check mono_debug_using_mono_debugger() rather than
3144 the `MONO_INSIDE_MDB' environment variable to check whether we're
3145 inside the debugger.
3147 2008-05-19 Zoltan Varga <vargaz@gmail.com>
3149 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3152 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
3154 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3156 * mini.c: Added mini_assembly_can_skip_verification. This
3157 function checks if the assembly requested to skip verification.
3158 Fixes part of #387274.
3160 2008-05-07 Zoltan Varga <vargaz@gmail.com>
3162 * mini.c (mini_get_method): Disable the check for open generic classes when
3163 using generic sharing.
3165 * generics.cs: Add a test for #387034.
3167 * mini.c (mini_get_method): Check whenever the method class is an open generic
3168 type, and return NULL in that case, causing a verification error. Fixes
3171 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3173 * driver.c (mono_main): Revert r102623. The right
3174 thing to do is to enable the verifier under verifiable
3175 unless a --security flag was passed.
3177 We need this non-trivial behavior for --verify-all otherwise
3178 mcs-compileall won't be able to use it. As it needs everything to
3179 be verified under validil.
3181 2008-05-06 Martin Baulig <martin@ximian.com>
3185 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3186 (mono_debugger_thread_cleanup): Likewise.
3187 (mono_debugger_extended_notification): Likewise.
3189 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3191 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3192 against both inflated and non-inflated methods. We need to check against the
3193 generic definition for cases where the instantiated method is not visible.
3194 We need to check against the inflated types for cases where the instantiation
3195 changes any super type. This fixes #382986.
3197 Note that this doesn't need to be applied to other parts of mono_method_to_ir
3198 that check for visibiliy as generic params only appears as the type subject
3199 of tokens on call opcodes. Field manipulation and ldftn must always
3200 target an exact type.
3202 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
3204 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3205 if no related --security flag is passed.
3207 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3209 * mini-arch.h: Prepare support for ppc64.
3211 Contributed under MIT/X11 license.
3213 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3215 * aot-runtime.c: Prepare support for ppc64.
3217 Contributed under MIT/X11 license.
3219 2008-05-05 Andreas Färber <andreas.faerber@web.de>
3221 * mini-ops.h: Prepare support for ppc64.
3223 Contributed under MIT/X11 license.
3225 2008-05-04 Andreas Färber <andreas.faerber@web.de>
3227 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3229 Contributed under MIT/X11 license.
3231 2008-05-03 Zoltan Varga <vargaz@gmail.com>
3233 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3234 assemblies, since aot_name is not a full path, causing us to load MS.NET
3235 assemblies on windows.
3237 2008-04-28 Kornél Pál <kornelpal@gmail.com>
3239 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3240 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3241 * main.c: Use UTF-8 encoded command line instead of Windows default code
3242 page on Windows to support Unicode.
3243 * driver.c (DllMain): New function for mixed-mode assembly support.
3244 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3245 export __stdcall functions without decoration.
3247 Contributed under MIT/X11 license.
3249 2008-04-28 Mark Probst <mark.probst@gmail.com>
3251 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3252 saving it very early.
3254 2008-04-28 Mark Probst <mark.probst@gmail.com>
3256 * mini.h, mini.c: Lots of code for accessing the old RGCTX
3257 deleted. The only way to access the new RGCTX is via the
3260 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3261 vtable instead of the RGCTX to static methods.
3263 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3264 accessing the new RGCTX.
3266 * generic-sharing.c: There is no separation between self, type
3267 arguments and other types in the RGCTX anymore.
3269 2008-04-25 Jonathan Chambers <joncham@gmail.com>
3271 * mini-amd64.c (add_general): Remove previous stack adjustment.
3272 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3273 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3274 for 32 bytes of stack space reserved for all calls.
3276 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
3277 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
3280 Code contributed under MIT/X11 license.
3282 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
3284 * mini.c (mini_method_verify): Only verify non-inflated methods, check
3285 against the root definition, peeling out method and type instantiations.
3286 Cache verify success results, code that fails verification is still
3287 checked multiple times.
3289 2008-04-23 Zoltan Varga <vargaz@gmail.com>
3291 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
3293 2008-04-23 Jonathan Chambers <joncham@gmail.com>
3295 * mini-amd64.c (add_general): Always increment stack on Win64.
3296 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
3299 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
3300 stack based argument handling on Win64.
3302 Code contributed under MIT/X11 license.
3304 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
3306 * Makefile.am (version.h): Add support for git-svn.
3308 2008-04-22 Zoltan Varga <vargaz@gmail.com>
3310 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
3311 so instead of calling g_spawn_command_line_sync, we do everything by hand,
3312 avoiding allocations and libc functions which might deadlock.
3314 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
3315 'no-gdb-backtrace' option is set.
3317 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
3319 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
3321 2008-04-21 Martin Baulig <martin@ximian.com>
3323 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
3324 and `get_lmf_addr'; `notification_address' is no longer a pointer.
3326 2008-04-21 Martin Baulig <martin@ximian.com>
3328 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
3329 `thread_vtable', `event_handler_ptr' and `event_handler'.
3331 2008-04-21 Martin Baulig <martin@ximian.com>
3333 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
3334 allows delayed initialization of the `executable_code_buffer' when
3337 2008-04-21 Martin Baulig <martin@ximian.com>
3339 * mini.h (mono_debugger_create_notification_function): Removed.
3340 * tramp-*.c (mono_debugger_create_notification_function): Removed.
3342 * mdb-debug-info64.s
3343 (MONO_DEBUGGER__notification_function): Added this in the .text section.
3345 * mdb-debug-info32.s
3346 (MONO_DEBUGGER__notification_function): Added this in the .text section.
3348 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
3349 currently only works on x86 and x86_64, so don't create it on ppc.
3351 2008-04-21 Martin Baulig <martin@ximian.com>
3353 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
3356 (mini_method_compile): In the fp elimination check, check
3357 `debug_options.mdb_optimizations' in addition to
3358 mono_debug_using_mono_debugger().
3360 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
3361 disable some JIT optimizations which are only disabled when
3362 running inside the debugger.
3363 Added `--help-debug' option to describe the debugging options.
3364 (parse_debug_options): New static function to parse the `--debug'
3365 options, so we can easily add more stuff in future.
3367 2008-04-20 Zoltan Varga <vargaz@gmail.com>
3369 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
3370 the method has no body.
3372 2008-04-19 Jonathan Chambers <joncham@gmail.com>
3374 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
3375 assembly is not allowed in MSVC 64-bit compiler.
3376 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
3377 as we get floating point exceptions everywhere.
3379 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
3380 correctly align arguments for call to throw_exception.
3381 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
3383 Code contributed under MIT/X11 license.
3385 2008-04-19 Zoltan Varga <vargaz@gmail.com>
3387 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
3389 2008-04-17 Zoltan Varga <vargaz@gmail.com>
3391 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
3393 * mini-amd64.c (NEW_INS): Set cil_code.
3395 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
3396 from mini-amd64.c so all debugger related logic is in one place.
3398 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
3399 later won't have a random ip assigned to them.
3401 2008-04-16 Zoltan Varga <vargaz@gmail.com>
3403 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
3404 the arch specific function initializes code_size.
3405 (mono_create_delegate_trampoline): Ditto.
3407 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
3408 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
3411 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
3412 running under the debugger.
3414 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
3417 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
3418 debugger. Also move the disabling of optimizations here from driver.c.
3419 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
3422 * mini.h (MonoCompile): Add a few new flags.
3424 2008-04-15 Zoltan Varga <vargaz@gmail.com>
3426 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
3427 so the cil_code field of created MonoInst's is properly set.
3428 (mini_select_instructions): Ditto.
3430 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
3431 (MONO_INST_NEW_CALL): Ditto.
3433 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
3434 in many places so the ins->cil_code field is properly initialized.
3436 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
3439 2008-04-14 Zoltan Varga <vargaz@gmail.com>
3441 * mini.c (mini_method_compile): Print a different message when compiling a
3444 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
3447 2008-04-11 Zoltan Varga <vargaz@gmail.com>
3449 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
3452 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
3454 2008-04-11 Zoltan Varga <vargaz@gmail.com>
3456 * mini.c (handle_stack_args): Make this return void since its return value was
3457 never used. Also set cfg->unverifiable for invalid IL instead of calling
3460 2008-04-10 Mark Probst <mark.probst@gmail.com>
3462 * mini.c: Make sure "this" is live in catch clauses with type
3463 variables in shared generic code.
3465 2008-04-08 Mark Probst <mark.probst@gmail.com>
3467 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
3468 generic_class_is_reference_type() to ensure the proper behaviour
3469 when sharing generic code and the type in question is a type
3472 2008-04-08 Zoltan Varga <vargaz@gmail.com>
3474 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
3475 race conditions when printing thread dumps. Fixes #377738.
3477 2008-04-08 Massimiliano Mantione <massi@ximian.com>
3479 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
3480 shows up when both MonoInst arguments can cause aliasig.
3481 There is likely no way in the current JIT to trigger this problem, but
3482 it showed up in the development of generics sharing, when in a new
3483 opcode both args of an OP_GROUP can be aliases (addresses of a local).
3484 When the generics sharing code will be committed, its tests will be
3485 valid also for this bug.
3487 2008-04-08 Zoltan Varga <vargaz@gmail.com>
3489 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
3492 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
3495 2008-04-07 Zoltan Varga <vargaz@gmail.com>
3497 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
3498 use a more detailed exception message for InvalidCastException.
3500 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
3502 * driver.c (mono_main): Add --debug=casts option to turn on better
3503 InvalidCastException message details.
3505 * mini.c (mini_get_debug_options): New helper function to return the address of
3506 the debug_options variable.
3508 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
3509 the jit_tls TLS variable.
3511 * mini.c (mono_jit_tls): New TLS variable.
3513 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
3516 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
3518 * mini.h: Removed verifer related stuff. This code was moved to verify.c
3520 * mini.c: Removed verifer related stuff, code moved to verify.c.
3522 * driver.c: Using code from verify.c instead of mini.c.
3524 2008-04-05 Zoltan Varga <vargaz@gmail.com>
3526 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
3529 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
3531 * mini.c (check_for_method_verify): Enabling verification of
3532 corlib if mono_verify_all is set. Bugs in the verifier preventing that
3535 2008-04-04 Zoltan Varga <vargaz@gmail.com>
3537 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
3538 caller saved registers as well.
3540 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
3541 saved registers as well.
3543 2008-03-30 Zoltan Varga <vargaz@gmail.com>
3545 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
3547 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
3550 2008-03-27 Zoltan Varga <vargaz@gmail.com>
3552 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
3554 (get_call_info): Take a gsctx argument instead of 'cfg'.
3556 2008-03-26 Zoltan Varga <vargaz@gmail.com>
3558 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
3559 mono_verify_all is set.
3561 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
3563 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
3565 2008-03-25 Zoltan Varga <vargaz@gmail.com>
3567 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
3570 * driver.c mini.c mini.h: Add a --verify-all development option to test the
3571 verifier and the code generated by the compiler.
3573 2008-03-25 Mark Probst <mark.probst@gmail.com>
3575 * mini.c: Generic sharing of the non-nullable case of the box
3578 2008-03-24 Zoltan Varga <vargaz@gmail.com>
3580 * inssel.brg: Fix the build.
3582 * iltests.il.in: Add a test for lconv.ovf.u8.un.
3584 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
3586 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
3587 Array:Address. Fixes #372410.
3589 * iltests.il.in: New tests for readonly prefix.
3591 2008-03-23 Zoltan Varga <vargaz@gmail.com>
3593 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
3596 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
3599 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
3601 * mini.c (mono_decompose_op_imm): New helper function.
3603 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
3604 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3607 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
3608 mono_arch_output_basic_block. Fix warnings.
3610 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
3613 2008-03-22 Zoltan Varga <vargaz@gmail.com>
3615 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
3616 since the extra frame is now detected automatically inside the loop.
3618 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
3619 opts which are now in mono_peephole_ins ().
3621 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
3623 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
3624 frames and skip duplicate managed-to-native frames. Fixes #367665.
3626 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3627 opts which are now in mono_peephole_ins ().
3628 (mono_arch_peephole_pass_2): Ditto.
3630 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
3632 * mini-codegen.c (mono_peephole_ins): New helper function containing the
3633 arch independent peephole optimizations.
3635 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
3636 opts which are now in mono_peephole_ins ().
3638 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
3640 * mini-s390.c (mono_arch_output_basic_block): Fix build.
3642 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
3645 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
3646 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
3649 2008-03-21 Zoltan Varga <vargaz@gmail.com>
3651 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
3652 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
3655 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
3656 mono_arch_output_basic_block. Fix warnings.
3658 2008-03-20 Zoltan Varga <vargaz@gmail.com>
3660 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3663 2008-03-20 Zoltan Varga <vargaz@gmail.com>
3665 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
3668 * iltests.il: Add new tests.
3670 2008-03-20 Kornél Pál <kornelpal@gmail.com>
3672 * mini.c: Removed Windows version macros.
3674 2008-03-20 Mark Probst <mark.probst@gmail.com>
3676 * generic-sharing.c: Put reflection types in the extensible part
3677 of the runtime generic context.
3679 * mini.c: Generic sharing of the GetTypeHandle special case of the
3680 ldtoken instruction.
3682 2008-03-20 Zoltan Varga <vargaz@gmail.com>
3684 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
3686 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
3688 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
3689 consistency with the other version on the linear IR branch.
3691 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
3693 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
3695 * iltests.il.in: Add new tests.
3697 2008-03-19 Zoltan Varga <vargaz@gmail.com>
3699 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
3701 * iltests.il.in: Add new tests.
3703 2008-03-19 Mark Probst <mark.probst@gmail.com>
3705 * mini.c: Two variables with the same name were declared in
3706 nesting contexts and one wasn't initialized. Fixed.
3708 2008-03-19 Mark Probst <mark.probst@gmail.com>
3710 * mini.c: Generic sharing of the initobj instruction.
3712 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
3714 * mini.c: make the test to optimize ldtoken from typeof() more
3717 2008-03-18 Mark Probst <mark.probst@gmail.com>
3719 * mini.c: Generic sharing of the initobj instruction for reference
3722 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
3724 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
3725 the mono_breakpoint_clean_code() code to perform bound checks.
3727 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
3729 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
3730 mono_arch_patch_callsite() to include the start of the managed method
3731 to be able to perform bound checks.
3733 2008-03-17 Mark Probst <mark.probst@gmail.com>
3735 * mini.c: Generic sharing for the isinst instruction.
3737 2008-03-17 Mark Probst <mark.probst@gmail.com>
3739 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3740 inssel-long32-mips.brg: Added opcodes for doing indirect calls
3741 with the runtime generic context argument.
3743 * mini.c: Share calls to several types of unsharable methods by
3744 putting the address of the method code in the runtime generic
3745 context and doing an indirect call.
3747 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3750 2008-03-16 Mark Probst <mark.probst@gmail.com>
3752 * generic-sharing.c: Change due to a change in the runtime genric
3755 2008-03-15 Martin Baulig <martin@ximian.com>
3758 (mono_arch_nullify_class_init_trampoline): Add call to
3759 mono_breakpoint_clean_code() to make things work when running
3760 inside the debugger.
3763 (mono_arch_nullify_class_init_trampoline): Add call to
3764 mono_breakpoint_clean_code() to make things work when running
3765 inside the debugger.
3767 2008-03-14 Zoltan Varga <vargaz@gmail.com>
3769 * inssel-long.brg (reg): Fix 64 bit build.
3771 2008-03-14 Mark Probst <mark.probst@gmail.com>
3773 * mini.c, mini.h: Share static generic code by passing it an
3774 implicit argument pointing to the runtime generic context.
3776 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
3777 inssel-long32-mips.brg: New opcodes for calling shared static,
3778 which need to be passed the runtime generic context.
3780 * mini-amd64.c, mini-x86.c: Save the runtime generic context
3781 argument on the stack in the prologue if needed. New function for
3782 finding the runtime generic context argument from the registers
3783 saved by the trampoline.
3785 * mini-amd64.h, mini-x86.h: Specify which register to use for the
3786 runtime generic context argument.
3788 * tramp-amd64.c: Also restore the register used for the runtime
3789 generic context argument.
3791 * mini-trampoline.c: Resolve shared static calls by consulting the
3792 runtime generic context via the new argument.
3794 * generic-sharing.c: Add an argument to sharability-checking
3795 functions that specifies whether type variables should be treated
3796 as sharable type arguments.
3798 * inssel-x86.brg: Removed a superfluous, buggy rule.
3800 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
3803 2008-03-14 Martin Baulig <martin@ximian.com>
3805 * debug-debugger.c (main_thread_handler): Call
3806 mono_runtime_run_main() without sending any notifications.
3808 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
3810 2008-03-14 Zoltan Varga <vargaz@gmail.com>
3812 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
3814 2008-03-14 Mark Probst <mark.probst@gmail.com>
3816 * tramp-x86.c: Fixed register restore offsets in the trampoline
3817 code for ECX and EDX.
3819 2008-03-12 Geoff Norton <gnorton@novell.com>
3821 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
3822 different ucontext_t implementations.
3823 * exceptions-arm.c: Use the above defines to get exceptions working on
3824 iPhone (based on a patch by Luke Howard lukeh@padl.com)
3825 * mini-arm.c: Implement iPhone icache support (based on a patch by
3826 Luke Howard lukeh@padl.com)
3828 2008-03-12 Mark Probst <mark.probst@gmail.com>
3830 * mini.c: Enable generic sharing of calls to non-static
3831 non-interface non-generic non-value-type methods.
3833 * mini-trampolines.c: Resolve calls from shared generic code.
3835 2008-03-11 Zoltan Varga <vargaz@gmail.com>
3837 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
3839 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
3841 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
3843 * mini.c: some fixes for the AOT compiler.
3845 2008-03-07 Zoltan Varga <vargaz@gmail.com>
3847 * cpu-amd64.md: Add clob:1 to some float opcodes.
3849 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
3851 * mini.h: Added MiniVerifierMode enumeration.
3853 * mini.c: Added mini_verifier_set_mode to control
3854 the usage of the new verifier.
3856 * mini.c (mono_method): Integrated the new verifier.
3858 * driver.c: Extended --security option with validil and
3859 verifiable options to activate the new verifier.
3861 2008-03-07 Zoltan Varga <vargaz@gmail.com>
3863 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
3864 optimization to ctors taking 0 or 2 arguments too.
3866 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
3869 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
3871 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
3873 2008-03-06 Zoltan Varga <vargaz@gmail.com>
3875 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
3876 non-aot case as well.
3878 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
3880 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
3883 * aot-compiler.c (encode_patch): Ditto.
3885 * mini.h (G_MININT32): Fix the definition of this.
3887 2008-03-05 Zoltan Varga <vargaz@gmail.com>
3889 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
3891 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
3893 2008-03-04 Zoltan Varga <vargaz@gmail.com>
3895 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
3896 methods returning vtypes in registers.
3897 (mono_arch_allocate_vars): Ditto.
3899 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
3901 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
3903 * generics.cs: Add a test from the linear IR branch.
3905 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
3907 * mini.c (inline_method): Cache failed inline attempts.
3909 2008-03-04 Mark Probst <mark.probst@gmail.com>
3911 * mini.c: For shared methods of generic classes put the location
3912 of "this" into the MonoGenericJitInfo.
3914 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
3915 register out of a MonoContext by register number. Add the generic
3916 sharing context as an argument to mono_arch_find_this_argument().
3918 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3919 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
3920 for new arch function.
3922 * mini-exception.c: Handle open exception clauses in shared
3925 * mini-trampolines.c: Supply additional argument to
3926 mono_arch_find_this_argument().
3928 2008-03-04 Zoltan Varga <vargaz@gmail.com>
3930 * Makefile.am (regtests): Run the bench.exe tests last.
3932 2008-03-03 Zoltan Varga <vargaz@gmail.com>
3934 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
3937 2008-03-02 Zoltan Varga <vargaz@gmail.com>
3939 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
3942 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
3944 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
3946 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
3947 whose class has no cctor.
3949 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
3951 2008-03-01 Zoltan Varga <vargaz@gmail.com>
3953 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
3956 2008-02-29 Zoltan Varga <vargaz@gmail.com>
3958 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
3959 to be in sync with the code on the linear IR branch.
3961 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
3963 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
3965 2008-02-27 Zoltan Varga <vargaz@gmail.com>
3967 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
3969 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
3971 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
3973 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
3975 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
3977 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
3980 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
3982 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
3983 OP_LOADR4_MEMBASE emission.
3985 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
3986 (mono_spillvar_offset_float): Ditto.
3988 * mini-mips.c (mono_arch_emit_prolog): Ditto.
3990 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
3993 * basic-long.cs: Add regression tests for them.
3995 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
3997 (mono_arch_allocate_vars): Fix representation of single-precision float
3999 (mono_arch_output_basic_block): Ditto.
4001 * inssel-mips.brg: Ditto, remove duplicate items.
4003 * mini-mips.c (emit_load_volatile_arguments): New function to handle
4004 arguments of tail calls as on other platforms.
4005 (mono_arch_output_basic_block): Handle tail calls.
4007 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4010 * objects.cs (test_5_pass_static_struct): Add test for it.
4012 Contributed under MIT/X11 license.
4014 2008-02-26 Zoltan Varga <vargaz@gmail.com>
4016 * Makefile.am: Use gmcs for compiling the regression tests.
4018 * *.2.cs *.2.il: Rename to *.cs and *.il.
4020 2008-02-24 Zoltan Varga <vargaz@gmail.com>
4022 * regalloc.h: Make the vassign array smaller.
4024 * mini.c (mini_method_compile): Remove an unused field in cfg.
4026 * mini-codegen.c: Add a bunch of micro optimizations.
4028 2008-02-23 Zoltan Varga <vargaz@gmail.com>
4030 * regalloc.h: Remove some unused fields.
4032 2008-02-22 Zoltan Varga <vargaz@gmail.com>
4034 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4036 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4038 2008-02-22 Mark Probst <mark.probst@gmail.com>
4040 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4042 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4043 trampoline: Fetch an entry from the runtime generic context. If
4044 it's NULL, jump to the actual trampoline to fill the runtime
4045 generic context. Otherwise, return it.
4047 * mini.c: Call the lazy fetch trampoline to get entries out of the
4048 runtime generic context.
4050 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4051 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4052 tramp-sparc.c: Stubs for the lazy fetch trampoline.
4054 2008-02-21 Mark Probst <mark.probst@gmail.com>
4056 * mini.c: Fetch data out of the extensible part of the runtime
4057 generic context instead of calling a helper function.
4059 * generic-sharing.c: Some functions moved into
4060 metadata/generic-sharing.c. Helper function for fetching other
4061 types now checks and asserts against extensible rgctx (just for
4062 debugging purposes - the helper function isn't called anymore
4063 unless for debugging).
4065 2008-02-21 Zoltan Varga <vargaz@gmail.com>
4067 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
4068 for tail calls up to the point that the tests in iltests.exe run. Also add a
4069 dummy CKFINITE implementation.
4070 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
4071 needed for trampoline LMF frames.
4073 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
4074 trampoline LMF frames.
4076 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
4078 * mini.c (inline_method): clean any pending loader error when inlining fail.
4079 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
4081 2008-02-21 Zoltan Varga <vargaz@gmail.com>
4083 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
4085 * aot-runtime.c (decode_patch_info): Ditto.
4087 * mini.c (mono_resolve_patch_target): Ditto.
4089 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
4092 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
4094 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
4095 if it references an icall address.
4097 2008-02-20 Zoltan Varga <vargaz@gmail.com>
4099 * cpu-s390x.md: Remove some more unused opcodes.
4101 * cpu-s390x.md: Remove some unused opcodes.
4103 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
4104 mono_op_imm_to_op ().
4106 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
4107 instead of a switch statement.
4109 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
4110 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
4112 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
4114 * mini-codegen.c: Remove unused mono_regstate2_... functions.
4116 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
4119 2008-02-19 Zoltan Varga <vargaz@gmail.com>
4121 * driver.c (mono_main): Improve error reporting when an assembly cannot be
4122 opened. Fixes #362607.
4124 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4126 * iltests.il.in: Add a test for static methods in interfaces.
4128 2008-02-18 Zoltan Varga <vargaz@gmail.com>
4130 * genmdesc.c (build_table): Fix a crash on older glib versions.
4132 * cpu-sparc.md: Remove some unused opcodes.
4134 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
4135 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4137 * cpu-amd64.md: Remove some unused opcodes.
4139 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4140 like the other opcodes.
4142 2008-02-17 Zoltan Varga <vargaz@gmail.com>
4144 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4146 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4148 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4149 variables 'cfg' instead of 'm' for consistency.
4151 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4153 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4154 argument holding the vtype return address, to avoid the ambigious use of
4155 cfg->ret for this purpose.
4157 * mini.c (NEW_RETLOADA): Use vret_addr if set.
4159 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4161 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4162 new mono_print_ins () function which only takes one argument.
4164 2008-02-15 Zoltan Varga <vargaz@gmail.com>
4166 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4169 2008-02-14 Zoltan Varga <vargaz@gmail.com>
4171 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4173 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4175 * mini-x86.c: Sync with the version on the linear IR branch by adding new
4176 opcodes and other small changes.
4178 * mini-ops.h: Add some new opcodes from the linear IR branch.
4180 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4182 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4183 opcodes, use the REG_MEMBASE opcodes instead.
4185 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4186 opcodes, use the REG_MEMBASE opcodes instead.
4188 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4191 * mini.c (mono_op_imm_to_op): New helper function.
4193 * mini-ops.h: Add some opcodes from linear IR branch.
4195 2008-02-13 Zoltan Varga <vargaz@gmail.com>
4197 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
4200 2008-02-12 Zoltan Varga <vargaz@gmail.com>
4202 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
4205 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4207 2008-02-09 Zoltan Varga <vargaz@gmail.com>
4209 * aot-compiler.c (emit_method_code): Add an assert.
4211 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4212 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4215 2008-02-08 Zoltan Varga <vargaz@gmail.com>
4217 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
4218 some load/store opcodes so they are consistent.
4219 (mono_arch_emit_prolog): Simplify some code.
4221 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4223 * objects.cs: Add tests for large argument offsets on ARM.
4225 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
4226 stack offsets. Fixes #359651.
4228 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4230 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4232 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4234 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4236 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4238 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4239 rid of CEE_CONV_R_UN.
4241 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4243 2008-02-07 Zoltan Varga <vargaz@gmail.com>
4245 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4247 * mini.c (mono_normalize_opcodes): Add some more opcodes.
4249 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4251 * cpu-amd64.md: Remove some unused opcodes.
4253 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4255 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4257 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
4258 arch specific functions for its parts. Call the peephole pass after local
4259 regalloc so the prolog can compute a more accurate max_offset.
4261 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4262 the corresponding OP_I/OP_L opcodes.
4264 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4266 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4268 2008-02-06 Zoltan Varga <vargaz@gmail.com>
4270 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4271 as they are handled in mini.c.
4273 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4275 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
4276 case since it is handled in mini.c.
4278 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
4280 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
4282 * *.c: Use the new opcodes in the IR and back end code.
4284 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
4286 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
4288 2008-02-06 Mark Probst <mark.probst@gmail.com>
4290 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
4291 an assert because it has a race condition.
4293 2008-02-06 Zoltan Varga <vargaz@gmail.com>
4295 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
4297 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
4299 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
4301 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
4302 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
4304 2008-02-05 Zoltan Varga <vargaz@gmail.com>
4306 * cpu-amd64.md (move): Correct the maximum size of move.
4308 2008-02-05 Mark Probst <mark.probst@gmail.com>
4310 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
4311 the generic class init trampoline to return quickly if the class
4314 2008-02-04 Zoltan Varga <vargaz@gmail.com>
4316 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
4317 issues where an 32 bit callsite cannot be patched by a 64 bit address.
4319 2008-02-03 Zoltan Varga <vargaz@gmail.com>
4321 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
4324 2008-01-31 Zoltan Varga <vargaz@gmail.com>
4326 * objects.cs: Add some soft-float tests.
4328 * mini.c: Fix a couple more soft-float issues.
4330 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
4332 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
4335 2008-01-30 Zoltan Varga <vargaz@gmail.com>
4337 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
4338 exception happens while compiling a virtual method.
4340 2008-01-29 Zoltan Varga <vargaz@gmail.com>
4342 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
4344 * mini-sparc.c: Fix build.
4346 * mini-sparc.c (get_call_info): Add support for generic sharing.
4348 * mini-exceptions.c: Add a FIXME.
4350 2008-01-27 Zoltan Varga <vargaz@gmail.com>
4352 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
4353 altstack handling code.
4355 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
4357 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
4359 * mini-s390.c: Add support for generic sharing.
4361 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
4363 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4365 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
4367 * mini-s390x.c: Add support for generic sharing.
4369 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
4371 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4373 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
4374 can be used since it takes a 16 bit signed immediate.
4376 * inssel-s390x.brg: Fix OP_SETRET.
4378 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
4380 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
4382 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
4384 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
4386 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
4389 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
4392 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
4393 of the unused mono_arch_patch_delegate_trampoline stuff.
4395 2008-01-26 Zoltan Varga <vargaz@gmail.com>
4397 * basic-long.cs: Move the fp related tests to basic-float.cs.
4399 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
4401 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
4403 * basic-calls.cs: Add a test for proper float argument passing.
4405 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
4406 if the context corresponds to an exception received through a signal.
4408 * exceptions.cs: Add a test for nullref handling at the start of a try
4411 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
4413 * jit-icalls.c (mono_break): New JIT icall.
4415 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
4417 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
4419 2008-01-25 Zoltan Varga <vargaz@gmail.com>
4421 * cpu-*.md: Get rid of unused opcodes.
4423 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
4425 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
4428 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
4431 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
4432 the arch independent trampoline code in mini-trampolines.c.
4434 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
4436 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
4438 * mini-s390.h: Remove an unused define.
4440 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
4441 the arch independent trampoline code in mini-trampolines.c.
4443 * mini-arm.c (mono_arch_emit_prolog): Fix build.
4445 2008-01-24 Zoltan Varga <vargaz@gmail.com>
4447 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
4449 * mini-s390.c (mono_arch_emit_prolog): Fix build.
4451 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
4453 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
4455 * cpu-amd64.md: Use smaller sizes for int opcodes.
4457 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
4459 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
4462 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
4465 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
4466 instead of though a pointer to save an indirection when accessing elements of
4469 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
4471 (NOT_IMPLEMENTED): New helper macro.
4472 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
4475 * *.c: Use the new helper macro.
4477 2008-01-21 Zoltan Varga <vargaz@gmail.com>
4479 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
4481 2008-01-20 Zoltan Varga <vargaz@gmail.com>
4483 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
4486 2008-01-18 Zoltan Varga <vargaz@gmail.com>
4488 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
4489 profiling is enabled.
4491 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
4493 (mono_arch_emit_prolog): Add more first bblock optimizations.
4495 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
4496 in order if possible.
4497 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
4498 bblock, since the arguments are still in their original registers.
4500 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
4502 2008-01-17 Zoltan Varga <vargaz@gmail.com>
4504 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
4507 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
4510 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
4512 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
4513 process async exceptions received while in unmanaged code.
4515 * mini.c (mini_init): Install a callback with the runtime which will be called
4516 when a thread receives an async exception while in unmanaged code.
4518 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
4520 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
4522 2008-01-16 Wade Berrier <wberrier@novell.com>
4529 2008-01-16 Zoltan Varga <vargaz@gmail.com>
4531 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
4532 compilation with sun cc.
4534 * cpu-*.md: Fix the build.
4536 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
4538 * mini-amd64.h: Add some comments to the MonoLMF structure.
4540 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
4542 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
4543 in the LMF structure if possible. This saves two instructions in the
4544 managed->native wrappers.
4546 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
4548 2008-01-16 Mark Probst <mark.probst@gmail.com>
4550 * generic-sharing.c: New type argument lookup code which uses the
4551 runtime generic context template.
4553 2008-01-15 Zoltan Varga <vargaz@gmail.com>
4555 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
4557 * mini-arm.c (add_general): Fix arm eabi parameter passing.
4558 (mono_arch_output_basic_block): Fix localloc implementation.
4560 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
4562 * mini-ia64.c (peephole_pass): Fix ia64 build.
4564 * mini-amd64.c (peephole_pass): Fix a warning.
4566 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
4567 at a constant offset from sp/fp.
4569 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
4570 instead of obtaining it from *lmf in the managed method case.
4572 2008-01-14 Zoltan Varga <vargaz@gmail.com>
4574 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
4576 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
4578 * mini.h (MonoInstList): New type.
4579 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
4580 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
4581 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
4582 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
4583 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
4584 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
4585 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
4586 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
4587 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
4588 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
4589 MONO_INST_LIST_FOR_EACH_ENTRY,
4590 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
4591 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
4592 mono_inst_list_first, mono_inst_list_last,
4593 mono_inst_list_next, mono_inst_list_prev): New instruction
4594 list handling interfaces.
4595 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
4596 list head 'ins_list'.
4597 (MonoInst): Replace next pointer with list head 'node'.
4598 (MonoCallInst): Make 'out_args' a MonoInstList.
4599 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
4600 (MonoCompile): Delete reverse_inst_list and
4601 reverse_inst_list_len.
4602 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
4603 mono_arch_lowering_pass, mono_arch_local_regalloc,
4604 mono_arch_output_basic_block, mono_arch_emit_prolog):
4605 Convert to new instruction lists.
4606 (insert_after_ins): Delete.
4607 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
4609 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
4610 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
4611 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
4612 mono_emulate_opcode, mono_emit_load_got_addr,
4613 inline_method, mono_method_to_ir, mono_print_bb_code,
4614 print_dfn, decompose_pass, nullify_basic_block,
4615 replace_out_block_in_code, remove_block_if_useless,
4616 merge_basic_blocks, move_basic_block_to_end,
4617 try_unsigned_compare, optimize_branches, mono_print_code,
4618 mini_select_instructions, remove_critical_edges): Likewise.
4619 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
4620 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
4621 mono_arch_output_basic_block, mono_arch_emit_prolog):
4623 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
4624 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4625 mono_arch_output_basic_block): Likewise.
4626 (inst_list_prepend, insert_after_ins): Delete.
4627 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
4628 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
4630 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
4631 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
4632 mono_arch_emit_prolog): Likewise.
4633 * cfold.c (mono_constant_fold): Likewise.
4634 * liveness.c (visit_bb, mono_analyze_liveness,
4635 optimize_initlocals): Likewise.
4636 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
4637 * graph.c (mono_draw_code_cfg): Likewise.
4638 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
4639 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
4640 mono_ssa_cprop): Likewise.
4641 * abcremoval (get_relations_from_previous_bb, process_block):
4643 * local-propagation (mono_cprop_invalidate_values,
4644 mono_local_cprop_bb): Likewise.
4645 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
4646 peephole_pass, mono_arch_output_basic_block,
4647 mono_arch_emit_prolog): Likewise.
4648 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
4649 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4650 mono_arch_emit_prolog): Likewise.
4651 (insert_after_ins): Delete.
4652 * aliasing.c (print_code_with_aliasing_information,
4653 mono_build_aliasing_information, mono_aliasing_deadce):
4654 Convert to new instruction lists.
4655 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
4656 peephole_pass, NEW_INS, mono_arch_lowering_pass,
4657 mono_arch_local_regalloc, mono_arch_output_basic_block):
4659 (insert_after_ins): Delete.
4660 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
4661 peephole_pass, mono_arch_output_basic_block): Convert to
4662 new instruction lists.
4663 * mini-codegen (InstList, inst_list_prepend,
4664 insert_after_ins): Delete.
4665 (insert_before_ins, get_register_force_spilling,
4666 get_register_spilling, free_up_ireg, free_up_reg,
4667 create_copy_ins, create_spilled_store, alloc_int_reg,
4668 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
4669 to new instruction lists.
4670 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
4671 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
4672 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
4673 (insert_after_ins): Delete.
4674 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
4675 mono_arch_local_regalloc, mono_arch_output_basic_block,
4676 mono_arch_call_opcode): Convert to new instruction lists.
4677 (insert_after_ins): Delete.
4678 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
4679 peephole_pass, mono_arch_output_basic_block,
4680 mono_arch_emit_prolog): Convert to new instruction lists.
4682 2008-01-11 Zoltan Varga <vargaz@gmail.com>
4684 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
4686 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
4689 * Makefile.am (version.h): Make this work with non-bash shells.
4691 2008-01-10 Zoltan Varga <vargaz@gmail.com>
4693 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
4695 2008-01-08 Zoltan Varga <vargaz@gmail.com>
4697 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
4698 the InitializeArray optimization.
4700 2008-01-06 Zoltan Varga <vargaz@gmail.com>
4702 * mini.c driver.c: Don't include os/gc_wrapper.h.
4704 2008-01-05 Zoltan Varga <vargaz@gmail.com>
4706 * mini.c (print_jit_stats): Print GC statistics if available.
4708 2008-01-04 Zoltan Varga <vargaz@gmail.com>
4710 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
4712 2007-12-29 Zoltan Varga <vargaz@gmail.com>
4714 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
4716 2007-12-26 Zoltan Varga <vargaz@gmail.com>
4718 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
4720 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
4722 * driver.c (mono_main): Ditto.
4724 2007-12-23 Zoltan Varga <vargaz@gmail.com>
4726 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
4728 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
4729 in the vtable can't be encoded.
4730 (compile_method): Ditto.
4732 2007-12-21 Zoltan Varga <vargaz@gmail.com>
4734 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
4737 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
4740 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
4741 the top LMF entry belongs to the current method.
4743 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
4745 2007-12-20 Zoltan Varga <vargaz@gmail.com>
4747 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
4749 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
4751 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
4753 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
4755 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
4757 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
4760 * basic-float.cs: Add an ulong->double cast test.
4762 2007-12-15 Zoltan Varga <vargaz@gmail.com>
4764 * mini.c (mono_method_to_ir): Fix a warning.
4766 2007-12-14 Zoltan Varga <vargaz@gmail.com>
4768 * mini-ops.h: Add OP_SWITCH.
4770 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
4771 CEE_SWITCH in back-end code, use OP_SWITCH instead.
4773 2007-12-11 Geoff Norton <gnorton@novell.com>
4775 * mini-s390x.c: Minor change to the MAX() define to allow
4776 it to compile with other gcc versions.
4778 2007-12-11 Geoff Norton <gnorton@novell.com>
4781 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
4783 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
4785 exceptions-arm.c (mono_arch_get_restore_context): Restore
4788 exceptions-arm.c (throw_exception): Save the frame pointer.
4789 This is a partial fix for #323747. Only the client side is
4792 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
4794 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
4795 was using an unrelated variable to log the class which
4796 needed the cctor to be called. This was crashing on arm.
4798 2007-12-09 Robert Jordan <robertj@gmx.net>
4800 * mini-x86.c (mono_arch_emit_epilog):
4801 Consider all kinds of 64-bit types. Fixes #323114.
4803 2007-12-08 Zoltan Varga <vargaz@gmail.com>
4805 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
4807 2007-12-07 Zoltan Varga <vargaz@gmail.com>
4809 * mini-amd64.c (peephole_pass): Add a missing instruction check.
4811 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4813 * mini.c: run type ctor before allocating an object, not only
4814 when running it's constructor method (fixes at least part of bug #342507).
4816 2007-12-07 Zoltan Varga <vargaz@gmail.com>
4818 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
4820 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
4821 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
4824 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
4825 mono_generic_class_init_trampoline () the same as it is done with the other
4828 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
4829 aot-runtime.c aot-compiler.c: Implement AOT support.
4831 2007-12-07 Mark Probst <mark.probst@gmail.com>
4833 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
4834 build for archs which don't have the vtable trampoline defined
4837 2007-12-07 Zoltan Varga <vargaz@gmail.com>
4839 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
4841 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
4843 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
4845 * tramp-<ARCH>.c: Use the new helper function.
4847 2007-12-07 Mark Probst <mark.probst@gmail.com>
4849 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
4850 trampoline call, which takes a vtable argument.
4852 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
4853 OP_TRAMPCALL_VTABLEs like other calls.
4855 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
4856 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
4857 call. Implemented a support function which fetches the vtable
4858 from a register set.
4860 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
4861 Implemented a generic class init trampoline, using the
4862 OP_TRAMPCALL_VTABLE opcode.
4864 * mini.c: Implemented static field access when sharing generic
4865 code. This implies initing the class using the new
4866 OP_TRAMPCALL_VTABLE call.
4868 2007-12-07 Mark Probst <mark.probst@gmail.com>
4870 * mini.c: Don't compile methods with sharing enabled if their
4871 classes are disabled for sharing.
4873 2007-12-06 Zoltan Varga <vargaz@gmail.com>
4875 * inssel.brg: Add a missing sign extension to the GETCHR and array access
4876 opcodes. Fixes #346563.
4878 * objects.cs: Add a new test.
4880 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
4882 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
4883 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
4885 2007-12-06 Zoltan Varga <vargaz@gmail.com>
4887 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
4889 2007-12-03 Zoltan Varga <vargaz@gmail.com>
4891 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
4894 2007-12-02 Zoltan Varga <vargaz@gmail.com>
4896 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
4898 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
4899 optimization in the AOT case.
4901 2007-11-30 Zoltan Varga <vargaz@gmail.com>
4903 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
4905 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
4907 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
4909 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
4911 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
4912 is created by the inlined delegate ctor.
4914 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4916 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
4918 2007-11-29 Zoltan Varga <vargaz@gmail.com>
4920 * cpu-x86.md: Fix the length of ckfinite.
4922 2007-11-28 Zoltan Varga <vargaz@gmail.com>
4924 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
4926 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
4927 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
4929 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
4931 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
4932 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
4934 2007-11-28 Martin Baulig <martin@ximian.com>
4937 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
4938 after creating the trampoline.
4940 2007-11-27 Zoltan Varga <vargaz@gmail.com>
4942 * aot-runtime.c (load_aot_module): Check runtime version if needed.
4944 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
4947 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
4948 instead of the calling method to help AOT.
4950 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
4952 2007-11-26 Zoltan Varga <vargaz@gmail.com>
4954 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
4957 2007-11-23 Zoltan Varga <vargaz@gmail.com>
4959 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
4961 * aot-compiler.c (compile_method): Correct check for generic method definitions.
4962 (encode_method_ref): No need to handle generic method definitions specially.
4964 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4966 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
4969 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
4971 (compile_method): Enable generic sharing.
4973 2007-11-22 Zoltan Varga <vargaz@gmail.com>
4975 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
4976 (mini_method_compile): Add preliminary support for AOTing shared generic code.
4978 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
4981 * mini-trampolines.c: Fix a warning.
4983 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
4985 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
4986 (generic_class_is_reference_type): Remove unused function.
4988 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
4989 in the generic vtable trampoline case.
4991 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
4993 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
4994 return an AOT method based on a vtable slot.
4996 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
4998 * mini.c (mini_get_vtable_trampoline): Export this.
5000 2007-11-22 Martin Baulig <martin@ximian.com>
5003 (MonoDebuggerInfo): Move `debugger_version' up.
5005 2007-11-22 Martin Baulig <martin@ximian.com>
5008 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5010 * mini-trampolines.c
5011 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5012 after compiling the method.
5014 2007-11-20 Martin Baulig <martin@ximian.com>
5017 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5018 (mono_debugger_remove_breakpoint): Likewise.
5019 (mono_debugger_check_breakpoints): Likewise.
5021 * debug-debugger.c: Implement the new breakpoint interface here.
5023 2007-11-18 Zoltan Varga <vargaz@gmail.com>
5025 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5026 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5028 * mini-x86.c (mono_arch_output_basic_block): Ditto.
5030 2007-11-17 Zoltan Varga <vargaz@gmail.com>
5032 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5034 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5037 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5040 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5041 returning a vtype in a register.
5043 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5044 here from the arch specific code.
5046 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5049 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5050 (mono_arch_emit_prolog): Increment maximum prolog size.
5052 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5053 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5055 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
5056 MonoGenericSharingContext.
5058 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
5059 MonoGenericSharingContext. Allocate memory from the cfg mempool.
5061 2007-11-15 Mark Probst <mark.probst@gmail.com>
5063 * mini.c, mini.h, generic-sharing.c: Functions for producing code
5064 which extract fields out of the runtime generic context. Full
5065 sharing of the NEWARR opcode.
5067 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5069 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
5070 --enable-minimal=ssa.
5072 2007-11-13 Zoltan Varga <vargaz@gmail.com>
5074 * mini-trampolines.c (mono_delegate_trampoline): Update after
5075 mono_marshal_get_delegate_invoke () signature change.
5077 2007-11-13 Mark Probst <mark.probst@gmail.com>
5079 * mini.c: Removed the shared context in favor of the generic
5080 sharing context. Allocate the MonoJitInfo structure with room for
5081 the generic sharing context if it's needed.
5083 * mini.h: Remove MonoGenericSharingContext declaration. It's in
5084 domain-internals.h now.
5086 * mini-x86.c: Pass the generic sharing context to get_call_info ().
5088 * generic-sharing.c: Several changes for working without a shared
5089 context and instead operating on open types instead.
5091 2007-11-12 David S. Miller <davem@davemloft.net>
5093 * inssel-sparc.brg: Fix double instruction emit.
5095 2007-11-12 Zoltan Varga <vargaz@gmail.com>
5097 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
5098 Get/Set/Address methods.
5100 * mini.c debug-debugger.c mini-trampolines.c: Update after
5101 mono_marshal_get_delegate_invoke signature change.
5103 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
5105 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
5106 This can happens with dynamic methods. Fixes the other bug in #322722.
5108 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
5110 * tramp-arm.c (mono_arch_patch_callsite): Support patching
5113 * mini-arm.c (arm_patch): Implement patching of BX call
5114 sequence. Fixes one of the bugs in #322722.
5116 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
5118 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
5119 under Linux. We only need to flush every 32-byte cache line.
5121 2007-11-07 Massimiliano Mantione <massi@ximian.com>
5124 move_basic_block_to_end: Add branches when needed, eventually creating
5126 optimize_branches: added a parameter that tells if it's ok to create
5127 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5128 and avoid calling move_basic_block_to_end when it's not ok.
5131 2007-11-07 Mark Probst <mark.probst@gmail.com>
5133 * mini.c: Abort inlining call to InitializeArray if something
5134 looks wrong. Let the icall handle it, which now has proper safety
5137 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
5139 * mini.c (mono_spill_call): add support for soft-float.
5141 * mini.c (mono_method_to_ir): add support for soft-float
5142 to inlined functions that return float.
5144 * mini.c (mono_method_to_ir): add support for soft-float
5145 to cee_stsfld opcode on float fields.
5147 2007-11-05 Geoff Norton <gnorton@novell.com>
5149 * mini-x86.h: Fix the structure access for X86 Leopard.
5152 2007-11-05 Martin Baulig <martin@ximian.com>
5154 * mini-trampolines.c
5155 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5156 after compiling the method to notify the debugger.
5158 2007-11-05 Martin Baulig <martin@ximian.com>
5160 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5162 2007-11-02 Zoltan Varga <vargaz@gmail.com>
5164 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5165 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5167 2007-11-01 Zoltan Varga <vargaz@gmail.com>
5169 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5170 native-to-managed wrappers.
5172 2007-11-01 Geoff Norton <gnorton@novell.com>
5174 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
5177 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5179 * mini.c, mini-x86.c: when getting back from unmanaged code
5180 to managed via a marshaled delegate we also need to set the
5183 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5185 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5188 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5190 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5191 let the debugger or other external agents to tell the JIT when
5192 a sw breakpoint has been inserted in the code that the JIT needs
5193 to be able to inspect.
5195 2007-10-31 Martin Baulig <martin@ximian.com>
5198 (MonoDebuggerInfo): Remove `runtime_class_init'.
5200 2007-10-30 Martin Baulig <martin@ximian.com>
5203 (mono_debugger_thread_created): Added `MonoThread *' argument.
5204 (mono_debugger_extended_notification): New public method.
5205 (mono_debugger_trampoline_compiled): New public method.
5208 (MonoDebuggerThreadInfo): Added `thread' and
5209 `extended_notifications' fields.
5212 (debugger_executable_code_buffer): New static variable.
5215 (MonoDebuggerInfo): Added `executable_code_buffer',
5216 `executable_code_buffer_size', `breakpoint_info_area',
5217 `breakpoint_table' and `breakpoint_table_size'.
5219 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
5221 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5222 that IP either is an unused value or the vtable pointer. IMT
5223 calls use vtable + offset now. Reduced by almost half the size
5226 2007-10-26 Jonathan Chambers <joncham@gmail.com>
5228 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5229 defines to access param registers. Replace long usage with
5230 gsize as sizeof(long) != sizeof(void*) on Win64.
5232 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5233 on Win64. Fix intrinsic, use _AddressOfReturnAddress
5234 instead of non-existant _GetAddressOfReturnAddress.
5236 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
5237 param registers. Save/restore %rdi and %rsi in MonoLMF.
5239 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
5240 param registers. Modify (throw_exception) signature to take
5241 %rdi and %rsi on Win64.
5243 Code is contributed under MIT/X11 license.
5245 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5247 * helpers.c: unlink debugging output files.
5249 2007-10-25 Zoltan Varga <vargaz@gmail.com>
5251 * mini.c: Move mono_create_ftnptr () to object.c.
5253 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
5255 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5256 optional. This function can now be used to disassemble code generated
5257 outside the JIT such as trampolines and IMT thunks.
5259 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5261 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5262 vtable pointer from a ldr instruction.
5264 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5265 new IMT call sequence.
5267 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5268 call sequence for interface invocations.
5270 * mini-arm.c (mono_arch_emit_imt_argument): added, required
5271 for imt support. This function is empty since IMT on ARM requires no
5272 special handling on the IR side.
5274 * mini-arm.c (mono_arch_find_imt_method): added, required for
5277 * mini-arm.c (mono_arch_find_this_argument): added, required
5280 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
5281 a ldr instruction to load a value stored in the code stream.
5283 * mini-arm.c (mono_arch_build_imt_thunk):added, required
5287 2007-10-23 Zoltan Varga <vargaz@gmail.com>
5289 * mini.c (mini_init): Install the jump trampoline callback.
5291 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5293 * mini-trampolines.c: handle synchronized methods with the common
5294 vtable trampoline (bug #335601).
5296 2007-10-17 Zoltan Varga <vargaz@gmail.com>
5298 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
5300 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
5303 * mini-ia64.h mini-ia64.c: Add support for IMT.
5305 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
5306 prolog. Fixes #331958.
5308 2007-10-15 Zoltan Varga <vargaz@gmail.com>
5310 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
5312 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5314 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
5317 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5319 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
5322 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
5324 * mini-x86.c, mini-x86.h: x86 support for the common vtable
5327 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5329 * mini-trampolines.c: changed the magic rampoline to understand
5330 the common vtable trampoline method: the method to invoke is
5331 determined by the vtable displacement of the call.
5333 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5335 * mini.c, mini.h: register the common vtable trampoline if the
5336 architecture supports it.
5338 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5340 * cpu-amd64.md: use the correct max length for tls_get.
5342 2007-10-14 Zoltan Varga <vargaz@gmail.com>
5344 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
5345 CEE_STELEM_ANY. Fixes #333696.
5347 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5349 * exceptions-x86.c: provide more graceful handling of the case where
5350 we followed a bogus function pointer from managed code (bug #332866).
5352 2007-10-11 Mark Probst <mark.probst@gmail.com>
5354 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
5355 replaces the generic_shared flag and will carry more information
5358 * generic-sharing.c: Added mini_type_stack_size() which allows
5359 allows open types if given a generic sharing context.
5360 mini_get_basic_type_from_generic() takes a
5361 MonoGenericSharingContext* instead of a MonoCompile* now.
5363 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
5364 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
5365 mini-sparc.c, mini-x86.c: Trivial changes required by the two
5366 changes above. Just passing arguments through to the right
5369 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5371 * mini-arm.c: unify the call emission to emit_code_seq().
5373 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
5375 * tramp-arm.c: reduced the trampoline size.
5377 2007-10-10 Mark Probst <mark.probst@gmail.com>
5379 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
5380 variable handling out of arch-specific code.
5382 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
5384 * mini-arm.c: implemented fast delegate dispatch.
5386 2007-10-09 Zoltan Varga <vargaz@gmail.com>
5388 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
5389 that fp elimination is turned off if the space required by locals is too
5392 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5394 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
5395 ARM to the new style trampoline.
5397 2007-10-09 Zoltan Varga <vargaz@gmail.com>
5399 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
5401 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
5403 2007-10-09 Martin Baulig <martin@ximian.com>
5406 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
5407 `field_info_offset_offset'.
5409 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
5411 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
5412 removed more internal usage of the r11 register and made it available
5413 to the register allocator.
5415 2007-10-08 Mark Probst <mark.probst@gmail.com>
5417 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
5418 when sharing generics and treat type variables as references.
5420 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5422 * mini-ppc.c: started removing the internal uses of register r11
5423 to eventually allow the register allocator to manage it as an
5424 additional available register.
5426 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5428 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
5430 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
5432 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
5433 specific trampolines as they are not performance critical as a jump
5434 target (maybe align as before only for AOT code?). This saves about
5435 200 KB of native code on x86 for monodevelop startup.
5437 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5439 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
5440 monodevelop startup.
5442 2007-10-06 Zoltan Varga <vargaz@gmail.com>
5444 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
5446 * mini-sparc.h mini-sparc.c: Implement IMT support.
5448 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
5449 its smaller and doesn't clobber sparc_g1.
5451 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
5453 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5455 * mini-ppc.c: optimized the size of the IMT thunks a bit.
5457 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5459 * mini-ppc.c: implemented fast delegate invocation.
5461 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5463 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
5465 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5467 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
5468 code to the new style trampoline in preparation for IMT support.
5470 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5472 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
5473 systems already. This also reduces the specific trampiline sizes and
5474 prepares for the use of r12 as the IMT identifier register.
5476 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5478 * mini-mips.h: endianess fix (simplified from a patch by
5479 Thomas Kunze <thommy@tabao.de>, bug #323737).
5481 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5483 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
5484 to access ucontext fields and enable netbsd support
5485 (partially from Magnus Henoch <mange@freemail.hu>).
5487 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5489 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
5490 use the preprocessor from the CPP env var if it is set.
5492 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5494 * mini-trampolines.c: fixed an assertion and moved it earlier in the
5495 code, before interface_offset gets used.
5497 2007-10-02 Zoltan Varga <vargaz@gmail.com>
5499 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
5500 mono_class_setup_vtable () before accessing klass->vtable.
5502 2007-10-01 Zoltan Varga <vargaz@gmail.com>
5504 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
5507 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5509 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
5510 IMT slots (this saves hundreds of KB of memory in programs like
5511 IronPython and Monodevelop).
5513 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5515 * mini.c: print the delegate counter.
5517 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
5519 * mini-x86.c: make it easier to enable the debugging code for IMT
5522 2007-09-28 Martin Baulig <martin@ximian.com>
5525 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
5526 `mono_method_klass_offset' and `mono_method_token_offset'.
5528 2007-09-20 Mark Probst <mark.probst@gmail.com>
5530 * mini.c: First generics sharing implementation. Can only share
5531 in very simple cases. If sharing doesn't work it falls back to
5532 dedicated compilation.
5534 * mini.h: Flag in MonoCompile to specify whether generic
5535 compilation is shared. Flags enum for marking which generic inst
5536 of a context is used. Prototypes for helper functions.
5538 * generic-sharing.c: Helper functions for generic method sharing.
5540 * optflags-def.h: Optimization flag (gshared) for enabling generic
5541 method sharing added.
5543 * Makefile.am: generic-sharing.c added.
5545 2007-09-19 Daniel Nauck <dna@mono-project.de>
5547 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
5549 2007-09-19 Massimiliano Mantione <massi@ximian.com>
5550 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
5553 2007-09-19 Martin Baulig <martin@ximian.com>
5555 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
5556 mono_debug_cleanup() is now part of mono_cleanup().
5558 2007-09-18 Zoltan Varga <vargaz@gmail.com>
5560 * driver.c (mono_main): Fix a warning.
5562 2007-09-17 Zoltan Varga <vargaz@gmail.com>
5564 * aot-compiler.c: Optimize various parts when processing large assemblies.
5567 * mini.c (mono_patch_info_hash): Improve hash function.
5569 2007-09-14 Jonathan Chambers <joncham@gmail.com>
5571 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
5573 Code is contributed under MIT/X11 license.
5575 2007-09-14 Zoltan Varga <vargaz@gmail.com>
5577 * mini.c (mini_init): Fix a leak.
5579 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
5581 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5583 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
5585 2007-09-14 Zoltan Varga <vargaz@gmail.com>
5587 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
5589 2007-09-13 Zoltan Varga <vargaz@gmail.com>
5591 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
5594 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
5596 * mini.c (handle_alloc): Enable managed allocators in AOT code.
5598 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
5600 * aot-runtime.c (decode_patch_info): Ditto.
5602 2007-09-12 Jonathan Chambers <joncham@gmail.com>
5604 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
5605 static case. Cache delegates in architecture specific code,
5606 based on number of parameters.
5608 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
5609 in architecture specific code, based on number of parameters.
5611 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
5612 caching happen in architecture specific code now.
5614 Code is contributed under MIT/X11 license.
5616 2007-09-12 Jonathan Chambers <joncham@gmail.com>
5618 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
5619 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
5620 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
5622 Code is contributed under MIT/X11 license.
5624 2007-05-15 Massimiliano Mantione <massi@ximian.com>
5625 * mini.c: (mono_thread_abort) Fixed bug #82416.
5627 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5629 * mini.: hook the new managed GC allocation feature into the JIT.
5631 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
5633 * mini.c: implementation for the new runtime tls opcode.
5635 2007-09-11 Martin Baulig <martin@ximian.com>
5638 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
5639 `mono_method_inflated_offset'.
5641 2007-09-07 Zoltan Varga <vargaz@gmail.com>
5643 * driver.c mini.h mini.c: Add a new devel command line option for injecting
5644 async exceptions into a method.
5646 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
5647 purpose of testing whenever the unwinder works at every instruction.
5649 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
5651 * mini.c: check accessibility of method used in ldftn (fixes
5654 2007-09-04 Zoltan Varga <vargaz@gmail.com>
5656 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
5658 * inssel.brg: Fix a warning.
5660 2007-09-03 Martin Baulig <martin@ximian.com>
5662 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
5663 now takes the `main_method' as argument.
5665 2007-09-02 Zoltan Varga <vargaz@gmail.com>
5667 * cpu-sparc.md (endfilter): Add missing src1:i argument.
5669 2007-08-30 Jonathan Chambers <joncham@gmail.com>
5671 * driver.c: include the cil-coff.h header on Windows.
5673 Code is contributed under MIT/X11 license.
5675 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
5677 * mini.c, driver.c: don't include the cil-coff.h header.
5679 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
5681 * mini.c: flag places that needs fixes fo soft-float support.
5683 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
5685 * mini.h, inssel-float.brg: fix soft-float constant loads on big
5686 endian systems (partially from Dean Jenkins, bug #81924).
5688 2007-08-28 Mark Probst <mark.probst@gmail.com>
5690 * mini.c (check_linkdemand): Remove embedded reference object in
5691 call to LinkDemandSecurityException.
5692 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
5693 with an IntPtr instead of a reference object.
5695 2007-08-28 Zoltan Varga <vargaz@gmail.com>
5697 * mini.c (handle_initobj): Handle alignment properly.
5699 * inssel.brg (mini_emit_memset): Ditto.
5701 * inssel.brg (mini_emit_memcpy): Ditto.
5703 * inssel-sparc.brg: Ditto.
5705 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
5707 2007-08-26 Zoltan Varga <vargaz@gmail.com>
5709 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
5710 exceptions raised in unmanaged code. Fixes part of #82594.
5712 2007-08-24 Mark Probst <mark.probst@gmail.com>
5714 * mini.c (mono_method_to_ir), declsec.c
5715 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
5717 2007-08-22 Martin Baulig <martin@ximian.com>
5720 (MonoDebuggerThreadInfo): New typedef.
5721 (mono_debugger_thread_table): New global variable.
5722 (mono_debugger_thread_created): New public function.
5723 (mono_debugger_thread_cleanup): New public function.
5727 - removed `get_current_thread' and `lookup_assembly'.
5728 - removed `data_table'.
5729 - added `thread_table'.
5732 (mono_thread_start_cb): Call mono_debugger_thread_created().
5733 (mono_thread_attach_cb): Likewise.
5734 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
5735 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
5738 * driver.c (mono_main): Move mono_debug_init() up, before calling
5739 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
5741 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
5743 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
5744 together when passing several arguments of type double (gives a small
5745 speedup and saves a few bytes of generated code).
5747 2007-08-20 Jb Evain <jbevain@novell.com>
5749 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
5751 2007-08-20 Jb Evain <jbevain@novell.com>
5753 * mini.c (mono_method_to_ir): throw MethodAccessException
5754 and FieldAccessException instead of InvalidProgramException.
5756 2007-08-20 Mark Probst <mark.probst@gmail.com>
5758 * mini.c: CoreCLR security checks.
5760 * mini.h: Removed MonoSecurityMode (moved to
5761 metadata/security-manager.h) and mono_security_mode global var
5762 (replaced by set/get functions in security-manager.h).
5764 * driver.c: Added "core-clr-test" security mode for testing. Used
5765 set-function for setting security mode.
5767 2007-08-17 Mark Probst <mark.probst@gmail.com>
5769 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
5770 the new jit_info_table.
5772 * driver.c: Test code for the new jit_info_table (enabled by the
5773 define MONO_JIT_INFO_TABLE_TEST).
5775 2007-08-14 Zoltan Varga <vargaz@gmail.com>
5777 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
5778 detection of call <REG> instruction sequence. Fixes build on freebsd.
5780 2007-08-13 Zoltan Varga <vargaz@gmail.com>
5782 * mini-exceptions.c: Fix a warning.
5784 2007-08-11 Zoltan Varga <vargaz@gmail.com>
5786 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
5787 stack overflow handling code on amd64 too.
5789 * mini-exceptions.c (mono_setup_altstack): Make this use
5790 mono_thread_get_stack_bounds ().
5792 * mini-x86.h: Disable sigaltstack on solaris x86.
5794 2007-08-10 Zoltan Varga <vargaz@gmail.com>
5796 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
5798 2007-08-10 Geoff Norton <gnorton@customerdna.com>
5800 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
5802 2007-08-08 Zoltan Varga <vargaz@gmail.com>
5804 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
5806 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
5808 2007-08-03 Neale Ferguson <neale@sinenomine.net>
5810 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
5813 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5815 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
5816 to be emitted (bug #82281).
5818 2007-08-01 Martin Baulig <martin@ximian.com>
5820 Merged the `debugger-dublin' branch.
5822 * debug-debugger.h (MonoDebuggerInfo):
5823 Removed the `old_*' compatibility entries.
5824 Added `debugger_version' and `data_table'.
5825 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
5826 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
5829 (MiniDebugMethodBreakpointInfo): Add `address_list'.
5830 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
5831 instead of a `gconstpointer'.
5832 (mono_debugger_insert_method_breakpoint): Return a
5833 `MonoDebugMethodAddressList *'.
5835 2007-06-28 Martin Baulig <martin@ximian.com>
5837 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
5839 2007-08-01 Zoltan Varga <vargaz@gmail.com>
5841 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
5842 __builtin_frame_address () since it is broken on older gcc versions.
5844 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5846 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
5847 on the stack overflow handling and made the managed stack overflows
5848 catchable in most cases using soft guard pages.
5849 * exceptions-x86.c: added code to restore the protection in the soft
5850 guard pages at the end of exception handling.
5852 2007-07-31 Zoltan Varga <vargaz@gmail.com>
5854 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
5856 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5858 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
5861 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
5863 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
5864 signal handling support until it has been ported to the new mechanism.
5865 * mini.c: fixed stack overflow detection and use the new
5866 architecture code to handle signals on the altstack.
5868 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
5870 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
5871 stack overflows on the alt stack.
5873 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
5875 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
5876 stack overflows on the alt stack.
5878 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
5880 * exceptions-ppc.c: cleanup preparing for altstack support.
5882 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
5884 * exceptions-arm.c: cleanup preparing for altstack support.
5886 2007-07-27 Mark Probst <mark.probst@gmail.com>
5888 * mini.c (print_jit_stats): Output hazard pointer stats.
5890 2007-07-26 Mark Probst <mark.probst@gmail.com>
5892 * driver.c, mini.c: Replaced security mode flags with a single
5895 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5897 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
5899 2007-07-25 Mark Probst <mark.probst@gmail.com>
5901 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
5902 (which doesn't do anything yet) for activating Core CLR
5903 (Silverlight) security.
5905 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
5907 * mini-codegen.c: work around a possible gcc bug on arm.
5909 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
5911 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
5912 message for platforms that don't support AOT compilation.
5914 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5916 * mini.h, mini.c, driver.c: temporary smcs hack.
5918 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
5920 * mini-arm.h, mini-arm.c: arm EABI fixes.
5922 2007-07-22 Zoltan Varga <vargaz@gmail.com>
5924 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
5927 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
5928 trampolines taking a method argument.
5930 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
5932 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
5933 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
5935 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
5936 JIT compilation throws an exception. Fixes #82050.
5938 2007-07-19 Mark Probst <mark.probst@gmail.com>
5940 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
5941 with the MONO_EXCEPTION_ defines.
5943 2007-07-17 Zoltan Varga <vargaz@gmail.com>
5945 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
5948 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
5949 the cause of an assertion.
5951 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
5953 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
5956 2007-07-15 Zoltan Varga <vargaz@gmail.com>
5958 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
5959 assert. Should fix #82103.
5961 2007-07-14 Zoltan Varga <vargaz@gmail.com>
5963 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
5964 here too. Fixes #82095.
5966 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
5969 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
5971 * mini-amd64.h: Enable IMT for amd64.
5973 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
5975 2007-07-12 Zoltan Varga <vargaz@gmail.com>
5977 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
5979 2007-07-12 Mark Probst <mark.probst@gmail.com>
5981 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
5982 as soon as check_linkdemand sets an exception_type.
5984 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
5986 * mini-x86.c: fixed offsets for IMT call sequence.
5987 * mini-x86.h: enable IMT again.
5989 2007-07-11 Zoltan Varga <vargaz@gmail.com>
5991 * trace.c (mono_trace_enter_method): Decode MonoType too.
5993 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
5995 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
5997 * mini-amd64.c: Add preliminary IMT implementation.
5999 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6001 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6002 understand the new IMT-base interface invocation (thanks to
6003 Daniel Nauck for the report and the remote debugging session).
6005 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6007 * mini-x86.c: size and speed optimizations for the IMT bsearch.
6009 2007-07-11 Zoltan Varga <vargaz@gmail.com>
6011 * Makefile.am (aotcheck): Make this actually use the AOTed code.
6013 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6015 * mini-trampolines.c: implement AOT IMT support.
6016 * mini-x86.h: enable IMT support for wider testing.
6018 2007-07-10 Zoltan Varga <vargaz@gmail.com>
6020 * inssel.brg (emit_imt_argument): Add aot support here.
6022 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6024 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6026 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6027 of the IMT implementation, partially from massi, with my
6028 implementation of the bsearch sequence. Disabled by default until
6029 the AOT code is implemented.
6031 2007-07-10 Zoltan Varga <vargaz@gmail.com>
6033 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6035 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6037 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6039 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6040 arch-independent IMT JIT code from Massimiliano
6041 Mantione (massi@ximian.com) with small cleanups from me.
6043 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6045 * Makefile.am: fix svn invocation to get the svn revision to be
6046 independent of the local language (build fix).
6048 2007-07-09 Mark Probst <mark.probst@gmail.com>
6050 * mini.c (inline_method): Reset cfg->exception_type if the
6051 inlining is aborted. Fixes: 82049.
6053 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6055 * mini.c: remove assert from exception handling code when exception_ptr
6058 2007-07-05 Zoltan Varga <vargaz@gmail.com>
6060 * mini.c (mono_codegen): Add an assert.
6062 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
6063 enter and leave code.
6064 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
6066 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6068 * mini-ppc.c: fixed memory corruption for localloc(0)
6071 2007-07-05 Zoltan Varga <vargaz@gmail.com>
6073 * mini.c: Fix warnings.
6075 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6077 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
6078 to emit better double->int conversions.
6080 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6082 * mini.c: the provided Min/Max optimizations are valid for unisgned
6085 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
6087 * 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
6089 2007-06-28 Miguel de Icaza <miguel@novell.com>
6091 * mini.c (mono_running_on_valgrind): Add support for reporting the
6092 method and its boundaries to valgrind.
6094 2007-06-28 Martin Baulig <martin@ximian.com>
6096 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6098 2007-06-25 Zoltan Varga <vargaz@gmail.com>
6100 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
6102 * generic.2.cs: Add new test case.
6104 2007-06-25 Martin Baulig <martin@ximian.com>
6106 Merged the `debugger-dublin' branch.
6109 (mono_debugger_insert_method_breakpoint): New public method.
6110 (mono_debugger_remove_method_breakpoint): Likewise.
6111 (mono_debugger_check_breakpoints): New static method.
6112 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
6114 * debug-debugger.h (MonoDebuggerInfo):
6115 Renamed (to keep backward compatibility in the vtable):
6116 `insert_breakpoint' -> `old_insert_breakpoint'.
6117 `remove_breakpoint' -> `old_remove_breakpoint'.
6118 `create_string' -> `old_create_string'.
6119 `lookup_class' -> `old_lookup_class'.
6120 `lookup_type' -> removed; changed into a dummy field.
6121 `lookup_assembly' -> `old_lookup_assembly'.
6122 Added (same functionality, but different signature):
6123 `create_string', `lookup_class', `lookup_assembly'
6125 `get_method_addr_or_bpt', `remove_method_breakpoint',
6126 `runtime_class_init'.
6128 * debug-debugger.c: Merged the `debugger-dublin' branch.
6130 2007-06-23 Zoltan Varga <vargaz@gmail.com>
6132 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6134 (peephole_pass): Likewise.
6136 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6138 * driver.c: hopefully make setaffinity work also for ancient
6141 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
6143 * driver.c : win32 build fix.
6145 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6147 * driver.c: check for the MONO_NO_SMP env var and bind to a single
6148 processor if it is set.
6150 2007-06-21 Martin Baulig <martin@ximian.com>
6152 * debug-mini.h: New file.
6155 (mono_debugger_insert_breakpoint_full): Moved here from
6156 ../metadata/mono-debug-debugger.c.
6157 (mono_debugger_remove_breakpoint): Likewise.
6158 (mono_debugger_breakpoint_callback): Likewise.
6160 2007-06-15 Raja R Harinath <rharinath@novell.com>
6162 * jit-icalls.c (mono_helper_compile_generic_method): Update to
6163 changes in MonoGenericClass.
6165 2007-06-14 Zoltan Varga <vargaz@gmail.com>
6167 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6169 2007-06-14 Raja R Harinath <rharinath@novell.com>
6171 * jit-icalls.c (mono_helper_compile_generic_method): Update to
6172 removal of MonoGenericMethod.
6174 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6176 * mini-exceptions.c: hooks for the exception events profiling API.
6178 2007-06-14 Randolph Chung <tausq@debian.org>
6180 * Makefile.ma: Add hppa target.
6181 * mini-arch.h: Include mini-hppa.h
6182 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6183 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6184 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6186 2007-06-14 Randolph Chung <tausq@debian.org>
6188 * inssel.brg: Add rules for "chained" compare-branch operations so that
6189 a single compare op can affect multiple branches. Adjust cost for
6190 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6191 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
6192 cost for some rules so that they can more easily be overridden by
6193 per-arch rules (with fixes from lupus).
6194 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6196 2007-06-13 Randolph Chung <tausq@debian.org>
6198 * mini-ops.h: Reorder branch ops so that they match the order of the
6199 corresponding CEE_* ops. The code expects them this way.
6200 Add new ops for HPPA target.
6201 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6203 2007-06-13 Randolph Chung <tausq@debian.org>
6205 * mini-exceptions.c: Handle cases where the stack grows towards
6207 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6209 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6211 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6213 * driver.c: explain where a non-matching corlib is found.
6215 2007-06-13 Mark Probst <mark.probst@gmail.com>
6217 * mini.c (print_jit_stats): Output dynamic code allocation stats.
6219 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
6221 * mini-exceptions.c: Generate a method profile leave event during
6222 an exception to ensure that the profiler gets notified.
6224 2007-06-07 Zoltan Varga <vargaz@gmail.com>
6226 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
6229 * cpu-amd64.md: Add long_and/or/xor opcodes.
6231 2007-06-06 Wade Berrier <wberrier@novell.com>
6233 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6234 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
6235 length of instruction shr_imm (expected 8, got 10)
6237 2007-06-06 Zoltan Varga <vargaz@gmail.com>
6239 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6241 2007-06-06 Mark Probst <mark.probst@gmail.com>
6243 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6244 MonoInternalHashTable again (fixed bug in the internal hash table
6247 2007-06-06 Mark Probst <mark.probst@gmail.com>
6249 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6250 Have to figure out what makes it crash the SWF regression.
6252 2007-06-05 Zoltan Varga <vargaz@gmail.com>
6254 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6256 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6258 * mini.c: optimize out the type check when storing null in a
6261 2007-06-04 Mark Probst <mark.probst@gmail.com>
6263 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6264 MonoInternalHashTable.
6266 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6268 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6269 signed integer methods.
6271 2007-06-02 Zoltan Varga <vargaz@gmail.com>
6273 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
6274 permanently since the current approach doesn't work.
6276 2007-06-02 Zoltan Varga <vargaz@gmail.com>
6278 * inssel.brg (stmt): Only call delegate->invoke_impl if
6279 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
6281 2007-06-01 Zoltan Varga <vargaz@gmail.com>
6283 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
6284 the sreg2==rdx case.
6286 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
6287 account if it contains a rex prefix.
6288 (peephole_pass): Handle OP_FMOVE as well.
6290 2007-06-01 Zoltan Varga <vargaz@gmail.com>
6292 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
6293 as it causes regressions.
6295 2007-05-31 Zoltan Varga <vargaz@gmail.com>
6297 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
6298 static case as well.
6300 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
6302 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6303 (mono_arch_get_this_arg_from_call): Ditto.
6305 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
6307 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
6310 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6311 (mono_arch_get_this_arg_from_call): Ditto.
6313 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
6315 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
6316 try to create optimized invoke code and use that for further invocations.
6317 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
6319 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
6321 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
6323 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
6324 sealed classes or methods.
6325 *devirtualization.cs: tests for the new optimization
6327 2007-05-29 Zoltan Varga <vargaz@gmail.com>
6329 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
6330 by the update_volatile () function.
6332 2007-05-27 Zoltan Varga <vargaz@gmail.com>
6334 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
6337 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
6339 2007-05-24 Jonathan Chambers <joncham@gmail.com>
6341 * mini.c: Add configure checks for header files.
6342 * mini-x86.c: Add configure checks for header files.
6343 * trace.c: Add configure checks for header files.
6344 * aot-runtime.c: Add configure checks for header files.
6345 * aot-compiler.c: Add configure checks for header files.
6346 * driver.c: Add configure checks for header files.
6347 * mini-codegen.c: Add configure checks for header files.
6349 Code is contributed under MIT/X11 license.
6351 2007-05-22 Zoltan Varga <vargaz@gmail.com>
6353 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
6354 icompare_imm -128 + op_iclt. Fixes #81703.
6356 2007-05-19 Zoltan Varga <vargaz@gmail.com>
6358 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
6360 2007-05-15 Massimiliano Mantione <massi@ximian.com>
6362 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
6363 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
6364 so that all isinst checks now use "interface_bitmap".
6366 2007-05-15 Zoltan Varga <vargaz@gmail.com>
6368 * cpu-amd64.md (jmp): Fix a warning.
6370 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
6372 * basic.cs: Add new regression test.
6374 * basic.cs: Remove test which is now in basic-long.cs.
6376 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
6378 * basic-long.cs: Add new test.
6380 2007-05-13 Zoltan Varga <vargaz@gmail.com>
6382 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
6384 2007-05-12 Zoltan Varga <vargaz@gmail.com>
6386 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
6388 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
6391 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
6392 throwing code a bit.
6394 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
6395 the exception throwing code a bit.
6397 * mini-x86.c (get_call_info): Allocate result from a mempool.
6399 2007-05-11 Zoltan Varga <vargaz@gmail.com>
6401 * aot-compiler.c (find_typespec_for_class): Fix the assert.
6403 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
6405 * mini.h (MonoCompile): Add 'token_info_hash' field.
6407 * mini.c: Save token->method associations during compilation so the AOT
6408 compiler can use it.
6410 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
6411 which reference generic classes and methods.
6413 2007-05-10 Zoltan Varga <vargaz@gmail.com>
6415 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
6417 * aot-compiler.c (compile_method): Fix a typo in a comment.
6419 * aot-runtime.c (decode_cached_class_info): Skip generic types.
6421 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
6424 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
6426 2007-05-09 Zoltan Varga <vargaz@gmail.com>
6428 * mini.h (MonoCompile): Add 'args' field.
6430 * mini.c (mono_compile_create_vars): Store variables representing the arguments
6433 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
6435 2007-05-08 Zoltan Varga <vargaz@gmail.com>
6437 * mini.c (mono_compile_get_interface_var): Remove this unused function.
6439 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
6441 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
6442 opcodes for some opcodes.
6444 * mini.h *.brg *.c: Use the new opcodes.
6446 2007-05-08 Massimiliano Mantione <massi@ximian.com>
6448 * mini.h: Bumped aot revision.
6450 * inssel.brg: modified code generation of type checks for interfaces
6451 to use the new "MonoClass.interface_bitmap" instead of the old
6452 "MonoClass.interface_offsets".
6454 2007-04-30 Zoltan Varga <vargaz@gmail.com>
6456 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
6458 2007-04-29 Zoltan Varga <vargaz@gmail.com>
6460 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
6463 2007-04-27 Neale Ferguson <neale@sinenomine.net>
6465 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
6467 2007-04-27 Wade Berrier <wberrier@novell.com>
6469 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
6470 mini.h) to fix build.
6472 2007-04-26 Zoltan Varga <vargaz@gmail.com>
6474 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
6476 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
6477 causes the corlib unit tests to fail.
6479 2007-04-25 Zoltan Varga <vargaz@gmail.com>
6481 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
6483 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
6485 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
6486 opcodes to the comparison relations.
6488 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
6489 opcodes to their types.
6491 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
6493 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
6494 it in cfg->arch.cinfo.
6496 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
6498 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
6499 cfg->cil_offset_to_bb.
6501 2007-04-24 Zoltan Varga <vargaz@gmail.com>
6503 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
6504 created becase of initlocals.
6506 2007-04-23 Zoltan Varga <vargaz@gmail.com>
6508 * mini-alpha.c cpu-alpha.md: More alpha port work from
6509 Sergey Tikhonov <tsv@solvo.ru>.
6511 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
6513 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
6515 2007-04-19 Zoltan Varga <vargaz@gmail.com>
6517 * cpu-s390.md (break): Correct the length of break instruction.
6519 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6521 * mini.c: fix a couple of soft-float issues and comments.
6523 2007-04-15 Miguel de Icaza <miguel@novell.com>
6525 * trace.c (is_filenamechar): - is also a filename char.
6527 2007-04-15 Neale Ferguson <neale@sinenomine.net>
6529 * mini-s390.c: Correct checking for enum type in return value processing.
6531 2007-04-14 Raja R Harinath <rharinath@novell.com>
6533 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
6534 (version.h): Makefile is in the build directory.
6536 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
6538 * mini-amd64.h: fix for assertion failure on Solaris/amd64
6540 2007-04-11 Martin Baulig <martin@ximian.com>
6542 * mini.c (can_access_member): Fix handling of generic classes;
6545 2007-04-10 Zoltan Varga <vargaz@gmail.com>
6547 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
6549 2007-04-05 Zoltan Varga <vargaz@gmail.com>
6551 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
6553 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6555 * mini-codegen.c: make sure the right spill amount is
6556 used for fp or integer registers (fixes the float_sub_spill() on ppc).
6558 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
6560 * mini-ppc.c: fixes for the fp_branch_nan test.
6562 2007-03-23 Zoltan Varga <vargaz@gmail.com>
6564 * basic.cs: Comment out new test which still fails on ia64.
6566 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
6568 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
6570 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6572 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
6574 2007-03-22 Zoltan Varga <vargaz@gmail.com>
6576 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
6577 on 64 bit machines. Fixes part of #80738.
6579 * basic.cs: Add regression test.
6581 2007-03-17 Zoltan Varga <vargaz@gmail.com>
6583 * inssel.brg basic.cs: Revert previous change to fix build.
6585 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
6588 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
6590 * basic.cs: Add new regression test.
6592 2007-03-17 Zoltan Varga <vargaz@gmail.com>
6594 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
6597 2007-03-16 Neale Ferguson <neale@sinenomine.net>
6599 * cpu-s390x.md: Correct length of break instruction.
6601 2007-03-16 Neale Ferguson <neale@sinenomine.net>
6603 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
6604 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
6606 2007-03-15 Jonathan Chambers <joncham@gmail.com>
6608 * *.c: Begin WIN64 port.
6609 * mini.c: Use correct register in profiler.
6610 * mini-amd64.c: No inline assembly on Win64.
6611 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
6612 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
6613 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
6614 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
6615 mono_arch_ip_from_context for Win64.
6617 Contributed under MIT/X11 license.
6619 2007-03-15 Zoltan Varga <vargaz@gmail.com>
6621 * exceptions-amd64.c (seh_handler): Ditto.
6623 * exceptions-x86.c (seh_handler): Fix a memory leak.
6625 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
6627 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
6628 mini-s390x.c: fixed peephole optimizations to deal
6629 correctly with 1 and 2 byte reload avoidance.
6631 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
6633 * cpu-s390.md, cpu-s390x.md: update localloc length.
6635 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6637 * cpu-g4.md: added missing descriptions.
6639 2007-03-14 Miguel de Icaza <miguel@novell.com>
6641 * Makefile.am: Add support so the tail tests are not executed on
6642 PowerPC as that is a known limitation of the PowerPC port.
6644 2007-03-13 Jonathan Chambers <joncham@gmail.com>
6646 * runmdesc.bat: Move to msvc directory.
6648 2007-03-13 Jonathan Chambers <joncham@gmail.com>
6650 * runmdesc.bat: Run executable that was produced by the current
6651 target and sent via an argument.
6653 2007-03-11 Zoltan Varga <vargaz@gmail.com>
6655 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
6658 * generics.2.cs: Add regression test.
6660 2007-03-09 Wade berrier <wberrier@novell.com>
6662 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
6664 2007-03-09 Zoltan Varga <vargaz@gmail.com>
6666 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
6667 AOT code depends on this.
6669 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6671 * mini.c: more precise tracking of types in the eval stack
6672 (part of fix for bug #81044).
6674 2007-03-07 Zoltan Varga <vargaz@gmail.com>
6676 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
6678 * aot-compiler.c (encode_patch): Remove an obsolete comment.
6680 2007-03-06 Zoltan Varga <vargaz@gmail.com>
6682 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
6684 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
6686 2007-02-22 Zoltan Varga <vargaz@gmail.com>
6688 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
6689 a pointer on 64 bit systems. Fixes #80190.
6691 * iltests.il: Add new regression test.
6693 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6695 * mini.c: inline a constant for Environment.IsRunningOnWindows.
6697 2007-02-19 Geoff Norton <gnorton@customerdna.com>
6699 * trace.c: Remove an erroneous alignemnt check when tracing.
6700 Fixes --trace on OSX86.
6702 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6704 * mini-$(arch).h: initialize SP in context for all the archs.
6706 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
6708 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
6709 regressions in the thread tests.
6711 2007-02-14 Zoltan Varga <vargaz@gmail.com>
6713 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
6714 - fixed implementation of LOCALLOC opcode
6715 - implemented non-un compare for floats
6717 - implementation of FDIV and CKFINITE opcodes
6718 - fixes for latest mono updates
6719 - additional arch opcodes
6721 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
6723 * Makefile.am: simplify and merge rules for cross-compilation.
6725 2007-02-07 Massimiliano Mantione <massi@ximian.com>
6727 * local-propagation.c: Actually *apply* the fix for bug 80591...
6729 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
6731 * mini-exceptions.c: backuot part of the last change
6732 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
6734 2007-02-06 Massimiliano Mantione <massi@ximian.com>
6735 * inssel.brg: Fix bug 59286.
6738 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
6740 * mini-exceptions.c: patch from Zoltan to correctly check for
6741 stack boundaries (using the stack register, not the frame register),
6742 fixes bugs #80724, #79717.
6744 2007-02-03 Zoltan Varga <vargaz@gmail.com>
6746 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
6747 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
6749 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
6750 presence of frame pointer elimination.
6752 2007-02-01 Geoff Norton <gnorton@customerdna.com>
6754 * mini-x86.h: NetBSD UCONTEX_REG defines.
6756 2007-02-01 Zoltan Varga <vargaz@gmail.com>
6758 * inssel-amd64.brg: Fix amd64 build.
6760 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
6762 * mini.h: remove extern to workaround what looks likes gcc bug 26905
6765 2007-01-31 Zoltan Varga <vargaz@gmail.com>
6767 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
6770 * mini-<ARCH>.c: Use mono_is_regsize_var ().
6772 2007-01-30 Mark Mason <mason@broadcom.com>
6774 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
6775 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
6776 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
6777 beginning support for CEE_JMP [not quite working yet]
6778 * tramp-mips.c: LMF handling now works
6780 2007-01-30 Zoltan Varga <vargaz@gmail.com>
6782 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
6784 * mini.h (NULLIFY_INS): New macro.
6786 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6788 * mini.c: statistical profiler fix for windows, patch
6789 from Tor Lillqvist (tml@novell.com).
6791 2007-01-30 Massimiliano Mantione <massi@ximian.com>
6792 * local-propagation.c: Fix bug 80591.
6794 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6796 * Makefile.am: put back the --export-dynamic option as with
6797 the previous gmodule flags (thanks to Robert Jordan).
6799 2007-01-28 Zoltan Varga <vargaz@gmail.com>
6801 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
6803 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
6804 simplify and speed up the local register allocator. Also rename some fields
6805 like iassign->vassign.
6807 * regalloc.c: Remove some functions which are no longer used since their
6808 inlined version is in mini-codegen.c.
6810 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
6812 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
6814 2007-01-27 Zoltan Varga <vargaz@gmail.com>
6816 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
6817 narrowing. Fixes #80622.
6819 * iltests.il: Add new regresssion test.
6821 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6823 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
6824 debug-debugger.c, debug-debugger.h: warning fixes.
6825 * driver.c: updated copyright year and made it fit in one line.
6827 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
6829 * aot-runtime.c: updated to use mono-dl instead of gmodule.
6831 2007-01-25 Zoltan Varga <vargaz@gmail.com>
6833 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
6835 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
6837 * iltests.il: Add new test for bug #80507.
6839 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
6841 * mini-arm.h: use soft-float also on vfp for now.
6843 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6845 * mini.c: fix some more soft-float issues.
6847 2007-01-24 Zoltan Varga <vargaz@gmail.com>
6849 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
6851 2007-01-24 Massimiliano Mantione <massi@ximian.com>
6852 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
6853 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
6854 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
6856 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
6858 * mini-arm.c: typo fix.
6860 2007-01-23 Neale Ferguson <neale@sinenomine.net>
6862 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
6864 2007-01-21 Zoltan Varga <vargaz@gmail.com>
6866 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
6867 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
6869 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
6871 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
6873 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
6875 * inssel.brg: Fix a warning.
6877 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
6879 * abcremoval.c ssa.c ssapre.c: Update after this change.
6881 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
6883 * dominators.c (df_set): Use mono_bitset_union_fast.
6885 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6887 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
6888 mini-codegen.c: reduce relocations and memory usage for the cpu
6891 2007-01-20 Zoltan Varga <vargaz@gmail.com>
6893 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
6895 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
6896 to reduce their size.
6898 2007-01-19 Mark Mason <mason@broadcom.com>
6900 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
6901 * mini-mips.c: more configuration macros, support long conditional branches, additional
6902 asserts, fix epilog instrumentation.
6903 * mini-mips.h: use standard stack walk
6904 * cpu-mips.md: increase size of div, rem and conditional branches
6906 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
6908 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
6911 2007-01-19 Zoltan Varga <vargaz@gmail.com>
6913 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
6914 (compile_method): Ditto.
6916 * aot-runtime.c (decode_klass_info): Ditto.
6918 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
6919 needed by the code generated by inssel.brg. Also fix a warning.
6921 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
6923 * mini.c: deal with enums that become genericinsts by
6924 being nested in a generic class (bug #79956).
6926 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
6928 * mini.c: match the generic definition to check for
6929 private access with generic types (bug #78431).
6931 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
6933 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
6934 to make life easier for people cross-compiling that insist on not
6937 2007-01-17 Mark Mason <mason@broadcom.com>
6939 * inssel-long.brg: patch to deal with mips missing flags
6940 * inssel-long32-mips.brg: implement overflow checks
6941 * insset-mips.brg: implement overflow checks
6942 * mini-mips.h: implement conditional exception handling
6943 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
6944 Remove unused code, minor cleanups.
6945 * exceptions-mips.c: minor cleanups
6946 * mini-ops.h: add mips conditional exception ops
6947 * cpu-mips.md: add mips conditional exception ops
6950 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
6952 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
6953 to deal with mips missing of flags.
6955 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
6957 * exceptions-ppc.c: execute fault handlers.
6959 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
6961 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
6963 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
6965 * mini.c: handle also floating point values in initialize_array.
6967 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
6969 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
6970 array initialization and make it conditional on the intrins option.
6972 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
6974 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
6975 relocations and put the patch info names close to the enum definition.
6977 2007-01-15 Mark Mason <mason@broadcom.com>
6979 * basic.cs, exceptions.cs: break up large tests to increase debugability.
6981 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6983 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
6985 2007-01-12 Raja R Harinath <rharinath@novell.com>
6987 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
6989 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
6991 * Makefile.am: distribute the mips sources.
6993 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6995 * mini-codegen.h: handle bug #80489 here, by excluding ecx
6998 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
7000 * cpu-x86.md: back out for now as this triggers other regressions.
7002 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7004 * cpu-x86.md: force src1 and dest regpair for long shift instructions
7005 to eax:edx, so ecx can't get allocated to them (bug #80489).
7007 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7009 * mini.c, mini-exceptions.c: enabled running fault handlers
7012 2007-01-03 Miguel de Icaza <miguel@novell.com>
7014 * driver.c: If nothing fail, do not use the string "failed",
7015 because it makes it very annoying to view test result logs on the
7018 2006-12-30 Miguel de Icaza <miguel@novell.com>
7020 * debug-debugger.c (mono_debugger_main): Rename "main" to
7021 "main_method" to prevent a warning.
7023 Remove a warning for unused field.
7025 2006-12-28 Martin Baulig <martin@ximian.com>
7028 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7030 2006-12-22 Martin Baulig <martin@ximian.com>
7032 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7033 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7034 seperate `.mdb_debug_info' section, so we can access it from the
7035 debugger even if the binary is stripped.
7037 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7038 from the `.mdb_debug_info' here to prevent the linker from
7039 removing that section.
7041 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7044 2006-12-19 Robert Jordan <robertj@gmx.net>
7046 * mini-x86: enable the code to return small structures in
7047 registers for FreeBSD as well. Fixes bug #80278.
7048 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7050 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7052 * mini-x86.c: align the stack when calling the profiler
7053 function instrumenting the prolog (on OSX).
7055 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7057 * mini.c: emit a break opcode where Debugger.Break () is called.
7059 2006-12-13 Miguel de Icaza <miguel@novell.com>
7061 * mini.c (mono_method_to_ir): Provide useful information on this
7062 assert, to prevent others from debugging like I did.
7064 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7066 * mini.c: enable code which was incorrectly commented
7069 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7071 * mini-x86.c: enable on OSX, too, the code to return small
7072 structures in registers.
7074 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7076 * mini-x86.c: remove the use of the dynamic code manager here, too.
7078 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7080 * mini.h, debug-debugger.c, tramp-*.c: fixed
7081 mono_debugger_create_notification_function() to use
7082 mono_global_codeman_reserve () instead of a dynamic code manager.
7084 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
7086 * mini.c, jit-icalls.h, jit-icalls.c: remove the
7087 ves_array_element_address() jit icall and use a generated
7088 managed method instead (which is about 4 times faster for a rank 3
7091 2006-11-29 Mark Mason <mason@broadcom.com>
7093 * basic-calls.cs: additional tests for passing
7094 structures as function arguments.
7096 2006-11-29 Mark Mason <mason@broadcom.com>
7098 * mini-mips.h: disable custom exception handling
7099 * mini-mips.c: throw/rethrow should use jalr to call
7100 exception stubs. Fixed bug with passing structures
7101 by value. More support for tracing floating point
7104 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7106 * mini.c: fixed typo in the soft-float ldind.r4 handling
7109 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7111 * mini.c, mini.h, driver.c: added --runtime command line
7112 option to select a different runtime than the autodetected one.
7113 * jit.h: added API for embedders to initialize with a specific
7116 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7118 * mini.c: handle also boxing of r4 values (bug #80024).
7120 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7122 * mini-ppc.c: force indirect calls until we reserve
7123 enough address space for all the generated code.
7125 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7127 * exceptions-arm.c: workaround bugs in the libc definition
7130 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7132 * inssel.brg: fixes from me and Mark Mason.
7134 2006-11-23 Dick Porter <dick@ximian.com>
7136 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7137 semaphore display now we've fixed the initial value
7139 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7141 * inssel.brg: partially revert the last change to fix the build.
7143 2006-11-21 Mark Mason <mason@broadcom.com>
7145 * inssel.brg: Add and use compare-and-branch macros to support
7146 architectures that do not have condition code registers (ie. MIPS).
7147 * *-mips.{c,brg,md}: Fix copyright statements
7149 2006-11-20 Mark Mason <mason@broadcom.com>
7151 * Makefile.am: remove mini-codegen.c from list of MIPS sources
7152 * mini.c: Allow GET_CONTEXT to be specified by the arch port
7153 * mini.h: Added declaration for mono_print_ins()
7154 * mini-codegen.c: added ins_spec initializer for MIPS
7155 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7156 vreg to be virtual and hreg to be non-virtual.
7157 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7158 is not yet working/implemented correctly.
7159 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7160 non-static, fixup calls to print_ins() from other parts in the file.
7162 2006-11-20 Mark Mason <mason@broadcom.com>
7164 * basic-calls.cs: added tests for passing structures as arguments
7167 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7169 * inssel-long32.brg: optimize signed division by power of two.
7171 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7173 * mini-arm.c: added support for interworking with thumb code
7174 (mono must be still be built using the ARM instruction encoding).
7176 2006-11-19 Miguel de Icaza <miguel@novell.com>
7178 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7179 verifier has different rules for it. Fixes a few verifier issues
7182 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7183 at the end, so people know what happened.
7185 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7187 * brach-opts.c: in optimize_exception_target() make sure we
7188 are in a catch clause (fixes bug #79871).
7190 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7192 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7193 more soft-float support fixes.
7195 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7197 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7198 that are passed half on the stack and half in registers.
7200 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7202 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7203 more mips integration work from Mark E Mason
7204 <mark.e.mason@broadcom.com>.
7206 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7208 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7209 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7210 tramp-mips.c: added sources for the mips port, not
7211 integrated in the build yet. Contributed by
7212 Mark E Mason <mark.e.mason@broadcom.com>.
7214 2006-11-14 Neale Ferguson <neale@sinenomine.net>
7216 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7218 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7220 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7221 put the soft-float rules in its own file since it seems to
7222 break s390 compilation.
7224 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7226 * mini-arm.c: fixed wrnings.
7228 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7230 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7231 inssel-arm.brg: ARM support for soft-float.
7233 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7235 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7236 loads and stores of 32 bit fp values.
7238 2006-11-10 Zoltan Varga <vargaz@gmail.com>
7240 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7242 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7243 works. Fixes #79852 and #79463.
7245 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7247 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7248 more soft-float support WIP and fixes.
7250 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7252 * mini-arm.c: some VFP updates.
7254 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7256 * mini-exceptions.c: 0 is a valid local var offset in some
7257 architectures, don't assert (bug #78508).
7259 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7261 * exceptions-arm.c: fixed off by one error in stack walk code.
7263 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7265 * mini.h, mini.c: more precise tracking of type load exceptions.
7267 2006-11-03 Robert Jordan <robertj@gmx.net>
7269 * Makefile.am: [WIN32] Add monow.exe target.
7270 * driver.c: [WIN32] Don't detach the console when debugging.
7273 2006-10-30 Miguel de Icaza <miguel@novell.com>
7275 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
7277 2006-10-23 Zoltan Varga <vargaz@gmail.com>
7279 * aot-compiler.c (emit_method_info): Add a case missed earlier.
7281 * driver.c (mini_regression): Fix --regression with AOT.
7283 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
7285 2006-10-17 Zoltan Varga <vargaz@gmail.com>
7287 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
7289 * mini-sparc.h: Don't use sigaction on sparc/linux.
7291 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
7293 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
7295 * mini-exceptions.c: Add proper include files for getpid ().
7297 2006-10-16 Zoltan Varga <vargaz@gmail.com>
7299 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
7300 address instead of a MonoJitInfo* to avoid decoding the exception info for the
7303 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
7304 name cache to reduce its size.
7306 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7308 2006-10-15 Zoltan Varga <vargaz@gmail.com>
7310 * mini-x86.c: Save/restore the current LMF structure more efficiently using
7311 the mono_lmf TLS variable.
7313 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
7314 trampoline lmf frames.
7316 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
7318 2006-10-14 Zoltan Varga <vargaz@gmail.com>
7320 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
7321 the mono_lmf TLS variable.
7323 * mini-exceptions.c: Access the LMF structure through accessors.
7325 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
7326 variable instead of in jit_tls->lmf.
7328 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
7330 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
7331 trampoline lmf frames.
7333 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
7335 2006-10-12 Zoltan Varga <vargaz@gmail.com>
7337 * mini.c trace.c mini-x86.c: Revert these too.
7339 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
7342 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
7344 * genmdesc.c: removed now dead code.
7346 2006-10-09 Robert Jordan <robertj@gmx.net>
7348 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
7350 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
7352 * mini.h: do not leave gaps in the opcode values.
7354 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
7356 * jit-icalls.h: flag functions as internal here, too.
7358 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
7360 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
7361 functions with the internal attribute.
7363 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
7365 * aot-compiler.c: fclose the file descriptor in the profile read loop.
7367 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7369 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
7372 2006-10-05 Zoltan Varga <vargaz@gmail.com>
7374 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
7375 tail calls as on other platforms.
7377 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
7379 * iltests.il: Add a few tailcall tests.
7381 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7383 * driver.c: fix loop for old compilers (bug #79521).
7385 2006-10-02 Zoltan Varga <vargaz@gmail.com>
7387 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
7389 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
7391 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
7392 metadata without any code.
7394 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
7395 more precise debugging information using gdb.
7397 2006-09-30 Zoltan Varga <vargaz@gmail.com>
7399 * inssel-ia64.brg: Make the helper methods static.
7401 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7403 * inssel-x86.brg: make the helper methods static.
7405 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
7407 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
7409 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7411 * mini.c: updates for monoburg changes.
7412 * inssel.brg: make a few helper functions static as they should.
7414 2006-09-27 Zoltan Varga <vargaz@gmail.com>
7416 * Makefile.am: Move mini-codegen.c to common_sources.
7418 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7420 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
7422 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
7423 mini-ppc.h: port to use the common local register allocator.
7425 2006-09-26 Zoltan Varga <vargaz@gmail.com>
7427 * mini.h: Remove the comment too then.
7429 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
7431 * mini.h: put back backend.data which is to be used shortly and
7432 doesn't increase the size of MonoInst. If any 64 bit arch aligned
7433 pointers on 4 byte boundaries it'd have much bigger issues running
7434 and you can ifdef it out anyway.
7436 2006-09-26 Zoltan Varga <vargaz@gmail.com>
7438 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
7439 MonoInst size by 4 bytes on 64 bit machines.
7441 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
7443 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
7444 replacement with more meaningful field names. Arch maintainers, please
7445 check the assigned names are good enough for your arch.
7447 2006-09-26 Zoltan Varga <vargaz@gmail.com>
7449 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
7450 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
7452 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
7454 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
7455 relocations and memory requirements, put the optimization flags
7456 definitions in their own file.
7458 2006-09-24 Zoltan Varga <vargaz@gmail.com>
7460 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
7462 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
7464 2006-09-22 Zoltan Varga <vargaz@gmail.com>
7466 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
7468 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
7470 * inssel.brg: use the correct function to get the size of an item
7471 in an array, given an element class.
7472 * aot-compiler.c: do not access class->class_size directly.
7474 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
7476 * mini.h, debug-mini.c: added a debugging function to print
7477 info about local variables and arguments in a jitted method.
7479 2006-09-20 Zoltan Varga <vargaz@gmail.com>
7481 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7483 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
7485 2006-09-19 Zoltan Varga <vargaz@gmail.com>
7487 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
7488 inner and outer loops when passing vtypes.
7490 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
7492 * mini-ppc.c: take into account the cpu errata for cache flushing
7493 which caused some random errors (bug #79381).
7495 2006-09-19 Zoltan Varga <vargaz@gmail.com>
7497 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
7498 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
7500 2006-09-17 Zoltan Varga <vargaz@gmail.com>
7502 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
7505 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
7508 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
7509 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
7511 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
7514 2006-09-13 Zoltan Varga <vargaz@gmail.com>
7516 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
7518 2006-09-12 Zoltan Varga <vargaz@gmail.com>
7520 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
7521 macro does not have to be changed during debugging.
7523 * 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>.
7525 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
7527 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
7529 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
7530 MONO_ARCH_NO_EMULATE_MUL is defined.
7532 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
7534 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
7536 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
7538 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
7540 2006-09-11 Zoltan Varga <vargaz@gmail.com>
7542 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
7543 stuff to mini-exceptions.c where it is used.
7545 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
7546 setup code, the real one is in mini-exceptions.c.
7548 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
7549 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
7550 some changes from the freebsd ports tree.
7552 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
7555 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
7557 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
7559 * mini.c: on Linux, check for /proc to be mounted
7560 (bug# 79351, novell bug#201204).
7562 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
7564 * mini.c: handle cases where pthread_attr_getstack() behaves
7565 incorrectly (bug #78096).
7567 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
7569 * mini-arm.c: support larger stack frames (bug #79272).
7571 2006-09-08 Zoltan Varga <vargaz@gmail.com>
7573 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
7575 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
7578 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
7579 mono_class_from_name () to find a class from its name.
7581 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
7583 2006-09-07 Zoltan Varga <vargaz@gmail.com>
7585 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
7587 2006-09-05 Kornél Pál <kornelpal@gmail.com>
7589 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
7591 2006-09-04 Zoltan Varga <vargaz@gmail.com>
7593 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
7594 callinfo->trampoline.
7596 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
7598 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
7601 2006-09-03 Zoltan Varga <vargaz@gmail.com>
7603 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
7605 2006-09-02 Zoltan Varga <vargaz@gmail.com>
7607 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
7608 stats.method_trampolines, it is already done by the generic trampoline code.
7610 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
7612 2006-09-01 Zoltan Varga <vargaz@gmail.com>
7614 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
7616 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
7618 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
7620 * mini.c (print_jit_stats): Print mscorlib mempool size too.
7622 * mini.c (print_jit_stats): Print new stats.
7624 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
7626 2006-08-31 Zoltan Varga <vargaz@gmail.com>
7628 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
7629 Address on two dimensional arrays. Fixes #78729.
7631 * mini.h (MonoCompile): Add a 'skip_visibility' field.
7633 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
7636 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
7638 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
7641 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
7643 (mini_get_ldelema_ins): Ditto.
7645 2006-08-30 Zoltan Varga <vargaz@gmail.com>
7647 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
7648 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
7651 2006-08-29 Neale Ferguson <neale@sinenomine.net>
7653 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
7654 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
7656 * exceptions-s390x.c: Cosmetic change.
7658 * tramp-s390.c: Fix warning.
7660 * cpu-s390.md: Correct length of mul_imm.
7662 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
7664 * aot-compiler.c: added binary writer with ELF backend
7665 implementation (only on Linux/x86 for now).
7667 2006-08-18 Zoltan Varga <vargaz@gmail.com>
7669 * Makefile.am: Don't run net 2.0 AOT tests.
7671 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
7672 (mono_compile_assembly): Skip net 2.0 assemblies as well.
7674 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
7676 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
7678 * aot-compiler.c: simplified and refactored the asm-writing code
7679 to allow different backends.
7681 2006-08-18 Zoltan Varga <vargaz@gmail.com>
7683 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7685 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
7686 little. Share patches of type TYPE_FROM_HANDLE as well.
7688 * mini.c (mono_patch_info_equal): New helper function.
7689 (mono_patch_info_hash): Ditto.
7691 * aot-compiler.c (emit_method_code): Fix s390 build.
7693 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
7694 is not handled because it is stored as a flag and not as a type ctor. Fixes
7697 2006-08-17 Zoltan Varga <vargaz@gmail.com>
7699 * aot-compiler.c: Fix computation of GOT slot statistics.
7701 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
7702 Also remove support for not PIC AOT.
7704 * mini.h: Bump AOT file format version.
7706 * objects.cs: Add a test for #78990.
7708 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
7709 (peter.dettman@iinet.net.au). Fixes #79087.
7711 * basic-long.cs: Add a test for the above.
7713 2006-08-16 Zoltan Varga <vargaz@gmail.com>
7715 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
7717 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
7720 2006-08-15 Zoltan Varga <vargaz@gmail.com>
7722 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
7725 2006-08-10 Jonathan Chambers <joncham@gmail.com>
7727 * mini.c: Don't verify COM proxy invoke calls
7730 2006-08-10 Dick Porter <dick@ximian.com>
7732 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
7733 which process is holding semaphores locked.
7735 2006-08-08 Zoltan Varga <vargaz@gmail.com>
7737 * mini-ia64.c mini-amd64.c: Fix #79027.
7739 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
7741 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
7743 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
7744 implicit arguments in a vararg call. Fixes #79027.
7746 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
7748 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
7749 (mono_get_array_new_va_signature): Ditto.
7751 2006-08-05 Zoltan Varga <vargaz@gmail.com>
7753 * aot-runtime.c: Call init_plt lazily.
7755 * inssel-long.brg: Fix unsigned long->int conversion.
7757 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
7759 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
7760 that most data is now in the .rss/.data section.
7762 2006-08-04 Zoltan Varga <vargaz@gmail.com>
7764 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
7766 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
7768 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
7770 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
7772 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
7773 virtual call. Fixes #79010.
7775 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
7776 and use the result as the this argument in the real call.
7778 * generics.2.cs: Add a new test for #79010.
7780 2006-08-03 Zoltan Varga <vargaz@gmail.com>
7782 * mini-x86.c: Fix a warning.
7784 * aot-compiler.c: Add a bunch of statistics.
7786 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
7788 2006-08-02 Zoltan Varga <vargaz@gmail.com>
7790 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
7792 2006-08-01 Zoltan Varga <vargaz@gmail.com>
7794 * 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>.
7796 2006-07-13 Miguel de Icaza <miguel@novell.com>
7798 * mini.c (mono_method_to_ir): Obtain the original method in the
7799 CIL stream and use this to perform validation.
7803 2006-07-19 Zoltan Varga <vargaz@gmail.com>
7805 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
7806 (mono_arch_call_opcode): Ditto.
7808 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
7811 * mini.c (mono_patch_info_dup_mp): New helper function.
7813 * aot-compiler.c (compile_method): Fix some of the memory allocated during
7814 compilation. Fixes #78827.
7816 2006-07-18 Kornél Pál <kornelpal@gmail.com>
7818 * declsec.c: Use original security informations for
7819 MONO_WRAPPER_MANAGED_TO_MANAGED.
7821 2006-07-15 Jonathan Chambers <joncham@gmail.com>
7823 * mini.c: Allow Com Interop methods/classes and
7824 don't verify COM wrapper calls
7827 2006-07-13 Zoltan Varga <vargaz@gmail.com>
7829 * inssel-long32.brg: Fix long->i4 checked conversion.
7831 * exceptions.cs: Add a test for the above.
7833 2006-07-08 Zoltan Varga <vargaz@gmail.com>
7835 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
7837 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
7840 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
7843 2006-07-03 Zoltan Varga <vargaz@gmail.com>
7845 * mini.c: Fix solaris/x86 exception handling.
7847 * Makefile.am: Get rid of $(ICU_LIBS).
7849 2006-07-02 Zoltan Varga <vargaz@gmail.com>
7851 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
7852 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
7853 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
7855 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
7857 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
7858 this function causes a SIGSEGV.
7860 2006-06-22 Zoltan Varga <vargaz@gmail.com>
7862 * mini.c: Remove unused solaris/x86 includes.
7864 2006-06-21 Zoltan Varga <vargaz@gmail.com>
7866 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
7868 2006-06-20 Jb Evain <jbevain@gmail.com>
7870 * cpu-g4.md: fix max length of start_handler instruction.
7872 2006-06-20 Massimiliano Mantione <massi@ximian.com>
7873 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
7875 2006-06-16 Massimiliano Mantione <massi@ximian.com>
7876 * ssa.c: Fixed bug 78653 for SSA based deadce.
7877 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
7878 MonoInst.flags, used in SSA based deadce.
7879 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
7880 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
7882 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
7884 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
7885 it can end up using non executable memory on ppc64 systems
7886 running ppc32 userspace (fix from Johannes Berg).
7888 2006-06-14 Dick Porter <dick@ximian.com>
7890 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
7893 2006-06-13 Massimiliano Mantione <massi@ximian.com>
7894 * mini.c: Made so that inline is locally disabled if it would
7895 trigger a .cctor, because too many apps depend on this behavior
7896 (which seems to be also the one of the MS CLR).
7898 2006-06-13 Zoltan Varga <vargaz@gmail.com>
7900 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
7901 No idea why this worked before.
7903 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
7904 which branch to outer exception clauses since they could skip the
7905 inner finally clauses. Fixes #78633.
7907 * exceptions.cs: Add a test for the above.
7909 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
7912 * iltests.il: Add a test for the above.
7914 2006-06-12 Zoltan Varga <vargaz@gmail.com>
7916 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
7917 after the end of a try bblock, to prevent asserts in mini_method_compile ().
7919 * iltests.il: Add a test for the above.
7921 2006-06-10 Zoltan Varga <vargaz@gmail.com>
7923 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
7925 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
7926 methods as instrinsics.
7928 2006-06-09 Wade Berrier <wberrier@novell.com>
7930 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
7931 (simple-cee-ops.h ssapre-mini-ops.h)
7933 2006-06-09 Neale Ferguson <neale@sinenomine.net>
7935 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
7936 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
7938 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
7939 * cpu-s390x.md: Fix max. length values for a couple of instructions.
7941 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
7943 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
7945 2006-06-08 Massimiliano Mantione <massi@ximian.com>
7947 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
7948 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
7949 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
7950 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
7951 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
7952 of opcodes, so that bug 78549 should not happen again.
7953 * ssapre.c: Updated to use the renamed files.
7955 2006-06-08 Zoltan Varga <vargaz@gmail.com>
7957 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
7958 in OP_ATOMIC_EXCHANGE_I4.
7960 2006-06-07 Wade Berrier <wberrier@novell.com>
7962 * tramp-s390.c: Fix s390 build (add missing pointer declarations
7963 in mono_debugger_create_notification_function)
7965 2006-06-06 Zoltan Varga <vargaz@gmail.com>
7967 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
7969 * mini.c (type_from_stack_type): Disable some changes which do not
7972 * driver.c: Reenable opts.
7974 * mini.h (MonoStackSlot): New structure to keep track of the verification state
7975 of the evaluation stack.
7977 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
7978 evaluation stack trace at entry to the bblock.
7980 * mini.c (merge_stacks): New function to perform verification of stack merges.
7981 Turned off by default.
7983 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
7986 2006-06-06 Massimiliano Mantione <massi@ximian.com>
7988 * local-propagation.c: Fixed bug 78549.
7990 2006-06-04 Zoltan Varga <vargaz@gmail.com>
7992 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
7994 2006-06-02 Miguel de Icaza <miguel@novell.com>
7996 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
7997 tramp-arm.c, tramp-ia64.c
7998 (mono_debugger_create_notification_function): Update signature to
7999 new signature and use new protocol for creating the notification
8002 Should fix the build.
8004 2006-06-02 Geoff Norton <gnorton@customerdna.com>
8006 * exceptions-ppc.c (mono_jit_walk_stack)
8007 (ves_icall_get_frame_info): Fix the build
8009 2006-06-02 Zoltan Varga <vargaz@gmail.com>
8011 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8013 2006-05-31 Raja R Harinath <rharinath@novell.com>
8015 * il2tests.2.il: New file for generics CIL tests. Add test for
8017 * Makefile.am: Update.
8020 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8023 2006-05-30 Massimiliano Mantione <massi@ximian.com>
8025 * aliasing.c: Fixed bug 78311.
8027 2006-05-29 Martin Baulig <martin@ximian.com>
8029 * mini-exceptions.c (mono_find_jit_info): When computing the
8030 native offset, check whether we're actually inside the method's
8031 code; call mono_debug_print_stack_frame() to format the frame.
8032 (ves_icall_System_Exception_get_trace): Call
8033 mono_debug_print_stack_frame() to format the stack frame.
8034 (ves_icall_get_trace): Update to the new debugging API.
8035 (mono_jit_walk_stack_from_ctx): Likewise.
8036 (ves_icall_get_frame_info): Likewise.
8038 * mini.c (get_method_from_ip): Use the new debugging API.
8039 (mono_print_method_from_ip): Likewise.
8042 (mono_jit_walk_stack): Use the new debugging API.
8043 (ves_icall_get_frame_info): Likewise.
8045 2006-05-27 Zoltan Varga <vargaz@gmail.com>
8047 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8049 2006-05-25 Massimiliano Mantione <massi@ximian.com>
8051 * mini.c: Added "limitator" to inline for debugging.
8053 2006-05-24 Martin Baulig <martin@ximian.com>
8055 * debug-debugger.c (mono_debugger_init): Create a private,
8056 malloc()-based code manager for the notification function and
8057 intentionally leak it on exit. This fixes the crash-on-exit race
8061 (mono_debugger_create_notification_function): Added
8062 `MonoCodeManager *' argument.
8065 (mono_debugger_create_notification_function): Added
8066 `MonoCodeManager *' argument.
8068 2006-05-23 Massimiliano Mantione <massi@ximian.com>
8070 * aliasing.c: Fixed 64 bit issue.
8071 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8072 default since all known bugs are fixed (one more time!).
8074 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8076 * mini.c: write barrier support.
8078 2006-05-23 Martin Baulig <martin@ximian.com>
8080 * debug-debugger.c: Revert Paolo's change. Add comment and #error
8081 check at the top of the file.
8083 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
8085 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
8086 reverting changes without reason and without changelog entries.
8088 2006-05-18 Zoltan Varga <vargaz@gmail.com>
8090 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
8091 to a few opcodes. Fixes #78439.
8093 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
8094 consistency with other archs.
8096 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
8098 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8100 * debug-debugger.c: fix the build.
8102 2006-05-17 Martin Baulig <martin@ximian.com>
8105 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
8106 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
8107 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
8108 (debugger_attach): Call GC_mono_debugger_add_all_threads().
8110 2006-05-11 Zoltan Varga <vargaz@gmail.com>
8112 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
8114 2006-05-10 Zoltan Varga <vargaz@gmail.com>
8116 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
8117 MONO_TYPE_GENERICINST.
8119 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
8120 MONO_TYPE_GENERICINST.
8122 2006-05-09 Zoltan Varga <vargaz@gmail.com>
8124 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8127 2006-05-08 Zoltan Varga <vargaz@gmail.com>
8129 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8131 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8133 2006-05-06 Zoltan Varga <vargaz@gmail.com>
8135 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8136 mono_trace_cleanup ().
8138 * iltests.il: Fix problem with the newly added test.
8140 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8141 due to register constraints, free up the previous hreg. Fixes #78314.
8143 * iltests.il: Add new test for #78314.
8145 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8146 Interlocked.Add. Fixes #78312.
8148 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8150 2006-05-05 Zoltan Varga <vargaz@gmail.com>
8152 * inssel.brg (mini_emit_virtual_call): Fix a warning.
8154 2006-05-05 Martin Baulig <martin@ximian.com>
8156 * debug-mini.c (mono_debug_open_block): New method.
8159 (mono_arch_output_basic_block): Call mono_debug_open_block() at
8160 the beginning of each basic block.
8163 (mono_arch_output_basic_block): Call mono_debug_open_block() at
8164 the beginning of each basic block.
8166 2006-05-04 Massimiliano Mantione <massi@ximian.com>
8168 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8169 default until I understand why they break the build on amd64.
8171 2006-05-04 Zoltan Varga <vargaz@gmail.com>
8173 * mini.c (mini_cleanup): Call mono_cleanup ().
8175 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8178 2006-05-04 Massimiliano Mantione <massi@ximian.com>
8180 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8181 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8182 default since all known bugs are fixed, and I cannot reproduce bug
8183 77944... I'm asking Matt Hargett to test again after this commit.
8185 2006-04-28 Massimiliano Mantione <massi@ximian.com>
8187 * mini-codegen.c: Fixed typo that thrashed inline.
8189 2006-04-28 Zoltan Varga <vargaz@gmail.com>
8191 * dominators.c (compute_dominators): Avoid using a worklist since
8192 it is not correct in some cases. Instead, iterate over all bblocks as
8193 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8195 2006-04-28 Miguel de Icaza <miguel@novell.com>
8197 * mini.c (mono_jit_compile_method_inner): Use
8198 mono_prepare_exception_from_error that resets the value
8201 2006-04-27 Miguel de Icaza <miguel@novell.com>
8203 * mini.c: Move the mini_loader_error_to_exception to metadata.
8205 2006-04-27 Massimiliano Mantione <massi@ximian.com>
8207 * aliasing.c: Fixed bug 78210.
8209 2006-04-27 Massimiliano Mantione <massi@ximian.com>
8211 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8212 default until all their problems (or the ones they trigger) are fixed.
8214 2006-04-26 Zoltan Varga <vargaz@gmail.com>
8216 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8218 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8219 as loaded only after resolving patches since that could invoke the same method.
8221 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8223 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8226 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8229 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8232 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8233 made from AOT code through the PLT table.
8235 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8236 holding the plt offset when a call is made to the aot plt trampoline.
8238 2006-04-25 Zoltan Varga <vargaz@gmail.com>
8240 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
8243 * Makefile.am (common_sources): Fix build breakage.
8245 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8246 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8247 intra-assembly calls if possible.
8249 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8251 * mini-trampolines.c: Handle PLT entries.
8253 * mini.c: Avoid creating a GOT var for calls.
8255 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8258 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8261 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8264 * mini.h: Bump AOT file format version.
8266 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8269 2006-04-25 Martin Baulig <martin@ximian.com>
8271 * driver.c: Disable copyprop, consprop and inline when running
8272 inside the debugger.
8274 2006-04-25 Martin Baulig <martin@ximian.com>
8276 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
8277 with `get_current_thread' and added `detach'.
8278 (MonoDebuggerMetadataInfo): Added `thread_size',
8279 `thread_tid_offset', `thread_stack_ptr_offset' and
8280 `thread_end_stack_offset'.
8282 2006-04-25 Zoltan Varga <vargaz@gmail.com>
8284 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
8287 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
8288 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
8290 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
8292 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
8294 * aot.c: Add support for ADJUSTED_IID.
8296 2006-04-24 Zoltan Varga <vargaz@gmail.com>
8298 * aot.c (emit_method_order): Don't align method_order_end.
8300 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
8301 the interface ID changes.
8303 2006-04-21 Dick Porter <dick@ximian.com>
8305 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
8306 cleaning up a thread. Fixes the new part of bug 77470.
8308 2006-04-20 Geoff Norton <gnorton@customerdna.com>
8310 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
8313 2006-04-19 Zoltan Varga <vargaz@gmail.com>
8315 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
8317 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
8318 SIGSEGV. Fixes #78072.
8320 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
8321 unregister our SIGABRT handler.
8323 2006-04-19 Massimiliano Mantione <massi@ximian.com>
8325 * mini.c: Disabled inline where it can alter the call stack in a
8326 way visible from managed code.
8327 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
8330 2006-04-16 Zoltan Varga <vargaz@gmail.com>
8332 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
8333 on other platforms. Fixes #78089.
8335 2006-04-13 Martin Baulig <martin@ximian.com>
8337 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
8338 determine whether we're inside the debugger.
8341 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
8343 2006-04-12 Zoltan Varga <vargaz@gmail.com>
8345 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
8346 handler clauses. Fixes #78024.
8348 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
8349 in the CALL_MEMBASE opcodes. Fixes #78088.
8350 (mono_arch_get_vcall_slot_addr): Ditto.
8352 2006-04-10 Martin Baulig <martin@ximian.com>
8354 * debug-debugger.c: The thread handling code has now been moved
8355 into ../metadata/threads.c.
8357 2006-04-10 Zoltan Varga <vargaz@gmail.com>
8359 * driver.c (mono_main): Fix --with-gc=none build.
8361 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
8362 (mono_spillvar_offset_float): Ditto.
8363 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
8364 hreg, not when its !global, since on ia64, there is a third category: stacked
8367 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
8369 * mini.c: set MonoInst->klass for load field address and a few other
8372 2006-04-10 Zoltan Varga <vargaz@gmail.com>
8374 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
8376 2006-04-07 Zoltan Varga <vargaz@gmail.com>
8378 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
8379 the branch opt changes.
8381 2006-04-06 Dick Porter <dick@ximian.com>
8383 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
8385 * wapihandles.c (mini_wapi_seminfo):
8386 * driver.c (mono_main): Add semaphore info option
8388 2006-04-05 Zoltan Varga <vargaz@gmail.com>
8390 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
8391 branch optimization changes. Fixes #78009.
8393 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8395 * mini.c: ignore accessibility of methods in managed->native wrappers.
8397 2006-04-04 Zoltan Varga <vargaz@gmail.com>
8399 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
8401 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
8403 2006-04-03 Zoltan Varga <vargaz@gmail.com>
8405 * mini.c: Modify the branch optimizations to preserve the invariant that
8406 the entries inside the in_bb and out_bb arrays are unique.
8407 (mono_unlink_bblock): Avoid creation of new arrays.
8409 2006-04-02 Zoltan Varga <vargaz@gmail.com>
8411 * mini.c (mono_unlink_bblock): Fix regression caused by previous
8414 2006-04-01 Zoltan Varga <vargaz@gmail.com>
8416 * mini.c (optimize_branches): Remove the "optimizations" in
8417 the cbranch1/cbranch2 -> branch cases which were causing several
8418 problems in the past. Fixes #77986.
8420 2006-03-31 Chris Toshok <toshok@ximian.com>
8422 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
8423 default optimizations :(
8425 2006-03-31 Zoltan Varga <vargaz@gmail.com>
8427 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
8430 2006-03-31 Massimiliano Mantione <massi@ximian.com>
8432 * local-propagation.c: Added comments to structs and removed
8433 "Mono" prefixes from local tree mover types.
8435 2006-03-30 Zoltan Varga <vargaz@gmail.com>
8437 * Makefile.am (arch_sources): Define this for each architecture so
8438 libmono_la_SOURCES is defined in one place.
8440 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8442 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
8445 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
8447 * driver.c: print the GC name supplied by configure.
8449 2006-03-29 Massimiliano Mantione <massi@ximian.com>
8451 * local-propagation.c: Added tree mover, and moved here all the
8452 local propagation code from mini.c
8453 * mini.c: Added support for treeprop, and moved all the local
8454 propagation code to local-propagation.c
8455 * mini.h: Added support for treeprop
8456 * driver.c: Added support for treeprop, enabled consprop, copyprop,
8457 treeprop, inline and deadce by default
8458 * Makefile.am: Added local-propagation.c
8460 2006-03-25 Zoltan Varga <vargaz@gmail.com>
8462 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
8464 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
8466 * debug-debugger.c: make it compile without the Boehm GC.
8468 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8470 * mini.c: fixed issue with mismatch when an icall is registered
8471 with multiple names but same address.
8473 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8475 * declsec.c, mini-exceptions.c: use write barrier to set reference
8476 fields of managed objects.
8478 2006-03-19 Zoltan Varga <vargaz@gmail.com>
8480 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
8481 (can_access_internals): Fix a warning.
8483 * mini.c (print_method_from_ip): Rename this to
8484 mono_print_method_from_ip so it gets exported.
8486 * trace.c: Deal with strings inside StringBuilder's containing garbage
8487 and fix memory leaks. Fixes #77848.
8489 2006-03-19 Zoltan Varga <vargaz@gmail.com>
8491 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
8494 2006-03-16 Neale Ferguson <neale@sinenomine.net>
8496 * mini-s390.c: Remove OP_X86_TEST_NULL.
8498 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8500 * mini.c: use the correct GetHashCode() for the moving collector.
8502 2006-03-16 Massimiliano Mantione <massi@ximian.com>
8504 * liveness.c: Regalloc spill cost tuning.
8506 2006-03-15 Neale Ferguson <neale@sinenomine.net>
8508 * mini-s390x.h: Correct S390_LONG macro.
8510 * mini-s390x.c: Cleanup unused code.
8512 2006-03-15 Zoltan Varga <vargaz@gmail.com>
8514 * jit-icalls.h: New file.
8516 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
8517 icalls and include that instead of including jit-icalls.c.
8519 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
8522 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
8524 * mini.c: when checking for member accessibility, also check for
8525 friend assemblies and for explicit interface implementations.
8527 2006-03-14 Zoltan Varga <vargaz@gmail.com>
8529 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
8531 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
8533 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8534 common cases are done first.
8536 * mini-ops.h: Only define platform specific opcodes on the given platform.
8538 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
8541 2006-03-14 Martin Baulig <martin@ximian.com>
8543 Revert Paolo's change from r57348:
8545 * mini.h: don't use gboolean for bitfields.
8546 * mini.c: verifier changes for fields and methods accessibility.
8548 2006-03-13 Neale Ferguson <neale@sinenomine.net>
8550 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
8552 * mini-s390x.c: Fix conv_r_un.
8554 * cpu-s390, cpu-s390x.md: Fix lengths.
8556 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
8558 * mini.c: nested types have access to all the nesting
8559 levels, not just the enclosing types.
8561 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8563 * mini.c: added a few more verification checks.
8565 2006-03-12 Zoltan Varga <vargaz@gmail.com>
8567 * liveness.c: Merge optimizations from the linear-il branch.
8569 2006-03-11 Zoltan Varga <vargaz@gmail.com>
8571 * mini-ia64.c (emit_call): Add a comment.
8573 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
8575 * tramp-ia64.c: Fix some warnings.
8577 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
8579 * mini.h: don't use gboolean for bitfields.
8580 * mini.c: verifier changes for fields and methods accessibility.
8582 2006-03-11 Zoltan Varga <vargaz@gmail.com>
8584 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
8585 lazy icall wrapper changes.
8587 * dominators.c: Replace all the dominator algorithms with faster
8588 ones from the linear-il branch.
8590 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
8593 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
8594 common cases are done first.
8596 * mini-amd64.c: Fix some warnings.
8598 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
8601 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
8604 * mini.h: Add a missing prototype.
8606 2006-03-10 Zoltan Varga <vargaz@gmail.com>
8608 * mini.c: Compile icall wrappers lazily.
8610 * mini-codegen.c: Use printf instead of g_print since its much faster.
8612 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
8615 * mini.c (optimize_branches): Cache the negative result from
8616 remove_block_if_useless ().
8618 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
8619 Also fix some bblock linking issues.
8621 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
8624 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
8626 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
8627 accessed fields first, for better cache behavior.
8629 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8631 * mini.c: speedup IList<T> array accesses.
8633 2006-03-09 Zoltan Varga <vargaz@gmail.com>
8635 * mini.c (mono_method_to_ir): Handle large methods overflowing the
8636 inline_costs counter. Fixes #77190.
8638 2006-03-06 Zoltan Varga <vargaz@gmail.com>
8640 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
8641 trace messages. Fixes #77706.
8643 2006-03-04 Martin Baulig <martin@ximian.com>
8645 * tramp-amd64.c, tramp-x86.c
8646 (mono_debugger_create_notification_function): Use
8647 mono_global_codeman_reserve() to allocate a buffer at runtime and
8650 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
8652 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
8653 notification function at runtime and then call `initialize' in the
8654 `MONO_DEBUGGER__debugger_info' vtable.
8656 2006-03-04 Zoltan Varga <vargaz@gmail.com>
8658 * iltests.il: Fix a visibility problem.
8660 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8662 * driver.c, mini.c: add hooks for the counters API.
8664 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
8666 * driver.c: show disabled options.
8668 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8670 * linear-scan.c: always use cost-driven selection.
8672 2006-02-28 Raja R Harinath <rharinath@novell.com>
8674 * jit-icalls.c (helper_compile_generic_method): Revert change from
8677 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
8679 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
8681 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
8683 * inssel.brg: style fixes, mostly to force the updated monoburg
8684 to run for people using svn.
8686 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
8688 * mini.c: match monoburg changes.
8690 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8692 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
8693 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
8694 declaration in the header file.
8696 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
8698 * helpers.c: reduce relocations and mem usage.
8700 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
8702 * mini.h, mini-codegen.c: disable logging features if
8703 requested by configure.
8705 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
8707 * mini.c: tiny verifier changes.
8709 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8711 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
8712 cpu-pentium.md: stack alignment changes for osx/x86,
8713 partially from Geoff Norton <gnorton@customerdna.com>.
8715 2006-02-24 Raja R Harinath <harinath@gmail.com>
8717 * jit-icalls.c (helper_compile_generic_method): Update to changes
8718 in metadata/class.c.
8720 2006-02-24 Zoltan Varga <vargaz@gmail.com>
8722 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
8724 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
8725 interface calls with large offsets.
8727 2006-02-23 Raja R Harinath <rharinath@novell.com>
8729 * jit-icalls.c (helper_compile_generic_method): Document the
8730 special-case we depend on so that we can inflate the method twice
8731 with the same context with no bad side-effects.
8733 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
8735 * mini-x86.c, mini-amd64.c: fix for case when xen support
8738 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
8740 * mini-x86.c, mini-amd64.c: generate code to access tls items
8741 in a faster way for Xen systems.
8743 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
8745 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
8746 updates and compilation fixes for the OSX/x86 port, mostly from
8747 Geoff Norton <gnorton@customerdna.com>.
8749 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8751 * inssel.brg: faster interface call implementation
8752 to sync with the interface_offsets MonoVTable changes.
8754 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8756 * mini.c: more verification checks.
8758 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
8760 * mini.c: added a few more verification checks.
8762 2006-02-17 Neale Ferguson <neale@sinenomine.net>
8764 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
8765 facility on the processor and use it if available.
8767 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
8769 * driver.c, aot.c, mini.c: throw exception if the IL code is
8770 invalid or unverifiable.
8772 2006-02-17 Raja R Harinath <rharinath@novell.com>
8774 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
8777 2006-02-16 Zoltan Varga <vargaz@gmail.com>
8779 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
8781 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8783 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
8784 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
8785 handling of instantiated generic valuetypes.
8787 2006-02-11 Zoltan Varga <vargaz@gmail.com>
8789 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
8790 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
8793 * generics.2.cs: Revert the nullable reftypes tests.
8795 2006-02-10 Zoltan Varga <vargaz@gmail.com>
8797 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
8798 using __builtin_frame_address (1) as it doesn't work in the presence
8799 of optimizations. Hopefully fixes #77273.
8801 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
8802 -> generics.cs change as it doesn't work with some automake versions.
8804 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8806 * mini.c: handle systems that sue a different way to
8807 retrieve the stack address of the current thread.
8809 2006-02-09 Zoltan Varga <vargaz@gmail.com>
8811 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
8812 it specially in the makefile.
8814 * generics.2.cs: Add tests for nullable reference types.
8816 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8818 * mini.c: always handle the case when mono_jit_init()
8819 is called in a thread different from the main thread,
8820 confusing libgc (bug #77309).
8822 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
8824 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
8826 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8828 * mini.c: change optimize_branches () to use a single loop
8829 and introduce a new optimization to simplify some range checks.
8831 2006-02-03 Martin Baulig <martin@ximian.com>
8833 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
8834 and merged with debugger_thread_manager_add_thread().
8835 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
8836 inform the debugger about the main thread.
8838 2006-02-03 Zoltan Varga <vargaz@gmail.com>
8840 * basic.cs: Add test for div.un/rem.un constant folding.
8842 2006-02-03 Neale Ferguson <neale@sinenomine.net>
8844 * cpu-s390x.md: correct int_xor_imm length
8846 2006-02-03 Zoltan Varga <vargaz@gmail.com>
8848 * generics.2.cs: New test for #77442.
8850 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
8853 2006-02-02 Martin Baulig <martin@ximian.com>
8855 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
8856 <mono/metadata/mono-debug-debugger.h>
8858 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
8860 2006-02-02 Martin Baulig <martin@ximian.com>
8862 * debug-debugger.h: New header file for debug-debugger.c.
8864 * debug-debugger.c: Big API cleanup; don't run the managed Main()
8865 function is a separate thread anymore; add support for attaching.
8867 2006-02-01 Zoltan Varga <vargaz@gmail.com>
8869 * tramp-x86.c: Fix a warning.
8871 2006-01-31 Zoltan Varga <vargaz@gmail.com>
8873 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
8874 on very large methods.
8876 * aot.c (load_patch_info): Fix a warning.
8878 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
8880 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
8881 mini-ops.h: alu membase optimizations.
8883 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
8885 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
8886 to speedup StringBuilder.
8888 2006-01-27 Zoltan Varga <vargaz@gmail.com>
8890 * dominators.c (mono_compute_natural_loops): Fix detection of
8891 loop body start blocks.
8893 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
8895 2006-01-26 Zoltan Varga <vargaz@gmail.com>
8897 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
8900 2006-01-25 Massimiliano Mantione <massi@ximian.com>
8902 * aliasing.c: Fixed aliasing issue on 64 bit archs.
8904 2006-01-25 Martin Baulig <martin@ximian.com>
8906 * debug-debugger.c: Moved the `MonoDebuggerManager' and
8907 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
8908 started to cleanup this file a little bit.
8910 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
8912 * mini.c: optimize a codepath frequently happening in generics code.
8914 2006-01-23 Martin Baulig <martin@ximian.com>
8916 * Makefile.am: Only compile debug-debugger.c on supported platforms.
8918 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
8921 * driver.c: debug-debugger.c is only available if
8922 `MONO_DEBUGGER_SUPPORTED' is defined.
8924 2006-01-23 Martin Baulig <martin@ximian.com>
8926 * debug-debugger.c: Only enable this on platforms where the Mono
8927 Debugger is working (x86 and x86_64).
8929 2006-01-21 Martin Baulig <martin@ximian.com>
8931 The Mono Debugger is now using the normal `mono' instead of the
8932 `mono-debugger-mini-wrapper' when executing managed code.
8934 * debug-debugger.c: New file; previously known as
8935 debugger/wrapper/wrapper.c.
8937 * debug-mini.c (mono_init_debugger): Removed.
8939 * driver.c (mono_main): Added new `--inside-mdb' command line
8940 argument which is used when running inside the debugger.
8942 2006-01-20 Zoltan Varga <vargaz@gmail.com>
8944 * liveness.c (mono_analyze_liveness): Remove some unused data
8947 2006-01-17 Zoltan Varga <vargaz@gmail.com>
8949 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
8951 2006-01-16 Zoltan Varga <vargaz@gmail.com>
8953 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
8954 depends on implementation details of monobitset.
8956 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
8959 2006-01-15 Zoltan Varga <vargaz@gmail.com>
8961 * liveness.c: Update after monobitset changes.
8963 2006-01-14 Zoltan Varga <vargaz@gmail.com>
8965 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
8967 2006-01-11 Neale Ferguson <neale@sinenomine.net>
8969 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
8971 * mini-s390x.c: Remove warning messages.
8973 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
8975 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
8977 2006-01-10 Zoltan Varga <vargaz@gmail.com>
8979 * generics.2.cs: Add ldelem/stelem_any test.
8981 2006-01-10 Neale Ferguson <neale@sinenomine.net>
8983 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
8985 2006-01-07 Zoltan Varga <vargaz@gmail.com>
8987 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
8989 2006-01-06 Zoltan Varga <vargaz@gmail.com>
8991 * generics.2.cs: Reenable vtype tests.
8993 * inssel-x86.brg: Remove an icorrect valuetype rule.
8995 2006-01-06 Neale Ferguson <neale@sinenomine.net>
8997 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
8998 initial support for OP_ABS.
9000 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9002 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9004 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9006 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
9007 conversion and implement LADD/LSUB.
9009 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9012 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9014 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9016 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9019 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9021 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
9022 localloc is encountered. Fixes crash in test-183.cs when using gmcs
9023 (stack walk problem).
9025 2006-01-04 Zoltan Varga <vargaz@gmail.com>
9027 * aot.c (mono_aot_load_method): Fix a warning.
9029 2006-01-03 Neale Ferguson <neale@sinenomine.net>
9031 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9033 2006-01-03 Zoltan Varga <vargaz@gmail.com>
9035 * iltests.il: Add test for #77148.
9037 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9040 2006-01-03 Neale Ferguson <neale@sinenomine.net>
9042 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9044 2006-01-03 Neale Ferguson <neale@sinenomine.net>
9046 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9047 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9049 * basic-long.cs: Add lconv-to-r4/r8 tests.
9051 2006-01-03 Zoltan Varga <vargaz@gmail.com>
9053 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9055 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9056 here as on other archs.
9058 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9060 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9062 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9064 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
9066 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
9068 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
9069 instrument_prolog; Add memory_barrier instruction.
9071 2005-12-26 Zoltan Varga <vargaz@gmail.com>
9073 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
9075 2005-12-23 Zoltan Varga <vargaz@gmail.com>
9077 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
9079 * aliasing.c inssel.brg: Fix warnings.
9081 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
9082 could skip initialization of some parts of memory.
9084 * mini.c mini-ia64.c: Fix warnings.
9086 * inssel-sparc.brg: Add an implementation of lneg which actually works.
9088 2005-12-22 Zoltan Varga <vargaz@gmail.com>
9090 * aliasing.c (mono_build_aliasing_information): Add a workaround for
9091 a crash seen on sparc.
9093 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
9095 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
9097 2005-12-21 Neale Ferguson <neale@sinenomine.net>
9099 * mini-ops.h: Add s390_backchain instruction
9101 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
9103 * cpu-s390.md: Add s390_backchain instruction
9105 * mini-s390.c: Significant ABI changes
9107 * mini-s390.h: Cater for zero length structures
9109 2005-12-20 Neale Ferguson <neale@sinenomine.net>
9111 * mini-s390.c: ABI fixes
9113 * inssel-s390.brg: Remove debug statements
9115 * cpu-s390.md: Fix length of ATOMIC_xx operations
9117 2005-12-19 Zoltan Varga <vargaz@gmail.com>
9119 * basic-float.cs: Add float<->long conversion tests.
9121 2005-12-16 Neale Ferguson <neale@sinenomine.net>
9123 * mini-s390.c: Fix LOCALLOC processing.
9125 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9127 2005-12-15 Zoltan Varga <vargaz@gmail.com>
9129 * iltests.il: Add tests for some opcodes not covered by the other
9132 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9134 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
9135 register loading for Tail processing; Correct trace output.
9137 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9139 * cpu-s390.md: Correct size of jmp instruction.
9141 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9143 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9145 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9147 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9148 Bring s390 up to current level.
9150 2005-12-12 Zltan Varga <vargaz@gmail.com>
9152 * generics.2.cs: Disable the newly added tests as they do not work yet.
9154 * generics.2.cs: Add valuetype tests.
9156 2005-12-09 Zoltan Varga <vargaz@gmail.com>
9158 * basic-long.cs: Add i4->u8 test.
9160 * objects.cs: Add tests for JIT intrinsic.
9162 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9163 optimizations lost by a mistake.
9165 2005-12-07 Zoltan Varga <vargaz@gmail.com>
9167 * basic-long.cs: Remove a test moved to objects.cs.
9169 * arrays.cs: Add more array tests.
9171 2005-12-06 Zoltan Varga <vargaz@gmail.com>
9173 * arrays.cs: Add new tests for multi-dimensional arrays.
9175 2005-12-06 Raja R Harinath <rharinath@novell.com>
9177 * Makefile.am (test_sources2): Add generics.2.cs.
9178 (EXTRA_DIST): Add test_sources2.
9180 2005-12-05 Ben Maurer <bmaurer@ximian.com>
9182 Support for boxing and unboxing nullable types as well as the
9183 isinst operation on nullables, per the CLI ammendment.
9185 * inssel.brg (CEE_ISINST): Special case for nullable
9187 * mini.c (handle_unbox_nullable): new method
9188 (handle_box): Special case for nullable types
9189 (mono_method_to_ir): Call handle_unbox_nullable in correct
9192 * generics.2.cs: New test suite
9194 * Makefile.am: Support for regression tests with generics.
9196 2005-12-03 Zoltan Varga <vargaz@gmail.com>
9198 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9199 allocated to registers. Fixes #76800.
9201 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9203 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9205 2005-11-30 Zoltan Varga <vargaz@gmail.com>
9207 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
9210 2005-11-29 Zoltan Varga <vargaz@gmail.com>
9212 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9215 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9217 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9218 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9220 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9221 single precision before storing to a single precision location.
9223 2005-11-28 Raja R Harinath <rharinath@novell.com>
9225 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9227 2005-11-27 Zoltan Varga <vargaz@gmail.com>
9229 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9232 * basic.cs: Remove test_0_byte_compares test which was moved to
9233 objects.cs a long time ago.
9235 2005-11-22 Massimiliano Mantione <massi@ximian.com>
9237 * aliasing.c: Fixed aliasing issue on 64 bit archs.
9239 2005-11-20 Zoltan Varga <vargaz@gmail.com>
9241 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9242 handlers are called.
9244 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9247 * mini-ia64.c: Add support for the throw->branch exception
9250 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9252 2005-11-18 Massimiliano Mantione <massi@ximian.com>
9254 * mini.c: Enabled "fastpath" deadce :-)
9256 2005-11-18 Massimiliano Mantione <massi@ximian.com>
9258 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9259 alias analysis pass to support it.
9262 * liveness.c: Likewise (liveness computation can use aliasing
9263 information to be more accurate).
9264 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9265 moreover made so that "--compile-all" uses the given optimization
9266 flags and not the default ones.
9267 * aliasing.c: Alias analysis (new file).
9268 * aliasing.h: Likewise.
9269 * Makefile.am: added "aliasing.c" and "aliasing.h".
9271 2005-11-17 Zoltan Varga <vargaz@gmail.com>
9273 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9276 2005-11-13 Zoltan Varga <vargaz@gmail.com>
9278 * mini-exceptions.c (mono_handle_exception_internal): Remove the
9279 fp >= end_of_stack exit condition, as it is not needed, and it might
9280 become true for fp eliminated frames.
9282 2005-11-11 Zoltan Varga <vargaz@gmail.com>
9284 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
9287 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
9289 * mini-arm.c: fixed alignment of doubles/longs to match
9290 the C ABI (bug #76635).
9292 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
9294 * aot.c: fix compilation with --enable-minimal=aot.
9296 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
9298 * mini-arm.c: fixed compatibility with the new
9299 floating point emulator package for compares.
9301 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
9303 * mini.c : reverted sig->pinvoke changes (r51396-51397).
9305 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
9307 * mini-exceptions.c (print_stack_frame): Output to stderr.
9308 (mono_handle_native_sigsegv): Ditto.
9310 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
9312 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
9313 OP_LCONV_TO_OVF_I implementation.
9315 * mini-amd64.c: Add support for the throw->branch exception
9318 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
9319 when the catch clause catches a more general exception, i.e. Object.
9321 2005-10-30 Zoltan Varga <vargaz@gmail.com>
9323 * cpu-ia64.md: Remove unused opcodes.
9325 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
9326 specific defines for architectures defining USE_SIGACTION.
9328 * mini-ia64.c: Fix some warnings.
9330 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
9331 version seemed to skip a frame.
9333 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
9335 * mini.c: Clean up the usage of sig->pinvoke flag. Now
9336 only calls which are made to native code use this flag.
9338 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
9340 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
9341 varargs methods as well.
9343 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
9344 which have save_lmf set. Reorganize methods prologs a bit.
9346 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
9347 debugger to the proper place.
9349 2005-10-29 Martin Baulig <martin@ximian.com>
9351 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
9352 when running inside the debugger until the debugger has support
9355 2005-10-26 Zoltan Varga <vargaz@gmail.com>
9357 * mini.h: Fix a warning.
9359 2005-10-24 Miguel de Icaza <miguel@novell.com>
9361 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
9362 we expose publicly, this returns the string.
9364 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
9366 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
9367 with fp elimination.
9369 2005-10-21 Zoltan Varga <vargaz@gmail.com>
9371 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
9372 native stacktrace using the glibc 'backtrace' function if available.
9374 2005-10-20 Zoltan Varga <vargaz@gmail.com>
9376 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
9378 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
9379 handle SIGSEGVs received while in native code.
9381 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
9382 code, call mono_handle_native_sigsegv which will abort the runtime
9383 after printing some diagnostics, instead of converting it into a
9384 confusing NullReferenceException.
9386 2005-10-18 Zoltan Varga <vargaz@gmail.com>
9388 * cpu-pentium.md: Remove unused opcodes.
9390 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
9392 * mini-amd64.h (MonoLMF): Add rsp field.
9394 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
9397 2005-10-17 Zoltan Varga <vargaz@gmail.com>
9399 * mini-codegen.c (get_register_spilling): Fix some warnings.
9401 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
9403 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
9404 elimination during exception handling. Enable fp elimination by
9407 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
9410 2005-10-16 Martin Baulig <martin@ximian.com>
9413 (mono_debugger_run_finally): New public method for the debugger.
9415 2005-10-10 Zoltan Varga <vargaz@gmail.com>
9417 * debug-mini.c (mono_debug_init_method): Fix warning.
9419 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
9420 the 'exname' parameter const to fix some warnings.
9422 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
9424 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
9425 introduced by the previous patch.
9427 2005-10-08 Zoltan Varga <vargaz@gmail.com>
9429 * basic-float.cs: Add test for precision of float arithmetic.
9431 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
9432 when loading/storing single values from/to memory.
9434 * mini.c (mono_jit_compile_method_with_opt): Create the function
9435 pointers in the correct domain.
9437 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
9439 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
9440 introduced by previous patch.
9442 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
9443 when out_filter_idx is NULL.
9445 * mini-exceptions.c: Don't run filter clauses twice during exception
9446 handling. Fixes #75755.
9448 2005-10-07 Zoltan Varga <vargaz@gmail.com>
9450 * aot.c: Add support for ldflda wrappers.
9452 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
9455 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
9457 * mini.c, mini.h: do not consider exception handlers blocks when
9458 setting up interface variables.
9460 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
9462 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
9464 2005-10-03 Zoltan Varga <vargaz@gmail.com>
9466 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
9467 causes a regression.
9469 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
9471 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
9473 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
9474 of the OP_P definitions.
9476 * TODO: Add a proposal for dealing with the CEE/OP mess.
9478 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
9479 optimizations from the x86 port.
9481 * cpu-amd64.md: Ditto.
9483 * basic.cs basic-long.cs: Add tests.
9485 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
9487 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
9488 Patrik Torstensson's implementation of my exception-handling
9489 optimization idea, when the exception object is not used
9492 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
9494 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
9495 of the mul_imm optimizations from the old jit.
9497 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
9499 * mini.c, liveness.c: patch by Patrik Torstensson and
9500 Zoltan Varga to improve performance in methods with
9503 2005-09-30 Zoltan Varga <vargaz@gmail.com>
9505 * driver.c: Remove 'Globalization' entry from --version.
9507 2005-09-28 Zoltan Varga <vargaz@gmail.com>
9509 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
9510 there is a profiler interested in JIT events.
9512 * aot.c: Load profile files produced by the AOT profiling module, and
9513 reorder methods based on the profiling info. Add a 'method_order' table
9514 to the AOT file to make mono_aot_find_jit_info work with the reordered
9517 * mini.h: Bump AOT file version info.
9519 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
9521 * mini-arm.h: work around what looks like a gcc bug when optimizations
9524 2005-09-28 Raja R Harinath <rharinath@novell.com>
9526 * Makefile.am (AM_CFLAGS): Don't use += to append inside
9527 conditionals. Use ...
9528 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
9530 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
9532 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
9533 to determine the amount of memory to copy when passing valuetypes.
9535 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
9536 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
9538 2005-09-27 Zoltan Varga <vargaz@gmail.com>
9540 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
9541 information about aot.
9543 2005-09-27 Ben Maurer <bmaurer@ximian.com>
9545 * *.c: Replace the use of {Enter,Leave}CriticalSection with
9546 macros. This will allow a deadlock debugger to easily be plugged
9549 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
9551 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
9553 2005-09-27 Raja R Harinath <rharinath@novell.com>
9555 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
9556 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
9557 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
9558 ($(arch_built)) [CROSS_COMPILING]: Error out.
9560 2005-09-26 Zoltan Varga <vargaz@gmail.com>
9562 * aot.c: Add support for the no_special_static flag for classes.
9564 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
9566 * Reapply reverted patches.
9568 * *: Revert r50174 as well.
9570 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
9572 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
9574 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
9576 2005-09-23 Miguel de Icaza <miguel@novell.com>
9578 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
9579 part of the SIG_HANDLER_SIGNATURE.
9581 2005-09-23 Zoltan Varga <vargaz@gmail.com>
9583 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
9586 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
9587 introduced by previous patch.
9589 2005-09-21 Zoltan Varga <vargaz@gmail.com>
9591 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
9592 saved registers too.
9594 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
9595 upon the information returned by get_call_info ().
9597 * mini-x86.c (add_float): Fix stack size calculation.
9598 (mono_arch_call_opcode): Rewrite this so it works based up the
9599 information returned by get_call_info ().
9600 (mono_arch_get_this_vret_args): Ditto.
9602 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
9604 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
9605 in cinfo to determine the registers which need to be used.
9607 2005-09-20 Miguel de Icaza <miguel@novell.com>
9609 * driver.c (mono_main): Add --server and --desktop flags.
9611 2005-09-16 Zoltan Varga <vargaz@gmail.com>
9613 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
9614 registers as global registers.
9616 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
9617 longer needed with the new register allocator.
9619 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
9621 * cpu-ia64.md: Remove unused opcodes.
9623 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
9625 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
9627 * cpu-amd64.md: Remove unused opcodes.
9629 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
9630 needed with the new register allocator.
9632 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
9635 2005-09-16 Raja R Harinath <rharinath@novell.com>
9637 * Makefile.am (check-local): Don't invoke semdel-wrapper.
9639 2005-09-16 Martin Baulig <martin@ximian.com>
9641 * exceptions-amd64.c
9642 (throw_exception): Don't call mono_debugger_throw_exception() if
9643 we're a rethrow - see the FIXME in the code.
9645 2005-09-15 Geoff Norton <gnorton@customerdna.com>
9647 * mini.c (mono_init_exceptions): This only works on some architectures.
9649 2005-09-15 Zoltan Varga <vargaz@gmail.com>
9651 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
9654 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
9656 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
9657 now in mini-exceptions.c.
9659 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
9661 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
9662 now in mini-exceptions.c.
9664 2005-09-15 Zoltan Varga <vargaz@gmail.com>
9666 * exceptions-x86.c: Applied patch from Patrik Torstensson
9667 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
9669 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
9670 code into mini-exceptions.c. Add some assertions to it.
9672 2005-09-12 Zoltan Varga <vargaz@gmail.com>
9674 * aot.c (emit_section_change): Applied patch from "The Software Team"
9675 (<software@solmersa.com>). Fix as errors on windows.
9677 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
9679 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
9680 method info into the LMF.
9682 2005-09-11 Zoltan Varga <vargaz@gmail.com>
9684 * mini-ia64.c: Add proper unwind info for method epilogs.
9686 * exceptions-ia64.c: Add some code to help debugging.
9688 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
9690 * mini-exceptions.c: Fix warning.
9692 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
9694 * mini.c: Really fix build.
9696 * mini-x86.c mini-amd64.c: Fix build.
9698 2005-09-11 Zoltan Varga <vargaz@gmail.com>
9700 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
9702 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
9703 some Interlocked methods as intrinsics.
9705 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
9706 for Thread methods as well.
9708 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
9710 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
9712 * mini-ia64.c mini-x86.c mini-amd64.c
9713 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
9716 * mini.c (mono_init_exceptions): Fix build breakage.
9718 2005-09-10 Zoltan Varga <vargaz@gmail.com>
9720 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
9721 of instructions. Use the new ia64_unw_op macros for emitting unwind
9724 * mini.c (mono_init_exceptions): Initialize exception handling
9725 related trampolines at startup.
9727 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
9729 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
9731 2005-09-09 Zoltan Varga <vargaz@gmail.com>
9733 * mini.c: Handle type loading errors gracefully during compilation and
9734 throw the appropriate exception.
9736 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
9738 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
9739 for the mono binary.
9741 2005-09-09 Martin Baulig <martin@ximian.com>
9743 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
9746 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9748 * mini-arm.h: use emulation for conv.r.un for the release.
9750 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
9752 * mini-arm.c, objects.cs: more fixes and tests for them.
9754 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9756 * mini-arm.c: align structures to at least 4 bytes to be able
9757 to keep our current optimized memcpy.
9759 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
9761 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
9763 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
9765 * mini.c: ignore SIGPIPE.
9767 2005-09-04 Zoltan Varga <vargaz@gmail.com>
9769 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
9771 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
9773 2005-09-02 Zoltan Varga <vargaz@gmail.com>
9775 * mini.h: Add prototype for mono_allocate_stack_slots_full.
9777 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
9779 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
9780 exception handling support.
9781 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
9782 patch by Brian Koropoff <briank@marakicorp.com>).
9784 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
9786 * mini.c: revert another 'optimization' which breaks when
9787 items on the eval stack need to be saved at a basic block end
9790 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
9792 * jit-icalls.c: for arrays, ensure we always provide
9795 2005-08-30 Zoltan Varga <vargaz@gmail.com>
9797 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
9799 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
9801 2005-08-29 Zoltan Varga <vargaz@gmail.com>
9803 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
9804 arguments in their original register.
9806 2005-08-28 Zoltan Varga <vargaz@gmail.com>
9808 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
9811 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
9812 when ssapre is enabled.
9814 * inssel-long.brg: Fix bug in previous patch.
9816 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
9817 multiplication by a constant.
9819 2005-08-27 Zoltan Varga <vargaz@gmail.com>
9821 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
9824 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
9827 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
9829 * inssel-arm.brg: apply changes tested by Brian Koropoff
9830 <briank@marakicorp.com>.
9832 2005-08-25 Zoltan Varga <vargaz@gmail.com>
9834 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
9836 2005-08-24 Zoltan Varga <vargaz@gmail.com>
9838 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
9839 to the same register if dreg is just a base register.
9840 (print_ins): Improve printing of membase opcodes.
9842 * inssel-x86.brg: Add optimized ldind(reg) rules.
9844 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
9846 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
9848 * mini.c: when running under valgrind, set the stack bottom for
9849 the GC at the actual approximate stack for the app (fixes running
9850 mono with valgrind).
9852 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
9854 * mini.c: do no break at the first valuetype to init found
9857 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
9859 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
9861 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
9863 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
9865 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
9867 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
9869 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
9871 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
9873 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
9876 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
9879 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
9882 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
9884 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
9886 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
9888 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
9889 in the tail recursion optimization.
9891 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
9892 debug info into the assembly file.
9894 * iltests.il: Add test for filter regions.
9896 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
9897 initial stack of filter regions. Fixes #75755.
9899 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
9901 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
9904 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
9906 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
9907 the check for an already compiled method on non-ia64 platforms.
9908 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
9911 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
9913 * inssel-x86.brg: Add some optimized call rules.
9915 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
9917 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
9920 * mini.h mini-trampolines.c: Pass the trampoline argument to
9921 mono_arch_patch_delegate_trampoline.
9923 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
9925 * mini-trampolines.c: Fix build.
9927 * mini-amd64.h: Add delegate trampolines.
9929 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
9931 * inssel-amd64.brg: Add optimized call rules.
9933 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
9935 * inssel-ia64.brg: Add optimized ldind(reg) rules.
9937 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
9939 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
9942 * mini-ia64.c: Remove LMF fixmes.
9944 * mini-ia64.h: Remove most fields from LMF.
9946 * inssel-ia64.brg (stmt): Fix unaligned access errors.
9948 * mini-trampolines.c: Add support for IA64 function descriptors.
9950 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
9951 for IA64 function descriptors.
9953 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
9955 * tramp-arm.c: patch the vtable for virtual calls. Added
9956 support code to register/unregister the LMF.
9957 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
9960 2005-08-19 Dick Porter <dick@ximian.com>
9962 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
9963 bit value if needed.
9965 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
9967 * mini.c (mini_get_method): Move handling of wrapper data here.
9969 * mini.c (mono_method_to_ir): Add support for dynamic methods.
9971 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
9974 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
9975 bblock->code does not remain empty.
9977 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
9979 * arrays.cs: Add regression test for #75832.
9981 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
9982 rules. Fixes #75832.
9984 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
9985 instruction scheduling.
9987 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
9989 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
9991 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
9993 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
9995 * mini-codegen.c: Fix VC build.
9997 * cpu-pentium.md: Increase length of atomic_exhange_i4.
9999 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10001 * mini.h: fix signature for mono_register_opcode_emulation.
10003 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
10005 * mini.c: Get rid of most of the helper_sig_... constants using
10006 mono_create_icall_signature ().
10008 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
10010 * jit-icalls.c (helper_ldstr): New helper function.
10012 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10014 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10015 throw, load the string using a helper call instead of creating a string object.
10017 * aot.c: Update after LDSTR changes.
10019 * mini.h: Bump AOT file version.
10021 * aot.c: Save class size info into the AOT file. Print more statistics during
10024 * mini.h: Bump AOT file version.
10026 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10027 ordering of disasm cases. Fixes #74957.
10029 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10031 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10032 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10033 the generic code needed for the ARM port.
10035 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10037 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10038 inssel-arm.brg: more ARM features and fixes.
10040 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10042 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10043 ARM port work in progress.
10045 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
10047 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10049 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10051 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10053 * inssel.brg (mini_emit_memset): Add support for unaligned access.
10055 * *-ia64.*: Ongoing IA64 work.
10057 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10059 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
10061 * TODO: Remove out-of-data todo stuff.
10063 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
10066 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
10068 * mini.h: Bump corlib version.
10070 2005-07-27 Martin Baulig <martin@ximian.com>
10073 (create_copy_ins): Added `const unsigned char *ip' argument; set
10074 `copy->cil_code' from it.
10076 2005-07-27 Martin Baulig <martin@ximian.com>
10078 * mini-exceptions.c (mono_handle_exception): Don't call
10079 mono_debugger_handle_exception() for filters.
10081 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
10083 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
10086 2005-07-26 Martin Baulig <martin@ximian.com>
10088 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
10090 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
10091 helper_compile_generic_method() if the method is actually virtual
10094 2005-07-26 Martin Baulig <martin@ximian.com>
10097 (trampoline_code): Renamed to `mono_trampoline_code' and made it
10098 public; this is now accessed directly by the debugger.
10099 (mono_generic_trampoline_code): Removed.
10102 (mono_debug_init_method): Also add interncalls and wrappers.
10104 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
10106 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
10108 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
10110 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
10112 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
10114 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
10116 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
10118 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
10119 getting TLS offsets on AMD64 too.
10121 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
10123 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10125 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10127 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10128 inssel-arm.brg, mini-arm.h: ARM port work in progress.
10130 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
10132 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10134 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10137 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
10138 mono_sparc_is_virtual_call ().
10140 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10142 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10143 trampoline parameters.
10145 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10147 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10148 to mono_arch_get_vcall_slot_addr.
10150 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10153 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10155 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
10157 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10159 2005-07-19 Martin Baulig <martin@ximian.com>
10161 * exceptions-amd64.c (throw_exception): Call
10162 mono_debugger_throw_exception() here like we're doing it on i386.
10164 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
10166 * mini-ia64.c: Add optimized TLS access support.
10168 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
10170 * mini-exceptions.c: Ongoing IA64 work.
10172 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10174 * mini.c: Use the default optimization set when embedding. Fixes
10177 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
10179 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
10180 of trampolines to a separate file.
10182 * mini-trampolines.c: New file.
10184 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
10187 * tramp-x86.c: Reorganize the trampoline code to be similar to the
10190 * mini-codegen.c: Fix cygwin build.
10192 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
10194 * mini.c: Add some minor changes needed by the IA64 port.
10196 * *-ia64.*: Ongoing IA64 work.
10198 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
10200 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
10201 trampolines into arch-independent and arch-dependent parts.
10203 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10205 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
10207 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10209 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10210 the xp-regalloc-branch for amd64.
10212 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10213 xp-regalloc-branch for x86.
10215 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
10217 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10219 2005-07-06 Martin Baulig <martin@ximian.com>
10222 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10223 (mono_jit_runtime_invoke): Likewise.
10225 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
10227 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10230 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10231 without loading their metadata. Reorganize the file format so exception handling+
10232 debug info is kept separate from normal method info. Create MonoJitInfo
10233 structures for methods lazily.
10235 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10237 (x86_class_init_trampoline): Patch AOT class init trampolines too.
10239 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10241 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10244 * mini.h: Bump AOT file version.
10246 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
10248 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10250 2005-07-01 Raja R Harinath <rharinath@novell.com>
10252 * Makefile.am (check-local): Call semdel-wrapper.
10254 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
10256 * mini-x86.c: Revert the last change as it seems to break the build..
10258 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
10260 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10262 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10264 2005-06-27 Ben Maurer <bmaurer@ximian.com>
10266 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10267 outside of the macro, so strange stuff doesn't happen with gcc4
10268 (NEW_AOTCONST_TOKEN): Likewise.
10270 2005-06-28 Martin Baulig <martin@ximian.com>
10272 * mini.c (mini_class_is_system_array): New static method; use this
10273 instead of `klass->parent == mono_defaults.array_class' everywhere
10274 since this also works for the new generic array class.
10276 2005-06-26 Ben Maurer <bmaurer@ximian.com>
10278 * inssel.brg: Remove warnings.
10280 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
10282 * mini-ia64.c: Ongoing IA64 work.
10284 * basic-float.cs: Add float->i1 conversion test.
10286 * iltests.il: Add conv.u4 test.
10288 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
10290 * inssel-long.brg: Fix bug caused by last change.
10292 2005-06-23 Geoff Norton <gnorton@customerdna.com>
10294 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
10295 BSDs. Allows the x86 JIT to work on OSX86
10297 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
10299 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
10302 * mini-ia64.c: Ongoing IA64 work.
10304 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
10306 * mini-ia64.c: Ongoing IA64 work.
10308 * driver.c: Clean up jit_code_hash as well when using --regression.
10310 * inssel-long.brg: Fix long->i4/u4 conversion rules.
10312 * basic-long.cs: Add tests for long->u4 conversion.
10314 2005-06-18 Ben Maurer <bmaurer@ximian.com>
10316 * mini.c: Take mono_get_domainvar out of macros. This makes sure
10317 that we do not depend on undefined C behavior: the order stuff
10318 gets evaluated within an expression. Fixes mono when compiled on
10321 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
10323 * *-ia64.*: Ongoing IA64 work.
10325 * aot.c: Lower memory usage while loading AOT methods.
10327 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
10329 * mini.h: Bump AOT file format version.
10331 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
10333 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
10335 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
10337 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
10338 not on callee assembly). Fixed some comments.
10340 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
10342 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
10343 it gets proper disassembly.
10344 (emit_method_info): Remove some dead code.
10346 * mini.c (mini_method_compile): Allways allocate the GOT var in
10347 mono_method_to_ir for emulating opcodes.
10349 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
10351 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
10352 before freeing the code memory. Fixes #74990.
10354 * objects.cs: Add regression test for #74992.
10356 * liveness.c: Extend live ranges of arguments to the beginning of the
10357 method. Fixes #74992.
10359 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
10360 so it points into the faulting instruction.
10362 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
10364 * jit-icalls.c (mono_imul_ovf): Add exception handling.
10366 * *-ia64.*: Ongoing IA64 work.
10368 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
10370 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
10372 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
10374 * *-ia64.*: Ongoing IA64 work.
10376 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
10378 * basic-long.cs: Add tests for add/sub.ovf.
10380 * basic.cs: Add tests for sub.ovf.
10382 * *-ia64.*: Ongoing IA64 work.
10384 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
10386 * *-ia64.*: Ongoing IA64 work.
10388 * basic.cs: Add conv.ovf.i4.un test.
10390 2005-06-09 Massimiliano Mantione <massi@ximian.com>
10392 * mini.c: (remove_block_if_useless) Fixed bug 75061.
10394 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10396 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
10398 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
10400 * *-ia64.*: Ongoing IA64 work.
10402 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10405 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
10407 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
10409 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
10411 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
10413 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
10415 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
10416 of a call is callable by a near call.
10418 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
10420 * mini-ia64.c: Ongoing IA64 work.
10422 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
10424 * genmdesc.c: Make the generated array non-static.
10426 * inssel-long.brg: Fix LSHR_IMM rule.
10428 * *-ia64.*: Ongoing IA64 work.
10430 * *-ia64.*: Ongoing IA64 work.
10432 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
10434 * *-ia64.*: Ongoing IA64 work.
10436 * *-ia64.*: Ongoing IA64 work.
10438 * mini-ia64.c: Ongoing IA64 work.
10440 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
10442 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
10444 * objects.cs basic-calls.cs: Move some tests to objects.cs.
10446 * objects.cs basic-long.cs: Move some tests to objects.cs.
10448 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
10450 * *-ia64.*: Ongoing IA64 work.
10452 * iltests.il: Add a new test.
10454 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
10455 newobj. Fixes #75042.
10457 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
10459 * *-ia64.*: Ongoing IA64 work.
10461 * *-ia64.*: Ongoing IA64 work.
10463 * *-ia64.*: Ongoing IA64 work.
10465 * basic.cs objects.cs: Move tests accessing static variables as well.
10467 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
10469 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
10471 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
10473 * driver.c: Always print failed tests.
10475 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
10478 * *ia64*: Ongoing IA64 work.
10480 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
10482 * basic.cs: Add tests for add.ovf. Fix warnings.
10484 2005-05-18 Miguel de Icaza <miguel@novell.com>
10486 * driver.c (mono_main): Avoid crash if no argument is passed to
10487 --break; Do not use g_error, but f_printf. And fix all other
10488 ocurrences of the same crash.
10490 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
10492 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
10493 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
10496 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
10498 * *-ia64.*: Add beginnings of IA64 backend.
10500 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
10502 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
10504 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
10507 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
10509 * mini-amd64.c: Fix a warning.
10511 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
10513 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
10514 in float_neg. Fixes #74897.
10516 * mini-amd64.c (emit_call): Fix another near call bug.
10518 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
10520 * declsec.c: Keep the appdomain information in the structure. Added a
10521 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
10522 value gets overwritten).
10523 * declsec.h: Set the default MonoArray for the the stack to 6. Added
10524 an MonoAppDomain member to MonoSecurityFrame.
10525 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
10526 used in the stack walk. Now use a MonoArray which grow (double) when
10529 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
10531 * mini.c: Re-enabled runtime cleanup, since running threads should
10532 now properly stop when exiting.
10534 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
10536 * mini-codegen.c: New file contaning the arch-independent local
10537 register allocator. Not used by any architectures yet.
10539 * mini.h linear-scan.c: Merge some changes from the
10540 mini-xp-local-regalloc branch.
10542 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
10544 * mini-amd64.c (emit_call): Fix calls to native functions when the
10545 runtime is compiled as a shared library. Fixes #74756.
10547 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
10548 on a literal field. Fixes #74751.
10550 2005-04-25 Raja R Harinath <rharinath@novell.com>
10552 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
10554 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
10556 * objects.cs: Add missing null casting test.
10558 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
10560 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
10561 in wrapper methods. Also rename 'address' variable to 'offset'.
10563 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
10565 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
10568 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
10570 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
10573 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10575 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
10577 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
10579 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
10580 just the last bytes.
10582 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
10584 * aot.c (mono_compile_assembly): Fix warning.
10586 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
10587 by the _MSC_VER stuff.
10589 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
10591 * inssel-long.brg: Fix #74588.
10593 * cpu-amd64.md: Fix #74591.
10595 * iltests.il: Add new regression tests.
10597 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
10599 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
10602 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
10604 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
10606 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
10607 from Bill Middleton <flashdict@gmail.com>.
10609 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
10611 * arrays.cs: Add new regression test. Fix warnings.
10613 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
10615 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
10616 and leakage in CKFINITE.
10618 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
10619 this to a null op since it is called on amd64 too.
10621 * exceptions-amd64.c (get_throw_trampoline): Align stack.
10623 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
10624 body since this is not used on amd64.
10626 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
10628 * mini-amd64.c: Remove obsolete fixmes.
10630 * mini.c (print_method_from_ip): Fix debugging support.
10632 2005-2-1 Massimiliano Mantione <massi@ximian.com>
10634 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
10635 so that expressions that don't give much gain are not reduced.
10636 * ssapre.h: Likewise.
10638 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
10640 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
10642 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
10644 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
10646 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
10648 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
10650 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
10652 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
10654 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
10657 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
10659 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
10661 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
10663 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
10664 MONO_ARCH_USE_SIGACTION. Fixes #74252.
10666 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
10668 * mini-x86.c: Fix up stack overflow handling.
10670 * exceptions.cs: Add new regression test.
10672 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
10674 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
10675 mono_jit_thread_attach.
10677 * mini.c (mono_method_to_ir): Verify called method is not abstract.
10679 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
10681 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
10682 avoid calling constructors using callvirt.
10684 * inssel.brg: Fix #74073.
10686 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
10688 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
10689 compilation with non-GCC compilers.
10690 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
10691 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
10693 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
10695 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
10696 klass->interface_offsets (will likely fix bug#74073).
10698 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
10700 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
10702 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
10704 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
10705 to amd64_div_reg_size ().
10707 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
10709 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
10711 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
10713 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
10715 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
10717 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
10719 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
10721 * mini.c (mono_precompile_assembly): Load and precompile referenced
10722 assemblies as well. Fixes #74015.
10724 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
10726 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
10728 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
10730 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
10731 a lot of checks and (anyway) permissions cannot work until corlib is
10734 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
10736 * mini-ppc.c: fixed ABI issue on sysv/ppc.
10738 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
10740 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
10741 calls (fixes bug#72824).
10743 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
10745 * mini.c: fix tail recursion elimination (see test in bug#73936).
10747 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
10749 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
10750 some fp functions in sse2 mode.
10752 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
10754 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
10756 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
10758 * mini.h mini.c: Add mono_get_jit_tls_key ().
10760 * mini-x86.c: Enable fast TLS support on windows.
10762 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
10764 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
10765 * mini.c: Check for p/invoke method when generating code. If a
10766 p/invoke method, or it's class, isn't decorated with [Suppress
10767 UnmanagedCodeSecurity] then generate code to call System.Security.
10768 UnmanagedDemand (only if the security manager is active).
10770 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
10772 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
10773 last change as it seems to cause strange crashes.
10775 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
10777 * *.c: handle unsafe function pointers where needed.
10779 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
10781 * mini.c (mono_jit_free_method): Remove the fixme too.
10783 2005-03-15 Miguel de Icaza <miguel@novell.com>
10785 * mini.c: As discussed, make the code actually free the delegate
10786 thunk now, to enable the debugging of delegate problems, use
10787 MONO_DEBUG=1 when running Mono.
10789 This takes also care of parts of the leaks as seen by Joe.
10791 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
10793 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
10794 thread_tls_offset calculation.
10796 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
10798 * declsec.c: Reworked linkdemand checks for icall. The previous code
10799 was using the declaration code (untrusted) and didn't work as expected
10800 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
10803 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
10805 * iltests.il: Add new localloc test.
10807 * mini-amd64.c: Handle large stack allocations the same way as on
10808 windows if stack overflow handling is working.
10810 * mini-amd64.c: Allocate the signal stack using mmap.
10812 * mini.c (sigsegv_signal_handler): Fix reading of context.
10814 * mini-exceptions.c: Fix up stack overflow handling.
10816 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
10818 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
10820 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
10822 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
10824 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
10825 tramp_init functions as they are no longer needed.
10827 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
10829 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
10831 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
10833 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
10835 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
10838 * mini-ops.h: Add OP_LMUL_IMM.
10840 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
10841 long mul/div opcodes as intrinsic.
10843 * mini-amd64.c (emit_call): Handle the case when the callee might be
10846 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
10848 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
10851 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
10853 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
10855 2005-03-09 Ben Maurer <bmaurer@ximian.com>
10857 * mini.c (mono_codegen): Don't leak here, to help people running
10860 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
10862 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
10863 conversions in sse2 mode.
10865 * basic-float.cs: Add regression test.
10867 * mini-amd64.c: Reenable sse2.
10869 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
10871 * mini-amd64.c: Disable sse2 until some regressions are fixed.
10873 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
10875 * driver.c: Copyright text should include 2005.
10877 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
10879 * cpu-amd64.md (load_membase): Fix more max lengths.
10881 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
10883 * cpu-amd64.md (load_membase): Fix max length.
10885 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
10887 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
10889 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
10890 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
10892 * basic-float.cs: Add rounding regression test.
10894 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
10896 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
10898 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
10899 structures in registers for pinvoke wrappers.
10901 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
10903 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
10905 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
10907 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
10908 wrapper to mono_jit_thread_attach.
10910 * mini.c (mini_jit_thread_attach): New jit icall.
10912 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
10913 native->managed wrappers.
10915 * exceptions.cs: Add new regression test.
10917 * mini.c (optimize_branches): Check regions in the cbranch to throw
10918 block case as well. Fixes #73242.
10920 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
10922 * mini.c: thread safety fixes.
10924 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
10926 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
10927 patching stuff, since delegates use jump trampolines so there is
10930 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
10933 * tramp-amd64.c: Fix build.
10935 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
10936 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
10938 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
10939 Rename this to mono_arch....
10940 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
10942 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
10944 * mini-amd64.c (emit_call): If both the caller and the callee is
10945 guaranteed to have 32 bit addresses, emit a normal call.
10947 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
10949 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
10950 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
10951 method_ptr inside delegates.
10953 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
10955 * mini.c (mono_jit_free_method): Free the method info even if the native code is
10956 invalidated. Fixes #73001.
10958 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
10960 * mini-x86.c: Only use stdcall for pinvokes on windows.
10962 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
10964 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
10965 * mini-x86.c: remove unreliable __thread var offset detection,
10966 use the correct accessors and enable by default.
10968 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
10970 * mini.c (mono_jit_free_method): Fix memory leak.
10972 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
10974 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
10976 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
10978 * cpu-amd64.md: Fix lengths of atomic opcodes.
10980 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
10982 * driver.c: try to not imply using ICU is any good.
10984 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
10986 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
10987 functions as inline ops.
10989 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
10990 some Interlocked functions as inline ops.
10992 * mini.c (move_basic_block_to_end): Fix bug in last patch.
10994 * mini.h (MonoBasicBlock): Reorganize fields a bit.
10996 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
10998 * mini.c: Add support for OP_NOT_TAKEN.
11000 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
11001 structures in registers for pinvoke wrappers.
11003 * mini-amd64.c: Fix warnings.
11005 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
11007 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11009 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11011 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
11012 address instead of loading the address from it.
11014 * mini-x86.c: Add support for returning small structs in registers
11015 on Win32. Fixes part of #70864.
11017 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
11019 * trace.c (get_token): Improve error checking.
11021 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
11023 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11025 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
11027 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11028 it can be reused for MonoClass.
11029 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11032 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
11034 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
11035 instead of a MonoReflectionMethod. The method information wasn't used
11036 when displaying SecurityException details (but will be now).
11038 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
11040 * Makefile.am : windows build fix.
11042 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
11044 * iltests.il: Add new regression test.
11046 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11049 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
11051 * mini.c: Moved linkdemand check into helper function check_linkdemand
11052 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
11055 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
11057 * declsec.c: Added statistics counter for different kinds of
11059 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11060 (and commented) declaration.
11061 * mini.c: Added statistics counter for security Demand code
11062 generation. Added display of security statistics.
11064 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
11066 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
11067 Fix compilation errors under gcc-2.95.
11069 2005-02-12 Ben Maurer <bmaurer@ximian.com>
11071 * mini.c, driver.c: Use the new jit trampoline hashtable
11073 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11075 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
11077 2005-02-11 Martin Baulig <martin@ximian.com>
11079 * debug-mini.c (mono_debug_close_method): Free the line number array.
11081 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
11083 * aot.c: Break up large methods into smaller ones. Share GOT slots for
11086 * mini.h: Bump AOT file format version.
11088 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
11090 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
11092 * declsec.h: Added macros to get/set lazyly initialized security
11093 informations about assemblies. Added new enum for different type of
11094 possible LinkDemand violation. Added function to check LinkDemands.
11095 * mini.h: Added a field to MonoCompile to hold any security violation
11096 detected when JITting a method (so it can be thrown later).
11097 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
11098 and CEE_CALLVIRT. Added code to throw exception at the end of
11099 mini_method_compile (note: the exception is unhandled right now).
11101 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
11103 * mini.c, jit-icalls.c: use the managed implementation of
11104 memset for initobj and memset, to avoid managed <-> unmanaged
11107 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
11109 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
11110 optimization if it would need a GOT var.
11112 * basic.cs: Add tests for constant propagation and switch statements.
11114 * ssa.c: Fix out-of-range constant propagation and switch statements.
11116 2005-02-09 <vargaz@freemail.hu>
11118 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
11120 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
11122 * cpu-amd64.md (load_membase): Fix max length of load_membase.
11124 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11126 * mini.c: update to new signature of mono_class_get_allocation_ftn().
11128 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
11130 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
11131 arithmetic operations.
11133 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11135 * mini-ppc.c: add a workaround for broken user code that
11136 DllImports vararg functions with non-vararg signatures.
11138 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
11140 * mini.c (mono_jit_compile_method_inner): Add detection and a
11141 meaningfull error message for assemblies written in Managed C++.
11143 * tramp-amd64.c mini-amd64.h: Add support for
11144 create_trampoline_from_token ().
11146 * aot.c mini-x86.c abcremoval.c: Applied patch from
11147 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11149 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
11151 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
11152 which takes a MonoImage/token as parameter instead of a MonoMethod.
11154 * aot.c: Use the new trampoline for initializing vtables.
11156 * aot.c: Add support for ldfld/stfld_remote wrappers.
11158 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11159 rules for compare <MEM>, IMM.
11161 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11163 * aot.c: Handle inherited finalizers correctly.
11165 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
11167 * inssel.brg (stmt): Add a missing _setup_... ().
11169 * aot.c: Save some parts of the class state to the AOT file and use it
11170 to recompute that state when a class is initialized.
11172 * mini.c: Install AOT hooks into the runtime.
11174 * mini.h: Bump AOT file format version.
11176 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11179 * iltests.il: Add new test.
11181 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11183 * mini.c: fix typo.
11185 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11187 * mini.c: setup the statistical profiler in the thread attach
11188 callback to cope with the new single thread code.
11190 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11192 * mini-ppc.c: ensure we have enough room for the profiler
11193 calls (fixed bug#72084).
11195 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
11197 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
11200 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11202 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11204 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11206 * ssapre.c: Fixed an issue with down safety (this allows IronPython
11207 to succesfully execute parrotbench).
11208 * ssapre.h: Likewise.
11210 2005-2-1 Massimiliano Mantione <massi@ximian.com>
11212 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11213 variable for stores to method arguments (fixes a SSAPRE issue).
11215 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11217 * mini.c: handle value types in dup, fixes gen-112.cs.
11219 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11221 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11222 sequence for calls in dynamic methods to avoid thunks.
11224 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11226 * mini.c: correctly remove dynamic methods from the hashtable.
11228 2005-1-20 Massimiliano Mantione <massi@ximian.com>
11230 * driver.c: Disabled SSAPRE until fix the bug that appears
11231 in IronPython's parrotbench.
11233 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
11235 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11237 * mini.c (mono_method_to_ir): Revert the previous change.
11239 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11240 when AOT compiling.
11242 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
11243 mono_jit_info_table_find () etc. when running under valgrind.
11245 * inssel.brg: Fix warnings.
11247 * mini-exceptions.c: Fix warnings.
11249 2005-01-31 Martin Baulig <martin@ximian.com>
11251 * driver.c (compile_all_methods_thread_main): Don't try to compile
11252 generic methods or anything which has type parameters.
11254 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
11256 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11258 * TestDriver.cs: Add --verbose flags.
11260 * graph.c ssa.c: Fix 64 bit warnings.
11262 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
11263 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11264 Fix 64 bit warnings.
11266 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11267 variable not spotted by gcc.
11269 * mini-amd64.c inssel-amd64.brg: Applied patch from
11270 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
11271 X86_COMPARE_MEMBASE opcodes.
11273 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11275 2005-01-29 Ben Maurer <bmaurer@ximian.com>
11277 * *: MonoMethod->signature might be NULL now. You *MUST* use
11278 mono_method_signature.
11280 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
11282 * driver.c (compile_all_methods_thread_main): Compile the methods
11283 without invoking cctors.
11285 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11287 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
11288 * basic-calls.cs: test for the above.
11290 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
11292 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
11293 MonoJitInfo changes.
11295 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
11297 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
11298 eagerly if it contains dynamic methods.
11300 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
11302 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
11303 trace, it is now computed by an icall from trace_ips.
11305 * mini-exceptions.c: Fix a warning.
11307 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
11309 * mini-exceptions.c: don't bother getting stack trace info if
11310 it's not going to be used.
11312 2005-01-27 Raja R Harinath <rharinath@novell.com>
11314 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
11317 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
11319 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
11321 * aot.c: Avoid calling mono_method_get_header () if not needed.
11323 * mini.h: Bump AOT file format version.
11325 * mini.c (mono_emit_native_call): Allocate a GOT var here.
11327 * mini.c (mono_print_tree): Print more info for calls.
11329 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
11331 * declsec.h: Remove warning by adding missing include for marshal.h
11333 2005-01-26 Martin Baulig <martin@ximian.com>
11335 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
11338 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
11340 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
11343 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
11345 * aot.c (mono_compile_assembly): Fix a warning.
11347 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
11349 * declsec.c: Look for security attributes on the original MonoMethod
11350 (and not the wrapped one). This fix permissions on icalls.
11352 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
11354 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11356 * mini.c (mono_allocate_stack_slots): Add a fixme.
11358 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11360 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11362 * inssel.brg: optimize casts of sealed types (more
11363 optimizations waiting for fixes in remoting).
11365 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
11367 * inssel.brg (stmt): Add another dummy rule.
11369 * driver.c: Fix warnings.
11371 * driver.c (mono_main): If running under valgrind, instruct glib to use
11372 the system allocation functions so valgrind can track the memory
11373 allocated by the g_... functions.
11375 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
11377 * mini-ops.h: Add OP_DUMMY_STORE opcode.
11379 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
11381 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
11382 variables in try regions.
11384 * mini.c (mini_method_compile): Don't disable optimizations on large
11385 methods when AOT compiling.
11387 * mini.c (mono_allocate_stack_slots): New arch independent method to
11388 allocate stack slots. Not yet used.
11390 2005-01-22 Ben Maurer <bmaurer@ximian.com>
11392 * debug-mini.c (mono_debug_close_method): Plug some leaks.
11394 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
11396 * mini-ppc.c: make the branch info relative as the code
11397 buffer can be reallocated.
11399 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
11401 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
11402 * driver.c: Removed the AOT/security restriction. Now initialize the
11403 security manager (in metadata) if --security is used.
11404 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
11405 rather than the pointer to declarative security, when AOT is used.
11407 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
11409 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
11410 basic blocks, reduced intrinsic exception throwing code size.
11412 2005-01-22 Miguel de Icaza <miguel@ximian.com>
11414 * driver.c (mini_usage): Reorder the usage screen.
11416 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
11418 * mini.c (mono_resolve_patch_target): Fix warning.
11420 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
11422 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
11425 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
11427 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
11428 breaks the amd64 build.
11430 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
11431 register allocation. Fixes #71454.
11433 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
11435 * arrays.cs: Add new regression test.
11437 2005-1-20 Massimiliano Mantione <massi@ximian.com>
11439 * ssapre.c: Turned usage of snprintf to GString.
11440 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
11441 (I left it on by mistake in my previous commit).
11443 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
11445 * mini.c, cfold.c, basic-calls.cs: preserve side effects
11446 on cond branch optimization (fixes bug# 71515).
11448 2005-1-20 Massimiliano Mantione <massi@ximian.com>
11450 * abcremoval.c: Fixed bug 71062.
11451 * abcremoval.h: Likewise.
11453 2005-1-20 Massimiliano Mantione <massi@ximian.com>
11455 * mini.c: Added a new functionality to optimize_branches, the removal
11456 of useless basic blocks, and fixed some problem in the removal of
11457 critical edges; some utility functions added for both purposes.
11458 * ssapre.c: Added complex expression support, and fixed bug 70637.
11459 * ssapre.h: Likewise.
11460 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
11462 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
11463 * driver.c: Re-enabled SSAPRE.
11465 2005-01-19 Martin Baulig <martin@ximian.com>
11467 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
11468 the result of mono_get_method_constrained().
11470 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
11472 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
11475 2005-01-18 Geoff Norton <gnorton@customerdna.com>
11477 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
11478 be detected. Fixes #59296.
11480 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
11482 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
11483 which can happen. Fixes #71361.
11485 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
11487 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
11490 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
11492 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
11493 appdomain-unload.exe to fail.
11495 * mini.c: Fix some memory leaks.
11497 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
11499 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
11500 Fixed bug and sped up some codepaths.
11502 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
11504 * mini.c: Fix some memory leaks.
11506 * exceptions.cs basic-long.cs: Add test for checked ulong->int
11509 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
11511 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
11514 * iltests.il: Add regression test for #71320.
11516 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
11518 * mini.c (mono_codegen): Fix installation of profiler hooks.
11520 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
11522 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
11524 * mini.h, mini.c, cfold.c: optimize access to enum
11525 readonly fields, too. Eval conditional branches if possible
11526 to perform unreachable code removal in more cases.
11528 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
11530 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
11532 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
11535 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
11536 WinXP DEP. Fixes #71244.
11538 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
11540 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
11542 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
11544 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
11546 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
11548 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
11551 * mini.h: Bump AOT version.
11553 * mini.h (MonoCompile): Change exvar to a hash table.
11555 * mini.c: Allocate a separate exvar for each handler block.
11557 * mini.c: Get rid of the computation of filter_lengths, its not needed.
11559 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
11560 ex var with the pending exception and only throw if the two are equal.
11563 * exceptions.cs: Add tests for rethrow and nested catch clauses.
11565 * mini-x86.c: Fix warnings.
11567 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
11568 used by all the ports now.
11570 * aot.c: Add write-symbols and save-temps options.
11572 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
11574 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
11576 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
11578 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
11581 * tramp-s390.c: Check vtable slot belongs to the domain.
11583 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
11584 as per other platforms.
11586 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
11588 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
11590 * driver.c: we don't run the Main() code in a subthread anymore.
11592 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
11594 * mini.c: added experimental rtc support in the statistical
11595 profiler: if the user has the permission, more accurate statistics
11596 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
11597 The MONO_RTC value must be restricted to what the linux rtc allows:
11598 power of two from 64 to 8192 Hz.
11600 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
11602 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
11604 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
11606 * mini-ppc.c: better icache flush for smp.
11608 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
11610 * mini-amd64.c (emit_move_return_value): Fix memory leak.
11612 * mini-x86.c (get_call_info): Add the get_call_info () code from the
11613 amd64 port, not yet used.
11615 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
11617 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
11620 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
11622 * driver.c: Added --security option to activate the security manager.
11623 Right now this will allow code generation for declarative demands and
11624 is disabled when AOT is specified.
11625 * mini.c: Add code generation for declarative security demands.
11626 * mini.h: Add mono_use_security_manager as an extern gboolean.
11628 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
11630 * aot.c (mono_compile_assembly): Speed up compilation a bit by
11631 emitting more dense assembly code.
11633 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
11634 exception throwing stuff.
11636 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
11638 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
11641 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
11642 left in by mistake.
11644 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
11647 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
11649 * tramp-*.c: Only patch vtable slots if the object is in the current
11650 domain. Fixes appdomain-unload.exe.
11652 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
11654 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
11657 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
11659 * mini.c (reverse_branch_op): New helper function.
11661 * mini.c (optimize_branches): Run the new optimization only on
11662 platforms which support it. Also reverse all kinds of branches.
11664 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
11666 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
11669 * mini.c (optimize_branches): Reverse not-equals branches if the false
11670 bblock is a throw. This happens a lot of time with argument checking in
11673 * mini.c (mono_codegen): Add support for placing basic blocks after
11674 the function epilogue.
11676 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
11679 2005-01-05 Miguel de Icaza <miguel@ximian.com>
11681 * mini.c (setup_stat_profiler): Only set this up if the platform
11682 supports ITIMER_PROF.
11684 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
11686 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
11689 * inssel.brg: Fix a warning.
11691 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
11693 * mini.c: added support for statistical profiler
11694 (run with: --profile=default:stat).
11696 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
11698 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
11700 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
11702 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
11703 related to global registers from the amd64 port.
11705 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
11707 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
11709 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
11710 with global registers.
11711 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
11713 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
11715 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
11717 * debug-mini.c (encode_value): Fix off-by-one.
11719 * aot.c (encode_value): Likewise.
11721 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
11723 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
11725 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
11728 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
11730 * aot.c (emit_method_info): Increase size of temp buffer.
11732 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
11735 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
11737 * aot.c (emit_method_info): Fix build.
11739 * aot.c: Further rework of the AOT file format to reduce the size of
11740 the method info data.
11742 * mini.h: Bump AOT file format version.
11744 2004-12-27 Martin Baulig <martin@ximian.com>
11746 * mini.c (mini_get_method): New static method; call
11747 mono_get_method_full() and mono_get_inflated_method().
11748 (mono_method_to_ir): Use mini_get_method() instead of
11749 mono_get_method_full().
11751 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
11753 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
11755 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
11757 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
11759 * inssel-amd64.brg: Add some optimization rules.
11761 2004-12-24 Ben Maurer <bmaurer@ximian.com>
11763 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
11764 standard not GC'd stuff is fine.
11766 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
11768 * aot.c: Rework the AOT file format to get rid of most of the global
11769 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
11771 * mini.h: Bump AOT file format version.
11773 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
11775 * mini.h: Bump AOT file format version.
11777 * aot.c (mono_aot_is_got_entry): New function to determine if an
11778 address is inside a GOT.
11780 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
11782 * cpu-pentium.md: Increase the maximum size of some instructions which
11783 might involve a got access.
11785 * mini.c (get_method_from_ip): Another debug helper function.
11787 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
11788 when got var accesses are created during the decompose phase.
11790 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
11792 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
11793 argument mini_compile_method and to MonoCompile, and use this to
11794 determine whenever a given method is compiled for AOT. This allows the
11795 other methods compiled during AOT compilation to be free of AOT stuff,
11796 so the backends does not need to add special support for them by
11797 creating a fake GOT etc.
11799 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
11802 2004-12-21 Ben Maurer <bmaurer@ximian.com>
11804 * mini.c (mono_method_to_ir): It turns out that some of the
11805 x-appdomain wrappers are lax with types, so just ignore this for
11808 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
11809 at the vtable->klass. If it is non-shared code we can just use the
11812 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
11814 * mini-ppc.c: access MonoDomain from tls, too.
11816 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
11818 * declsec.c: Removed unused variable (and related warning ;-)
11820 2004-12-21 Ben Maurer <bmaurer@ximian.com>
11822 * iltests.il: New test for LDELEMA on an array of ref types.
11824 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
11825 all ldelema's on reftypes.
11826 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
11827 it was the wrong place to put it.
11829 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
11830 register to pop to make this cleaner, at the request of Paolo.
11832 2004-12-20 Ben Maurer <bmaurer@ximian.com>
11834 * mini-ops.h (OP_GETHASHCODE): New op.
11836 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
11838 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
11841 For a microbenchmark, this reduces the cost of Hashtable.get_Item
11844 * mini-x86.c (mono_arch_output_basic_block): Rather than
11852 The first is 3 bytes while the second is 1. This saves 36 kb on
11853 mscorlib, quite a big saving. When bootstraping mcs, I was able to
11854 see a small boost because of icache locality.
11856 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
11858 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
11860 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
11861 started code sharing with the generic code.
11863 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
11865 * mini-ppc.c, cpu-g4.md: added code for direct access to
11868 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
11870 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
11871 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
11874 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
11876 * declsec.c|h: Added functions to cache the declarative stack modifiers
11877 in MonoJitInfo and to create a security frame from a MonoJitInfo
11879 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
11880 created. Register internal calls for System.Security.SecurityFrame::
11881 _GetSecurityFrame and _GetSecurityStack.
11882 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
11883 the definitions for the new stack walk/callback mechanism.
11884 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
11885 first security frame for LinkDemands and InheritanceDemands) and
11886 GetSecurityStack for Demands. Both use the new mono_walk_stack code
11888 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
11889 walk initialization (lupus).
11891 2004-12-20 Ben Maurer <bmaurer@ximian.com>
11893 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
11895 (handle_loaded_temps): Do not create a temporary variable for
11896 things that we know are temps. They will never be modified.
11897 (mono_spill_call): Set MONO_INST_IS_TEMP
11898 (mono_emulate_opcode): ditto
11900 (mono_method_to_ir.CEE_DUP): ditto
11902 2004-12-19 Ben Maurer <bmaurer@ximian.com>
11904 * mini.c (type_to_eval_stack_type): Make this handle the void type
11905 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
11906 (emit_tree): use ip_in_bb to special case some common idioms
11907 Update all callers to pass in the IP.
11908 (mono_method_to_ir): Make CEE_CALL* do the above as well.
11910 This gives us a nice 2% speedup in mcs bootstrap.
11912 * mini-x86.c (peephole_pass): Peephole pass to make
11921 * mini.c (ip_in_bb): new method.
11922 (mono_method_to_ir): use this method rather than doing the hash
11925 * linear-scan.c (mono_linear_scan): When expiring actives, you
11926 don't need to keep around variables that expire on this
11927 instruction. This makes it so that:
11930 store (ebx add (ebx, 1))
11934 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
11936 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
11937 combination to avoid doing two copies. Fix up problems with previous
11940 * mini.c: Fix 64 bit warnings.
11942 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
11944 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
11946 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
11947 changes from the x86 code.
11949 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
11951 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
11953 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
11954 throwing code to reduce its size, unify the AOT and non-aot code and
11955 get rid of relocations in the AOT case.
11957 * mini-x86.h mini.c exceptions-x86.c
11958 (mono_arch_get_throw_corlib_exception): New arch specific function to
11959 raise corlib exceptions which doesn't require relocations in the
11962 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
11964 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
11966 * mini.c (mono_emit_method_call): Only allocate the got var when it is
11969 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
11972 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
11974 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
11975 with add function when used from Inc/dec atomic
11976 functions. Re-enabled optimization on x86.
11977 * mini-ops.h: renamed atomic_add functions to
11978 allow _add to match the Interlocked::Add and
11979 _add_next to match Interlocked::Inc/Dec.
11981 2004-12-15 Massimiliano Mantione <massi@ximian.com>
11983 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
11984 linking of BBs to the end BB, and enabled SSAPRE also with
11985 consprop and copyprop (which was prevented by that bug).
11987 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
11989 * mini-x86.c: disabling the Interlocked optimizing code.
11991 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
11993 * aot.c (load_aot_module): Move reading of got_addr after the AOT
11994 file version check.
11996 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
11998 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
11999 interlocked optimization due lack of support on x86, rewrote
12000 exchange to take into account that base may be in eax.
12002 xsp works again; activated Interlocked optimizing code.
12004 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
12006 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12008 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
12010 * mini-ops.h: Add new opcodes.
12012 * mini.h: Add new patch types. Add got_var to MonoCompile.
12014 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
12015 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12016 make it work with all kinds of patchable code.
12018 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12019 address of the GOT, and referencing entries in the GOT.
12021 * mini.c: Add code to load the GOT address if needed by an opcode.
12023 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
12024 independent AOT code on the x86 using an elf-style Global Offset Table.
12026 2004-12-14 Raja R Harinath <rharinath@novell.com>
12028 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12030 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12032 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12035 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
12037 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12038 of Interlocked:Increment/Decrement/Add as inline ops.
12039 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12041 2004-12-12 Geoff Norton <gnorton@customerdna.com>
12043 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12044 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12046 2004-12-12 Duncan Mak <duncan@ximian.com>
12048 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12049 again. `patch_info->table_size' is no longer valid after Zoltan's
12052 2004-12-12 Martin Baulig <martin@ximian.com>
12054 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12055 if we are the "real" method, ie. not an inlined method inside it.
12057 2004-12-11 Ben Maurer <bmaurer@ximian.com>
12059 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12060 before we look in the special fields table. This fixes
12061 ../tests/thread-static-init.cs.
12063 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12065 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
12066 for Array get_Rank and get_Length. Fixes bug #70465.
12068 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
12070 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
12071 separate structure to reduce the size of MonoJumpInfo.
12073 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
12075 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
12077 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
12079 * mini.c (mini_get_inst_for_method): Changed to allow ports
12080 to return a MonoInst instead of opcode
12081 (renamed mini_get_opcode_for_method to better reflect the new functionality)
12083 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
12084 Allow ports to return a created MonoInst instead of op-code, will enable
12086 (renamed mini_get_opcode_for_method to better reflected the functionality)
12088 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
12090 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
12092 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
12094 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
12097 2004-12-08 Martin Baulig <martin@ximian.com>
12099 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
12100 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
12102 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
12104 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
12107 * exceptions.cs: Disable some tests which depend on properties of x86 fp
12110 2004-12-08 Raja R Harinath <rharinath@novell.com>
12112 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
12114 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
12116 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
12117 bug introduced by the previous patch.
12119 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12121 * mini-ppc.c, objectc.cs: handle large structs passed by value
12122 (fixes bug #69972).
12124 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12126 * mini-ppc.c: OP_ARGLIST implementation from
12127 Geoff Norton <gnorton@customerdna.com>.
12129 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12131 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12132 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12134 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12136 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12138 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12140 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12143 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
12145 * mini-sparc.c: Zero out localled-ed memory.
12147 * iltests.il: Add tests for zeroing out localloc-ed memory.
12149 2004-12-04 Martin Baulig <martin@ximian.com>
12151 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12152 mono_method_get_signature_full().
12154 2004-12-03 Massimiliano Mantione <massi@ximian.com>
12156 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12157 and some utility functions (always for SSAPRE), integrated SSAPRE.
12158 * mini.h: Likewise.
12159 * driver.c: Added ssapre option.
12160 * ssa.c: Small fix on OP_ARG handling.
12161 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12162 * Makefile.am: Likewise.
12164 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
12166 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12167 now in the xp code.
12169 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12172 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12174 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12176 * cpu-s390.md : Increase instruction length of oparglist.
12178 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12180 2004-11-30 Martin Baulig <martin@ximian.com>
12182 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12183 virtual generic methods. We call a special helper_compile_generic_method()
12184 icall to retrieve the method from the vtable, inflate and compile
12185 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
12187 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12189 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
12191 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12193 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
12195 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12198 2004-11-27 Ben Maurer <bmaurer@ximian.com>
12200 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12201 platforms with PIC aot.
12203 2004-11-28 Martin Baulig <martin@ximian.com>
12205 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12208 2004-11-28 Martin Baulig <martin@ximian.com>
12210 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12211 the result of mono_type_get_underlying_type() to check whether
12214 2004-11-26 Martin Baulig <martin@ximian.com>
12217 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12220 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
12222 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12223 the same way as the other arguments so they won't get clobbered.
12225 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
12226 calls through R11 since it is clobbered by the trampoline code.
12228 2004-11-26 Raja R Harinath <rharinath@novell.com>
12230 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12231 pick up in-tree mscorlib.dll.
12233 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
12235 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12237 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
12238 runtime data/code are now stored in a table similar to the GOT in ELF.
12239 This allows the code itself to be position independent.
12241 * aot.c: Fix loading of referenced assemblies after the lazy assembly
12244 * aot.c: Attach ELF type (object/function) directives to all global
12247 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12249 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12251 * mini-amd64.h: Turn on PIC AOT code.
12253 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12254 returning the offset within an OP_AOTCONST instruction where the GOT
12255 offset needs to be added.
12257 * mini.h: Bump AOT file format version.
12259 2004-11-25 Martin Baulig <martin@ximian.com>
12261 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12262 uninflated generic methods.
12264 2004-11-25 Martin Baulig <martin@ximian.com>
12266 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12268 2004-11-24 Martin Baulig <martin@ximian.com>
12270 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12271 original klass (this only applies for generic instances).
12273 2004-11-24 Martin Baulig <martin@ximian.com>
12275 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
12276 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
12279 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
12281 * mini.c (mono_method_to_ir): Disable inlining for methods containing
12282 localloc. Fixes #69678.
12284 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
12286 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
12288 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
12289 used SSE registers on pinvoke calls. Fixes #69774.
12291 2004-11-23 Geoff Norton <gnorton@customerdna.com>
12293 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
12294 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
12296 2004-11-23 Raja R Harinath <rharinath@novell.com>
12298 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
12299 Refer directly to the mcs/ tree.
12301 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12303 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
12304 Check if a trampoline for a synchronized method is required.
12306 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
12308 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
12309 with localloc if needed. Throe arithmetric exception in
12310 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
12311 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
12313 2004-11-19 Geoff Norton <gnorton@customerdna.com>
12315 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
12316 types before switching on type. Fixes #69622.
12318 2004-11-19 Raja R Harinath <rharinath@novell.com>
12320 * Makefile.am (check-local): New. Integrate into 'make check'.
12321 (MCS,RUNTIME): Define using in-tree mono and mcs.
12323 (%.exe): Use $(ILASM).
12325 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
12327 * mini-ppc.c: adjust initial prolog size (bug #69691).
12329 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
12331 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
12334 2004-11-17 Raja R Harinath <rharinath@novell.com>
12336 * Makefile.am (clean-local): Rename from 'clean'.
12338 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12340 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
12341 to mono_arch_is_int_overflow.
12342 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
12345 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
12347 * declsec.c|h: New files to support declarative security attributes.
12348 Added function to check if a method has (applicable) security.
12349 * mini.c|h: Add check for declarative security attributes in
12350 mono_method_check_inlining.
12351 * Makefile.am: Added declsec.c and declsec.h to the build.
12353 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
12355 * mini.c, mini.h: update to keep dynamic code info per-domain.
12357 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
12359 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
12360 (mini_init): Get rid of it from here too.
12362 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
12364 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
12365 implemented OP_RETHROW (patch by Geoff Norton
12366 <gnorton@customerdna.com>).
12368 2004-11-10 Geoff Norton <gnorton@customerdna.com>
12370 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
12371 between appdomains. Fixes appdomain-unload on PPC.
12373 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
12375 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12376 mini-exceptions.c: handle the new wrapper types.
12377 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
12378 token value as a MonoClass* when compiling a wrapper.
12379 mono_jit_create_remoting_trampoline now takes an additional
12380 MonoRemotingTarget parameter.
12382 2004-11-10 Martin Baulig <martin@localhost>
12384 * mini.c (mono_method_to_ir): Use `generic_container->context'
12385 rather than creating a new one.
12387 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12389 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
12391 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
12393 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
12395 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
12396 the experimental aot cache stuff.
12398 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12400 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12401 mini-exceptions.c: update to exception clause structure changes.
12403 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
12405 * exceptions-x86.c (throw_exception): Fix warnings.
12407 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
12410 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
12412 * exceptions-sparc.c (get_throw_exception): Really fix this.
12414 2004-11-07 Ben Maurer <bmaurer@ximian.com>
12416 * tramp-*.c: we no longer support icalls without wrappers, so
12417 a bit of code can be removed here
12419 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
12421 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
12424 * cpu-sparc.md: Add op_rethrow.
12426 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
12428 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
12430 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
12431 * mini-ops.h: Add OP_RETHROW.
12433 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
12435 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
12437 2004-11-05 Geoff Norton <gnorton@customerdna.com>
12439 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
12440 Makes the output much easier to read
12442 2004-11-05 Ben Maurer <bmaurer@ximian.com>
12444 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
12445 prevents another huge leak when compiling with ssa. Secondly, the
12446 performance of doing this rather than freeing the lists is much
12447 better. GList does a lock every time you allocate a list link,
12448 so that it can use a memory pool. So, it is better to just use
12449 a memory pool of our own.
12451 * ssa.c, linear-scan.c: replace g_list_remove_link with
12452 g_list_delete. The remove one does not free the GList, so we were
12453 leaking memory. On -O=all --compile-all with corlib, this cut down
12454 3 MB of allocations.
12456 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
12458 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
12460 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
12462 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
12463 into a new function mono_create_jit_trampoline ().
12465 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
12467 * trace.c (get_spec): Allow tracing of classes without a namespace.
12469 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
12471 * mini.c: Fix pointer overwrite in mini_method_compile.
12473 2004-11-2 Geoff Norton <gnorton@customerdna.com>
12475 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
12476 The darwin ABI needs some special handling for 1 and 2 byte structs
12477 Lets use lbz/lhz instead of lwz everywhere.
12478 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
12479 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
12480 Use stb/sth for the former, and put the latter always on stack instead of in
12481 argument registers.
12483 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
12485 * trace.c (is_filenamechar): Add '_'.
12487 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12489 * mini-s390.c: Fix prolog length to allow for large trace requirements.
12491 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
12493 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
12495 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
12496 depends on libmonogc. Fixes #68805.
12498 2004-10-26 Miguel de Icaza <miguel@ximian.com>
12500 * mini.c (mono_jit_free_method): Provide extra information for
12501 this error. Currently this leaks, but will be turned into a
12502 developer option in the future.
12504 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
12506 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
12508 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
12510 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
12511 boundary. Fixes reading of PATCH_INFO_R4 and R8.
12512 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
12514 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
12516 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
12517 trampolines for AOT code.
12519 2004-10-22 <vargaz@freemail.hu>
12521 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
12522 constructed types. Fixes #68136.
12524 2004-10-21 Martin Baulig <martin@ximian.com>
12526 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
12527 if it returns true, unwind the stack to the call instruction.
12529 2004-10-21 <vargaz@freemail.hu>
12531 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
12533 * mini.h: Bump AOT version number.
12535 * objects.cs: Add another test for unbox trampolines.
12537 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
12540 2004-10-20 <vargaz@freemail.hu>
12542 * driver.c: Add SHARED to the set of optimizations tested.
12544 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
12546 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
12547 used by CEE_NEWARR.
12549 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
12551 2004-10-20 Martin Baulig <martin@ximian.com>
12553 * mini-exceptions.c (mono_handle_exception): Call
12554 mono_debugger_handle_exception() to tell the debugger about
12555 catch/finally clauses.
12557 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
12559 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
12561 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
12564 2004-10-15 Geoff Norton <gnorton@customerdna.com>
12566 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
12567 methods as their native size, fixed bug #57543, #57545.
12568 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
12569 This saves a temporary register and mullw call down into 1 (minor perf
12570 increase for cases like sum = sum * 5; This use to translate into:
12573 It now translates to
12576 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
12578 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
12581 2004-10-11 Martin Baulig <martin@ximian.com>
12583 * mini.c (mono_method_to_ir): If we're a generic method, get the
12584 MonoGenericContainer from our MonoMethodNormal and create a
12585 MonoGenericContext from it.
12587 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
12589 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
12591 * basic-long.cs: Add test for checked i8->i2 cast.
12593 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12595 * inssel-ppc.brg: added a couple of speedup rules.
12597 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
12599 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
12600 to speed up rebuilds.
12602 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12604 * mini-s390.c: Minor fix to OP_OR_IMM.
12606 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
12608 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
12609 better. Fixes appdomain-unload.exe on sparc.
12611 2004-10-02 Massimiliano Mantione <massi@ximian.com>
12613 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
12614 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
12617 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
12619 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
12621 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
12623 * mini.c: Always generate a field read/write wrapper for members
12624 of the class MarshalByRefObject since the actual instance could
12627 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
12629 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
12631 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
12633 * driver.c mini.h trace.c: Move the setting of the main assembly into
12634 a separate function called mono_trace_set_assembly () and call it after
12635 actually loading the main assembly. Fixes #66872.
12637 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
12639 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
12640 using the code manager.
12642 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
12644 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
12646 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
12648 * cpu-amd64.md: Fix bug in previous patch.
12650 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
12653 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
12655 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12656 mini-exceptions.c: updates for changed stack walk interface.
12658 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12660 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
12662 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
12664 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
12666 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
12668 * driver.c (mini_regression_list): Do not call mono_assembly_close
12669 since assemblies can't be unloaded.
12671 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
12673 * cpu-amd64.md: Fix more instruction lengths.
12675 * cpu-amd64.md: Fix lengths of some instructions.
12677 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
12679 * inssel.brg: Make the array ldelema check aot friendly.
12681 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
12683 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
12685 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
12687 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
12689 * mini-x86.c: Fix build.
12691 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
12692 mono_type_get_underlying_type () helper function to simplify code.
12694 2004-09-09 Martin Baulig <martin@ximian.com>
12696 * mini-amd64.c: Don't access `type->data.klass' directly, call
12697 mono_class_from_mono_type() instead since the type may be a
12700 2004-09-09 Martin Baulig <martin@ximian.com>
12702 * mini-amd64.c (get_call_info): Fix support for generic instances.
12703 (add_valuetype): Use mono_class_from_mono_type() to get the class
12704 since we can be a generic instance.
12706 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
12708 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
12710 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
12712 * liveness.c: reset spill costs on each scan: bug 62107
12714 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
12716 * exceptions-sparc.c (mono_arch_find_jit_info): remove
12717 unnecessary line that doesn't compile
12719 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
12721 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
12722 trampolines, make them call an error function so people can fix their
12725 2004-09-06 Martin Baulig <martin@ximian.com>
12727 * mini.c (mono_method_to_ir): When initializing locals, handle a
12728 generic instances like a valuetype if it's a valuetype and like a
12729 class if it's a class.
12731 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12733 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
12734 stack. Fixes #64674.
12736 * exceptions.cs: Add test for unwinding of call arguments.
12738 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
12740 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
12741 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
12742 set the carry/borrow flag). The sparc and s390 implementations
12743 can now use optimized versions (and simplify the code). ppc bugfixes.
12745 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
12747 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
12749 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
12751 * inssel-amd64.brg: Remove leftover 32 bit rule.
12753 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
12755 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
12757 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
12758 mono_arch_find_jit_info functions into a new function. Fix a memory
12761 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
12764 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
12766 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
12769 * exceptions.cs: Add array size tests.
12771 * mini.c: Allocate a separate icall wrapper for each arity of
12772 mono_array_new_va. Fixes #59509.
12774 * exceptions.cs: Add testcase for 64578.
12776 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
12778 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
12780 2004-09-02 Martin Baulig <martin@ximian.com>
12782 * mini.c (mono_method_to_ir): When initializing the locals, call
12783 handle_initobj() on the generic instance itself, not its
12786 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
12788 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
12789 MonoJitInfo for dynamic methods.
12791 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
12793 * mini.c: Add support for freeing JIT data for dynamic methods.
12795 2004-09-01 Martin Baulig <martin@ximian.com>
12797 * mini-x86.c (is_regsize_var): Added support for generic
12799 (mono_arch_emit_prolog): Make this compile again, use
12800 `x86_push_imm_template (code)'.
12802 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
12804 * mini-x86.c: make all push_imm instructions that get
12805 patched always emit the long form
12807 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
12809 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
12810 in a per-domain hash.
12812 * mini-amd64.c (merge_argument_class_from_type): Handle generic
12815 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
12817 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
12820 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
12823 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
12824 Beginnings of SSE2 support.
12826 * exceptions.cs: Add more tests for checked int<->uint casts.
12828 2004-08-28 Martin Baulig <martin@ximian.com>
12830 * mini-x86.c (mono_arch_instrument_epilog): Added support for
12834 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
12835 Handle generic instances recursively.
12837 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
12839 * iltests.il: test for conv.u8 on a constant
12841 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
12843 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
12844 LCONV_x4 (shrun_32 (membase)).
12846 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
12848 * inssel-x86.brg: c&p rules for push/setret of long
12850 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
12852 * inssel-x86.brg: c&p rules for compare (base, regvar) and
12853 compare (regvar, base)
12855 * inssel-x86.brg: more burg love
12857 * inssel.brg: more cleanup
12859 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
12861 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
12863 * basic-long.cs, basic-calls.cs: new tests for optimization.
12865 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
12867 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
12870 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
12872 * mini-amd64.c (read_tls_offset_from_method): Add another case.
12874 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
12876 * inssel.brg (mini_emit_memcpy): use
12877 NO_UNALIGNED_ACCESS to disable memcpy optimization
12879 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
12881 * mini-amd64.c: Handle generic types in various places.
12883 * mini.c (mono_method_to_ir): Handle generic types in init locals.
12885 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
12887 * mini.c (handle_box): Fix warning.
12889 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
12891 * mini-amd64.h: Enable the emit_state optimization.
12893 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
12895 * mini-amd64.c: Add some new 64 bit peephole opts.
12897 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
12899 * cpu-amd64.md: sreg1 of div instructions must be %rax.
12901 * mini-amd64.c: Register allocator fixes.
12903 * mini.c: Add an optimization to emit_state to avoid allocation of new
12904 registers on some platforms.
12906 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
12908 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
12910 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
12911 allocation. Fixes #63085.
12913 * basic-long.cs: Add new regression test.
12915 * mini-amd64.c: Register allocator improvements.
12917 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
12919 * mini-amd64.c (read_tls_offset_from_method): Add another code
12922 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
12923 instruction sequence for nullifying class init trampolines.
12925 * objects.cs: Add new regalloc test.
12927 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
12929 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
12931 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
12933 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
12936 * driver.c: Fix profiling after TLS changes.
12938 * driver.c (mono_main): Set mono_stats.enabled if needed.
12940 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
12943 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
12945 * mini-x86.c: use a 1 op rather than a 2 op tls access
12946 instruction -> faster.
12948 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
12950 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12953 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
12955 * exceptions-sparc.c (throw_exception): fix typo
12957 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
12959 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
12960 set tree->dreg correctly with tls. Allow any
12961 register to be used.
12963 * mini-x86.c (read_tls_offset_from_method): add new code
12964 generation pattern seen with GCC.
12967 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12969 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
12970 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12971 exceptions-sparc.c: fix some performance issues in exception
12972 handling and setting of the stack trace for exceptions that were
12975 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
12977 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
12980 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
12983 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
12985 This patch inlines tls access, when possible.
12987 * mini.h: new arch functions for TLS intrinsics.
12988 All platforms updated with a stub.
12990 * mini.c: use the new intrinsics
12992 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
12993 arch specific intrinsic for tls variables
12995 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
12997 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
13000 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
13002 * mini.c: thread local allocation
13004 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
13006 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13008 * Makefile.am: Link against the static version of libmonogc.
13010 * Makefile.am: Link the static versions of the convenience libraries
13011 into the mono executable.
13013 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13015 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
13017 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13018 on integer overflow.
13020 * mini-amd64.c: Reorganize function call code.
13022 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13024 2004-08-14 Ben Maurer <bmaurer@ximian.com>
13026 * inssel-x86.brg: use xor eax,eax.
13028 * basic.cs: new tests
13030 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13032 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13033 in exception throwing code.
13035 2004-08-14 Ben Maurer <bmaurer@ximian.com>
13037 * inssel-x86.brg: use xor esi,esi.
13039 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13041 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13042 can trace methods compiled during mini_init () too.
13044 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
13047 2004-08-14 Ben Maurer <bmaurer@ximian.com>
13049 * Makefile.am: static link on x86 (r=zoltan)
13051 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
13053 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13054 code since it causes some programs to fail.
13056 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
13058 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13060 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
13062 * mini.c: ovfops_op_map - add STACK_OBJ case for
13064 * basic.cs: add test_0_pin_string as test
13067 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
13069 * Makefile.am: build C# if srcdir != builddir
13071 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13073 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
13074 fall-through blocks.
13076 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13078 * driver.c: enable loop by default again and include abcrem in -O=all.
13080 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
13082 * iltests.il: Add some localloc tests.
13084 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
13086 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
13089 * inssel-amd64.brg: Add some optimizations.
13091 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
13094 * Makefile.am: Statically link mono against libmono on AMD64.
13096 * mini-amd64.c inssel-amd64.brg: Optimizations.
13098 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
13100 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
13102 * tramp-amd64.c: Patch calling code in trampolines.
13104 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
13106 * mini-amd64.c: pinvoke struct passing fixes.
13108 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
13110 * mini-sparc.c: redo change, make mono_arch_cpu_init call
13111 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
13113 2004-08-05 Duncan Mak <duncan@ximian.com>
13115 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13118 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13120 * mini-amd64.c (emit_move_return_value): Move return value for normal
13123 2004-08-05 Martin Baulig <martin@ximian.com>
13125 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13126 `type->type'; just modify `type' itself when dealing with enums
13127 and generic instances.
13128 (check_call_signature): Make `simple_type' a `MonoType *'.
13130 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13132 * mini.c: Use OP_PADD to add offsets to addresses.
13134 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13136 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
13138 * mini-sparc.c (mono_arch_emit_epilog): fix check
13139 for folding last op into restore instruction
13141 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
13143 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13144 helper methods using the code manager.
13146 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13148 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13150 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13152 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13153 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13155 * mini-s390.c: fix tail processing
13157 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13159 * mini-ppc.c: mul.ovf.un exception name fix.
13161 2004-08-03 Martin Baulig <martin@ximian.com>
13163 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13164 instances; before jumping to `handle_enum', also modify `ptype'.
13166 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
13168 * cpu-sparc.md: fcall maximal length too small.
13170 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
13172 * mini-amd64.c mini.h: Add initial support for passing/returning
13173 structures to/from pinvoked methods.
13175 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13177 * mini-ppc.c: reg allocator fix.
13179 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
13181 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13183 * inssel.brg: Optimize memset on 64 bit machines.
13185 * mini-amd64.c: Fix some vararg cases.
13187 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13189 * mini-s390.c: Corrected macro in emit_float_to_int
13191 * s390-abi.cs: Tests to exercise the s390 ABI
13193 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13195 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13198 * basic.cs: Add a test for add.ovf.un.
13200 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
13202 * mini-sparc.c: add case for OP_IDIV_UN
13204 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13206 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13208 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13210 2004-07-30 Ben Maurer <bmaurer@ximian.com>
13212 * basic.cs: regression tests.
13214 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13217 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
13219 * basic.cs: Add a new test.
13221 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
13222 and AOT. Various fixes and optimizations.
13224 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13226 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13228 * mini-ppc.c: make sure temp regs are not used for global reg
13231 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
13233 * cpu-sparc.md: conv_i8 fix for 64bits
13235 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13237 2004-07-29 Ben Maurer <bmaurer@ximian.com>
13239 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13240 add opcode for cmp BYTE PTR [eax], imm.
13242 * inssel.brg: Make memcpy and memset takes bases.
13244 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
13246 * *-amd64.*: More AMD64 work.
13248 2004-07-28 Ben Maurer <bmaurer@ximian.com>
13250 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13251 add a compare-not-equal opcode.
13253 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
13255 * mini.c: Use mono_init_from_assembly instead of mono_init.
13257 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
13259 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13261 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13263 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13265 * inssel.brg: 64 bit fixes.
13267 * mini.h (MonoCallInst): Add some AMD64 specific data.
13269 * mini.h: Add some OP_P opcodes.
13271 2004-07-28 Ben Maurer <bmaurer@ximian.com>
13273 * basic.cs: tests for 61797 and 61740
13275 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13277 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
13278 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
13280 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
13282 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
13284 * *-amd64*.*: Ongoing AMD64 work.
13286 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
13288 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
13290 * *-amd64*: Ongoing AMD64 work.
13292 * mini-arch.h: Add AMD64 support.
13294 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
13296 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
13298 * mini-ops.h: Add new opcodes.
13300 * Makefile.am: Add AMD64 support.
13302 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
13303 rules into the inssel-long*.brg files.
13305 * *-amd64.*: Add beginnings of AMD64 backend.
13307 2004-07-22 Ben Maurer <bmaurer@ximian.com>
13309 * mini.c (print_dfn): commenting out the code that prints
13310 the cil. With -O=deadce, this makes -v -v crash.
13312 * cpu-pentium.md: make checkthis have a length of 2
13314 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
13316 * mini-sparc.h: fix implementations of __builtin
13317 functions for Sun compiler for V9.
13319 2004-07-16 Ben Maurer <bmaurer@ximain.com>
13321 * mini.c: use the new stelem.ref wrapper
13322 * exceptions.cs, arrays.cs: new stelem.ref tests
13324 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13326 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
13327 new XSP should work with these changes).
13329 2004-07-14 Ben Maurer <bmaurer@ximain.com>
13331 * inssel-{long32,x86,}.brg: trivial optimizations.
13333 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13335 * mini.c: load value when emitting box operation in
13338 2004-07-12 Ben Maurer <bmaurer@ximian.com>
13340 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
13341 is one byte shorter than cmp DWORD PTR [eax], 0.
13343 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13345 * inssel-ppc.brg: arguments on the stack are always
13346 relative to the stack pointer (spotted by Neale Ferguson).
13348 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13350 * exceptions-x86.c: delay appending the method name to the trace until
13351 after mono_jit_info_table_find is called, as this gets the real
13354 2004-07-09 Ben Maurer <bmaurer@ximian.com>
13356 * aot.c: register roots
13358 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
13360 * aot.c : I could just use PLATFORM_WIN32 flag.
13362 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
13364 * aot.c : Reverting the previous fix. This time it broke linux build.
13366 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
13368 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
13370 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
13372 * mini.c (handle_stack_args): Remove some more debugging code.
13374 * mini.c (handle_stack_args): Remove debug output left in by mistake.
13376 * driver.c mini.h aot.c: Allow additional options to be specified with
13377 --aot and pass them to mono_compile_assembly.
13379 * aot.c: Add experimental code to AOT compile all loaded assemblies
13380 on demand and save the code into a cache in the filesystem.
13382 * aot.c: Add support for more wrapper methods.
13384 * mini.c (handle_stack_args): Handle some corner cases. Fixes
13387 * cpu-*.md: Remove removed opcodes.
13389 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
13390 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
13391 related icalls to marshal.c.
13393 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
13395 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
13397 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
13399 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
13401 2004-07-06 Ben Maurer <bmaurer@ximian.com>
13402 * liveness.c: If liveness is recomputated we need to reset the information
13403 for each variable. This way, if the liveness range has been narrowed
13404 by optimizations that happened after the last computation, we can return
13407 For example, if you have
13412 // Tons of code that does not affect i
13418 i = 0 is dead code and will be removed by SSA. However, when
13419 linear scan gets to the code, i will still appear to be live
13420 throughout the entire block. This prevents good register allocation.
13422 2004-07-06 Martin Baulig <martin@ximian.com>
13424 * debug-mini.c (mono_debug_init_method): Allow
13425 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
13426 (mono_debug_add_icall_wrapper): New method.
13428 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
13430 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
13432 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
13435 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
13437 * aot.c (mono_aot_load_method): Fix loading of debug info.
13439 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
13441 * aot.c: Add logging support.
13443 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
13445 * mini.h: Add prototype for mono_print_method_from_ip.
13447 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
13449 * inssel.brg: 64 bit fixes.
13451 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
13454 * Makefile.am: Add SPARC64 support.
13456 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
13458 * aot.c: Fix alignment problems on 32 bit platforms.
13460 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
13462 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
13465 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
13468 * mini.h: Bump AOT file version. Some 64 bit fixes.
13470 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
13472 * inssel-sparc.brg: Add new rule to avoid register moves.
13474 * inssel.brg: Add ldind_to_load_membase helper function.
13476 2004-06-30 Ben Maurer <bmaurer@ximian.com>
13478 * mini.c: OffsetToStringData intrinsic.
13480 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
13482 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
13484 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
13487 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
13488 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
13490 * mini.c: reinstated mono_compile_get_interface_var()
13491 on x86, too, since the change breaks the Gtk# build there as well.
13493 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13495 * driver.c: remove loop from the default optimizations: it seems to
13496 interact badly with some of the other options (see bug #60613).
13498 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
13500 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
13501 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
13503 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
13505 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
13506 vararg-using methods.
13508 2004-06-21 Martin Baulig <martin@ximian.com>
13510 * mini/mini-exceptions.c
13511 (mono_handle_exception): Added `gpointer original_ip' argument.
13512 After calling mono_unhandled_exception(), call
13513 mono_debugger_unhandled_exception() and if that returns true,
13514 restore the context and return.
13516 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
13518 * mini-ppc.c: prefer the use of relative branches so
13519 they won't need to be patched in aot code (patch from Patrick Beard).
13521 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13523 * aot.c: patch from Patrick Beard to make the output assembly
13524 more correct for the MacOSX assembler. Small tweak to
13525 generate sane images on Linux/PPC, too.
13527 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13529 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
13530 case until bug #59509 is fixed (shows up in #60332).
13532 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13534 * mini.c: make sure the needed wrappers are compiled, too, with
13537 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
13539 * driver.c: remove NPTL reference in --version output.
13541 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13543 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
13544 generate valid assembly for the Mach-O assembler.
13546 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13548 * driver.c: don't include abcrem in the all optimization specifier
13549 since it slows down jit compilation too much for now.
13551 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
13553 * mini.c: use BIGMUL only if both operands have the same signage.
13554 * iltests.il: Test for bug 60056. (errors related to signage in
13559 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
13561 * mini.c, aot.c: memory leak fixes.
13563 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
13565 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
13567 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
13569 * Makefile.am: remove the -static hack completely, it links in
13570 statically glib as well.
13572 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
13574 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
13575 * exceptions.cs: make it compile with new mcs/csc.
13577 2004-06-03 Massimiliano Mantione <massi@ximian.com>
13578 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
13579 and added relevant test case.
13581 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13583 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
13584 regressions in gtk-sharp.
13586 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
13588 * exceptions.cs: New regression tests.
13590 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
13592 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
13594 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
13596 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
13598 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
13600 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
13602 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
13604 * mini.c (mono_jit_runtime_invoke): Init class in this
13605 method instead of trusting mono_jit_compile_method to
13606 do the work (because wrappers can be in object class)
13608 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
13610 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
13612 * basic-long.cs: New regression test.
13614 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
13616 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
13617 and div/rem checks.
13619 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
13621 * Makefile.am: fix miguel's change to build mono statically against
13622 libmono (track build dependencies).
13624 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
13626 * cfold.c: Some glib versions do not have G_MININT32.
13628 2004-05-26 Massimiliano Mantione <massi@ximian.com>
13630 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
13631 with precision of tan, atan, sin and cos, and implemented related
13632 regressions tests (fixes bug 54467, but one new problem appeared and
13635 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
13637 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
13639 * exceptions.cs: Add test for constant folding && division by zero.
13641 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
13642 since driver.c is in libmono too, so the optimization was useless.
13644 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
13645 variable to driver.c so the compiler can emit more efficient code to
13648 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13650 * Makefile.am: don't distribute generated inssel.[ch] files.
13652 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
13654 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
13655 into the default appdomain. Fixes #58707.
13657 * jit-icalls.c: Remove the broken approximation for truncl, doing
13658 no conversion is better.
13660 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
13663 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
13665 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
13666 of the mcrxr instruction which is not available on some processors
13667 even if it's documented to be. Implement add and sub overflow correctly
13668 (still not complete for long unsigned). Speed up icalls a bit.
13670 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
13672 * mini.c (mono_jit_compile_method_with_opt): Make sure that
13673 we run .cctor in the current domain instead of target_domain.
13675 Fixes bug #58558, .cctor not being called in -O=shared.
13677 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13679 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
13681 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
13683 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
13684 which can be done with an imm8, do it that way.
13685 (mono_arch_output_basic_block): ditto for a jmp
13686 (mono_arch_emit_prolog): Computate maximum offset of a label.
13688 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
13690 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
13691 now tries to allocate prefered physical reg's for virtual
13692 regs. This reduces the number of emited spills/loads with
13693 20-30% on our core assemblies.
13695 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13697 * jit-icalls.c: truncl() is not needed and trunc() is
13698 the correct thing to do anyway (bug #58287).
13700 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
13702 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
13705 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
13707 * driver.c: enable loop optimizations by default.
13709 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
13711 * mini-x86.c: fix calc of max loop size when aligning loops start.
13713 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
13715 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
13718 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
13720 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
13723 * basic-long.cs: Add tests for add/subtract of immediates with carry.
13725 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
13727 * mini.c (inline_method): Allways inline some wrappers even if the cost
13728 is too large. Fixes #58785.
13730 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
13732 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
13734 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
13735 (crichton@gimp.org). Beginning of support for sparc/linux.
13737 * mini-sparc.c: Optimize retrieval of LMF address.
13739 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
13741 * exceptions-ppc.c: handle alloca in methods with clauses.
13743 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
13745 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
13747 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
13749 * mini.c: Delegate most of the abort signal work to
13750 mono_thread_request_interruption, which also handles Stop and Suspend
13753 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
13755 * mini.c mini.h: Allow inlining of icall wrappers if the backend
13756 supports the save/restore lmf opcodes.
13758 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
13760 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
13761 by gcc-3.4 as well.
13763 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
13765 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
13767 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
13768 methods which contain array accesses.
13770 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
13771 boundaries. Fixes #58537.
13773 * iltests.il: Add regression test for #58537.
13775 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
13777 * mini-x86.c (mono_arch_local_regalloc): Last part of
13778 fix for bug #58633 (releasing register to early).
13780 2004-05-18 Miguel de Icaza <miguel@ximian.com>
13782 * basic-long.cs: Add new regression test.
13784 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
13786 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
13787 register too early on the chain.
13789 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
13791 * mini.c (create_helper_signature): Use a helper function to reduce
13792 the code which needs to be written. Also set the calling convention of
13793 icalls on windows. Fixes #57840.
13795 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
13797 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
13798 exceptions-ppc.c: added helper function to get the instruction address
13799 from a signal handler context.
13801 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
13803 * helpers.c: use g_get_tmp_dir. Invokes happyness
13806 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
13808 * helpers.c: Add new env variable to pass args to objdump.
13809 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
13811 2004-05-17 Radek Doulik <rodo@ximian.com>
13813 * Makefile.am (common_sources): added abcremoval.h so it get
13814 disted and daily mono packages on go-mono.com will build again
13816 2004-05-17 Massimiliano Mantione <massi@ximian.com>
13818 * abcremoval.c: Fixed coding style, added copyright header.
13820 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
13822 * mini.h: Added prototype for abc removal main function.
13824 * build_relations_propagation_table.pl: Added copyright header.
13826 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
13828 * basic-long.cs: reg test for complex ceq_long bug.
13830 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
13832 * mini-x86.c (mono_arch_local_regalloc): Correctly free
13833 reg in long and clob case (bug #58343). Fixed/added comments.
13835 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
13837 * mini.c (mono_jit_runtime_invoke): Follow new convention
13838 of calling the invoke method with an function pointer.
13840 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
13842 * ChangeLog: Fix author of memory leak patch.
13844 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
13846 * Makefile.am: fix make dist as well...
13849 2004-05-14 Massimiliano Mantione <massi@ximian.com>
13851 * cfold.c: Made so that conversions from pointer to int4 are no-ops
13852 on archs where pointers are 4 bytes long.
13854 * Makefile.am: Added abcremoval.c source file.
13856 * abcremoval.c: Added abcremoval.c.
13858 * abcremoval.h: Added abcremoval.h.
13860 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
13862 * inssel.brg: Enabled bounds check removal.
13864 * mini.c: Added support for abcrem optimization.
13866 * mini.h: Added abcrem optimization label.
13868 * driver.c: Added support for abcrem optimization.
13870 * propagated_relations_table.def: Added propagated_relations_table.def.
13872 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
13874 * mini.c, cfold.c: fix style.
13876 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13878 * mini.c: handle issue with the low-level implementation of
13879 some long opcodes (bug #54209).
13881 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
13883 * basic.cs: test for my new cmov stuff.
13885 2004-05-13 Patrik Torstensson
13887 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
13888 opt and added peephole documentation.
13890 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
13892 * tramp-ppc.c: rewrote the generic trampoline code.
13894 2004-05-11 Patrik Torstensson
13896 * mini-x86.c: optimize long shl/shr asm code (one less branch)
13898 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
13900 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
13902 * mini.h mini.c dominators.c: Applied patch from Derek Woo
13903 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
13905 * mini.c: Add new icalls for AsAny marshalling.
13907 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
13909 * tramp-ppc.c, mini-ppc.c: more cleanups.
13911 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13913 * mini.c: no warnings.
13915 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13917 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
13919 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
13921 * mini.c: In the thread abort signal handler, if the thread is in the
13922 process of being stoped, don't throw the Abort exception, just stop the
13925 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
13927 * tramp-ppc.c: removed old code.
13929 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13931 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
13932 do some simple speed optimizations on ppc.
13934 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13936 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
13937 and large offsets in load/store.
13939 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
13941 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
13942 it causes regressions.
13944 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
13946 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
13949 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
13951 * jit-icalls.c: remove warnings.
13952 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
13953 speedups for unsafe code.
13955 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
13957 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
13959 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
13961 * basic-calls.cs: Add new regression test.
13963 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
13966 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
13968 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
13971 2004-05-06 Patrik Torstensson
13973 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
13974 long reg allocation in any reg (not only eax:edx) and implemented
13975 long shl/shr ops in asm instead of helpers.
13977 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
13979 * mini-sparc.h: Fix warnings.
13981 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
13984 * mini-exceptions.c (mono_handle_exception): Call the filter in a
13985 separate statement for clarity.
13987 * mini-sparc.c: Update status.
13989 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
13991 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
13994 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
13996 * inssel-ppc.brg: another small pre-release workaround:
13997 we don't do overflow detection for long_sub_un.
13999 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14001 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14002 (also works around a weird ppc bug: 57957).
14004 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14006 * tramp-ppc.c: trampoline fixes.
14008 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
14010 * mini-ppc.c: fixed typos.
14012 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14014 * mini-ppc.c, exceptions-ppc.c: more code saves registers
14015 at the top of the stack. Fixed typos. Use a frame registers
14016 for all the methods with exception clauses.
14018 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14020 * exceptions-ppc.c: restore fp registers.
14022 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14024 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14025 order from the stack top (moved the stack room to save the
14026 return value for trace after the param area). Fixed corruption
14027 in restoring registers on unwind.
14029 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14031 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14033 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14035 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14036 and prolog/epilog for methods that use it. Allow
14037 enough param area room for varargs methods. Fix miguel's
14038 breakage in exception handling.
14040 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14042 * Makefile.am: run genmdesc only on current arch.
14044 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14046 * exceptions-x86.c:
14047 * mini-x86.h: fix the build on windows.
14049 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
14051 * 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.
14053 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14055 * mini-exceptions.c: New file.
14057 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14058 Move some parts of the x86 exception handling code to an
14059 arch-independent file so it can be shared with other ports.
14061 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14063 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
14065 2004-04-26 David Waite <mass@akuma.org>
14067 * driver.c: remove comma from end of enumeration declaration
14069 2004-04-26 Jackson Harper <jackson@ximian.com>
14071 * driver.c: parse config file before loading first assembly. This
14072 allows the user gac to be enabled/disabled.
14074 2004-04-23 Miguel de Icaza <miguel@ximian.com>
14076 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
14077 simpler mechanism: we do not care what is encoded initially
14078 (branch absolute or relative), we care about the code and its
14079 target. I kept the old code for reference for now.
14081 The new code tries first to determine if the jump is anywhere in
14082 the -/+32 absolute meg range, if it succeeds, it encodes using the
14083 absolute branch; If not, it tried to find something in the
14084 relative range, if not, it uses the handle_thunk code.
14086 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
14088 * exceptions-ppc.c: use the correct ip register on macosx.
14090 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
14092 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
14094 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
14096 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
14097 Raise exception on integer divide by zero by hand since the hw
14098 doesn't support it. Handle NaNs in FP compares.
14100 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
14102 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
14103 code reducing duplication between the platforms and enabled
14104 signal exception handling (on linux for now).
14106 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
14108 * exceptions-ppc.c: more macosx support.
14110 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14112 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
14114 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14116 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
14118 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
14120 * iltests.il: more tests.
14122 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
14124 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14127 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14129 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14131 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
14133 * liveness.c: Mark variables as volatile in all basic blocks reachable
14134 from exception clauses.
14136 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
14138 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14141 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
14143 * iltests.il, basic.cs: more tests for regalloc.
14145 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
14147 * iltests.il: Some tests for register allocation modifications
14150 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
14152 * exceptions.cs: Add regression test for bug #56782.
14154 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14155 original stack trace if an exception is rethrown. Fixes #56782. Oh,
14156 the beauty of fixing the same thing in 5 different files...
14158 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
14160 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14163 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
14165 * mini.c: Add support for STRWLPARRAY marshalling convention.
14167 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14169 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14170 to init the context to setup the regs pointer).
14172 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14174 * exceptions-ppc.c: more exceptions work.
14176 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14178 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14181 2004-04-13 Miguel de Icaza <miguel@ximian.com>
14183 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14184 can use the memory directly.
14186 * cpu-pentium.md: Update documentation from a post from Zoltan.
14188 add x86_add_membase, x86_sub_membase, x86_mul_membase
14190 2004-04-13 Miguel de Icaza <miguel@ximian.com>
14192 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14193 GENERAL_REGS they were also hardcoded for all PPC ports.
14195 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14197 Remove hard-coded limit for floating point registers, use
14198 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14200 Notice that in MacOS X calling conventions you can fit a lot more
14201 floating point values in registers, so I should update the PInvoke
14202 test to excercise the passing of floating point values on the
14203 stack (currently broken).
14205 2004-04-06 Miguel de Icaza <miguel@ximian.com>
14207 * tramp-ppc.c (create_trampoline_code): Added
14208 JUMP_TRAMPOLINE_SIZE.
14209 (ppc_magic_trampoline): Follow the pattern from
14210 x86_magic_trampoline: if code is set to zero, return.
14211 (create_trampoline_code): Always pass MonoMethod to the jump
14212 trampoline, before it was passing a null.
14213 (mono_arch_create_jump_trampoline): Implement the jump stub, could
14214 share the code with mono_arch_create_jit_trampoline.
14216 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14218 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14221 * cpu-g4.md: Added length for jmp instruction, the worst case
14222 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14225 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
14227 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14229 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
14231 * mini.c: Only set bblock->real_offset when adding a new bblock, and
14232 before each IL instruction.
14234 * mini.c (CEE_BOX): Fix warnings.
14236 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14238 * mini.c: removed a few unused vars and extra whitespace.
14240 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
14242 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14244 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14246 (OP_GETCHR): use the above
14247 (CEE_LDELEMA): use the above.
14249 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14250 version of the generic impl.
14251 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14252 (CEE_LDELEMA): use the above.
14254 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
14256 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14259 * iltests.il: Added new regression test for #56317.
14261 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
14263 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14264 under NetBSD. Fixes #56450.
14266 * liveness.c (update_gen_kill_set): Fix previous patch.
14268 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14270 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14272 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
14274 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
14275 ldsfld and ldsflda.
14277 * inssel-sparc.brg: Add more optimizations.
14279 * mini-sparc.c: Replace multiply/divide with shifts if possible.
14281 2004-04-01 Martin Baulig <martin@ximian.com>
14283 * mini.c (handle_box): New static function; moved the
14284 implementation of CEE_BOX here.
14285 (mono_method_to_ir): Added `constrained_call' variable.
14286 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
14287 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
14288 mono_method_get_constrained() to get the method.
14290 2004-04-01 Martin Baulig <martin@ximian.com>
14292 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
14293 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
14294 (mono_method_to_ir): We don't need these macros anymore since
14295 mono_class_get_full() already takes care of it.
14297 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14299 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
14300 use @function (as doesn't accept #function here) and check the return
14301 value of system and stop if fails.
14303 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14305 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
14307 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
14309 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
14311 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
14313 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
14316 * basic-long.cs: Add test for negation of Int64.MinValue.
14318 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
14320 * mini-sparc.c: Update status.
14322 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
14324 * exceptions-sparc.c: Fix return value in filters.
14326 * inssel-sparc.brg: Fix register allocation in some rules.
14328 2004-03-28 Martin Baulig <martin@ximian.com>
14330 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
14333 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
14335 * mini-x86.c (mono_arch_patch_code): Fix warnings.
14337 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
14338 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
14339 remove unused conv_u4 opcode.
14341 * mini-x86.c: Remove valgrind workaround since it slows down things
14342 even when mono is not run under valgrind.
14344 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
14346 * mini-sparc.c: Update status.
14348 * inssel-sparc.brg: Add some optimizations.
14350 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
14351 future delay slot filling. Add support for varargs, tail calls and JMP.
14353 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
14354 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
14356 * inssel.brg: Fix register allocation in OP_ARGLIST.
14358 * inssel.brg: Fix warnings.
14360 2004-03-25 Martin Baulig <martin@ximian.com>
14362 * mini.c (inflate_generic_field): Removed.
14363 (mini_get_method): Removed, use mono_get_method_full(),
14364 (mini_get_class): Removed, use mono_class_get_full().
14365 (mono_method_to_ir): Pass our generic context to
14366 mono_field_from_token().
14368 2004-03-25 Martin Baulig <martin@ximian.com>
14370 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
14371 of a `MonoMethod *'.
14372 (mini_get_method): Take a `MonoGenericContext *' instead
14373 of a `MonoMethod *'.
14374 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
14375 a new local variable called `generic_context' which holds the
14376 current `MonoGenericContext *'; use it to lookup things.
14378 2004-03-24 Martin Baulig <martin@ximian.com>
14380 * mini.c (mini_get_class): New static method; if we're inside a
14381 generic instance, inflate the class if neccessary.
14382 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
14384 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
14386 * iltests.il: New regression test for #55976.
14388 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
14391 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
14393 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
14396 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
14398 * liveness.c: Consider SSA stores as well as loads when making vars
14401 * exceptions.cs: New regression tests for register allocation.
14403 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
14405 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
14406 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
14407 domain lock only to protect puntual access to data structures.
14408 Added access lock for sighash, jit_icall_hash_name,
14409 jit_icall_hash_addr and domain->code_mp.
14411 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
14413 * driver.c: Print SIGSEGV handling method.
14415 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
14417 * mini.c (setup_jit_tls_data): Handle case when this is called
14418 multiple times for a thread.
14420 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
14421 is different from fbxx_un. Fixes #54303. Also use constants instead of
14422 magic numbers in a lot of places.
14424 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
14426 * exceptions.cs: Fix cctor test when --regression is used.
14428 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
14430 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
14433 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14435 * inssel-ppc.brg: fixed register assignments for some rules.
14437 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
14439 * exceptions.cs: Add test for exceptions in static constructors.
14441 * mini.c (mono_jit_compile_method_with_out): Move the calling of
14442 static constructors outside the domain lock. Fixes #55720.
14444 2004-03-17 Martin Baulig <martin@ximian.com>
14446 * mini.c (get_generic_field_inst): Removed, this'll never happen.
14447 (inflate_generic_field): Take the `MonoMethod *' instead of the
14448 `MonoClass *' and added support for generic method.
14449 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
14450 have a `field->parent->gen_params', only inflate the field if it's
14451 an open constructed type.
14453 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
14455 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
14456 exception object instead of the preconstructed ones.
14458 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14460 * mini.c: reverted changed to sigsegv_signal_handler commited
14461 accidentally in the previous patch.
14463 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14466 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
14467 running --aot with an old assembly.
14469 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
14471 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
14474 * mini-sparc.c: Add support for v9 branches with prediction.
14476 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
14478 * mini.c (mini_init): #warning is GNUC only
14480 * mini-sparc.h: implement __builtin_frame_address
14481 and __builtin_return_address for Sun C compiler
14483 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
14485 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
14487 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
14489 * basic-calls.cs: Add test for unaligned byref long argument passing.
14491 * mini-ops.h: Add sparcv9 compare and branch instructions.
14493 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
14494 v9 instructions if we have a v9 cpu.
14496 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
14497 registers for global allocation.
14499 * exceptions-sparc.c: Fixes.
14501 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
14503 * liveness.c (mono_analyze_liveness): Optimized version.
14505 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
14507 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
14510 * basic-float.cs basic-calls.cs: New regression tests.
14512 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
14514 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
14515 sigaltstack implementation.
14517 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
14519 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
14520 stuff if SIGSEGV_ON_ALTSTACK is not defined.
14522 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
14524 * mini.c: Fix warnings.
14526 * mini.c (mono_resolve_patch_target): New function which contains the
14527 arch independent part of the patching process.
14529 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
14530 patching code to a separate function.
14532 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
14534 * mini.c (add_signal_handler): ifdef out on Windows
14536 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
14538 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
14539 cpu-sparc.md: Add exception handling support + other fixes.
14541 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
14542 typed GC detection in --version.
14544 * basic.cs exceptions.cs: New regression tests.
14546 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
14547 the arch specific code can store data during a compilation.
14549 * mini-ops.h: Add OP_SETFRET.
14551 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
14552 function, register a separate icall for each arity, so the icalls can
14555 * mini.c (mono_print_tree): Print negative offsets in a more readable
14558 * mini.c: Make signal handling work on sparc.
14560 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
14562 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
14564 * jit-icalls.c: Emulate truncl by aintl on solaris.
14566 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
14568 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
14570 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
14572 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
14574 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
14575 a MarshalByRef type, inline a method that performs the check, taking into
14576 account that the object can be a proxy. Also implemented tow new opcodes:
14577 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14578 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
14579 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
14581 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
14583 * mini-ppc.c: if a relative branch displacement is too big
14584 but it points to and area reachable with an absolute branch,
14587 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
14589 * mini.c: optimize small copies in cpblk.
14591 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
14593 * basic-calls.cs basic-float.cs: New regression tests.
14595 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
14596 negative offsets from %fp. Implement localloc. Fix local register
14597 allocation. Fix the case when the this argument needs to be saved to
14598 the stack. Implement some missing opcodes.
14600 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
14602 * mini.c (mini_method_compile): Reenable global regalloc in methods
14603 with exception handlers.
14605 * linear-scan.c (mono_varlist_sort): Fix warning.
14607 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
14609 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
14612 * liveness.c: Make all variables uses in exception clauses volatile, to
14613 prevent them from being allocated to registers. Fixes #42136.
14615 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
14617 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
14618 causes regressions.
14620 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
14621 argument to mono_arch_regalloc_cost.
14623 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
14626 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
14628 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
14629 Make the cost of allocating a variable to a register arch dependent.
14631 * basic-calls.cs: Fix compilation of tests.
14633 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
14634 helper function to cut back on the number of #ifdefs needed.
14636 * mini-ppc.c: Fix compilation.
14638 * basic-calls.cs: New regression tests.
14640 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
14642 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
14643 of l0 since that is callee saved.
14645 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
14648 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
14649 of delay instruction.
14651 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
14653 * mini.h (MonoCallInst): Add 'virtual' flag.
14655 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
14657 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
14659 * *.cs: New regression tests.
14661 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
14664 * mini.c (mono_runtime_install_handlers): Fix build.
14666 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
14667 'signal_stack_size' members.
14669 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
14670 alternate signal stack.
14672 * exceptions-x86.c: Add stack overflow handling.
14674 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
14675 functions to arch independent code.
14677 * mini.c (mono_print_tree): Print more detailed info for load_membase
14680 2004-02-23 Martin Baulig <martin@ximian.com>
14682 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
14684 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14686 * mini-x86.c: fixed reg allocation for div/rem.
14688 2004-02-22 Miguel de Icaza <miguel@ximian.com>
14690 * driver.c (mono_main): Report some configuratio options on --version.
14692 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
14694 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
14695 low in the address space. Correctly flush memory in thunks where we
14696 output native code.
14698 2004-02-20 Martin Baulig <martin@ximian.com>
14700 * mini.c (mini_get_method): New static method; inflate all generic
14701 methods and methods in open generic instances.
14702 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
14703 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
14705 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
14707 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
14709 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
14711 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
14713 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
14715 * mini-sparc.c (flushi mono_arch_output_basic_block): make
14716 it compile using Sun's compiler.
14718 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
14720 * 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.
14722 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
14724 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14726 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
14728 * mini-ppc.c: handle calls outside of the allowed range with thunks
14729 allocated using the code manager.
14730 * tramp-ppc.c: use the code manager to hold generated native code.
14731 Fixed the magic trampoline to just patch vtable entries.
14733 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
14735 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
14738 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
14740 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
14743 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
14744 if we have a working __thread implementation.
14746 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
14747 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
14749 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
14751 * mini-x86.c: Fix compilation under gcc 2.
14753 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
14755 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
14756 contains a call to the wrapped function.
14758 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
14759 OP_<CALL>_IMM opcodes, and use them under X86.
14761 * mini.c (mono_jit_find_compiled_method): Fix warning.
14763 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
14765 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
14767 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
14768 functionality to mini.c.
14770 * mini.c (mono_create_jump_trampoline): New function to create a jump
14771 trampoline. Return a compiled method instead of a trampoline if it
14772 exists. Add a cache for jump trampolines.
14774 * mini.c (mono_jit_find_compiled_method): New function to return a
14775 compiled method if it exists.
14777 * mini-x86.c: Call mono_create_jump_trampoline instead of
14778 mono_arch_create_jit_trampoline.
14780 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
14781 a jump trampoline. Fixes #52092.
14783 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
14785 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
14786 which is not up-to-date. Add check_corlib_version () instead.
14788 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
14791 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
14792 since newer valgrind versions do not need it.
14794 * mini.c (mono_jit_compile_method_with_opt): New helper function to
14795 compile a method with a given set of optimizations.
14797 * mini.c: Compile icall wrappers on-demand instead of at startup.
14799 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
14800 wrapper for an icall.
14802 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
14804 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
14807 * iltests.il: Add test for non-empty stack before switch instruction.
14809 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
14811 * mini.c: Add support for new stringbuilder marshalling conventions.
14813 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
14815 2004-02-01 Martin Baulig <martin@ximian.com>
14817 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
14818 in `ginst->mtype_argv'.
14820 2004-01-31 Miguel de Icaza <miguel@ximian.com>
14822 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
14823 facilitate grepping.
14825 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
14827 * mini.c: fixed buglet in initobj generic implementation for references.
14829 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
14831 * Makefile.am: make the version script conditional.
14832 * jit-icalls.c: handle missing truncl().
14834 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
14836 * exceptions.cs: Add more tests for double->int conversion.
14838 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
14839 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
14841 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
14843 * driver.c: make --verbose --version emit an error
14844 if the loaded corlib doesn't match the runtime version.
14846 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
14848 * mini-ppc.h: export ppc_patch().
14849 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
14850 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
14851 on par or better than on MacOSX.
14853 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
14855 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
14856 mono_lookup_pinvoke_call.
14858 * mini-x86.c: Under windows, the default pinvoke calling convention is
14859 stdcall. Fixes #52834.
14861 * mini.c (optimize_branches): Add an upper bound to the number of
14862 iterations to prevent infinite loops on strange loops. Fixes #53003.
14864 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
14866 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
14867 and ISINST. Fixes #52093.
14869 * objects.cs (test_0_vector_array_cast): New tests.
14871 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
14873 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
14874 checking in Array.Set ().
14876 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
14879 * object.cs (test_0_multi_array_cast): New regression test.
14881 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
14883 * exceptions-ppc.c: fix build on Linux/PPC.
14885 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
14887 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
14888 running under valgrind.
14889 (x86_magic_trampoline): Fix build bustage.
14891 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
14892 negative values as well. This is needed for the encoding of the line number
14893 info, since sometimes the line numbers are not in increasing order.
14895 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
14897 * cpu-pentium.md (localloc): Increase the size of the localloc
14898 instruction since it is a loop under Win32.
14900 * debug-mini.c (record_line_number): Get rid of unneccesary memory
14903 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
14905 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
14906 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
14907 Max Horn (max@quendi.de). Fix file names in comments.
14909 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
14911 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
14912 avoid stack overflow.
14913 (replace_usage): Avoid uninitialized variable warnings.
14915 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
14916 and taking the address of valuetype variables.
14918 2004-01-03 Patrik Torstensson
14920 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
14921 for other purposes than FP later on.
14923 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
14925 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
14928 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14930 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
14932 2003-12-30 Patrik Torstensson <p@rxc.se>
14934 * mini-x86.h: Decreased number of availiable fp regs.
14935 Solves corner cases with FP spilling.
14937 2003-12-23 Patrik Torstensson <p@rxc.se>
14939 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
14940 for floating point stack tracking / spilling on x86.
14943 * basic-float.cs: added float mul overflow test.
14945 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
14947 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
14949 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14951 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
14952 supports for cond branches that overflow the immediate
14953 overflow offset. mcs can compile simple programs.
14955 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
14957 * exceptions-ppc.c: exception handling support wip:
14958 finally handlers get run on exception.
14960 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
14962 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
14965 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
14967 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
14968 initial support for stack walking and unwinding.
14970 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
14972 * driver.c (mono_main): Make corlib-out-of-sync message more
14973 descriptive. Also remove verify_corlib call.
14975 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
14977 * mini.c: make CEE_NEWARR calls and other emulated opcodes
14978 not overlap with other call's arguments, too.
14980 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
14982 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
14983 move to arch-specific code the choice of arch-specific
14984 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
14985 * mini.c: ensure emulation calls will not interleave
14988 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
14990 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
14991 the magic trampoline stack frame is dropped before executing
14994 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
14996 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
14997 and integer to fp conversions. Added support for overflowing
14998 arguments on the stack. Reserve a couple more registers as temps.
14999 Added support for aot compilation (as output still needs to be
15002 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15004 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15005 Don't overwrite return register in some corner cases.
15007 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
15009 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15010 static constructors when AOT compiling.
15012 * driver.c (mono_main): Call mono_check_corlib_version.
15014 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15016 * cpu-g4.md, basic.cs: fixed div target register.
15018 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15020 * mini-ppc.c, basic.cs: shl_imm fix with test.
15022 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15024 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
15025 structures by value. Misc fixes.
15026 * objects.cs: more tests.
15028 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15030 * mini-ppc.c: lconv.ovf.i implemented.
15032 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15035 (mini_init): don't error out if someone already called g_thread_init.
15037 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15039 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15040 to be any type per the spec. Fix abnormal memory usage when
15041 the same object is repeatedly thrown.
15043 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15045 * mini.c: check for overruns in IL code.
15047 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
15049 * TODO: Add/remove some todo entries.
15051 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
15053 * driver.c (mono_main): Call mono_verify_corlib.
15055 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
15057 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
15058 This has been moved to mini.c
15059 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15060 type being casted is marshalbyref it could be a proxy, so instead of
15061 emitting the type check code, emit a call to a runtime method that will
15062 perform the check by calling CanCastTo if needed.
15064 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
15066 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
15067 methods with large stack frames under Win32.
15069 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
15071 * Makefile.am: Distribute regression tests.
15073 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
15074 at the end instead of inserting each variable into the sorted list.
15076 * linear-scan.c (mono_varlist_sort): New helper function.
15078 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15080 * mini.c: ensure arguments and locals are within bounds.
15082 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15084 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
15087 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
15089 * mini.c (mono_cprop_copy_values): Fix crash.
15091 * aot.c: Set verbosity back to 0.
15093 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15095 * regalloc.c: complete memory leak fix by Laurent Morichetti
15098 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
15100 * driver.c (main_thread_handler): Revert the previous patch.
15102 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
15105 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
15106 memory from the memory pool.
15108 * driver.c (main_thread_handler): Turn on all optimizations when
15111 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
15112 an array for better performance.
15114 * regalloc.c (mono_regstate_assign): Fix memory leak.
15116 * debug-mini.c (mono_debug_serialize_debug_info): New function to
15117 serialize the debug info.
15119 * debug-mini.c (mono_debug_add_aot_method): New function to load the
15120 debug info from the serialized representation.
15122 * aot.c: Save debug info into the generated file and load it when
15125 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15127 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15129 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15130 More FP-related fixes.
15132 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15134 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15135 and register allocation buglet. Hello world now runs.
15137 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15139 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15140 * tramp-ppc.c: fixed class init trampoline.
15141 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15143 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15145 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15146 mini.c: more ppc changes/fixes.
15148 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
15150 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15151 Also optimize the case when the arguments are the same in the caller
15154 * iltests.il: Add tests for tail calls with valuetype arguments.
15156 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15158 * mini-ppc.c: fixes for struct return type.
15160 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15162 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15163 mono_spillvar_offset() to arch-specific code.
15165 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15167 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15169 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
15171 * exceptions-x86.c: Fix stack space leaks.
15173 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15174 registers from the lmf if the method has save_lmf set.
15176 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
15178 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15179 of icall wrappers into InvokeInDomain, since these are now per-domain.
15181 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15183 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15184 make some opcode emulation and intrinsic ops enabled/disabled
15185 according to the architecture. More fixes.
15187 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15189 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15191 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15193 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15194 arch-specific handling for 'this' and struct return type to
15195 arch-specific code.
15197 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15199 * aot.c: prevent divide by zero error when reporting (it happened with
15200 Accessibility.dll).
15202 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
15204 * mini.h (inst_switch): Remove unused macro.
15206 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15209 (load_aot_module): free 'info->methods' and 'info' properly. No more
15210 "free(): invalid pointer blah" messages when you have an old aot
15213 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
15215 * jit-icalls.c, mini.c: Added support for context static fields.
15217 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
15219 * mini.c (mono_method_blittable): Methods which set LastError are not
15220 blittable either. Fixes #51108.
15222 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15224 * mini.c: flush icache.
15225 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15227 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
15229 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15231 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
15233 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15236 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
15239 * inssel.brg (CEE_MKREFANY): Fix AOT case.
15241 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
15243 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
15244 instruction when the result is discarded.
15246 * iltests.il (test_0_div_regalloc): New regression test.
15248 * arrays.cs: Fix compilation error.
15250 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15252 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15253 float rules to inssel-x86.brg: sane architectures with FP registers
15254 don't need to implement these rules.
15256 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15258 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15260 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15262 * mini.h, inssel-long32.brg: fixed endianess issues in int64
15263 implementation of 32 bit systems.
15265 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15267 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15268 (Jeroen Zwartepoorte).
15270 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
15272 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15273 the caller and the callee matches.
15275 * mini.c (mono_method_to_ir): Add comment.
15277 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
15278 signbit is missing on some platforms.
15280 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
15282 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
15284 * mini.c (setup_jit_tls_data): Call the new function.
15286 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
15288 * mini-x86.c: Add experimental support for fast access to the lmf
15289 structure under NPTL/Linux 2.6.x.
15291 2003-11-06 Martin Baulig <martin@ximian.com>
15293 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
15294 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
15297 2003-11-02 Martin Baulig <martin@ximian.com>
15299 * mini.c (inflate_generic_field): New static method.
15300 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
15301 generic instance and the field is declared in a generic type, call
15302 inflate_generic_field() to inflate it. Fixes gen-28.cs.
15304 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
15306 * mini.h mini.c (mono_method_same_domain): New function to return
15307 whenever the caller and the callee are in the same domain.
15309 * tramp-x86.c (x86_magic_trampoline): Use the new function.
15311 2003-10-30 Martin Baulig <martin@ximian.com>
15313 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
15314 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
15316 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
15317 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
15319 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
15321 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
15324 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
15325 object here, so it is in the correct appdomain etc.
15327 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
15329 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
15331 (mono_method_to_ir): Avoid freeing the type created returned from
15332 mono_type_create_from_typespec, since it is put into an internal cache
15333 by the function. Fixes pointer.exe.
15335 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
15336 trampolines for icalls and pinvokes as well. Fixes #33569.
15338 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
15340 * mini.c: Update after appdomain changes.
15342 * mini.c (mono_jit_compile_method_inner): Allways compile native
15343 method wrappers in the root domain, since there can only be one
15344 instance of them, whose address is stored in method->info.
15346 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
15348 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
15349 environment variable. Instead detect automatically whenever running
15350 under valgrind using the magic macro RUNNING_ON_VALGRIND from
15353 2003-10-16 Miguel de Icaza <miguel@ximian.com>
15355 * trace.c, trace.h: New files that implement the new trace option
15358 * driver.c: Document new --trace options.
15360 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
15363 - if (mono_jit_trace_calls)
15364 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
15366 * mini.h: prototypes.
15368 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
15370 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
15372 * mini.c inssel.brg: Implement typedefbyref opcodes.
15374 * mini.c (mono_jit_compile_method): Remove unused local variable.
15376 * mini.c (mono_jit_compile_method_inner): Ditto.
15378 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
15380 * tramp-x86.c (x86_class_init_trampoline): Fix build.
15382 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
15384 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
15386 * mini.c (mono_no_aot): Remove unused global variable.
15388 * mini.c: Thread safety fixes.
15390 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
15392 * mini.c (mono_create_class_init_trampoline): Add a lock around
15393 class_init_hash_addr.
15395 * arrays.cs (test_0_newarr_emulation): Add new regression test for
15398 * mini.c: Decompose the NEWARR instruction before decomposing its
15399 arguments. Fixes #30073.
15401 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
15403 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
15406 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
15408 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
15410 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
15412 * driver.c: Add support for compiling icall wrappers to --compile.
15414 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
15416 * inssel.brg: The empty value in class->interface_offsets is -1, not
15419 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
15421 * objects.cs: New test for 'is' operator on an array of interfaces.
15423 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15425 * tramp-ppc.c: update trampoline code to support jumps
15426 and class initialization.
15428 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
15430 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
15432 * inssel.brg (OP_UNBOXCAST): Fix #46027.
15434 * inssel.brg (OP_UNBOX): Remove unused rule.
15436 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
15437 region instead of one for each method. Fixes #47813.
15439 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
15441 * exceptions.cs (test_0_nested_finally): New regression test for
15442 nested exception handlers.
15444 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
15446 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
15448 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
15451 * mini.c (mono_method_check_inlining): Make the inlining limit
15452 configurable by an environment variable.
15454 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
15456 * mini.h: Bump AOT file version.
15458 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
15459 token, store the image along with the token, since the token might not
15460 refer to the same image as the method containing the relocation,
15461 because of inlining.
15463 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
15465 * mini.c (mono_precompile_assemblies): New function to compile
15466 all methods in all loaded assemblies.
15468 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
15470 * regalloc.h regalloc.c (MonoRegState): Change the type of
15471 iassign and fassign to int*, since they can contain large negative
15472 values if the register is spilled. Also added some comments. Fixes
15475 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
15476 under Win32. Fixes #42964.
15478 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
15480 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
15482 * aot.c: Added support for AOT compiling methods which contain calls
15483 to wrappers. Currently, only remoting-invoke-with-check wrappers are
15486 * driver.c (compile_all_methods): Run the compilation in a thread
15487 managed by mono. Fixes #44023.
15489 * mini.c (mono_codegen): Print full method name in verbose output.
15491 * mini-x86.c (mono_arch_patch_code): Fix warning.
15493 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
15494 jumps, since the method we are jumping to might be domain-specific.
15496 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
15498 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
15500 * inssel.brg: string chars are unsigned.
15502 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
15504 * TODO: New todo item.
15506 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
15507 which calls mono_runtime_class_init and patches the call site to
15508 avoid further calls.
15509 (mono_arch_create_class_init_trampoline): New arch specific function
15510 to create a class init trampoline.
15511 (create_trampoline_code): Generalized so it can create
15512 class init trampolines as well.
15514 * mini.c (helper_sig_class_init_trampoline): New helper variable.
15515 (mono_create_class_init_trampoline): New function to create and cache
15516 class init trampolines.
15517 (mono_find_class_init_trampoline_by_addr): New function to lookup the
15518 vtable given the address of a class init trampoline. Used by the
15520 (mono_codegen): Generate a call to a trampoline instead of
15521 mono_runtime_class_init in LDSFLD[A].
15522 (mono_codegen): Add relocations for the new trampoline.
15524 * mini.h mini-x86.c aot.c: Added a new relocation type:
15525 MONO_PATCH_INFO_CLASS_INIT.
15527 * mini.h: Bump AOT version number.
15529 * aot.c: Create a copy of the loaded code instead of using the original
15530 so methods which call each other will be close in memory, improving
15533 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
15534 patch since it breaks the regression tests.
15536 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
15537 for the register saving instruction sequence since the
15538 frame_state_for function in glibc 2.3.2 don't seem to detect it.
15540 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
15542 * TODO: Fix todo item && remove another.
15544 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
15546 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
15549 * aot.c: Moved the check for MONO_LASTAOT into the initialization
15550 function of the module.
15552 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
15553 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
15554 --no-aot command line option.
15556 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
15558 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
15559 by Bernie Solomon (bernard@ugsolutions.com).
15561 * inssel.brg: Refactor the interface offset table related code into
15562 its separate functions and add support for the AOT case.
15564 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
15566 * aot.c (mono_aot_get_method_inner): Fix memory leak.
15568 * aot.c: Added mono_aot_verbose variable and made all debugging
15569 output depend on the value of this variable.
15571 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
15572 method_label and info_label.
15574 * mini.h mini-x86.c aot.c: Added a new relocation type
15575 MONO_PATCH_INFO_IID for klass->interface_id.
15577 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
15578 the MonoJitInfo structure.
15580 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
15581 a non-root appdomain in shared mode.
15583 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
15585 * aot.c: make aot loader less verbose. Remove free of unused variable.
15587 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
15589 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
15591 * .cvsignore: Added *.dll.
15593 * mini.c (mono_print_tree_nl): New function callable while debugging.
15595 * mini.c (mono_print_code): Export this.
15597 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
15600 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
15602 * mini.h (MonoCompile): Added 'jit_info' field.
15604 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
15605 the cfg structure, since it is needed by the AOT compiler.
15607 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15609 * aot.c: A major rewrite. Changes include:
15610 - save exception tables for methods which have them.
15611 - cache failed lookups in aot_get_method () to avoid the (slow) calls
15612 to g_module_symbol.
15613 - reworked the file format so it is now much smaller and needs
15614 fewer relocation entries.
15616 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
15618 * aot.c (load_aot_module): Fix build bustage on platforms without
15621 2003-09-04 Martin Baulig <martin@ximian.com>
15623 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
15625 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
15627 * TODO: Some new optimization ideas.
15629 * aot.c: Move AOT module loading logic here from mono_assembly_open.
15631 * aot.c: Save the optimization flags used to compile the code into
15634 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
15635 support emitting domain specific code.
15637 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
15638 no longer domain neutral. It can be made domain neutral by compiling
15639 with --optimize=shared.
15641 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
15642 between appdomains.
15644 * driver.c mini.h mini.c: New --no-aot debugging option which disables
15645 loading of AOT code.
15647 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
15649 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
15650 if there is no domain neutrality information.
15652 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
15654 * aot.c (mono_compile_assembly): Emit a symbol containing the file
15655 format version into the generated library.
15657 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
15658 callee method into the caller since one of them could be shared.
15660 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
15661 system exceptions from AOT code now works.
15663 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
15664 method if it is domain neutral and the callee is not.
15666 * graph.c (cfg_emit_one_loop_level): Fix warning.
15668 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
15670 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
15673 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
15675 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
15676 is needed by code which is executed before mono_runtime_init ().
15677 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
15679 * mini.c (mono_thread_abort): Fix warning.
15680 (mono_jit_compile_method): Call static constructor in the AOT case too.
15682 * aot.c (mono_compile_assembly): Fix warning.
15684 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15686 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
15688 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
15690 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
15692 * cpu-pentium.md: Fix the length of call opcodes so they include the
15693 ESP restoring instruction. Fixes #47968.
15695 2003-08-28 Martin Baulig <martin@ximian.com>
15697 * mini-x86.c (mono_arch_call_opcode): Added support for
15698 MONO_TYPE_GENERICINST.
15700 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
15702 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
15704 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
15705 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
15707 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
15710 2003-08-26 Martin Baulig <martin@ximian.com>
15712 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
15713 when reporting an error, set this to the actual error location.
15714 (mono_method_to_ir): Report the correct error location if
15715 get_basic_blocks() returned an error.
15717 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
15719 * mini.c (mono_type_blittable): OBJECT is not blittable.
15720 (mono_method_blittable): Methods which have marshalling descriptors
15721 are not blittable either. Fixes #47842.
15723 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
15725 * driver.c mini.c: Use an environment variable instead of a global
15726 variable. Also fix the build.
15728 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
15729 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
15732 * driver.c mini.c: Added --with-valgrind option to turn off some
15733 code which prevents mono from running under valgrind.
15735 * mini.c (mono_emit_call_args): Fixed warning.
15737 * mini.c (mono_emulate_opcode): Fixed warning.
15739 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15741 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
15742 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
15743 regalloc.c, regalloc.h: specify available registers in arch-specific
15744 code and support floats in the regallocator (patch by Laurent Morichetti
15747 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
15749 * mini.c: mono_thread_current() can be called only after
15750 mono_runtime_init(): rearrange code to not call it early on.
15752 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15754 * mini.c: allocate jump tables in the code mempools.
15756 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
15758 * mini.c, mini.h: make sure per-thread data allocated by the jit is
15761 2003-08-10 Miguel de Icaza <miguel@ximian.com>
15763 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
15764 12 to 16. This fixes bug #47453.
15767 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
15769 * mini-ppc.c: fixed indexed load and unsigned compares.
15771 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
15773 * mini.c: reenabled installation of handler for
15774 thread abort signal.
15776 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15778 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
15779 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
15780 until it's fixed and actually useful.
15782 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
15784 * inssel-long32.brg: couple more opcodes implemented.
15786 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15788 * mini-sparc.c: Even more opcodes implemeted.
15790 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
15792 * mini-sparc.c: More opcodes implemented.
15794 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
15796 * mini-sparc.c: More opcodes implemented.
15798 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
15800 * inssel-sparc.brg: Add some needed rules. Direct
15802 * Makefile.am: Use inssel-sparc.brg
15803 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
15804 an assert happy for now.
15806 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
15808 * mini-sparc.c: Fixed compile errors.
15809 * exceptions-sparc.c: Same. We now produce a mono binary
15810 on sparc-linux. Yea.
15812 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
15814 * mini-sparc.c: Renamed registers. Also some macro cleanups.
15815 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
15816 They compile, but do not work.
15818 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15820 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
15821 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
15822 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
15825 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
15827 * mini.c: more opcodes implemented and better support for generics.
15829 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
15831 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
15832 * mini.c, mini.h: first cut at generics support: some new instructions
15833 added and changed the behaviour of some of the existing ones.
15835 2003-07-21 Miguel de Icaza <miguel@ximian.com>
15837 * mini.c: Removed definition of metadata_shared mutex here.
15839 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
15841 * mini-x86.c: make vararg calls work for instance methods.
15843 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
15845 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
15846 returns the arguments in a separte list, now.
15848 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15850 * aot.c, mini.c: updates for array type representation changes.
15852 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
15854 * mini.c: register function to perform jit shutdown.
15856 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
15858 * mini.c: use a faster allocator if possible.
15860 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
15862 * aot.c: some cleanups and portability changes.
15864 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15866 * mini.c: use faster allocation for CEE_BOX if possible.
15868 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
15870 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
15871 Moved inlined mempcy code to its own function so that is can be
15872 reused. Added an inline memset function as well (optimized initobj).
15873 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
15875 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
15877 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
15879 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
15881 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
15882 arch code can setup the cpu for CLR execution, if needed.
15883 We use it on x86 to set the precision of FP operations.
15885 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
15887 * mini.c: disable some optimizations if we can guess they'll cost too
15888 much for a given method.
15890 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
15892 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
15894 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
15895 * mini.h mini.c mini-x86.c: Added instruction level coverage
15896 info collection support.
15898 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15900 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
15901 is now implemented in the profiling API. Get rid of a couple of
15902 unnecessary global variables.
15904 2003-06-15 Nick Drochak <ndrochak@gol.com>
15906 * basic-long.cs: tests for negative values for bigmul, and unsigned.
15907 * cpu-g4.md: add op_bigmul and op_bigmul_un
15908 * cpu_pentium.md: add op_bigmul_un
15909 * inssel-long32.brg: add rule for unsigned bigmul
15910 * mini-ops.h: define OP_BIGMUL_UN
15911 * mini-x86.c: THE BUG: handle (un)signed properly
15912 * mini.c: choose unsigned opcode if needed.
15913 This set of patches fixes bug #44291
15915 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
15917 * mini.c (optimize_branches): improved to handle all kinds of
15918 conditional branches.
15920 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
15922 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
15923 don't raise exceptions.
15925 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
15927 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
15928 to arch-specific files.
15930 2003-06-09 Martin Baulig <martin@ximian.com>
15932 * Makefile.am (libs): Added $(LIBGC_LIBS).
15934 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
15936 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
15937 and OP_ATAN (fixes bug#44293).
15939 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
15941 * Makefile.am, mini-x86.c: rename cpu description array to
15942 pentium_desc, since some compilers define the 'pentium' preprocessor
15945 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
15947 * mini.c (mini_select_instructions): add explicit branch if the
15948 following block is not the false target of a conditional branch -
15949 we need this with any optimization that reorder or remove bblocks
15951 * mini.c (optimize_branches): bug fixes
15953 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
15955 * mini.c (mono_method_to_ir): inline static readonly fields
15957 * ssa.c (fold_tree): start cfold support for long (very simple
15960 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
15962 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
15964 * inssel.brg: fixed memcpy (bug #44219).
15966 2003-06-05 Dick Porter <dick@ximian.com>
15968 * driver.c: Set the glib log levels to not abort if g_message
15971 g_set_prgname() has to happen before mini_init() so that the
15972 process handle gets the info.
15974 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
15976 * driver.c: add intrins to the default optimizations to get wider
15979 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
15981 * mini.h: some large basic blocks will overflow a 16-bit
15982 integers for symbolic registers.
15984 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
15986 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
15987 (mono_arch_output_basic_block): fix bug 43499
15989 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
15991 * mini.c: kill duplicated definition of mono_debug_format.
15993 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
15995 * mini-x86.c, arrays.cs: fixed register allocation bug.
15997 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
15999 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16001 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16003 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16006 (print_method_from_ip): also print source location information if
16009 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
16011 * mini.c (mono_find_block_region): bug fix in region code
16012 (mini_method_compile): enable removing unreachable code again, but
16013 only in methods without exception clauses.
16015 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16017 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16018 Implemented arglist opcode and handling of TypedReference type.
16019 Fixed x86 call convention when a structure is returned.
16020 Minimal support for calling static vararg methods.
16022 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
16024 * mini.c (mini_method_compile): always remove unreachable code,
16025 because the code in them may be inconsistent (access to dead
16026 variables for example).
16028 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16030 * driver.c, debug-mini.c: warning fixes.
16032 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16034 * Makefile.am, jit.h, mini.h: install header for embedding mono.
16036 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16038 * mini.c: thread-static fields are registered in mono_class_vtable(),
16039 so ensure the function is called before checking for them.
16041 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
16043 * mini.c (optimize_branches): fix for bug 43586
16045 * jit-icalls.c (mono_llmult_ovf): added an additional check for
16046 overflow (fixes Bug #43639)
16048 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16050 * mini.c, objects.cs: allow the use of stobj for primitive types.
16052 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16054 * mini.c: be less strict about argument checking until we support
16055 running the verifier.
16057 2003-05-27 Nick Drochak <ndrochak@gol.com>
16059 * basic-long.cs: tests for (ulong)int * (ulong)int also
16060 * mini.c: use the same trick for (ulong)int * (ulong)int
16062 2003-05-27 Nick Drochak <ndrochak@gol.com>
16064 * basic-long.cs: add regression test for (long)int * (long)int
16065 * cpu-pentium.md: add op_bigmul specification
16066 * inssel-long32.brg: add OP_BIGMUL rule
16067 * mini-ops.h: add OP_BIGMUL
16068 * mini-x86.c: register allocator: handle case where src1 needs to be
16070 * mini.c: substitute special BIGMUL opcode in the tree for
16071 (long)int * (long)int
16073 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16075 * jit-icalls.c: call the type ctor on field access if needed.
16077 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16079 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
16080 to a method (including results of ldelema, bug#43207).
16082 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
16084 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
16085 colors to show exception handler blocks.
16087 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
16088 (fix for pinvoke7.cs).
16090 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16092 * mini.h, mini.c: ensure correct initialization order for types that
16093 require it. Prepare for lazy compilation of jit icall wrappers.
16094 Provide a name for opcode emulation to reduce unneeded mallocing.
16096 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16098 * mini-x86.c: better register restoring code and profiling
16099 support for tail calls.
16101 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16103 * mini.h, driver.c: prepare for leaf methods optimization.
16105 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16107 * mini.c: get targets of branches before converting a method.
16109 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
16111 * mini.c (optimize_branches): added some experimental code (disbaled)
16113 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
16115 * mini.c (optimize_branches): fix branch to branch optimization
16117 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
16119 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
16121 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
16123 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16126 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
16128 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16129 enable use of interface variables again.
16131 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16132 I1 to registers because there is no simply way to sign extend 8bit
16133 quantities in caller saved registers on x86.
16135 * inssel-float.brg: set costs of some rules to 2 so
16136 that monobure always select the arch. specific ones if supplied,
16137 regardless of the order we pass the files to monoburg.
16139 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16141 * mini.c, mini-x86.c: since the magic trampoline for jumps
16142 can't patch the code directly, we do it as soon as the
16143 method gets compiled.
16145 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16147 * mini-x86.c, mini.h: introduce a new patching method
16148 to support CEE_JMP and tail calls.
16149 * mini.c: obey tail.call. Don't precompile methods target
16151 * tramp-x86.c: new trampoline code to handle methods
16152 reached through a jump.
16154 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
16156 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16157 bit values to registers
16159 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
16161 * mini.c (mono_compile_get_interface_var): share interface
16162 variables if possible.
16164 2003-05-16 Martin Baulig <martin@ximian.com>
16166 * debug-mini.c (mono_init_debugger): New function to initialize
16167 the debugger. This is not in the debugger since it needs to
16168 access some of mini's internals.
16170 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
16172 * mini.c (mono_method_to_ir): inlining fixes/cleanups
16174 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16176 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16177 for value type handling.
16179 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
16181 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16182 (mono_method_check_inlining): enable inlining of all kinds of wrappers
16184 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
16186 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16187 the constructor through a proxy.
16189 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16191 * jit-icalls.c, inssel.brg: fixes to array element address
16194 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
16196 * mini-x86.c (is_regsize_var): allocate pointer to registers
16198 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16200 * driver.c: fixed typo, added intrins to the set of optimizations
16201 tested with regressions.
16203 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16205 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16206 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16209 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
16211 * inssel.brg: remove some common pop instructions without side effects
16213 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16215 * inssel-x86.brg: fixed thinko in int to double conversions.
16217 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16219 * mini.c, jit-icalls.c: added runtime thread-static variable support.
16221 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16223 * inssel-long32.brg: two more missing instructions.
16225 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
16227 * mini.c (mono_emit_call_args): set the cil_code for all arguments
16228 if not already set.
16230 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
16232 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16235 * basic-float.cs: Added tests for negative zero.
16237 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16239 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16240 a couple of missing operations for long casts, with test cases.
16242 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16244 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16246 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
16248 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16249 code size estimation.
16251 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
16253 * mini.c (mono_jit_create_remoting_trampoline): make it work with
16254 abstract methods (fix bug 42542)
16256 * aot.c: add ability to handle array types
16258 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
16260 * mini.c: Call the _specific versions of the object allocation
16261 functions if possible.
16263 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16265 * driver.c: call setlocale ().
16267 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16269 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16272 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
16274 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
16276 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
16277 wrappers (fix bug 42122)
16279 2003-05-04 Martin Baulig <martin@ximian.com>
16281 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
16283 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
16284 s/mini_set_defaults/mono_set_defaults/g.
16286 2003-05-04 Martin Baulig <martin@ximian.com>
16288 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
16290 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16292 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
16293 (reported by Don Roberts).
16295 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16297 * mini.c: temporarily work around two bugs for this release.
16299 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16301 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
16302 that contains -export-dynamic and it makes using the ld script
16304 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
16306 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16308 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
16311 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16313 * mini.c: make sure leave calls all the needed finally blocks,
16314 even when the target jumps out of multiple exception clauses.
16316 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16318 * ldscript, Makefile.am: add linker script to reduce the number of
16319 exported symbols (should also fix the issues with libwine defining
16320 some of the same symbols in io-layer).
16322 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
16324 * driver.c (mini_main): Avoid assertion when no file name is given on
16327 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
16329 * driver.c: added --version/-V command line option.
16330 Added the inline optimization in the regression tests.
16332 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16334 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
16335 to the type in the method signature (fixes bug#42134).
16337 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
16339 * mini.c: when inlining, check this is not null only when needed (bug #42135).
16341 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
16343 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
16345 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16347 * driver.c: fixed bug #42100.
16349 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
16351 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
16353 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16355 * mini.c: moved most of the code required to do inlining to its own
16356 function so it can be reused. Inline also ctors if appropriate.
16358 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
16360 * Makefile.am: Link with -export-dynamic so shared libs loaded by
16361 the runtime can call mono API functions.
16363 2003-04-27 Martin Baulig <martin@ximian.com>
16365 * debug-mini.c (mono_debug_init_method): Added
16366 `guint32 breakpoint_id' argument; if the method has a breakpoint,
16367 send a notification to the debugger.
16369 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
16370 running in the Mono Debugger, just pass the breakpoint number to
16371 mono_debug_init_method().
16373 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
16375 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
16377 * mini.c: allow some more unsafe compares.
16379 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16381 * mini-x86.c, Makefile.am: make distcheck works (partially from
16382 a patch by Richard Lee <r.h.lee@attbi.com>).
16383 * regset.c, regset.h: removed, they are unused.
16385 2003-04-25 Dick Porter <dick@ximian.com>
16387 * driver.c: Usage reports the name as 'mono' not 'mini'
16388 * exceptions-x86.c: Build and run on freebsd
16390 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
16392 * Makefile.am: install the program with the 'mono' name and
16393 the library as libmono instead of mini and libmini.
16395 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16397 * driver.c: provide the APIs for the embedding interface of the old jit.
16399 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
16401 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
16403 2003-04-23 Martin Baulig <martin@ximian.com>
16405 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
16407 * driver.c: Added `--debug' command line argument to enable
16410 2003-04-23 Martin Baulig <martin@ximian.com>
16412 * debug.[ch]: Removed. The code is now in
16413 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
16415 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
16418 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
16420 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
16422 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
16425 (mini_cleanup): moved mono_runtime_cleanup call after the call to
16426 mono_domain_finalize.
16427 (mini_method_compile): use mono_method_profile* if the the option is
16430 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
16432 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16433 methods with their wrapper.
16435 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16436 methods with their wrapper.
16438 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
16441 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
16444 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
16447 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
16449 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
16451 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
16453 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
16454 of the mempool. This is slightly faster and uses less memory
16456 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16458 * mini.c: avoid O(n) allocation for variables.
16460 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16462 * mini.c: handle items on the stack after inlining methods.
16464 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16466 * mini.c: make the method->opcode optimization dependent
16467 on MONO_OPT_INSTRINS and do it lazily.
16469 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16471 * driver.c: print overall results at the end of regression run.
16473 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16475 * inssel.brg: don't overwrite symbolic registers.
16477 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16479 * inssel-x86.brg: fix conversion from long to float.
16481 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
16483 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
16485 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
16487 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
16489 * driver.c: Added --print-vtable option as in the old JIT.
16491 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16493 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
16495 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
16497 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
16499 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
16501 * mini.c regalloc.c regalloc.h: Fix memory leak.
16503 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
16505 * aot.c (mono_aot_get_method): register all used strings
16507 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16509 * mini.c: always intern strings references with ldstr at compile time.
16511 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16513 * Makefile.am: add BUILT_SOURCES.
16515 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16517 * driver.c: give a better error message when the assembly to execute
16518 doesn't have an entry point.
16520 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
16522 * Makefile.am: added hack for automake
16524 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
16527 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
16529 22003-04-07 Martin Baulig <martin@ximian.com>
16531 * Makefile.am: Added Makefile.am.
16533 * debugger-main.c: Removed, this is now in the debugger where it
16536 * mini.pc.in: Call this package `mini' for the moment.