1 2008-08-08 Zoltan Varga <vargaz@gmail.com>
3 * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
5 * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
6 mono_marshal_get_native_wrapper () signature changes.
8 2008-08-07 Rodrigo Kumpera <rkumpera@novell.com>
10 * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
11 conversion bug under arm.
13 2008-08-06 Rodrigo Kumpera <rkumpera@novell.com>
15 * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
17 * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
18 with overflow checking.
20 2008-08-05 Marek Habersack <mhabersack@novell.com>
22 * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
23 to the genmdesc.pl file
25 2008-08-05 Zoltan Varga <vargaz@gmail.com>
27 * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
28 arg_array in the soft-float versions of the LOAD/STORE macros.
30 * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
33 * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
35 2008-08-02 Zoltan Varga <vargaz@gmail.com>
37 * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
38 a float HFA. Fixes #413621.
40 2008-08-02 Gert Driesen <drieseng@users.sourceforge.net>
42 * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
43 frame_size to args_size. Fixes build.
45 2008-08-02 Zoltan Varga <vargaz@gmail.com>
47 * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
48 and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
50 * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
51 the stack are not unaligned. Fixes #413247.
53 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
55 * mini.c: update jitted methods performance counters.
57 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
59 * mini-exceptions.c: increase the exceptions thrown performance
60 counter in mono_handle_exception ().
62 2008-07-29 Zoltan Varga <vargaz@gmail.com>
64 * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
65 can work with netmodules.
67 2008-07-28 Geoff Norton <gnorton@novell.com>
69 * mini-x86.h: Correct the frame alignment on OSX. Fixes the jit
72 2008-07-28 Zoltan Varga <vargaz@gmail.com>
74 * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
77 2008-07-28 Bill Holmes <billholmes54@gmail.com>
79 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
80 The float param registers and other param registers must be the
81 same index on Windows x64.
83 * mini-amd64.c (mono_arch_allocate_vars) : Implementing the
84 ArgValuetypeAddrInIReg argument case. Setting the argument
85 op to OP_VTARG_ADDR (OP_REGOFFSET)).
87 * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix. Use the size
88 variable computed above as the copy length for arguments of storage
89 type ArgValuetypeAddrInIReg.
91 * mini-amd64.c (mono_arch_emit_call) : Implementing the
92 ArgValuetypeAddrInIReg argument case. This case will rely on
93 mono_arch_emit_outarg_vt to emit the correct code later in the process.
95 * mini-amd64.c (mono_arch_emit_call) : On Winx64 there always needs to be
96 a 32 byte stack allocation for all calls. We will omit the adjustment for
97 jump and tail call instructoins as they do not follow the typical call behavior.
99 * mini-amd64.c (mono_arch_emit_outarg_vt) : Implementing the case for
100 ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
101 local variable and pass the local variable by reference to the called method.
103 * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
104 Implementing the ArgValuetypeAddrInIReg argument case. When the address
105 of a struct is passed in a register it must be saved with the other
106 volatile argument on the stack.
108 * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix. When omitting the
109 frame pointer the stack adjustment value must be saved to the unwind
112 Contributed under MIT/X11 license.
114 2008-07-28 Zoltan Varga <vargaz@gmail.com>
116 * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
117 which got lost in the merge.
119 2008-07-27 Zoltan Varga <vargaz@gmail.com>
121 * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
124 * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
126 * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
127 icalls, since they won't be patched.
129 * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
130 different code sequence when running under valgrind to prevent some valgrind
133 * iltests.il.in: Add new regression test.
135 * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
138 * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
139 accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
141 * iltests.il.in: Add new test.
143 * aot-compiler.c: Fix some warnings.
145 * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
148 2008-07-27 Zoltan Varga <vargaz@gmail.com>
150 * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
151 (mini_usage_jitdeveloper): Add a missing --wapi option.
153 2008-07-25 Zoltan Varga <vargaz@gmail.com>
155 * mini-codegen.c: Simplify the is_fp macros.
156 (free_up_ireg): Remove, use free_up_reg instead.
157 (free_up_reg): Fix the fp case.
159 2008-07-26 Zoltan Varga <vargaz@gmail.com>
161 * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
164 * exceptions-x86.c: Merge some changes which seemed to have got lost
165 in the linear-ir merge.
167 * liveness.c: Disable the liveness2 pass on 32 bit platforms.
169 * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
170 long vreg volatile even if the variable was already created.
172 * liveness.c (update_liveness2): Avoid eliminating dead definitions of
175 2008-07-26 Zoltan Varga <vargaz@gmail.com>
177 * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
179 * mini.c (mono_jit_compile_method_inner): Add support for
180 MONO_EXCEPTION_BAD_IMAGE.
182 * method-to-ir.c (mono_method_to_ir2): Avoid a crash if
183 mini_method_get_context () returns NULL. Fixes #356531.
185 * mini.c (mono_method_to_ir): Ditto.
187 * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
188 accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
190 2008-07-25 Zoltan Varga <vargaz@gmail.com>
192 * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
193 in the LDFTN implementation.
195 2008-07-25 Mark Probst <mark.probst@gmail.com>
197 * mini-trampolines.c (mono_magic_trampoline): When sharing generic
198 code, patch calls to icalls, too, even if they're not in the
199 shared generic code hash. Fixes #411962.
201 2008-07-25 Zoltan Varga <vargaz@gmail.com>
203 * cpu-x86.md: Increase the length of the fcall opcodes.
205 * mini-x86.c (emit_move_return_value): Avoid some precision issues for
206 calls returning floats.
208 * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
211 * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
214 * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
215 into the domain->method_code_hash.
217 * aot-compiler.c: Fix win32 build.
219 * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
221 * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
222 gshared NEWARR implementation.
224 * cpu-sparc.md: Remove duplicate localloc_imm opcode.
226 * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
227 can be used outside of method_to_ir.
229 * mini.h (MonoCompile): Add arg_types field.
231 * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
233 * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
234 the values of the local arg_array and param_types array.
236 2008-07-24 Zoltan Varga <vargaz@gmail.com>
238 * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
239 got accesses might only get generated later when NEWOBJ is decomposed.
241 * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
242 looking up the native code of the target method when a delegate is called
245 * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
248 * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
250 * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
251 AOT work on platforms without a working dlsym implementation.
253 * mini.h: Bump AOT image format version.
255 2008-07-24 Mark Probst <mark.probst@gmail.com>
257 * mini-exceptions.c: Free a MonoType with
258 mono_metadata_free_type() instead of g_free().
260 * aot-runtime.c: Free a MonoType.
262 2008-07-24 Zoltan Varga <vargaz@gmail.com>
264 * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
267 * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
270 2008-07-23 Massimiliano Mantione <massi@ximian.com>
271 * mini.c (sigprof_signal_handler): call the new "runtime initialized"
274 2008-07-23 Zoltan Varga <vargaz@gmail.com>
276 * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
277 NEWOBJ calls on valuetypes.
279 * iltests.il.in: Add new test.
281 * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
283 2008-07-22 Zoltan Varga <vargaz@gmail.com>
285 * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
288 * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
289 non register sized integer arguments.
290 (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
291 (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to
294 * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
297 * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
298 two a binop with different sized arguments is emitted.
300 * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
301 instruction in the ins==NULL case.
303 2008-07-23 Zoltan Varga <vargaz@gmail.com>
305 * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
307 * mini-x86.c: Fix osx build.
309 * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
312 * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
313 instruction for non int sized variables.
315 * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
318 2008-07-23 Robert Jordan <robertj@gmx.net>
320 * method-to-ir.c: Fix MSVC build.
322 2008-07-22 Zoltan Varga <vargaz@gmail.com>
324 * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
325 a non int sized type, widen it to an int since newer versions of gcc seem to
326 generate code which needs this.
328 * ssa2.c abcremoval2.c: Fix warnings.
330 * *: Merge the Linear IR branch.
332 The original branch is at trunk/branches/vargaz/mini-linear-il, and
333 the ChangeLog file there describes all the changes done over the years.
334 Further documentation can be found at www.mono-project.com/Linear_IL.
336 2008-07-21 Bill Holmes <billholmes54@gmail.com>
338 * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
339 The float param registers and other param registers must be the
340 same index on Windows x64.
342 Contributed under MIT/X11 license.
344 2008-07-21 Rodrigo Kumpera <rkumpera@novell.com>
346 * mini.c: Make the previous fix GC safe.
348 2008-07-21 Raja R Harinath <harinath@hurrynot.org>
350 * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
352 2008-07-21 Bill Holmes <billholmes54@gmail.com>
354 * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
355 on Winx64. This type will not be passed on the stack (ArgOnStack), but
356 ArgValuetypeAddrInIReg instead.
358 Contributed under MIT/X11 license.
360 2008-07-21 Zoltan Varga <vargaz@gmail.com>
362 * mini-codegen.c (get_register_spilling): Fix a warning.
364 2008-07-17 Rodrigo Kumpera <rkumpera@novell.com>
366 * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
367 for types which the initialization fails. Raises the provided exception
368 at the right stop after cleanup.
370 2008-07-16 Zoltan Varga <vargaz@gmail.com>
372 * aot-compiler.c: Free most of the memory allocated during compilation.
374 * mini.c (mini_parse_debug_options): Fix a leak.
376 * mini.c (mini_method_compile): Don't add the method to the jit info tables
377 during aot compilation.
379 2008-07-14 Zoltan Varga <vargaz@gmail.com>
381 * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as
382 it has too much register pressure.
384 2008-07-13 Zoltan Varga <vargaz@gmail.com>
386 * inssel.brg (CEE_CASTCLASS): Remove some dead code.
388 2008-07-12 Zoltan Varga <vargaz@gmail.com>
390 * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
393 * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
394 on amd64 similar to the way it is done on arm.
396 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
398 * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for
399 consistency, normalize error messages, avoid loading aot-only modules in
402 * driver.c (mono_main): Rename --aot-only command line option to --full-aot
405 * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
407 2008-07-11 Martin Baulig <martin@ximian.com>
410 (MonoDebuggerInfo): Add `interruption_request'.
412 2008-07-12 Zoltan Varga <vargaz@gmail.com>
414 * aot-compiler.c (emit_plt): Remove some dead code.
416 * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
418 * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
419 return the plt info offset belonging to a given plt entry.
421 * mini-trampolines.c (mono_aot_plt_trampoline): Use
422 mono_aot_get_plt_info_offset.
424 * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
425 similar to the amd64 code by makeing jumps through a separate jump table
426 instead of embedding the jump addresses into the code.
428 2008-07-11 Zoltan Varga <vargaz@gmail.com>
430 * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
433 2008-07-10 Martin Baulig <martin@ximian.com>
435 * mini.c (mini_method_compile): Disable generics sharing when
436 running in the debugger.
438 2008-07-10 Zoltan Varga <vargaz@gmail.com>
440 * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
442 * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
443 the local register allocator from running out of registers on x86 when
446 2008-07-10 Bill Holmes <billholmes54@gmail.com>
448 * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when
449 expressing IntMin for the VS Compiler. See Compiler Warning (level 2)
452 Contributed under MIT/X11 license.
454 2008-07-10 Zoltan Varga <vargaz@gmail.com>
456 * aot-compiler.c: Get rid of whitespace in the generated assembly file to
457 speed up the assembler.
459 2008-07-09 Zoltan Varga <vargaz@gmail.com>
461 * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
464 * mini.c: Move the soft float handling macros a bit earlier, add
465 NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
468 * mini.h: Add prototype for mono_arch_fixup_jinfo.
470 * mini.c (mini_init): In aot-only mode, set the root domain code manager to
471 read-only to help catch code allocation requests.
473 * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
474 and turn it off when using --aot-only or when compiling with --aot=full.
476 * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
477 jump table for switches from the normal domain mempool, not the code
480 * mini-trampolines.c (get_unbox_trampoline): New function to return an
481 unbox trampoline which handles aot-only mode too.
483 * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
484 an AOTed unbox trampoline.
486 * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
488 2008-07-09 Bill Holmes <billholmes54@gmail.com>
490 * wapihandles.c: Fixing MSVC builds. Include statement changed from <> to
493 Contributed under MIT/X11 license.
495 2008-07-09 Bill Holmes <billholmes54@gmail.com>
497 * mini.c (mono_codegen): Allocate space at the end of the code block and store
498 the unwind information for the method at the end of the allocated block.
500 * mini-amd64.h: Added declarations for the unwind routines and adding field to
501 MonoCompileArch to hold the unwind info for SEH on Winx64
503 * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
504 frame pointer info for the method being compiled.
506 * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
507 the call to mono_exception_from_token.
509 * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations. This code is responsible
510 storing the method prolog information in a format that the Winx64 SEH can understand. This
511 information is stored a the end of the method block because it is all 32-bit offset based.
513 Contributed under MIT/X11 license.
515 2008-07-09 Zoltan Varga <vargaz@gmail.com>
517 * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
519 * wapihandles.c: Fix warnings.
521 * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
524 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling
525 mono_jit_compile_method in aot-only mode since that calls the type
528 * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
529 get_delegate_invoke_impl in aot-only mode.
531 * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
533 2008-07-08 Zoltan Varga <vargaz@gmail.com>
535 * trace.c (mono_trace_enter_method): Fix printing of Type instances.
537 * aot-compiler.c (compile_method): Disable the check for GSHARED since it
540 * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
542 * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
543 init trampoline from the AOT file as well.
545 * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
546 mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
549 * mini.c (mini_init): Move the call to mono_exceptions_init () after
552 * exceptions-amd64.c: Add _full variants for the remaining exception code
553 creation functions as well, allow emission of relocatable code, remove
554 caching since that is now done by the caller.
556 * mini-exceptions.c: Add _full variants for the remaining exception code
557 creation functions as well, add aot-only support.
559 * aot-compiler.c (compile_method): Allow calls to methods of constructed types
560 if we can determine a proper token for them.
561 (add_wrappers): Add a few more wrappers.
562 (emit_method_code): Remove some dead code.
563 (emit_trampolines): Emit exception code too.
565 * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
567 * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
568 mono_array_new_va which avoids varargs.
570 * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
572 * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
573 mono_arch_create_specific_trampoline () in all places.
575 * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
576 a bit so it can be used for other things as well.
578 * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
581 * exceptions-amd64.c: Rename the caching from the exception code creation
582 functions, it is done by the caller instead.
584 * exceptions-amd64.c: Change the signature of the exception code creation
585 functions to allow the creation of relocatable code later.
587 * mini-exceptions.c: Add a set of functions to query the various
588 runtime-generated exception functions.
590 * mini.c mini-exceptions.c: Use the newly added functions instead of the
591 mono_arch_.. () functions.
593 2008-07-07 Zoltan Varga <vargaz@gmail.com>
595 * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
597 * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
599 * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
600 (mini_get_vtable_trampoline): Ditto.
602 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
603 code in the AOT case by returning the code size and a list of relocations to
606 * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
608 2008-07-07 Bill Holmes <billholmes54@gmail.com>
610 * mini-amd64.c: On Winx64 the calling convention always requires the caller to
613 Contributed under MIT/X11 license.
615 2008-07-07 Zoltan Varga <vargaz@gmail.com>
617 * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
618 so the buffer size can be computed correctly. Fixes #404735.
620 * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
621 normally as cfg->debug_info is already freed.
623 2008-07-06 Zoltan Varga <vargaz@gmail.com>
625 * mini-amd64.c: For calls returning vtypes in registers, don't store
626 the return address on the stack, instead allocate a separate local for
629 2008-07-05 Mark Probst <mark.probst@gmail.com>
631 * mini-trampolines.c, mini.h: Add an argument to
632 mono_create_jit_trampoline_in_domain() for turning off the adding
635 * mini.c: Use the JIT trampoline without sync instead of
636 ldftn_nosync in static RGCTX invoke wrappers so that the call can
639 2008-07-04 Mark Probst <mark.probst@gmail.com>
641 * driver.c: Turn on GSHARED optimization by default.
643 2008-07-04 Zoltan Varga <vargaz@gmail.com>
645 * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
646 to MONO_TRAMPOLINE_JIT since it better reflects what it does.
648 * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
649 create a variant of the generic trampoline code callable from AOTed trampolines.
651 * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
652 trampoline code callable from AOTed trampolines.
654 * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
656 2008-07-04 Mark Probst <mark.probst@gmail.com>
658 * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
661 * mini.c: Generic method sharing. Pass MRGCTX to generic methods
662 and don't fail sharing for them anymore.
664 * mini-exceptions.c: Handle exceptions in shared generic methods.
666 * generic-sharing.c: When checking the context of a generic
667 method, also check its class's context. Don't treat wrappers as
670 * mini-trampolines.c: Some code factored out to
671 metadata/generic-sharing.c. Handle the MRGCTX case.
673 * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
674 we must deal with the method being of another instantiation of the
675 class. Add static rgctx invoke wrappers to generic methods.
677 2008-07-04 Mark Probst <mark.probst@gmail.com>
679 * mini.c: Provide all jit infos of generic shared methods with a
682 * mini-exceptions.c: Handle the new situation that a generic info
683 might be available, but not info about the this/vtable/mrgctx
686 2008-07-03 Mark Probst <mark.probst@gmail.com>
688 * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
691 2008-07-03 Zoltan Varga <vargaz@gmail.com>
693 * dominators.c (check_dominance_frontier): Fix a warning.
695 * mini.h: Add some missing prototypes.
697 * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
699 * driver.c (mono_jit_init_version): Correct the comments since the first
700 argument should be the name of the root domain, not a filename.
702 * aot-runtime.c (make_writable): Error out if this is called while running
704 (load_aot_module): Ditto.
706 * aot-compiler.c: Really fix the computation of method indexes.
708 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous
709 optimizations as this is no longer called frequently.
711 * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
712 method and the invoke impl code and pass it to the delegate trampoline instead of
713 just the delegate class.
715 2008-07-02 Zoltan Varga <vargaz@gmail.com>
717 * aot-compiler.c: Fixup the computation of method indexes.
718 (add_wrappers): Create the base methods of the runtime invoke wrappers using
719 the method builder infrastructure.
721 * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
724 * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
725 mode, load the method right away instead of creating a trampoline.
727 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
729 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
732 2008-07-01 Zoltan Varga <vargaz@gmail.com>
734 * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
735 (mono_aot_load_method): Use method_index instead of method->token.
737 * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
738 can handle icalls etc. properly.
740 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
742 * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
744 * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
745 (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
746 JIT_ICALL_ADDR patch type.
748 * patch-info.h: Add JIT_ICALL_ADDR patch type.
750 * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
752 (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
754 * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
756 2008-06-30 Zoltan Varga <vargaz@gmail.com>
758 * mini.c: Use domain->jit_code_hash_lock for controlling access to
759 domain->jit_code_hash.
761 2008-06-29 Zoltan Varga <vargaz@gmail.com>
763 * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
765 2008-06-27 Zoltan Varga <vargaz@gmail.com>
767 * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
768 get_this_arg_from_call, let it compute it when needed.
770 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
771 gsctx from code only when needed.
773 * mini-trampolines.c (get_generic_context): Rename this to
774 mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
775 it can be called by the arch backends.
777 * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
779 2008-06-26 Zoltan Varga <vargaz@gmail.com>
781 * driver.c (mono_main): Add experimental --aot-only command line option.
783 * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
786 2008-06-26 Kornél Pál <kornelpal@gmail.com>
788 * driver.c (DllMain): Remove mono_module_handle.
790 Contributed under MIT/X11 license.
792 2008-06-25 Zoltan Varga <vargaz@gmail.com>
794 * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
795 for emitting methods which are not in the source assembly. Detect and report
796 failure of assembling+linking.
798 * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
800 * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
802 2008-06-24 Rodrigo Kumpera <rkumpera@novell.com>
804 * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
806 2008-06-24 Zoltan Varga <vargaz@gmail.com>
808 * mini.h: Remove some obsolete prototypes.
810 * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
812 2008-06-24 Mark Probst <mark.probst@gmail.com>
814 * mini.c (get_object_generic_inst): Variable-sized arrays are not
815 supported by Visual Studio, so use alloca().
817 2008-06-23 Zoltan Varga <vargaz@gmail.com>
819 * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
822 2008-06-23 Mark Probst <mark.probst@gmail.com>
824 * mini.c: Fail sharing of a generic method if it contains an open
825 catch clause (because we don't pass MRGCTXs yet).
827 2008-06-23 Mark Probst <mark.probst@gmail.com>
829 * mini.c: When compiling a method with generic sharing, insert the
830 method instantiated with an all-Object generic context into the
831 jit info table, instead of the context of the first instantiation
832 of the method we happen to compile.
834 2008-06-18 Martin Baulig <martin@ximian.com>
836 * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
837 `major_version' and `minor_version'.
839 2008-06-17 Mark Probst <mark.probst@gmail.com>
841 * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
842 mono_method_is_generic_sharable_impl() takes an additional
843 argument specifying whether to treat type variables as reference
846 2008-06-17 Mark Probst <mark.probst@gmail.com>
848 * mini.h: Removed obsolete prototypes.
850 2008-06-17 Mark Probst <mark.probst@gmail.com>
852 * mini.c: Don't fail generic sharing for initobj and sizeof - we
855 2008-06-17 Mark Probst <mark.probst@gmail.com>
857 * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
858 tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
859 tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
860 tramp-x86.c: Added a MonoGenericContext* argument to
861 mono_arch_get_unbox_trampoline() so that it can call other
862 functions which require it.
864 2008-06-17 Mark Probst <mark.probst@gmail.com>
866 * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
867 mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
868 mono_arch_get_this_arg_from_call() takes a
869 MonoGenericSharingContext* as well.
871 2008-06-17 Mark Probst <mark.probst@gmail.com>
873 * mini.c: Factor out code for emitting unbox into emit_unbox() and
874 implement generic sharing of unbox.
876 2008-06-17 Mark Probst <mark.probst@gmail.com>
878 * mini.c: Don't compute the vtable to determine whether a field is
879 special static, because it might not work for open types.
881 2008-06-17 Mark Probst <mark.probst@gmail.com>
883 * mini.c: Removed the unused token_type and token_source arguments
884 from get_runtime_generic_context_ptr().
886 2008-06-17 Marek Habersack <mhabersack@novell.com>
888 * mini.c (ADD_BINOP): fix the build
890 2008-06-16 Zoltan Varga <vargaz@gmail.com>
892 * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
895 2008-06-16 Mark Probst <mark.probst@gmail.com>
897 * mini.h: Removed class relations enum that's not used anymore.
899 2008-06-16 Mark Probst <mark.probst@gmail.com>
901 * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
903 * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
904 the lazy fetch trampoline access code.
906 2008-06-15 Zoltan Varga <vargaz@gmail.com>
908 * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
910 2008-06-14 Zoltan Varga <vargaz@gmail.com>
912 * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
914 * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
916 * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
918 2008-06-13 Zoltan Varga <vargaz@gmail.com>
920 * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
923 * mini-ops.h: Add MIN/MAX_UN opcodes.
925 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
928 * basic-math.cs: Add more min/max tests.
930 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
932 2008-06-13 Mark Probst <mark.probst@gmail.com>
934 * mini.c: Small fix in the prologue of emit_castclass.
936 2008-06-13 Zoltan Varga <vargaz@gmail.com>
938 * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
940 * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
941 do not work even for unsigned types. Fixes #400014.
943 * basic-math.cs: Add regression tests for unsigned Min/Max.
945 2008-06-13 Mark Probst <mark.probst@gmail.com>
947 * mini.c: Added additional context_used argument to several
948 functions, which will be needed for sharing generic methods. Use
949 GET_RGCTX macro wherever appropriate. Declare only one
950 context_used in mono_method_to_ir().
952 2008-06-13 Mark Probst <mark.probst@gmail.com>
954 * mini.c, generic-sharing.c: Removed generic class relations.
956 * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
957 functions due to MRGCTX changes.
959 2008-06-13 Mark Probst <mark.probst@gmail.com>
961 * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
962 graph.c, local-propagation.c, aliasing.c: New opcodes for calls
965 * mini.c: Generic sharing of calls via generic interfaces.
967 * jit-icalls.c, jit-icalls.h: Helper function for compiling a
968 generic method with non-constant MonoGenericContext*. Instead,
969 the context is taken out of the method itself.
971 2008-06-13 Mark Probst <mark.probst@gmail.com>
973 * mini.c: Generic sharing of ldvirtftn.
975 2008-06-13 Mark Probst <mark.probst@gmail.com>
977 * mini.c: Generic sharing of ldftn.
979 2008-06-13 Mark Probst <mark.probst@gmail.com>
981 * mini.c: Do pass VTable/RGCTX argument to static generic methods.
983 2008-06-13 Mark Probst <mark.probst@gmail.com>
985 * mini.c: Generic sharing of the special case of ldtoken followed
986 by a call to GetTypeFromHandle.
988 2008-06-13 Mark Probst <mark.probst@gmail.com>
990 * mini.c: Generic sharing of box for nullable types.
992 2008-06-13 Zoltan Varga <vargaz@gmail.com>
994 * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
995 are passed on the stack. Fixes #324807.
997 2008-06-12 Bill Holmes <billholmes54@gmail.com>
999 * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
1000 for the ArgValuetypeAddrInIReg case.
1002 * mini-amd64.c:mono_arch_allocate_vars: Adding a case for
1003 ArgValuetypeAddrInIReg to avoid asserts. Code needs to be added here.
1005 * mini-amd64.c: mono_arch_call_opcode: Adding Winx64 code for an ArgInfo of
1006 type ArgValuetypeAddrInIReg. The code emitted will copy the argument to a
1007 local variable and pass the local variable by reference to the called method.
1009 * mini-amd64.c: mono_arch_emit_prolog: Adjust the stack for calls to
1010 mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
1012 Contributed under MIT/X11 license.
1014 2008-06-10 Rodrigo Kumpera <rkumpera@novell.com>
1016 * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
1018 * debug-mini.c (mono_debug_print_vars): Release memory after printing
1021 2008-06-10 Martin Baulig <martin@ximian.com>
1024 (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
1026 2008-06-09 Kornél Pál <kornelpal@gmail.com>
1028 * main.c: Add and set argv [argc] to NULL to match C specification that fixes
1029 possible error when no arguments are passed.
1031 Contributed under MIT/X11 license.
1033 2008-06-09 Rodrigo Kumpera <rkumpera@novell.com>
1035 * mini-exceptions.c (ves_icall_get_trace): Skip source locations
1036 where the file name is NULL.
1038 2008-06-09 Zoltan Varga <vargaz@gmail.com>
1040 * mini.c: Fix s390 build.
1042 2008-06-08 Zoltan Varga <vargaz@gmail.com>
1044 * trace.c (mono_trace_parse_options): Fix warnings.
1046 * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
1048 2008-06-07 Zoltan Varga <vargaz@gmail.com>
1050 * mini.c (remove_block_if_useless): Avoid printing the method name.
1052 * mini.c: Remove needless setting of ins->cil_code which is now done by
1055 * mini-amd64.c: Add some code to avoid saving callee saved registers in the
1058 * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
1059 translated code after it has been patched.
1061 2008-06-06 Zoltan Varga <vargaz@gmail.com>
1063 * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
1064 avoid problems during code patching on SMP systems.
1065 (emit_call): Avoid adding a patch info which is already added by
1067 (mono_arch_emit_exceptions): Ditto.
1069 2008-06-05 Zoltan Varga <vargaz@gmail.com>
1071 * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
1072 MONO_TYPE_ISSTRUCT already checks for it.
1074 2008-06-05 Bill Holmes <billholmes54@gmail.com>
1076 * mini-amd64.c:merge_argument_class_from_type: When marshaling
1077 structs with floats on Winx64 the float registers are not used.
1078 The integer registers are always used..
1079 * mini-amd64.c:add_valuetype: When marshaling structs on Winx64
1080 only one register will be used and only if the size of the struct
1081 is 1,2,4, or 8 bytes.
1083 * tramp-amd64.c : Adjusting size used for mono_global_codeman_reserve
1086 Contributed under MIT/X11 license.
1088 2008-06-05 Martin Baulig <martin@ximian.com>
1090 * debug-debugger.c (debugger_lookup_class): Also call
1091 mono_class_setup_methods() here; we're only called from RTI.
1093 2008-06-05 Andreas Färber <andreas.faerber@web.de>
1095 * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
1096 (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
1097 * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
1098 Post-process object files and add dtrace-generated object, if necessary.
1100 Contributed under MIT/X11 license.
1102 2008-06-04 Mark Probst <mark.probst@gmail.com>
1104 * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
1107 * mini.c: Generic sharing for unbox.any and castclass.
1109 2008-06-04 Mark Probst <mark.probst@gmail.com>
1111 * mini.c: Ignore tailcall prefix in shared generic code and when
1112 doing calls which require a vtable/rgctx argument.
1114 2008-06-04 Mark Probst <mark.probst@gmail.com>
1116 * mini.c: Don't free the JIT info.
1118 * driver.c: Changes in the JIT info table testing code.
1120 2008-06-03 Zoltan Varga <vargaz@gmail.com>
1122 * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread
1123 interruption. Fix some warnings.
1125 * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
1126 interruption_checkpoint.
1128 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
1130 * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
1131 from embedding applications.
1133 2008-06-02 William Holmes <billholmes54@gmail.com>
1135 * mini-amd64.c : Correcting some of the issues for Winx64 dealing with
1136 reserving 32 bytes on the stack when making calls.
1138 Contributed under MIT/X11 license.
1140 2008-06-01 Zoltan Varga <vargaz@gmail.com>
1142 * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
1143 the linear IL branch.
1145 * driver.c: Print out more information for --version on arm.
1147 2008-05-30 Zoltan Varga <vargaz@gmail.com>
1149 * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
1150 bb_exit instead, since out of line bblocks might not actually be emitted
1153 * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
1154 maximum epilog size for out of line bblocks if tracing is enabled.
1156 * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
1158 2008-05-28 Rodrigo Kumpera <rkumpera@novell.com>
1160 * arrays.cs: Regression tests for allocating arrays with negative sizes.
1162 2008-05-28 Zoltan Varga <vargaz@gmail.com>
1164 * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
1165 CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE
1168 2008-05-27 Zoltan Varga <vargaz@gmail.com>
1170 * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
1171 the 'value' to store is a constant.
1173 * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
1175 * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
1176 of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
1178 2008-05-26 Zoltan Varga <vargaz@gmail.com>
1180 * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
1181 for accessing method->generic_container.
1183 2008-05-24 Zoltan Varga <vargaz@gmail.com>
1185 * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
1187 * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
1189 * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
1191 * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
1194 2008-05-23 Zoltan Varga <vargaz@gmail.com>
1196 * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
1198 * mini.c: Handle the case when mono_class_vtable () fails.
1200 2008-05-23 Massimiliano Mantione <massi@ximian.com>
1201 * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
1204 2008-05-22 Mark Probst <mark.probst@gmail.com>
1206 * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
1207 together with domain sharing.
1209 2008-05-22 Mark Probst <mark.probst@gmail.com>
1211 * mini.c: Treat callvirts to final methods like non-virtual calls
1212 when doing generic sharing, i.e. look them up in the runtime
1215 2008-05-22 Mark Probst <mark.probst@gmail.com>
1217 * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
1218 with computed types (for generic sharing).
1220 * mini.c: Generic sharing for mkrefany and refanyval.
1222 2008-05-22 Zoltan Varga <vargaz@gmail.com>
1224 * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
1227 * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
1228 the generic sharing code.
1230 * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
1233 2008-05-21 Zoltan Varga <vargaz@gmail.com>
1235 * mini.h: Remove the declaration of mono_aot_init_vtable ().
1237 2008-05-21 C.J. Adams-collier <cjac@colliertech.org>
1239 * driver.c: updated copyright date
1241 2008-05-21 Zoltan Varga <vargaz@gmail.com>
1243 * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
1246 2008-05-19 Martin Baulig <martin@ximian.com>
1248 * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
1249 pointing to the new `_mono_debug_using_mono_debugger' variable.
1252 (mono_main): Check mono_debug_using_mono_debugger() rather than
1253 the `MONO_INSIDE_MDB' environment variable to check whether we're
1254 inside the debugger.
1256 2008-05-19 Zoltan Varga <vargaz@gmail.com>
1258 * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
1261 2008-05-08 Rodrigo Kumpera <rkumpera@novell.com>
1263 * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
1265 * mini.c: Added mini_assembly_can_skip_verification. This
1266 function checks if the assembly requested to skip verification.
1267 Fixes part of #387274.
1269 2008-05-07 Zoltan Varga <vargaz@gmail.com>
1271 * mini.c (mini_get_method): Disable the check for open generic classes when
1272 using generic sharing.
1274 * generics.cs: Add a test #387034.
1276 * mini.c (mini_get_method): Check whenever the method class is an open generic
1277 type, and return NULL in that case, causing a verification error. Fixes
1280 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
1282 * driver.c (mono_main): Revert r102623. The right
1283 thing to do is to enable the verifier under verifiable
1284 unless a --security flag was passed.
1286 We need this non-trivial behavior for --verify-all otherwise
1287 mcs-compileall won't be able to use it. As it needs everything to
1288 be verified under validil.
1290 2008-05-06 Martin Baulig <martin@ximian.com>
1294 * debug-mini.c (mono_debugger_thread_created): Add proper locking.
1295 (mono_debugger_thread_cleanup): Likewise.
1296 (mono_debugger_extended_notification): Likewise.
1298 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
1300 * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
1301 against both inflated and non-inflated methods. We need to check against the
1302 generic definition for cases where the instantiated method is not visible.
1303 We need to check against the inflated types for cases where the instantiation
1304 changes any super type. This fixes #382986.
1306 Note that this doesn't need to be applied to other parts of mono_method_to_ir
1307 that check for visibiliy as generic params only appears as the type subject
1308 of tokens on call opcodes. Field manipulation and ldftn must always
1309 target an exact type.
1311 2008-05-06 Rodrigo Kumpera <rkumpera@novell.com>
1313 * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
1314 if no related --security flag is passed.
1316 2008-05-05 Andreas Färber <andreas.faerber@web.de>
1318 * mini-arch.h: Prepare support for ppc64.
1320 Contributed under MIT/X11 license.
1322 2008-05-05 Andreas Färber <andreas.faerber@web.de>
1324 * aot-runtime.c: Prepare support for ppc64.
1326 Contributed under MIT/X11 license.
1328 2008-05-05 Andreas Färber <andreas.faerber@web.de>
1330 * mini-ops.h: Prepare support for ppc64.
1332 Contributed under MIT/X11 license.
1334 2008-05-04 Andreas Färber <andreas.faerber@web.de>
1336 * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
1338 Contributed under MIT/X11 license.
1340 2008-05-03 Zoltan Varga <vargaz@gmail.com>
1342 * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
1343 assemblies, since aot_name is not a full path, causing us to load MS.NET
1344 assemblies on windows.
1346 2008-04-28 Kornél Pál <kornelpal@gmail.com>
1348 * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
1349 for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
1350 * main.c: Use UTF-8 encoded command line instead of Windows default code
1351 page on Windows to support Unicode.
1352 * driver.c (DllMain): New function for mixed-mode assembly support.
1353 * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
1354 export __stdcall functions without decoration.
1356 Contributed under MIT/X11 license.
1358 2008-04-28 Mark Probst <mark.probst@gmail.com>
1360 * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
1361 saving it very early.
1363 2008-04-28 Mark Probst <mark.probst@gmail.com>
1365 * mini.h, mini.c: Lots of code for accessing the old RGCTX
1366 deleted. The only way to access the new RGCTX is via the
1369 * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
1370 vtable instead of the RGCTX to static methods.
1372 * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
1373 accessing the new RGCTX.
1375 * generic-sharing.c: There is no separation between self, type
1376 arguments and other types in the RGCTX anymore.
1378 2008-04-25 Jonathan Chambers <joncham@gmail.com>
1380 * mini-amd64.c (add_general): Remove previous stack adjustment.
1381 (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
1382 adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
1383 for 32 bytes of stack space reserved for all calls.
1385 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
1386 (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack
1389 Code contributed under MIT/X11 license.
1391 2008-04-23 Rodrigo Kumpera <rkumpera@novell.com>
1393 * mini.c (mini_method_verify): Only verify non-inflated methods, check
1394 against the root definition, peeling out method and type instantiations.
1395 Cache verify success results, code that fails verification is still
1396 checked multiple times.
1398 2008-04-23 Zoltan Varga <vargaz@gmail.com>
1400 * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
1402 2008-04-23 Jonathan Chambers <joncham@gmail.com>
1404 * mini-amd64.c (add_general): Always increment stack on Win64.
1405 (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
1408 * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for
1409 stack based argument handling on Win64.
1411 Code contributed under MIT/X11 license.
1413 2008-04-23 Raja R Harinath <harinath@hurrynot.org>
1415 * Makefile.am (version.h): Add support for git-svn.
1417 2008-04-22 Zoltan Varga <vargaz@gmail.com>
1419 * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
1420 so instead of calling g_spawn_command_line_sync, we do everything by hand,
1421 avoiding allocations and libc functions which might deadlock.
1423 * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
1424 'no-gdb-backtrace' option is set.
1426 * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
1428 * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
1430 2008-04-21 Martin Baulig <martin@ximian.com>
1432 * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
1433 and `get_lmf_addr'; `notification_address' is no longer a pointer.
1435 2008-04-21 Martin Baulig <martin@ximian.com>
1437 * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
1438 `thread_vtable', `event_handler_ptr' and `event_handler'.
1440 2008-04-21 Martin Baulig <martin@ximian.com>
1442 * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
1443 allows delayed initialization of the `executable_code_buffer' when
1446 2008-04-21 Martin Baulig <martin@ximian.com>
1448 * mini.h (mono_debugger_create_notification_function): Removed.
1449 * tramp-*.c (mono_debugger_create_notification_function): Removed.
1451 * mdb-debug-info64.s
1452 (MONO_DEBUGGER__notification_function): Added this in the .text section.
1454 * mdb-debug-info32.s
1455 (MONO_DEBUGGER__notification_function): Added this in the .text section.
1457 * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
1458 currently only works on x86 and x86_64, so don't create it on ppc.
1460 2008-04-21 Martin Baulig <martin@ximian.com>
1462 * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
1465 (mini_method_compile): In the fp elimination check, check
1466 `debug_options.mdb_optimizations' in addition to
1467 mono_debug_using_mono_debugger().
1469 * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
1470 disable some JIT optimizations which are only disabled when
1471 running inside the debugger.
1472 Added `--help-debug' option to describe the debugging options.
1473 (parse_debug_options): New static function to parse the `--debug'
1474 options, so we can easily add more stuff in future.
1476 2008-04-20 Zoltan Varga <vargaz@gmail.com>
1478 * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
1479 the method has no body.
1481 2008-04-19 Jonathan Chambers <joncham@gmail.com>
1483 * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
1484 assembly is not allowed in MSVC 64-bit compiler.
1485 (mono_arch_cpu_init): Don't set floating point precision on MSVC build
1486 as we get floating point exceptions everywhere.
1488 * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
1489 correctly align arguments for call to throw_exception.
1490 (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
1492 Code contributed under MIT/X11 license.
1494 2008-04-19 Zoltan Varga <vargaz@gmail.com>
1496 * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
1498 2008-04-17 Zoltan Varga <vargaz@gmail.com>
1500 * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
1502 * mini-amd64.c (NEW_INS): Set cil_code.
1504 * mini.c (mini_method_compile): Move the disabling of fp elimination to here
1505 from mini-amd64.c so all debugger related logic is in one place.
1507 * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
1508 later won't have a random ip assigned to them.
1510 2008-04-16 Zoltan Varga <vargaz@gmail.com>
1512 * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
1513 the arch specific function initializes code_size.
1514 (mono_create_delegate_trampoline): Ditto.
1516 * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
1517 tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
1520 * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if
1521 running under the debugger.
1523 * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
1526 * mini.c (mini_method_compile): Set a few flags in cfg if running under the
1527 debugger. Also move the disabling of optimizations here from driver.c.
1528 (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
1531 * mini.h (MonoCompile): Add a few new flags.
1533 2008-04-15 Zoltan Varga <vargaz@gmail.com>
1535 * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
1536 so the cil_code field of created MonoInst's is properly set.
1537 (mini_select_instructions): Ditto.
1539 * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
1540 (MONO_INST_NEW_CALL): Ditto.
1542 * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
1543 in many places so the ins->cil_code field is properly initialized.
1545 * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
1548 2008-04-14 Zoltan Varga <vargaz@gmail.com>
1550 * mini.c (mini_method_compile): Print a different message when compiling a
1553 * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
1556 2008-04-11 Zoltan Varga <vargaz@gmail.com>
1558 * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
1561 * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
1563 2008-04-11 Zoltan Varga <vargaz@gmail.com>
1565 * mini.c (handle_stack_args): Make this return void since its return value was
1566 never used. Also set cfg->unverifiable for invalid IL instead of calling
1569 2008-04-10 Mark Probst <mark.probst@gmail.com>
1571 * mini.c: Make sure "this" is live in catch clauses with type
1572 variables in shared generic code.
1574 2008-04-08 Mark Probst <mark.probst@gmail.com>
1576 * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
1577 generic_class_is_reference_type() to ensure the proper behaviour
1578 when sharing generic code and the type in question is a type
1581 2008-04-08 Zoltan Varga <vargaz@gmail.com>
1583 * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
1584 race conditions when printing thread dumps. Fixes #377738.
1586 2008-04-08 Massimiliano Mantione <massi@ximian.com>
1588 aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
1589 shows up when both MonoInst arguments can cause aliasig.
1590 There is likely no way in the current JIT to trigger this problem, but
1591 it showed up in the development of generics sharing, when in a new
1592 opcode both args of an OP_GROUP can be aliases (addresses of a local).
1593 When the generics sharing code will be committed, its tests will be
1594 valid also for this bug.
1596 2008-04-08 Zoltan Varga <vargaz@gmail.com>
1598 * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
1601 * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
1604 2008-04-07 Zoltan Varga <vargaz@gmail.com>
1606 * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
1607 use a more detailed exception message for InvalidCastException.
1609 * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
1611 * driver.c (mono_main): Add --debug=casts option to turn on better
1612 InvalidCastException message details.
1614 * mini.c (mini_get_debug_options): New helper function to return the address of
1615 the debug_options variable.
1617 * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
1618 the jit_tls TLS variable.
1620 * mini.c (mono_jit_tls): New TLS variable.
1622 * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
1625 2008-04-07 Rodrigo Kumpera <rkumpera@novell.com>
1627 * mini.h: Removed verifer related stuff. This code was moved to verify.c
1629 * mini.c: Removed verifer related stuff, code moved to verify.c.
1631 * driver.c: Using code from verify.c instead of mini.c.
1633 2008-04-05 Zoltan Varga <vargaz@gmail.com>
1635 * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
1638 2008-04-04 Rodrigo Kumpera <rkumpera@novell.com>
1640 * mini.c (check_for_method_verify): Enabling verification of
1641 corlib if mono_verify_all is set. Bugs in the verifier preventing that
1644 2008-04-04 Zoltan Varga <vargaz@gmail.com>
1646 * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
1647 caller saved registers as well.
1649 * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
1650 saved registers as well.
1652 2008-03-30 Zoltan Varga <vargaz@gmail.com>
1654 * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
1656 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
1659 2008-03-27 Zoltan Varga <vargaz@gmail.com>
1661 * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
1663 (get_call_info): Take a gsctx argument instead of 'cfg'.
1665 2008-03-26 Zoltan Varga <vargaz@gmail.com>
1667 * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
1668 mono_verify_all is set.
1670 * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
1672 * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
1674 2008-03-25 Zoltan Varga <vargaz@gmail.com>
1676 * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
1679 * driver.c mini.c mini.h: Add a --verify-all development option to test the
1680 verifier and the code generated by the compiler.
1682 2008-03-25 Mark Probst <mark.probst@gmail.com>
1684 * mini.c: Generic sharing of the non-nullable case of the box
1687 2008-03-24 Zoltan Varga <vargaz@gmail.com>
1689 * inssel.brg: Fix the build.
1691 * iltests.il.in: Add a test for lconv.ovf.u8.un.
1693 2008-03-24 Rodrigo Kumpera <rkumpera@novell.com>
1695 * mini.c (mono_method_to_ir): Implement readonly for ldelema and
1696 Array:Address. Fixes #372410.
1698 * iltests.il.in: New tests for readonly prefix.
1700 2008-03-23 Zoltan Varga <vargaz@gmail.com>
1702 * mini.h mini.c mini-trampolines.c: Move trampoline related code to
1705 * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to
1708 * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
1710 * mini.c (mono_decompose_op_imm): New helper function.
1712 * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
1713 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
1716 * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
1717 mono_arch_output_basic_block. Fix warnings.
1719 * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
1722 2008-03-22 Zoltan Varga <vargaz@gmail.com>
1724 * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
1725 since the extra frame is now detected automatically inside the loop.
1727 * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole
1728 opts which are now in mono_peephole_ins ().
1730 * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
1732 * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
1733 frames and skip duplicate managed-to-native frames. Fixes #367665.
1735 * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
1736 opts which are now in mono_peephole_ins ().
1737 (mono_arch_peephole_pass_2): Ditto.
1739 * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
1741 * mini-codegen.c (mono_peephole_ins): New helper function containing the
1742 arch independent peephole optimizations.
1744 * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
1745 opts which are now in mono_peephole_ins ().
1747 * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
1749 * mini-s390.c (mono_arch_output_basic_block): Fix build.
1751 * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
1754 * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
1755 CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
1758 2008-03-21 Zoltan Varga <vargaz@gmail.com>
1760 * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
1761 with the other architectures, add an 'mp' argument, fold 'sz' argument into the
1764 * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in
1765 mono_arch_output_basic_block. Fix warnings.
1767 2008-03-20 Zoltan Varga <vargaz@gmail.com>
1769 * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
1772 2008-03-20 Zoltan Varga <vargaz@gmail.com>
1774 * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
1777 * iltests.il: Add new tests.
1779 2008-03-20 Kornél Pál <kornelpal@gmail.com>
1781 * mini.c: Removed Windows version macros.
1783 2008-03-20 Mark Probst <mark.probst@gmail.com>
1785 * generic-sharing.c: Put reflection types in the extensible part
1786 of the runtime generic context.
1788 * mini.c: Generic sharing of the GetTypeHandle special case of the
1789 ldtoken instruction.
1791 2008-03-20 Zoltan Varga <vargaz@gmail.com>
1793 * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
1795 * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
1797 * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for
1798 consistency with the other version on the linear IR branch.
1800 * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
1802 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
1804 * iltests.il.in: Add new tests.
1806 2008-03-19 Zoltan Varga <vargaz@gmail.com>
1808 * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
1810 * iltests.il.in: Add new tests.
1812 2008-03-19 Mark Probst <mark.probst@gmail.com>
1814 * mini.c: Two variables with the same name were declared in
1815 nesting contexts and one wasn't initialized. Fixed.
1817 2008-03-19 Mark Probst <mark.probst@gmail.com>
1819 * mini.c: Generic sharing of the initobj instruction.
1821 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
1823 * mini.c: make the test to optimize ldtoken from typeof() more
1826 2008-03-18 Mark Probst <mark.probst@gmail.com>
1828 * mini.c: Generic sharing of the initobj instruction for reference
1831 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1833 * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
1834 the mono_breakpoint_clean_code() code to perform bound checks.
1836 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
1838 * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
1839 mono_arch_patch_callsite() to include the start of the managed method
1840 to be able to perform bound checks.
1842 2008-03-17 Mark Probst <mark.probst@gmail.com>
1844 * mini.c: Generic sharing for the isinst instruction.
1846 2008-03-17 Mark Probst <mark.probst@gmail.com>
1848 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
1849 inssel-long32-mips.brg: Added opcodes for doing indirect calls
1850 with the runtime generic context argument.
1852 * mini.c: Share calls to several types of unsharable methods by
1853 putting the address of the method code in the runtime generic
1854 context and doing an indirect call.
1856 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
1859 2008-03-16 Mark Probst <mark.probst@gmail.com>
1861 * generic-sharing.c: Change due to a change in the runtime genric
1864 2008-03-15 Martin Baulig <martin@ximian.com>
1867 (mono_arch_nullify_class_init_trampoline): Add call to
1868 mono_breakpoint_clean_code() to make things work when running
1869 inside the debugger.
1872 (mono_arch_nullify_class_init_trampoline): Add call to
1873 mono_breakpoint_clean_code() to make things work when running
1874 inside the debugger.
1876 2008-03-14 Zoltan Varga <vargaz@gmail.com>
1878 * inssel-long.brg (reg): Fix 64 bit build.
1880 2008-03-14 Mark Probst <mark.probst@gmail.com>
1882 * mini.c, mini.h: Share static generic code by passing it an
1883 implicit argument pointing to the runtime generic context.
1885 * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
1886 inssel-long32-mips.brg: New opcodes for calling shared static,
1887 which need to be passed the runtime generic context.
1889 * mini-amd64.c, mini-x86.c: Save the runtime generic context
1890 argument on the stack in the prologue if needed. New function for
1891 finding the runtime generic context argument from the registers
1892 saved by the trampoline.
1894 * mini-amd64.h, mini-x86.h: Specify which register to use for the
1895 runtime generic context argument.
1897 * tramp-amd64.c: Also restore the register used for the runtime
1898 generic context argument.
1900 * mini-trampoline.c: Resolve shared static calls by consulting the
1901 runtime generic context via the new argument.
1903 * generic-sharing.c: Add an argument to sharability-checking
1904 functions that specifies whether type variables should be treated
1905 as sharable type arguments.
1907 * inssel-x86.brg: Removed a superfluous, buggy rule.
1909 * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
1912 2008-03-14 Martin Baulig <martin@ximian.com>
1914 * debug-debugger.c (main_thread_handler): Call
1915 mono_runtime_run_main() without sending any notifications.
1917 * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
1919 2008-03-14 Zoltan Varga <vargaz@gmail.com>
1921 * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
1923 2008-03-14 Mark Probst <mark.probst@gmail.com>
1925 * tramp-x86.c: Fixed register restore offsets in the trampoline
1926 code for ECX and EDX.
1928 2008-03-12 Geoff Norton <gnorton@novell.com>
1930 * mini-arm.h: Add some #defines for locating sp, pc, r4 with
1931 different ucontext_t implementations.
1932 * exceptions-arm.c: Use the above defines to get exceptions working on
1933 iPhone (based on a patch by Luke Howard lukeh@padl.com)
1934 * mini-arm.c: Implement iPhone icache support (based on a patch by
1935 Luke Howard lukeh@padl.com)
1937 2008-03-12 Mark Probst <mark.probst@gmail.com>
1939 * mini.c: Enable generic sharing of calls to non-static
1940 non-interface non-generic non-value-type methods.
1942 * mini-trampolines.c: Resolve calls from shared generic code.
1944 2008-03-11 Zoltan Varga <vargaz@gmail.com>
1946 * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
1948 * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
1950 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
1952 * mini.c: some fixes for the AOT compiler.
1954 2008-03-07 Zoltan Varga <vargaz@gmail.com>
1956 * cpu-amd64.md: Add clob:1 to some float opcodes.
1958 2008-03-07 Rodrigo Kumpera <rkumpera@novell.com>
1960 * mini.h: Added MiniVerifierMode enumeration.
1962 * mini.c: Added mini_verifier_set_mode to control
1963 the usage of the new verifier.
1965 * mini.c (mono_method): Integrated the new verifier.
1967 * driver.c: Extended --security option with validil and
1968 verifiable options to activate the new verifier.
1970 2008-03-07 Zoltan Varga <vargaz@gmail.com>
1972 * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation
1973 optimization to ctors taking 0 or 2 arguments too.
1975 * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
1978 * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
1980 * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
1982 2008-03-06 Zoltan Varga <vargaz@gmail.com>
1984 * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
1985 non-aot case as well.
1987 * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
1989 * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
1992 * aot-compiler.c (encode_patch): Ditto.
1994 * mini.h (G_MININT32): Fix the definition of this.
1996 2008-03-05 Zoltan Varga <vargaz@gmail.com>
1998 * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
2000 * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
2002 2008-03-04 Zoltan Varga <vargaz@gmail.com>
2004 * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for
2005 methods returning vtypes in registers.
2006 (mono_arch_allocate_vars): Ditto.
2008 * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
2010 * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().
2012 * generics.cs: Add a test from the linear IR branch.
2014 * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
2016 * mini.c (inline_method): Cache failed inline attempts.
2018 2008-03-04 Mark Probst <mark.probst@gmail.com>
2020 * mini.c: For shared methods of generic classes put the location
2021 of "this" into the MonoGenericJitInfo.
2023 * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
2024 register out of a MonoContext by register number. Add the generic
2025 sharing context as an argument to mono_arch_find_this_argument().
2027 * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
2028 mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
2029 for new arch function.
2031 * mini-exception.c: Handle open exception clauses in shared
2034 * mini-trampolines.c: Supply additional argument to
2035 mono_arch_find_this_argument().
2037 2008-03-04 Zoltan Varga <vargaz@gmail.com>
2039 * Makefile.am (regtests): Run the bench.exe tests last.
2041 2008-03-03 Zoltan Varga <vargaz@gmail.com>
2043 * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
2046 2008-03-02 Zoltan Varga <vargaz@gmail.com>
2048 * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
2051 * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
2053 * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
2055 * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
2056 whose class has no cctor.
2058 * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
2060 2008-03-01 Zoltan Varga <vargaz@gmail.com>
2062 * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
2065 2008-02-29 Zoltan Varga <vargaz@gmail.com>
2067 * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
2068 to be in sync with the code on the linear IR branch.
2070 * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
2072 * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
2074 2008-02-27 Zoltan Varga <vargaz@gmail.com>
2076 * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
2078 * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
2080 * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
2082 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
2084 * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
2086 * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
2089 2007-11-14 Yoichi NAKAYAMA <nakayama@pixela.co.jp>
2091 * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
2092 OP_LOADR4_MEMBASE emission.
2094 * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
2095 (mono_spillvar_offset_float): Ditto.
2097 * mini-mips.c (mono_arch_emit_prolog): Ditto.
2099 * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
2102 * basic-long.cs: Add regression tests for them.
2104 * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
2106 (mono_arch_allocate_vars): Fix representation of single-precision float
2108 (mono_arch_output_basic_block): Ditto.
2110 * inssel-mips.brg: Ditto, remove duplicate items.
2112 * mini-mips.c (emit_load_volatile_arguments): New function to handle
2113 arguments of tail calls as on other platforms.
2114 (mono_arch_output_basic_block): Handle tail calls.
2116 * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
2119 * objects.cs (test_5_pass_static_struct): Add test for it.
2121 Contributed under MIT/X11 license.
2123 2008-02-26 Zoltan Varga <vargaz@gmail.com>
2125 * Makefile.am: Use gmcs for compiling the regression tests.
2127 * *.2.cs *.2.il: Rename to *.cs and *.il.
2129 2008-02-24 Zoltan Varga <vargaz@gmail.com>
2131 * regalloc.h: Make the vassign array smaller.
2133 * mini.c (mini_method_compile): Remove an unused field in cfg.
2135 * mini-codegen.c: Add a bunch of micro optimizations.
2137 2008-02-23 Zoltan Varga <vargaz@gmail.com>
2139 * regalloc.h: Remove some unused fields.
2141 2008-02-22 Zoltan Varga <vargaz@gmail.com>
2143 * mini-amd64.c (mono_arch_patch_code): Fix a warning.
2145 * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
2147 2008-02-22 Mark Probst <mark.probst@gmail.com>
2149 * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
2151 * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
2152 trampoline: Fetch an entry from the runtime generic context. If
2153 it's NULL, jump to the actual trampoline to fill the runtime
2154 generic context. Otherwise, return it.
2156 * mini.c: Call the lazy fetch trampoline to get entries out of the
2157 runtime generic context.
2159 * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
2160 tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
2161 tramp-sparc.c: Stubs for the lazy fetch trampoline.
2163 2008-02-21 Mark Probst <mark.probst@gmail.com>
2165 * mini.c: Fetch data out of the extensible part of the runtime
2166 generic context instead of calling a helper function.
2168 * generic-sharing.c: Some functions moved into
2169 metadata/generic-sharing.c. Helper function for fetching other
2170 types now checks and asserts against extensible rgctx (just for
2171 debugging purposes - the helper function isn't called anymore
2172 unless for debugging).
2174 2008-02-21 Zoltan Varga <vargaz@gmail.com>
2176 * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
2177 for tail calls up to the point that the tests in iltests.exe run. Also add a
2178 dummy CKFINITE implementation.
2179 (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
2180 needed for trampoline LMF frames.
2182 * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for
2183 trampoline LMF frames.
2185 2008-02-21 Rodrigo Kumpera <rkumpera@novell.com>
2187 * mini.c (inline_method): clean any pending loader error when inlining fail.
2188 Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
2190 2008-02-21 Zoltan Varga <vargaz@gmail.com>
2192 * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
2194 * aot-runtime.c (decode_patch_info): Ditto.
2196 * mini.c (mono_resolve_patch_target): Ditto.
2198 * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
2201 * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
2203 * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
2204 if it references an icall address.
2206 2008-02-20 Zoltan Varga <vargaz@gmail.com>
2208 * cpu-s390x.md: Remove some more unused opcodes.
2210 * cpu-s390x.md: Remove some unused opcodes.
2212 * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
2213 mono_op_imm_to_op ().
2215 * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
2216 instead of a switch statement.
2218 * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
2219 the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
2221 * mini-codegen.c: Eliminate rassign macro which is no longer needed.
2223 * mini-codegen.c: Remove unused mono_regstate2_... functions.
2225 * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
2228 2008-02-19 Zoltan Varga <vargaz@gmail.com>
2230 * driver.c (mono_main): Improve error reporting when an assembly cannot be
2231 opened. Fixes #362607.
2233 * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
2235 * iltests.il.in: Add a test for static methods in interfaces.
2237 2008-02-18 Zoltan Varga <vargaz@gmail.com>
2239 * genmdesc.c (build_table): Fix a crash on older glib versions.
2241 * cpu-sparc.md: Remove some unused opcodes.
2243 * genmdesc.c: Error out if the .md contains CEE_ opcodes if
2244 MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
2246 * cpu-amd64.md: Remove some unused opcodes.
2248 * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
2249 like the other opcodes.
2251 2008-02-17 Zoltan Varga <vargaz@gmail.com>
2253 * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
2255 * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
2257 * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
2258 variables 'cfg' instead of 'm' for consistency.
2260 * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
2262 * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
2263 argument holding the vtype return address, to avoid the ambigious use of
2264 cfg->ret for this purpose.
2266 * mini.c (NEW_RETLOADA): Use vret_addr if set.
2268 * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
2270 * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
2271 new mono_print_ins () function which only takes one argument.
2273 2008-02-15 Zoltan Varga <vargaz@gmail.com>
2275 * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
2278 2008-02-14 Zoltan Varga <vargaz@gmail.com>
2280 * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
2282 * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
2284 * mini-x86.c: Sync with the version on the linear IR branch by adding new
2285 opcodes and other small changes.
2287 * mini-ops.h: Add some new opcodes from the linear IR branch.
2289 * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
2291 * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
2292 opcodes, use the REG_MEMBASE opcodes instead.
2294 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
2295 opcodes, use the REG_MEMBASE opcodes instead.
2297 * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
2300 * mini.c (mono_op_imm_to_op): New helper function.
2302 * mini-ops.h: Add some opcodes from linear IR branch.
2304 2008-02-13 Zoltan Varga <vargaz@gmail.com>
2306 * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov
2309 2008-02-12 Zoltan Varga <vargaz@gmail.com>
2311 * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to
2314 * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
2316 2008-02-09 Zoltan Varga <vargaz@gmail.com>
2318 * aot-compiler.c (emit_method_code): Add an assert.
2320 * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
2321 the IMT code so it is AOT friendly. Enable AOT for methods which call interface
2324 2008-02-08 Zoltan Varga <vargaz@gmail.com>
2326 * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for
2327 some load/store opcodes so they are consistent.
2328 (mono_arch_emit_prolog): Simplify some code.
2330 * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
2332 * objects.cs: Add tests for large argument offsets on ARM.
2334 * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large
2335 stack offsets. Fixes #359651.
2337 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
2339 * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
2341 * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
2343 * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
2345 * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
2347 * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
2348 rid of CEE_CONV_R_UN.
2350 * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
2352 2008-02-07 Zoltan Varga <vargaz@gmail.com>
2354 * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
2356 * mini.c (mono_normalize_opcodes): Add some more opcodes.
2358 * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
2360 * cpu-amd64.md: Remove some unused opcodes.
2362 * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
2364 * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
2366 * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make
2367 arch specific functions for its parts. Call the peephole pass after local
2368 regalloc so the prolog can compute a more accurate max_offset.
2370 * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
2371 the corresponding OP_I/OP_L opcodes.
2373 * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
2375 * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
2377 2008-02-06 Zoltan Varga <vargaz@gmail.com>
2379 * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
2380 as they are handled in mini.c.
2382 * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
2384 * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
2385 case since it is handled in mini.c.
2387 * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
2389 * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
2391 * *.c: Use the new opcodes in the IR and back end code.
2393 * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
2395 * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
2397 2008-02-06 Mark Probst <mark.probst@gmail.com>
2399 * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
2400 an assert because it has a race condition.
2402 2008-02-06 Zoltan Varga <vargaz@gmail.com>
2404 * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
2406 * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
2408 * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
2410 * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
2411 use OP_MOVE/OP_FMOVE/OP_ICONST instead.
2413 2008-02-05 Zoltan Varga <vargaz@gmail.com>
2415 * cpu-amd64.md (move): Correct the maximum size of move.
2417 2008-02-05 Mark Probst <mark.probst@gmail.com>
2419 * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
2420 the generic class init trampoline to return quickly if the class
2423 2008-02-04 Zoltan Varga <vargaz@gmail.com>
2425 * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
2426 issues where an 32 bit callsite cannot be patched by a 64 bit address.
2428 2008-02-03 Zoltan Varga <vargaz@gmail.com>
2430 * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
2433 2008-01-31 Zoltan Varga <vargaz@gmail.com>
2435 * objects.cs: Add some soft-float tests.
2437 * mini.c: Fix a couple more soft-float issues.
2439 * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
2441 * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
2444 2008-01-30 Zoltan Varga <vargaz@gmail.com>
2446 * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
2447 exception happens while compiling a virtual method.
2449 2008-01-29 Zoltan Varga <vargaz@gmail.com>
2451 * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
2453 * mini-sparc.c: Fix build.
2455 * mini-sparc.c (get_call_info): Add support for generic sharing.
2457 * mini-exceptions.c: Add a FIXME.
2459 2008-01-27 Zoltan Varga <vargaz@gmail.com>
2461 * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
2462 altstack handling code.
2464 * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
2466 * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
2468 * mini-s390.c: Add support for generic sharing.
2470 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
2472 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2474 * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
2476 * mini-s390x.c: Add support for generic sharing.
2478 * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame):
2480 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
2482 * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
2483 can be used since it takes a 16 bit signed immediate.
2485 * inssel-s390x.brg: Fix OP_SETRET.
2487 * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
2489 * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
2491 * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
2493 * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
2495 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
2498 * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline
2501 * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
2502 of the unused mono_arch_patch_delegate_trampoline stuff.
2504 2008-01-26 Zoltan Varga <vargaz@gmail.com>
2506 * basic-long.cs: Move the fp related tests to basic-float.cs.
2508 * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
2510 * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
2512 * basic-calls.cs: Add a test for proper float argument passing.
2514 * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
2515 if the context corresponds to an exception received through a signal.
2517 * exceptions.cs: Add a test for nullref handling at the start of a try
2520 * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
2522 * jit-icalls.c (mono_break): New JIT icall.
2524 * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
2526 * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
2528 2008-01-25 Zoltan Varga <vargaz@gmail.com>
2530 * cpu-*.md: Get rid of unused opcodes.
2532 * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
2534 * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
2537 * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
2540 * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
2541 the arch independent trampoline code in mini-trampolines.c.
2543 * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
2545 * mini.c (get_runtime_generic_context_ptr): Fix a warning.
2547 * mini-s390.h: Remove an unused define.
2549 * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
2550 the arch independent trampoline code in mini-trampolines.c.
2552 * mini-arm.c (mono_arch_emit_prolog): Fix build.
2554 2008-01-24 Zoltan Varga <vargaz@gmail.com>
2556 * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
2558 * mini-s390.c (mono_arch_emit_prolog): Fix build.
2560 * mini-s390x.c (mono_arch_emit_prolog): Fix build.
2562 * mini-ppc.c (mono_arch_emit_prolog): Fix build.
2564 * cpu-amd64.md: Use smaller sizes for int opcodes.
2566 * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
2568 * *.cs: Add some tests from the linear-ir branch. Move structs tests to
2571 * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
2574 * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
2575 instead of though a pointer to save an indirection when accessing elements of
2578 * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
2580 (NOT_IMPLEMENTED): New helper macro.
2581 (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
2584 * *.c: Use the new helper macro.
2586 2008-01-21 Zoltan Varga <vargaz@gmail.com>
2588 * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
2590 2008-01-20 Zoltan Varga <vargaz@gmail.com>
2592 * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
2595 2008-01-18 Zoltan Varga <vargaz@gmail.com>
2597 * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
2598 profiling is enabled.
2600 * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
2602 (mono_arch_emit_prolog): Add more first bblock optimizations.
2604 * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
2605 in order if possible.
2606 (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
2607 bblock, since the arguments are still in their original registers.
2609 * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
2611 2008-01-17 Zoltan Varga <vargaz@gmail.com>
2613 * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
2616 * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
2619 * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
2621 * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to
2622 process async exceptions received while in unmanaged code.
2624 * mini.c (mini_init): Install a callback with the runtime which will be called
2625 when a thread receives an async exception while in unmanaged code.
2627 * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
2629 * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
2631 2008-01-16 Wade Berrier <wberrier@novell.com>
2638 2008-01-16 Zoltan Varga <vargaz@gmail.com>
2640 * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
2641 compilation with sun cc.
2643 * cpu-*.md: Fix the build.
2645 * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
2647 * mini-amd64.h: Add some comments to the MonoLMF structure.
2649 * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
2651 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
2652 in the LMF structure if possible. This saves two instructions in the
2653 managed->native wrappers.
2655 * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
2657 2008-01-16 Mark Probst <mark.probst@gmail.com>
2659 * generic-sharing.c: New type argument lookup code which uses the
2660 runtime generic context template.
2662 2008-01-15 Zoltan Varga <vargaz@gmail.com>
2664 * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
2666 * mini-arm.c (add_general): Fix arm eabi parameter passing.
2667 (mono_arch_output_basic_block): Fix localloc implementation.
2669 * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
2671 * mini-ia64.c (peephole_pass): Fix ia64 build.
2673 * mini-amd64.c (peephole_pass): Fix a warning.
2675 * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
2676 at a constant offset from sp/fp.
2678 * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
2679 instead of obtaining it from *lmf in the managed method case.
2681 2008-01-14 Zoltan Varga <vargaz@gmail.com>
2683 * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
2685 Mon Jan 14 12:33:06 CET 2008 David S. Miller <davem@davemloft.net>
2687 * mini.h (MonoInstList): New type.
2688 (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
2689 __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
2690 MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
2691 __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
2692 MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
2693 MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
2694 MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
2695 MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
2696 MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
2697 MONO_INST_LIST_FOR_EACH_PREV_SAFE,
2698 MONO_INST_LIST_FOR_EACH_ENTRY,
2699 MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
2700 MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
2701 mono_inst_list_first, mono_inst_list_last,
2702 mono_inst_list_next, mono_inst_list_prev): New instruction
2703 list handling interfaces.
2704 (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
2705 list head 'ins_list'.
2706 (MonoInst): Replace next pointer with list head 'node'.
2707 (MonoCallInst): Make 'out_args' a MonoInstList.
2708 (MONO_INST_NEW_CALL): Explicitly init ->out_args.
2709 (MonoCompile): Delete reverse_inst_list and
2710 reverse_inst_list_len.
2711 * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
2712 mono_arch_lowering_pass, mono_arch_local_regalloc,
2713 mono_arch_output_basic_block, mono_arch_emit_prolog):
2714 Convert to new instruction lists.
2715 (insert_after_ins): Delete.
2716 * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
2718 * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
2719 * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
2720 split_bblock, mono_add_ins_to_end, mono_emit_call_args,
2721 mono_emulate_opcode, mono_emit_load_got_addr,
2722 inline_method, mono_method_to_ir, mono_print_bb_code,
2723 print_dfn, decompose_pass, nullify_basic_block,
2724 replace_out_block_in_code, remove_block_if_useless,
2725 merge_basic_blocks, move_basic_block_to_end,
2726 try_unsigned_compare, optimize_branches, mono_print_code,
2727 mini_select_instructions, remove_critical_edges): Likewise.
2728 * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
2729 peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
2730 mono_arch_output_basic_block, mono_arch_emit_prolog):
2732 * mini-mips.c (mono_arch_call_opcode, peephole_pass,
2733 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2734 mono_arch_output_basic_block): Likewise.
2735 (inst_list_prepend, insert_after_ins): Delete.
2736 * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
2737 MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
2739 * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
2740 peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
2741 mono_arch_emit_prolog): Likewise.
2742 * cfold.c (mono_constant_fold): Likewise.
2743 * liveness.c (visit_bb, mono_analyze_liveness,
2744 optimize_initlocals): Likewise.
2745 * ssapre.c (dump_code, process_bb, code_motion): Likewise.
2746 * graph.c (mono_draw_code_cfg): Likewise.
2747 * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
2748 mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
2749 mono_ssa_cprop): Likewise.
2750 * abcremoval (get_relations_from_previous_bb, process_block):
2752 * local-propagation (mono_cprop_invalidate_values,
2753 mono_local_cprop_bb): Likewise.
2754 * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
2755 peephole_pass, mono_arch_output_basic_block,
2756 mono_arch_emit_prolog): Likewise.
2757 * mini-arm.c (mono_arch_call_opcode, peephole_pass,
2758 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2759 mono_arch_emit_prolog): Likewise.
2760 (insert_after_ins): Delete.
2761 * aliasing.c (print_code_with_aliasing_information,
2762 mono_build_aliasing_information, mono_aliasing_deadce):
2763 Convert to new instruction lists.
2764 * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
2765 peephole_pass, NEW_INS, mono_arch_lowering_pass,
2766 mono_arch_local_regalloc, mono_arch_output_basic_block):
2768 (insert_after_ins): Delete.
2769 * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
2770 peephole_pass, mono_arch_output_basic_block): Convert to
2771 new instruction lists.
2772 * mini-codegen (InstList, inst_list_prepend,
2773 insert_after_ins): Delete.
2774 (insert_before_ins, get_register_force_spilling,
2775 get_register_spilling, free_up_ireg, free_up_reg,
2776 create_copy_ins, create_spilled_store, alloc_int_reg,
2777 alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
2778 to new instruction lists.
2779 * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
2780 NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
2781 mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
2782 (insert_after_ins): Delete.
2783 * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
2784 mono_arch_local_regalloc, mono_arch_output_basic_block,
2785 mono_arch_call_opcode): Convert to new instruction lists.
2786 (insert_after_ins): Delete.
2787 * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
2788 peephole_pass, mono_arch_output_basic_block,
2789 mono_arch_emit_prolog): Convert to new instruction lists.
2791 2008-01-11 Zoltan Varga <vargaz@gmail.com>
2793 * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
2795 * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
2798 * Makefile.am (version.h): Make this work with non-bash shells.
2800 2008-01-10 Zoltan Varga <vargaz@gmail.com>
2802 * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
2804 2008-01-08 Zoltan Varga <vargaz@gmail.com>
2806 * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in
2807 the InitializeArray optimization.
2809 2008-01-06 Zoltan Varga <vargaz@gmail.com>
2811 * mini.c driver.c: Don't include os/gc_wrapper.h.
2813 2008-01-05 Zoltan Varga <vargaz@gmail.com>
2815 * mini.c (print_jit_stats): Print GC statistics if available.
2817 2008-01-04 Zoltan Varga <vargaz@gmail.com>
2819 * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
2821 2007-12-29 Zoltan Varga <vargaz@gmail.com>
2823 * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
2825 2007-12-26 Zoltan Varga <vargaz@gmail.com>
2827 * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
2829 * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
2831 * driver.c (mono_main): Ditto.
2833 2007-12-23 Zoltan Varga <vargaz@gmail.com>
2835 * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
2837 * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
2838 in the vtable can't be encoded.
2839 (compile_method): Ditto.
2841 2007-12-21 Zoltan Varga <vargaz@gmail.com>
2843 * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
2846 * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to
2849 * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
2850 the top LMF entry belongs to the current method.
2852 * mini.c: Update after renaming of mono_thread_get_pending_exception ().
2854 2007-12-20 Zoltan Varga <vargaz@gmail.com>
2856 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
2858 * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
2860 * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
2862 * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
2864 * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
2866 * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double
2869 * basic-float.cs: Add an ulong->double cast test.
2871 2007-12-15 Zoltan Varga <vargaz@gmail.com>
2873 * mini.c (mono_method_to_ir): Fix a warning.
2875 2007-12-14 Zoltan Varga <vargaz@gmail.com>
2877 * mini-ops.h: Add OP_SWITCH.
2879 * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
2880 CEE_SWITCH in back-end code, use OP_SWITCH instead.
2882 2007-12-11 Geoff Norton <gnorton@novell.com>
2884 * mini-s390x.c: Minor change to the MAX() define to allow
2885 it to compile with other gcc versions.
2887 2007-12-11 Geoff Norton <gnorton@novell.com>
2890 * mini-s390x.c: Implement sext_i4 to fix the build on s390x
2892 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
2894 exceptions-arm.c (mono_arch_get_restore_context): Restore
2897 exceptions-arm.c (throw_exception): Save the frame pointer.
2898 This is a partial fix for #323747. Only the client side is
2901 2007-12-11 Rodrigo Kumpera <rkumpera@novell.com>
2903 * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
2904 was using an unrelated variable to log the class which
2905 needed the cctor to be called. This was crashing on arm.
2907 2007-12-09 Robert Jordan <robertj@gmx.net>
2909 * mini-x86.c (mono_arch_emit_epilog):
2910 Consider all kinds of 64-bit types. Fixes #323114.
2912 2007-12-08 Zoltan Varga <vargaz@gmail.com>
2914 * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
2916 2007-12-07 Zoltan Varga <vargaz@gmail.com>
2918 * mini-amd64.c (peephole_pass): Add a missing instruction check.
2920 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
2922 * mini.c: run type ctor before allocating an object, not only
2923 when running it's constructor method (fixes at least part of bug #342507).
2925 2007-12-07 Zoltan Varga <vargaz@gmail.com>
2927 * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
2929 * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
2930 * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable ()
2933 * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
2934 mono_generic_class_init_trampoline () the same as it is done with the other
2937 * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md
2938 aot-runtime.c aot-compiler.c: Implement AOT support.
2940 2007-12-07 Mark Probst <mark.probst@gmail.com>
2942 * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
2943 build for archs which don't have the vtable trampoline defined
2946 2007-12-07 Zoltan Varga <vargaz@gmail.com>
2948 * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
2950 * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
2952 * mini-trampolines.c (mono_get_trampoline_func): New helper function.
2954 * tramp-<ARCH>.c: Use the new helper function.
2956 2007-12-07 Mark Probst <mark.probst@gmail.com>
2958 * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
2959 trampoline call, which takes a vtable argument.
2961 * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
2962 OP_TRAMPCALL_VTABLEs like other calls.
2964 * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
2965 register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
2966 call. Implemented a support function which fetches the vtable
2967 from a register set.
2969 * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
2970 Implemented a generic class init trampoline, using the
2971 OP_TRAMPCALL_VTABLE opcode.
2973 * mini.c: Implemented static field access when sharing generic
2974 code. This implies initing the class using the new
2975 OP_TRAMPCALL_VTABLE call.
2977 2007-12-07 Mark Probst <mark.probst@gmail.com>
2979 * mini.c: Don't compile methods with sharing enabled if their
2980 classes are disabled for sharing.
2982 2007-12-06 Zoltan Varga <vargaz@gmail.com>
2984 * inssel.brg: Add a missing sign extension to the GETCHR and array access
2985 opcodes. Fixes #346563.
2987 * objects.cs: Add a new test.
2989 * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
2991 * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
2992 HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
2994 2007-12-06 Zoltan Varga <vargaz@gmail.com>
2996 * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
2998 2007-12-03 Zoltan Varga <vargaz@gmail.com>
3000 * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
3003 2007-12-02 Zoltan Varga <vargaz@gmail.com>
3005 * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
3007 * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation
3008 optimization in the AOT case.
3010 2007-11-30 Zoltan Varga <vargaz@gmail.com>
3012 * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
3014 * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
3016 * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
3018 * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
3020 * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
3021 is created by the inlined delegate ctor.
3023 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
3025 * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
3027 2007-11-29 Zoltan Varga <vargaz@gmail.com>
3029 * cpu-x86.md: Fix the length of ckfinite.
3031 2007-11-28 Zoltan Varga <vargaz@gmail.com>
3033 * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
3035 * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
3036 (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
3038 * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
3040 * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the
3041 OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
3043 2007-11-28 Martin Baulig <martin@ximian.com>
3046 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
3047 after creating the trampoline.
3049 2007-11-27 Zoltan Varga <vargaz@gmail.com>
3051 * aot-runtime.c (load_aot_module): Check runtime version if needed.
3053 * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
3056 * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
3057 instead of the calling method to help AOT.
3059 * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
3061 2007-11-26 Zoltan Varga <vargaz@gmail.com>
3063 * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
3066 2007-11-23 Zoltan Varga <vargaz@gmail.com>
3068 * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
3070 * aot-compiler.c (compile_method): Correct check for generic method definitions.
3071 (encode_method_ref): No need to handle generic method definitions specially.
3073 * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3075 * aot-runtime.c (decode_klass_ref): Clean this up and rename from
3078 * aot-compiler.c (encode_klass_ref): Clean this up and rename from
3080 (compile_method): Enable generic sharing.
3082 2007-11-22 Zoltan Varga <vargaz@gmail.com>
3084 * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
3085 (mini_method_compile): Add preliminary support for AOTing shared generic code.
3087 * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
3090 * mini-trampolines.c: Fix a warning.
3092 * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
3094 (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
3095 (generic_class_is_reference_type): Remove unused function.
3097 * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
3098 in the generic vtable trampoline case.
3100 * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
3102 * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
3103 return an AOT method based on a vtable slot.
3105 * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
3107 * mini.c (mini_get_vtable_trampoline): Export this.
3109 2007-11-22 Martin Baulig <martin@ximian.com>
3112 (MonoDebuggerInfo): Move `debugger_version' up.
3114 2007-11-22 Martin Baulig <martin@ximian.com>
3117 (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
3119 * mini-trampolines.c
3120 (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
3121 after compiling the method.
3123 2007-11-20 Martin Baulig <martin@ximian.com>
3126 (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
3127 (mono_debugger_remove_breakpoint): Likewise.
3128 (mono_debugger_check_breakpoints): Likewise.
3130 * debug-debugger.c: Implement the new breakpoint interface here.
3132 2007-11-18 Zoltan Varga <vargaz@gmail.com>
3134 * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
3135 CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
3137 * mini-x86.c (mono_arch_output_basic_block): Ditto.
3139 2007-11-17 Zoltan Varga <vargaz@gmail.com>
3141 * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
3143 * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
3146 * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
3149 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
3150 returning a vtype in a register.
3152 * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
3153 here from the arch specific code.
3155 * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
3158 * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
3159 (mono_arch_emit_prolog): Increment maximum prolog size.
3161 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
3162 START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
3164 * mini-x86.c (get_call_info): Receive a MonoCompile instead of a
3165 MonoGenericSharingContext.
3167 * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a
3168 MonoGenericSharingContext. Allocate memory from the cfg mempool.
3170 2007-11-15 Mark Probst <mark.probst@gmail.com>
3172 * mini.c, mini.h, generic-sharing.c: Functions for producing code
3173 which extract fields out of the runtime generic context. Full
3174 sharing of the NEWARR opcode.
3176 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
3178 * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
3179 --enable-minimal=ssa.
3181 2007-11-13 Zoltan Varga <vargaz@gmail.com>
3183 * mini-trampolines.c (mono_delegate_trampoline): Update after
3184 mono_marshal_get_delegate_invoke () signature change.
3186 2007-11-13 Mark Probst <mark.probst@gmail.com>
3188 * mini.c: Removed the shared context in favor of the generic
3189 sharing context. Allocate the MonoJitInfo structure with room for
3190 the generic sharing context if it's needed.
3192 * mini.h: Remove MonoGenericSharingContext declaration. It's in
3193 domain-internals.h now.
3195 * mini-x86.c: Pass the generic sharing context to get_call_info ().
3197 * generic-sharing.c: Several changes for working without a shared
3198 context and instead operating on open types instead.
3200 2007-11-12 David S. Miller <davem@davemloft.net>
3202 * inssel-sparc.brg: Fix double instruction emit.
3204 2007-11-12 Zoltan Varga <vargaz@gmail.com>
3206 * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array
3207 Get/Set/Address methods.
3209 * mini.c debug-debugger.c mini-trampolines.c: Update after
3210 mono_marshal_get_delegate_invoke signature change.
3212 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
3214 * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
3215 This can happens with dynamic methods. Fixes the other bug in #322722.
3217 2007-11-12 Rodrigo Kumpera <rkumpera@novell.com>
3219 * tramp-arm.c (mono_arch_patch_callsite): Support patching
3222 * mini-arm.c (arm_patch): Implement patching of BX call
3223 sequence. Fixes one of the bugs in #322722.
3225 2007-11-03 David S. Miller <davem@huronp11.davemloft.net>
3227 * mini-sparc.c (mono_arch_flush_icache): Make more efficient
3228 under Linux. We only need to flush every 32-byte cache line.
3230 2007-11-07 Massimiliano Mantione <massi@ximian.com>
3233 move_basic_block_to_end: Add branches when needed, eventually creating
3235 optimize_branches: added a parameter that tells if it's ok to create
3236 new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
3237 and avoid calling move_basic_block_to_end when it's not ok.
3240 2007-11-07 Mark Probst <mark.probst@gmail.com>
3242 * mini.c: Abort inlining call to InitializeArray if something
3243 looks wrong. Let the icall handle it, which now has proper safety
3246 2007-11-05 Rodrigo Kumpera <rkumpera@novell.com>
3248 * mini.c (mono_spill_call): add support for soft-float.
3250 * mini.c (mono_method_to_ir): add support for soft-float
3251 to inlined functions that return float.
3253 * mini.c (mono_method_to_ir): add support for soft-float
3254 to cee_stsfld opcode on float fields.
3256 2007-11-05 Geoff Norton <gnorton@novell.com>
3258 * mini-x86.h: Fix the structure access for X86 Leopard.
3261 2007-11-05 Martin Baulig <martin@ximian.com>
3263 * mini-trampolines.c
3264 (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
3265 after compiling the method to notify the debugger.
3267 2007-11-05 Martin Baulig <martin@ximian.com>
3269 * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
3271 2007-11-02 Zoltan Varga <vargaz@gmail.com>
3273 * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
3274 David Miller <davem@davemloft.net>. Allow larger offsets in branches.
3276 2007-11-01 Zoltan Varga <vargaz@gmail.com>
3278 * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
3279 native-to-managed wrappers.
3281 2007-11-01 Geoff Norton <gnorton@novell.com>
3283 * mini-ppc.h, mini-x86.h: Handle Leopards renaming of some structure
3286 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
3288 * mini.c, mini-x86.c: when getting back from unmanaged code
3289 to managed via a marshaled delegate we also need to set the
3292 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
3294 * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
3297 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
3299 * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
3300 let the debugger or other external agents to tell the JIT when
3301 a sw breakpoint has been inserted in the code that the JIT needs
3302 to be able to inspect.
3304 2007-10-31 Martin Baulig <martin@ximian.com>
3307 (MonoDebuggerInfo): Remove `runtime_class_init'.
3309 2007-10-30 Martin Baulig <martin@ximian.com>
3312 (mono_debugger_thread_created): Added `MonoThread *' argument.
3313 (mono_debugger_extended_notification): New public method.
3314 (mono_debugger_trampoline_compiled): New public method.
3317 (MonoDebuggerThreadInfo): Added `thread' and
3318 `extended_notifications' fields.
3321 (debugger_executable_code_buffer): New static variable.
3324 (MonoDebuggerInfo): Added `executable_code_buffer',
3325 `executable_code_buffer_size', `breakpoint_info_area',
3326 `breakpoint_table' and `breakpoint_table_size'.
3328 2007-10-26 Rodrigo Kumpera <rkumpera@novell.com>
3330 * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
3331 that IP either is an unused value or the vtable pointer. IMT
3332 calls use vtable + offset now. Reduced by almost half the size
3335 2007-10-26 Jonathan Chambers <joncham@gmail.com>
3337 * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
3338 defines to access param registers. Replace long usage with
3339 gsize as sizeof(long) != sizeof(void*) on Win64.
3341 * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
3342 on Win64. Fix intrinsic, use _AddressOfReturnAddress
3343 instead of non-existant _GetAddressOfReturnAddress.
3345 * tramp-amd64.c: Use AMD64_ARG_REG# defines to access
3346 param registers. Save/restore %rdi and %rsi in MonoLMF.
3348 * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access
3349 param registers. Modify (throw_exception) signature to take
3350 %rdi and %rsi on Win64.
3352 Code is contributed under MIT/X11 license.
3354 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
3356 * helpers.c: unlink debugging output files.
3358 2007-10-25 Zoltan Varga <vargaz@gmail.com>
3360 * mini.c: Move mono_create_ftnptr () to object.c.
3362 2007-10-24 Rodrigo Kumpera <rkumpera@novell.com>
3364 * helpers.c (mono_disassemble_code): MonoCompile parameter is now
3365 optional. This function can now be used to disassemble code generated
3366 outside the JIT such as trampolines and IMT thunks.
3368 * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
3370 * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
3371 vtable pointer from a ldr instruction.
3373 * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
3374 new IMT call sequence.
3376 * mini-arm.c (mono_arch_output_basic_block): emit the IMT
3377 call sequence for interface invocations.
3379 * mini-arm.c (mono_arch_emit_imt_argument): added, required
3380 for imt support. This function is empty since IMT on ARM requires no
3381 special handling on the IR side.
3383 * mini-arm.c (mono_arch_find_imt_method): added, required for
3386 * mini-arm.c (mono_arch_find_this_argument): added, required
3389 * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
3390 a ldr instruction to load a value stored in the code stream.
3392 * mini-arm.c (mono_arch_build_imt_thunk):added, required
3396 2007-10-23 Zoltan Varga <vargaz@gmail.com>
3398 * mini.c (mini_init): Install the jump trampoline callback.
3400 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3402 * mini-trampolines.c: handle synchronized methods with the common
3403 vtable trampoline (bug #335601).
3405 2007-10-17 Zoltan Varga <vargaz@gmail.com>
3407 * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
3409 * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
3412 * mini-ia64.h mini-ia64.c: Add support for IMT.
3414 * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
3415 prolog. Fixes #331958.
3417 2007-10-15 Zoltan Varga <vargaz@gmail.com>
3419 * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
3421 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3423 * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
3426 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3428 * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
3431 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
3433 * mini-x86.c, mini-x86.h: x86 support for the common vtable
3436 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
3438 * mini-trampolines.c: changed the magic rampoline to understand
3439 the common vtable trampoline method: the method to invoke is
3440 determined by the vtable displacement of the call.
3442 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
3444 * mini.c, mini.h: register the common vtable trampoline if the
3445 architecture supports it.
3447 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
3449 * cpu-amd64.md: use the correct max length for tls_get.
3451 2007-10-14 Zoltan Varga <vargaz@gmail.com>
3453 * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
3454 CEE_STELEM_ANY. Fixes #333696.
3456 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
3458 * exceptions-x86.c: provide more graceful handling of the case where
3459 we followed a bogus function pointer from managed code (bug #332866).
3461 2007-10-11 Mark Probst <mark.probst@gmail.com>
3463 * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
3464 replaces the generic_shared flag and will carry more information
3467 * generic-sharing.c: Added mini_type_stack_size() which allows
3468 allows open types if given a generic sharing context.
3469 mini_get_basic_type_from_generic() takes a
3470 MonoGenericSharingContext* instead of a MonoCompile* now.
3472 * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
3473 mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
3474 mini-sparc.c, mini-x86.c: Trivial changes required by the two
3475 changes above. Just passing arguments through to the right
3478 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3480 * mini-arm.c: unify the call emission to emit_code_seq().
3482 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
3484 * tramp-arm.c: reduced the trampoline size.
3486 2007-10-10 Mark Probst <mark.probst@gmail.com>
3488 * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
3489 variable handling out of arch-specific code.
3491 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
3493 * mini-arm.c: implemented fast delegate dispatch.
3495 2007-10-09 Zoltan Varga <vargaz@gmail.com>
3497 * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
3498 that fp elimination is turned off if the space required by locals is too
3501 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
3503 * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
3504 ARM to the new style trampoline.
3506 2007-10-09 Zoltan Varga <vargaz@gmail.com>
3508 * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
3510 * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
3512 2007-10-09 Martin Baulig <martin@ximian.com>
3515 (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
3516 `field_info_offset_offset'.
3518 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
3520 * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
3521 removed more internal usage of the r11 register and made it available
3522 to the register allocator.
3524 2007-10-08 Mark Probst <mark.probst@gmail.com>
3526 * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
3527 when sharing generics and treat type variables as references.
3529 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3531 * mini-ppc.c: started removing the internal uses of register r11
3532 to eventually allow the register allocator to manage it as an
3533 additional available register.
3535 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
3537 * tramp-amd64.c: fixed memory corruption in the trampoline generation.
3539 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
3541 * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
3542 specific trampolines as they are not performance critical as a jump
3543 target (maybe align as before only for AOT code?). This saves about
3544 200 KB of native code on x86 for monodevelop startup.
3546 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
3548 * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
3549 monodevelop startup.
3551 2007-10-06 Zoltan Varga <vargaz@gmail.com>
3553 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
3555 * mini-sparc.h mini-sparc.c: Implement IMT support.
3557 * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
3558 its smaller and doesn't clobber sparc_g1.
3560 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
3562 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
3564 * mini-ppc.c: optimized the size of the IMT thunks a bit.
3566 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
3568 * mini-ppc.c: implemented fast delegate invocation.
3570 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
3572 * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
3574 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3576 * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
3577 code to the new style trampoline in preparation for IMT support.
3579 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
3581 * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
3582 systems already. This also reduces the specific trampiline sizes and
3583 prepares for the use of r12 as the IMT identifier register.
3585 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3587 * mini-mips.h: endianess fix (simplified from a patch by
3588 Thomas Kunze <thommy@tabao.de>, bug #323737).
3590 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
3592 * exceptions-ppc.c, mini-ppc.h: refactor to use macros
3593 to access ucontext fields and enable netbsd support
3594 (partially from Magnus Henoch <mange@freemail.hu>).
3596 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3598 * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
3599 use the preprocessor from the CPP env var if it is set.
3601 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
3603 * mini-trampolines.c: fixed an assertion and moved it earlier in the
3604 code, before interface_offset gets used.
3606 2007-10-02 Zoltan Varga <vargaz@gmail.com>
3608 * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
3609 mono_class_setup_vtable () before accessing klass->vtable.
3611 2007-10-01 Zoltan Varga <vargaz@gmail.com>
3613 * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
3616 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
3618 * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
3619 IMT slots (this saves hundreds of KB of memory in programs like
3620 IronPython and Monodevelop).
3622 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
3624 * mini.c: print the delegate counter.
3626 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
3628 * mini-x86.c: make it easier to enable the debugging code for IMT
3631 2007-09-28 Martin Baulig <martin@ximian.com>
3634 (MonoDebuggerMetadataInfo): Add `klass_image_offset',
3635 `mono_method_klass_offset' and `mono_method_token_offset'.
3637 2007-09-20 Mark Probst <mark.probst@gmail.com>
3639 * mini.c: First generics sharing implementation. Can only share
3640 in very simple cases. If sharing doesn't work it falls back to
3641 dedicated compilation.
3643 * mini.h: Flag in MonoCompile to specify whether generic
3644 compilation is shared. Flags enum for marking which generic inst
3645 of a context is used. Prototypes for helper functions.
3647 * generic-sharing.c: Helper functions for generic method sharing.
3649 * optflags-def.h: Optimization flag (gshared) for enabling generic
3650 method sharing added.
3652 * Makefile.am: generic-sharing.c added.
3654 2007-09-19 Daniel Nauck <dna@mono-project.de>
3656 * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
3658 2007-09-19 Massimiliano Mantione <massi@ximian.com>
3659 * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
3662 2007-09-19 Martin Baulig <martin@ximian.com>
3664 * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
3665 mono_debug_cleanup() is now part of mono_cleanup().
3667 2007-09-18 Zoltan Varga <vargaz@gmail.com>
3669 * driver.c (mono_main): Fix a warning.
3671 2007-09-17 Zoltan Varga <vargaz@gmail.com>
3673 * aot-compiler.c: Optimize various parts when processing large assemblies.
3676 * mini.c (mono_patch_info_hash): Improve hash function.
3678 2007-09-14 Jonathan Chambers <joncham@gmail.com>
3680 * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
3682 Code is contributed under MIT/X11 license.
3684 2007-09-14 Zoltan Varga <vargaz@gmail.com>
3686 * mini.c (mini_init): Fix a leak.
3688 * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
3690 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3692 * mini.c: redirect string.InternalAllocStr() to the managed allocator.
3694 2007-09-14 Zoltan Varga <vargaz@gmail.com>
3696 * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
3698 2007-09-13 Zoltan Varga <vargaz@gmail.com>
3700 * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
3703 * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
3705 * mini.c (handle_alloc): Enable managed allocators in AOT code.
3707 * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
3709 * aot-runtime.c (decode_patch_info): Ditto.
3711 2007-09-12 Jonathan Chambers <joncham@gmail.com>
3713 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
3714 static case. Cache delegates in architecture specific code,
3715 based on number of parameters.
3717 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
3718 in architecture specific code, based on number of parameters.
3720 * mini-trampolines.c (mono_delegate_trampoline): Architecture specific
3721 caching happen in architecture specific code now.
3723 Code is contributed under MIT/X11 license.
3725 2007-09-12 Jonathan Chambers <joncham@gmail.com>
3727 * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
3728 mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
3729 mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
3731 Code is contributed under MIT/X11 license.
3733 2007-05-15 Massimiliano Mantione <massi@ximian.com>
3734 * mini.c: (mono_thread_abort) Fixed bug #82416.
3736 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3738 * mini.: hook the new managed GC allocation feature into the JIT.
3740 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
3742 * mini.c: implementation for the new runtime tls opcode.
3744 2007-09-11 Martin Baulig <martin@ximian.com>
3747 (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
3748 `mono_method_inflated_offset'.
3750 2007-09-07 Zoltan Varga <vargaz@gmail.com>
3752 * driver.c mini.h mini.c: Add a new devel command line option for injecting
3753 async exceptions into a method.
3755 * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
3756 purpose of testing whenever the unwinder works at every instruction.
3758 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
3760 * mini.c: check accessibility of method used in ldftn (fixes
3763 2007-09-04 Zoltan Varga <vargaz@gmail.com>
3765 * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
3767 * inssel.brg: Fix a warning.
3769 2007-09-03 Martin Baulig <martin@ximian.com>
3771 * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
3772 now takes the `main_method' as argument.
3774 2007-09-02 Zoltan Varga <vargaz@gmail.com>
3776 * cpu-sparc.md (endfilter): Add missing src1:i argument.
3778 2007-08-30 Jonathan Chambers <joncham@gmail.com>
3780 * driver.c: include the cil-coff.h header on Windows.
3782 Code is contributed under MIT/X11 license.
3784 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
3786 * mini.c, driver.c: don't include the cil-coff.h header.
3788 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
3790 * mini.c: flag places that needs fixes fo soft-float support.
3792 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
3794 * mini.h, inssel-float.brg: fix soft-float constant loads on big
3795 endian systems (partially from Dean Jenkins, bug #81924).
3797 2007-08-28 Mark Probst <mark.probst@gmail.com>
3799 * mini.c (check_linkdemand): Remove embedded reference object in
3800 call to LinkDemandSecurityException.
3801 (mono_jit_compile_method_inner): Call LinkDemandSecurityException
3802 with an IntPtr instead of a reference object.
3804 2007-08-28 Zoltan Varga <vargaz@gmail.com>
3806 * mini.c (handle_initobj): Handle alignment properly.
3808 * inssel.brg (mini_emit_memset): Ditto.
3810 * inssel.brg (mini_emit_memcpy): Ditto.
3812 * inssel-sparc.brg: Ditto.
3814 * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
3816 2007-08-26 Zoltan Varga <vargaz@gmail.com>
3818 * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
3819 exceptions raised in unmanaged code. Fixes part of #82594.
3821 2007-08-24 Mark Probst <mark.probst@gmail.com>
3823 * mini.c (mono_method_to_ir), declsec.c
3824 (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
3826 2007-08-22 Martin Baulig <martin@ximian.com>
3829 (MonoDebuggerThreadInfo): New typedef.
3830 (mono_debugger_thread_table): New global variable.
3831 (mono_debugger_thread_created): New public function.
3832 (mono_debugger_thread_cleanup): New public function.
3836 - removed `get_current_thread' and `lookup_assembly'.
3837 - removed `data_table'.
3838 - added `thread_table'.
3841 (mono_thread_start_cb): Call mono_debugger_thread_created().
3842 (mono_thread_attach_cb): Likewise.
3843 (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
3844 (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
3847 * driver.c (mono_main): Move mono_debug_init() up, before calling
3848 mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
3850 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
3852 * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
3853 together when passing several arguments of type double (gives a small
3854 speedup and saves a few bytes of generated code).
3856 2007-08-20 Jb Evain <jbevain@novell.com>
3858 * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
3860 2007-08-20 Jb Evain <jbevain@novell.com>
3862 * mini.c (mono_method_to_ir): throw MethodAccessException
3863 and FieldAccessException instead of InvalidProgramException.
3865 2007-08-20 Mark Probst <mark.probst@gmail.com>
3867 * mini.c: CoreCLR security checks.
3869 * mini.h: Removed MonoSecurityMode (moved to
3870 metadata/security-manager.h) and mono_security_mode global var
3871 (replaced by set/get functions in security-manager.h).
3873 * driver.c: Added "core-clr-test" security mode for testing. Used
3874 set-function for setting security mode.
3876 2007-08-17 Mark Probst <mark.probst@gmail.com>
3878 * mini.c: MonoJitInfo's are freed hazardously now. Statistics for
3879 the new jit_info_table.
3881 * driver.c: Test code for the new jit_info_table (enabled by the
3882 define MONO_JIT_INFO_TABLE_TEST).
3884 2007-08-14 Zoltan Varga <vargaz@gmail.com>
3886 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
3887 detection of call <REG> instruction sequence. Fixes build on freebsd.
3889 2007-08-13 Zoltan Varga <vargaz@gmail.com>
3891 * mini-exceptions.c: Fix a warning.
3893 2007-08-11 Zoltan Varga <vargaz@gmail.com>
3895 * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
3896 stack overflow handling code on amd64 too.
3898 * mini-exceptions.c (mono_setup_altstack): Make this use
3899 mono_thread_get_stack_bounds ().
3901 * mini-x86.h: Disable sigaltstack on solaris x86.
3903 2007-08-10 Zoltan Varga <vargaz@gmail.com>
3905 * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
3907 2007-08-10 Geoff Norton <gnorton@customerdna.com>
3909 * tramp-x86.c: Remove some unneeded alignment changes on Apple. Fixes #82387.
3911 2007-08-08 Zoltan Varga <vargaz@gmail.com>
3913 * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
3915 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
3917 2007-08-03 Neale Ferguson <neale@sinenomine.net>
3919 * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
3922 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
3924 * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
3925 to be emitted (bug #82281).
3927 2007-08-01 Martin Baulig <martin@ximian.com>
3929 Merged the `debugger-dublin' branch.
3931 * debug-debugger.h (MonoDebuggerInfo):
3932 Removed the `old_*' compatibility entries.
3933 Added `debugger_version' and `data_table'.
3934 Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
3935 Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
3938 (MiniDebugMethodBreakpointInfo): Add `address_list'.
3939 (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
3940 instead of a `gconstpointer'.
3941 (mono_debugger_insert_method_breakpoint): Return a
3942 `MonoDebugMethodAddressList *'.
3944 2007-06-28 Martin Baulig <martin@ximian.com>
3946 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
3948 2007-08-01 Zoltan Varga <vargaz@gmail.com>
3950 * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using
3951 __builtin_frame_address () since it is broken on older gcc versions.
3953 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
3955 * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
3956 on the stack overflow handling and made the managed stack overflows
3957 catchable in most cases using soft guard pages.
3958 * exceptions-x86.c: added code to restore the protection in the soft
3959 guard pages at the end of exception handling.
3961 2007-07-31 Zoltan Varga <vargaz@gmail.com>
3963 * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
3965 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3967 * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
3970 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
3972 * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
3973 signal handling support until it has been ported to the new mechanism.
3974 * mini.c: fixed stack overflow detection and use the new
3975 architecture code to handle signals on the altstack.
3977 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
3979 * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
3980 stack overflows on the alt stack.
3982 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
3984 * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
3985 stack overflows on the alt stack.
3987 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
3989 * exceptions-ppc.c: cleanup preparing for altstack support.
3991 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
3993 * exceptions-arm.c: cleanup preparing for altstack support.
3995 2007-07-27 Mark Probst <mark.probst@gmail.com>
3997 * mini.c (print_jit_stats): Output hazard pointer stats.
3999 2007-07-26 Mark Probst <mark.probst@gmail.com>
4001 * driver.c, mini.c: Replaced security mode flags with a single
4004 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4006 * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
4008 2007-07-25 Mark Probst <mark.probst@gmail.com>
4010 * mini.c, mini.h, driver.c (mono_main): Added command-line flag
4011 (which doesn't do anything yet) for activating Core CLR
4012 (Silverlight) security.
4014 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
4016 * mini-codegen.c: work around a possible gcc bug on arm.
4018 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
4020 * driver.c, mini-x86.h, mini-amd64.h: print a nice error
4021 message for platforms that don't support AOT compilation.
4023 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
4025 * mini.h, mini.c, driver.c: temporary smcs hack.
4027 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
4029 * mini-arm.h, mini-arm.c: arm EABI fixes.
4031 2007-07-22 Zoltan Varga <vargaz@gmail.com>
4033 * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
4036 * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
4037 trampolines taking a method argument.
4039 * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
4041 * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
4042 * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
4044 * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
4045 JIT compilation throws an exception. Fixes #82050.
4047 2007-07-19 Mark Probst <mark.probst@gmail.com>
4049 * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
4050 with the MONO_EXCEPTION_ defines.
4052 2007-07-17 Zoltan Varga <vargaz@gmail.com>
4054 * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
4057 * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
4058 the cause of an assertion.
4060 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
4062 * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
4065 2007-07-15 Zoltan Varga <vargaz@gmail.com>
4067 * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
4068 assert. Should fix #82103.
4070 2007-07-14 Zoltan Varga <vargaz@gmail.com>
4072 * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
4073 here too. Fixes #82095.
4075 * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
4078 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
4080 * mini-amd64.h: Enable IMT for amd64.
4082 * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
4084 2007-07-12 Zoltan Varga <vargaz@gmail.com>
4086 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
4088 2007-07-12 Mark Probst <mark.probst@gmail.com>
4090 * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
4091 as soon as check_linkdemand sets an exception_type.
4093 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
4095 * mini-x86.c: fixed offsets for IMT call sequence.
4096 * mini-x86.h: enable IMT again.
4098 2007-07-11 Zoltan Varga <vargaz@gmail.com>
4100 * trace.c (mono_trace_enter_method): Decode MonoType too.
4102 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
4104 * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
4106 * mini-amd64.c: Add preliminary IMT implementation.
4108 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
4110 * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
4111 understand the new IMT-base interface invocation (thanks to
4112 Daniel Nauck for the report and the remote debugging session).
4114 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
4116 * mini-x86.c: size and speed optimizations for the IMT bsearch.
4118 2007-07-11 Zoltan Varga <vargaz@gmail.com>
4120 * Makefile.am (aotcheck): Make this actually use the AOTed code.
4122 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
4124 * mini-trampolines.c: implement AOT IMT support.
4125 * mini-x86.h: enable IMT support for wider testing.
4127 2007-07-10 Zoltan Varga <vargaz@gmail.com>
4129 * inssel.brg (emit_imt_argument): Add aot support here.
4131 * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
4133 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
4135 * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
4136 of the IMT implementation, partially from massi, with my
4137 implementation of the bsearch sequence. Disabled by default until
4138 the AOT code is implemented.
4140 2007-07-10 Zoltan Varga <vargaz@gmail.com>
4142 * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
4144 * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
4146 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
4148 * inssel.brg, mini.c, mini.h, mini-trampolines.c:
4149 arch-independent IMT JIT code from Massimiliano
4150 Mantione (massi@ximian.com) with small cleanups from me.
4152 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
4154 * Makefile.am: fix svn invocation to get the svn revision to be
4155 independent of the local language (build fix).
4157 2007-07-09 Mark Probst <mark.probst@gmail.com>
4159 * mini.c (inline_method): Reset cfg->exception_type if the
4160 inlining is aborted. Fixes: 82049.
4162 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
4164 * mini.c: remove assert from exception handling code when exception_ptr
4167 2007-07-05 Zoltan Varga <vargaz@gmail.com>
4169 * mini.c (mono_codegen): Add an assert.
4171 * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method
4172 enter and leave code.
4173 * mini-amd64.c (mono_arch_emit_prolog): Likewise.
4175 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4177 * mini-ppc.c: fixed memory corruption for localloc(0)
4180 2007-07-05 Zoltan Varga <vargaz@gmail.com>
4182 * mini.c: Fix warnings.
4184 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
4186 * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
4187 to emit better double->int conversions.
4189 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
4191 * mini.c: the provided Min/Max optimizations are valid for unisgned
4194 2007-07-03 Rodrigo Kumpera <rkumpera@novell.com>
4196 * 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
4198 2007-06-28 Miguel de Icaza <miguel@novell.com>
4200 * mini.c (mono_running_on_valgrind): Add support for reporting the
4201 method and its boundaries to valgrind.
4203 2007-06-28 Martin Baulig <martin@ximian.com>
4205 * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
4207 2007-06-25 Zoltan Varga <vargaz@gmail.com>
4209 * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
4211 * generic.2.cs: Add new test case.
4213 2007-06-25 Martin Baulig <martin@ximian.com>
4215 Merged the `debugger-dublin' branch.
4218 (mono_debugger_insert_method_breakpoint): New public method.
4219 (mono_debugger_remove_method_breakpoint): Likewise.
4220 (mono_debugger_check_breakpoints): New static method.
4221 (mono_debug_close_method): Call mono_debugger_check_breakpoints().
4223 * debug-debugger.h (MonoDebuggerInfo):
4224 Renamed (to keep backward compatibility in the vtable):
4225 `insert_breakpoint' -> `old_insert_breakpoint'.
4226 `remove_breakpoint' -> `old_remove_breakpoint'.
4227 `create_string' -> `old_create_string'.
4228 `lookup_class' -> `old_lookup_class'.
4229 `lookup_type' -> removed; changed into a dummy field.
4230 `lookup_assembly' -> `old_lookup_assembly'.
4231 Added (same functionality, but different signature):
4232 `create_string', `lookup_class', `lookup_assembly'
4234 `get_method_addr_or_bpt', `remove_method_breakpoint',
4235 `runtime_class_init'.
4237 * debug-debugger.c: Merged the `debugger-dublin' branch.
4239 2007-06-23 Zoltan Varga <vargaz@gmail.com>
4241 * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
4243 (peephole_pass): Likewise.
4245 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
4247 * driver.c: hopefully make setaffinity work also for ancient
4250 2007-06-22 Atsushi Enomoto <atsushi@ximian.com>
4252 * driver.c : win32 build fix.
4254 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
4256 * driver.c: check for the MONO_NO_SMP env var and bind to a single
4257 processor if it is set.
4259 2007-06-21 Martin Baulig <martin@ximian.com>
4261 * debug-mini.h: New file.
4264 (mono_debugger_insert_breakpoint_full): Moved here from
4265 ../metadata/mono-debug-debugger.c.
4266 (mono_debugger_remove_breakpoint): Likewise.
4267 (mono_debugger_breakpoint_callback): Likewise.
4269 2007-06-15 Raja R Harinath <rharinath@novell.com>
4271 * jit-icalls.c (mono_helper_compile_generic_method): Update to
4272 changes in MonoGenericClass.
4274 2007-06-14 Zoltan Varga <vargaz@gmail.com>
4276 * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
4278 2007-06-14 Raja R Harinath <rharinath@novell.com>
4280 * jit-icalls.c (mono_helper_compile_generic_method): Update to
4281 removal of MonoGenericMethod.
4283 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4285 * mini-exceptions.c: hooks for the exception events profiling API.
4287 2007-06-14 Randolph Chung <tausq@debian.org>
4289 * Makefile.ma: Add hppa target.
4290 * mini-arch.h: Include mini-hppa.h
4291 * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
4292 mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
4293 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4295 2007-06-14 Randolph Chung <tausq@debian.org>
4297 * inssel.brg: Add rules for "chained" compare-branch operations so that
4298 a single compare op can affect multiple branches. Adjust cost for
4299 OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
4300 * inssel-long32.brg: Update rules to use compare-branch macros. Adjust
4301 cost for some rules so that they can more easily be overridden by
4302 per-arch rules (with fixes from lupus).
4303 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4305 2007-06-13 Randolph Chung <tausq@debian.org>
4307 * mini-ops.h: Reorder branch ops so that they match the order of the
4308 corresponding CEE_* ops. The code expects them this way.
4309 Add new ops for HPPA target.
4310 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4312 2007-06-13 Randolph Chung <tausq@debian.org>
4314 * mini-exceptions.c: Handle cases where the stack grows towards
4316 Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
4318 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
4320 * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
4322 * driver.c: explain where a non-matching corlib is found.
4324 2007-06-13 Mark Probst <mark.probst@gmail.com>
4326 * mini.c (print_jit_stats): Output dynamic code allocation stats.
4328 2007-06-10 Sanghyeon Seo <sanxiyn@gmail.com>
4330 * mini-exceptions.c: Generate a method profile leave event during
4331 an exception to ensure that the profiler gets notified.
4333 2007-06-07 Zoltan Varga <vargaz@gmail.com>
4335 * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir
4338 * cpu-amd64.md: Add long_and/or/xor opcodes.
4340 2007-06-06 Wade Berrier <wberrier@novell.com>
4342 * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
4343 (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction
4344 length of instruction shr_imm (expected 8, got 10)
4346 2007-06-06 Zoltan Varga <vargaz@gmail.com>
4348 * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
4350 2007-06-06 Mark Probst <mark.probst@gmail.com>
4352 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
4353 MonoInternalHashTable again (fixed bug in the internal hash table
4356 2007-06-06 Mark Probst <mark.probst@gmail.com>
4358 * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
4359 Have to figure out what makes it crash the SWF regression.
4361 2007-06-05 Zoltan Varga <vargaz@gmail.com>
4363 * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
4365 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
4367 * mini.c: optimize out the type check when storing null in a
4370 2007-06-04 Mark Probst <mark.probst@gmail.com>
4372 * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
4373 MonoInternalHashTable.
4375 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
4377 * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
4378 signed integer methods.
4380 2007-06-02 Zoltan Varga <vargaz@gmail.com>
4382 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case
4383 permanently since the current approach doesn't work.
4385 2007-06-02 Zoltan Varga <vargaz@gmail.com>
4387 * inssel.brg (stmt): Only call delegate->invoke_impl if
4388 MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
4390 2007-06-01 Zoltan Varga <vargaz@gmail.com>
4392 * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
4393 the sreg2==rdx case.
4395 * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
4396 account if it contains a rex prefix.
4397 (peephole_pass): Handle OP_FMOVE as well.
4399 2007-06-01 Zoltan Varga <vargaz@gmail.com>
4401 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
4402 as it causes regressions.
4404 2007-05-31 Zoltan Varga <vargaz@gmail.com>
4406 * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
4407 static case as well.
4409 * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
4411 * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4412 (mono_arch_get_this_arg_from_call): Ditto.
4414 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
4416 * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
4419 * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
4420 (mono_arch_get_this_arg_from_call): Ditto.
4422 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
4424 * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
4425 try to create optimized invoke code and use that for further invocations.
4426 Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
4428 * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
4430 2007-05-29 Rodrigo Kumpera <kumpera@gmail.com>
4432 * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
4433 sealed classes or methods.
4434 *devirtualization.cs: tests for the new optimization
4436 2007-05-29 Zoltan Varga <vargaz@gmail.com>
4438 * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
4439 by the update_volatile () function.
4441 2007-05-27 Zoltan Varga <vargaz@gmail.com>
4443 * driver.c (mono_main): Call g_thread_init () early since newer glib versions
4446 * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
4448 2007-05-24 Jonathan Chambers <joncham@gmail.com>
4450 * mini.c: Add configure checks for header files.
4451 * mini-x86.c: Add configure checks for header files.
4452 * trace.c: Add configure checks for header files.
4453 * aot-runtime.c: Add configure checks for header files.
4454 * aot-compiler.c: Add configure checks for header files.
4455 * driver.c: Add configure checks for header files.
4456 * mini-codegen.c: Add configure checks for header files.
4458 Code is contributed under MIT/X11 license.
4460 2007-05-22 Zoltan Varga <vargaz@gmail.com>
4462 * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
4463 icompare_imm -128 + op_iclt. Fixes #81703.
4465 2007-05-19 Zoltan Varga <vargaz@gmail.com>
4467 * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
4469 2007-05-15 Massimiliano Mantione <massi@ximian.com>
4471 * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
4472 inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
4473 so that all isinst checks now use "interface_bitmap".
4475 2007-05-15 Zoltan Varga <vargaz@gmail.com>
4477 * cpu-amd64.md (jmp): Fix a warning.
4479 * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
4481 * basic.cs: Add new regression test.
4483 * basic.cs: Remove test which is now in basic-long.cs.
4485 * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
4487 * basic-long.cs: Add new test.
4489 2007-05-13 Zoltan Varga <vargaz@gmail.com>
4491 * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
4493 2007-05-12 Zoltan Varga <vargaz@gmail.com>
4495 * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
4497 * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
4500 * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception
4501 throwing code a bit.
4503 * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of
4504 the exception throwing code a bit.
4506 * mini-x86.c (get_call_info): Allocate result from a mempool.
4508 2007-05-11 Zoltan Varga <vargaz@gmail.com>
4510 * aot-compiler.c (find_typespec_for_class): Fix the assert.
4512 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
4514 * mini.h (MonoCompile): Add 'token_info_hash' field.
4516 * mini.c: Save token->method associations during compilation so the AOT
4517 compiler can use it.
4519 * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
4520 which reference generic classes and methods.
4522 2007-05-10 Zoltan Varga <vargaz@gmail.com>
4524 * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
4526 * aot-compiler.c (compile_method): Fix a typo in a comment.
4528 * aot-runtime.c (decode_cached_class_info): Skip generic types.
4530 * aot-compiler.c: Add minimal support for AOTing generic code by skipping
4533 * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
4535 2007-05-09 Zoltan Varga <vargaz@gmail.com>
4537 * mini.h (MonoCompile): Add 'args' field.
4539 * mini.c (mono_compile_create_vars): Store variables representing the arguments
4542 * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
4544 2007-05-08 Zoltan Varga <vargaz@gmail.com>
4546 * mini.c (mono_compile_get_interface_var): Remove this unused function.
4548 * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
4550 * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
4551 opcodes for some opcodes.
4553 * mini.h *.brg *.c: Use the new opcodes.
4555 2007-05-08 Massimiliano Mantione <massi@ximian.com>
4557 * mini.h: Bumped aot revision.
4559 * inssel.brg: modified code generation of type checks for interfaces
4560 to use the new "MonoClass.interface_bitmap" instead of the old
4561 "MonoClass.interface_offsets".
4563 2007-04-30 Zoltan Varga <vargaz@gmail.com>
4565 * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
4567 2007-04-29 Zoltan Varga <vargaz@gmail.com>
4569 * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
4572 2007-04-27 Neale Ferguson <neale@sinenomine.net>
4574 * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
4576 2007-04-27 Wade Berrier <wberrier@novell.com>
4578 * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in
4579 mini.h) to fix build.
4581 2007-04-26 Zoltan Varga <vargaz@gmail.com>
4583 * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
4585 * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
4586 causes the corlib unit tests to fail.
4588 2007-04-25 Zoltan Varga <vargaz@gmail.com>
4590 * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
4592 * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
4594 * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional
4595 opcodes to the comparison relations.
4597 * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional
4598 opcodes to their types.
4600 * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
4602 * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache
4603 it in cfg->arch.cinfo.
4605 * local-propagation.c (mono_local_cprop_bb): Fix a warning.
4607 * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in
4608 cfg->cil_offset_to_bb.
4610 2007-04-24 Zoltan Varga <vargaz@gmail.com>
4612 * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
4613 created becase of initlocals.
4615 2007-04-23 Zoltan Varga <vargaz@gmail.com>
4617 * mini-alpha.c cpu-alpha.md: More alpha port work from
4618 Sergey Tikhonov <tsv@solvo.ru>.
4620 2007-04-21 Andreas Faerber <andreas.faerber@web.de>
4622 * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
4624 2007-04-19 Zoltan Varga <vargaz@gmail.com>
4626 * cpu-s390.md (break): Correct the length of break instruction.
4628 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
4630 * mini.c: fix a couple of soft-float issues and comments.
4632 2007-04-15 Miguel de Icaza <miguel@novell.com>
4634 * trace.c (is_filenamechar): - is also a filename char.
4636 2007-04-15 Neale Ferguson <neale@sinenomine.net>
4638 * mini-s390.c: Correct checking for enum type in return value processing.
4640 2007-04-14 Raja R Harinath <rharinath@novell.com>
4642 * Makefile.am (BUILT_SOURCES): Add 'version.h'.
4643 (version.h): Makefile is in the build directory.
4645 2007-04-06 Andreas Faerber <andreas.faerber@web.de>
4647 * mini-amd64.h: fix for assertion failure on Solaris/amd64
4649 2007-04-11 Martin Baulig <martin@ximian.com>
4651 * mini.c (can_access_member): Fix handling of generic classes;
4654 2007-04-10 Zoltan Varga <vargaz@gmail.com>
4656 * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
4658 2007-04-05 Zoltan Varga <vargaz@gmail.com>
4660 * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
4662 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
4664 * mini-codegen.c: make sure the right spill amount is
4665 used for fp or integer registers (fixes the float_sub_spill() on ppc).
4667 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
4669 * mini-ppc.c: fixes for the fp_branch_nan test.
4671 2007-03-23 Zoltan Varga <vargaz@gmail.com>
4673 * basic.cs: Comment out new test which still fails on ia64.
4675 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
4677 * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
4679 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4681 * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
4683 2007-03-22 Zoltan Varga <vargaz@gmail.com>
4685 * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
4686 on 64 bit machines. Fixes part of #80738.
4688 * basic.cs: Add regression test.
4690 2007-03-17 Zoltan Varga <vargaz@gmail.com>
4692 * inssel.brg basic.cs: Revert previous change to fix build.
4694 * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
4697 * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
4699 * basic.cs: Add new regression test.
4701 2007-03-17 Zoltan Varga <vargaz@gmail.com>
4703 * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
4706 2007-03-16 Neale Ferguson <neale@sinenomine.net>
4708 * cpu-s390x.md: Correct length of break instruction.
4710 2007-03-16 Neale Ferguson <neale@sinenomine.net>
4712 * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
4713 * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
4715 2007-03-15 Jonathan Chambers <joncham@gmail.com>
4717 * *.c: Begin WIN64 port.
4718 * mini.c: Use correct register in profiler.
4719 * mini-amd64.c: No inline assembly on Win64.
4720 * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
4721 Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
4722 * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
4723 is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
4724 mono_arch_ip_from_context for Win64.
4726 Contributed under MIT/X11 license.
4728 2007-03-15 Zoltan Varga <vargaz@gmail.com>
4730 * exceptions-amd64.c (seh_handler): Ditto.
4732 * exceptions-x86.c (seh_handler): Fix a memory leak.
4734 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
4736 * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
4737 mini-s390x.c: fixed peephole optimizations to deal
4738 correctly with 1 and 2 byte reload avoidance.
4740 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
4742 * cpu-s390.md, cpu-s390x.md: update localloc length.
4744 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
4746 * cpu-g4.md: added missing descriptions.
4748 2007-03-14 Miguel de Icaza <miguel@novell.com>
4750 * Makefile.am: Add support so the tail tests are not executed on
4751 PowerPC as that is a known limitation of the PowerPC port.
4753 2007-03-13 Jonathan Chambers <joncham@gmail.com>
4755 * runmdesc.bat: Move to msvc directory.
4757 2007-03-13 Jonathan Chambers <joncham@gmail.com>
4759 * runmdesc.bat: Run executable that was produced by the current
4760 target and sent via an argument.
4762 2007-03-11 Zoltan Varga <vargaz@gmail.com>
4764 * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
4767 * generics.2.cs: Add regression test.
4769 2007-03-09 Wade berrier <wberrier@novell.com>
4771 * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
4773 2007-03-09 Zoltan Varga <vargaz@gmail.com>
4775 * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
4776 AOT code depends on this.
4778 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
4780 * mini.c: more precise tracking of types in the eval stack
4781 (part of fix for bug #81044).
4783 2007-03-07 Zoltan Varga <vargaz@gmail.com>
4785 * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
4787 * aot-compiler.c (encode_patch): Remove an obsolete comment.
4789 2007-03-06 Zoltan Varga <vargaz@gmail.com>
4791 * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
4793 * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
4795 2007-02-22 Zoltan Varga <vargaz@gmail.com>
4797 * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
4798 a pointer on 64 bit systems. Fixes #80190.
4800 * iltests.il: Add new regression test.
4802 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4804 * mini.c: inline a constant for Environment.IsRunningOnWindows.
4806 2007-02-19 Geoff Norton <gnorton@customerdna.com>
4808 * trace.c: Remove an erroneous alignemnt check when tracing.
4809 Fixes --trace on OSX86.
4811 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
4813 * mini-$(arch).h: initialize SP in context for all the archs.
4815 2007-02-14 Sebastien Pouliot <sebastien@ximian.com>
4817 * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
4818 regressions in the thread tests.
4820 2007-02-14 Zoltan Varga <vargaz@gmail.com>
4822 * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
4823 - fixed implementation of LOCALLOC opcode
4824 - implemented non-un compare for floats
4826 - implementation of FDIV and CKFINITE opcodes
4827 - fixes for latest mono updates
4828 - additional arch opcodes
4830 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
4832 * Makefile.am: simplify and merge rules for cross-compilation.
4834 2007-02-07 Massimiliano Mantione <massi@ximian.com>
4836 * local-propagation.c: Actually *apply* the fix for bug 80591...
4838 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
4840 * mini-exceptions.c: backuot part of the last change
4841 (fixes cas tests on amd64 related to GetExecutingAssembly ()).
4843 2007-02-06 Massimiliano Mantione <massi@ximian.com>
4844 * inssel.brg: Fix bug 59286.
4847 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
4849 * mini-exceptions.c: patch from Zoltan to correctly check for
4850 stack boundaries (using the stack register, not the frame register),
4851 fixes bugs #80724, #79717.
4853 2007-02-03 Zoltan Varga <vargaz@gmail.com>
4855 * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
4856 OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
4858 * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
4859 presence of frame pointer elimination.
4861 2007-02-01 Geoff Norton <gnorton@customerdna.com>
4863 * mini-x86.h: NetBSD UCONTEX_REG defines.
4865 2007-02-01 Zoltan Varga <vargaz@gmail.com>
4867 * inssel-amd64.brg: Fix amd64 build.
4869 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
4871 * mini.h: remove extern to workaround what looks likes gcc bug 26905
4874 2007-01-31 Zoltan Varga <vargaz@gmail.com>
4876 * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
4879 * mini-<ARCH>.c: Use mono_is_regsize_var ().
4881 2007-01-30 Mark Mason <mason@broadcom.com>
4883 * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
4884 * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
4885 * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
4886 beginning support for CEE_JMP [not quite working yet]
4887 * tramp-mips.c: LMF handling now works
4889 2007-01-30 Zoltan Varga <vargaz@gmail.com>
4891 * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
4893 * mini.h (NULLIFY_INS): New macro.
4895 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
4897 * mini.c: statistical profiler fix for windows, patch
4898 from Tor Lillqvist (tml@novell.com).
4900 2007-01-30 Massimiliano Mantione <massi@ximian.com>
4901 * local-propagation.c: Fix bug 80591.
4903 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
4905 * Makefile.am: put back the --export-dynamic option as with
4906 the previous gmodule flags (thanks to Robert Jordan).
4908 2007-01-28 Zoltan Varga <vargaz@gmail.com>
4910 * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
4912 mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
4913 simplify and speed up the local register allocator. Also rename some fields
4914 like iassign->vassign.
4916 * regalloc.c: Remove some functions which are no longer used since their
4917 inlined version is in mini-codegen.c.
4919 * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
4921 * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
4923 2007-01-27 Zoltan Varga <vargaz@gmail.com>
4925 * mini-amd64.c (peephole_pass): Remove optimizations which omit a
4926 narrowing. Fixes #80622.
4928 * iltests.il: Add new regresssion test.
4930 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
4932 * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
4933 debug-debugger.c, debug-debugger.h: warning fixes.
4934 * driver.c: updated copyright year and made it fit in one line.
4936 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
4938 * aot-runtime.c: updated to use mono-dl instead of gmodule.
4940 2007-01-25 Zoltan Varga <vargaz@gmail.com>
4942 * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
4944 * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
4946 * iltests.il: Add new test for bug #80507.
4948 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
4950 * mini-arm.h: use soft-float also on vfp for now.
4952 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
4954 * mini.c: fix some more soft-float issues.
4956 2007-01-24 Zoltan Varga <vargaz@gmail.com>
4958 * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
4960 2007-01-24 Massimiliano Mantione <massi@ximian.com>
4961 * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
4962 mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
4963 MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
4965 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
4967 * mini-arm.c: typo fix.
4969 2007-01-23 Neale Ferguson <neale@sinenomine.net>
4971 * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
4973 2007-01-21 Zoltan Varga <vargaz@gmail.com>
4975 * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
4976 Share stack slots for scalar types. Avoid expensive g_list_free () calls.
4978 * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
4980 * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto.
4982 * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
4984 * inssel.brg: Fix a warning.
4986 * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
4988 * abcremoval.c ssa.c ssapre.c: Update after this change.
4990 * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
4992 * dominators.c (df_set): Use mono_bitset_union_fast.
4994 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
4996 * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
4997 mini-codegen.c: reduce relocations and memory usage for the cpu
5000 2007-01-20 Zoltan Varga <vargaz@gmail.com>
5002 * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
5004 * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
5005 to reduce their size.
5007 2007-01-19 Mark Mason <mason@broadcom.com>
5009 * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
5010 * mini-mips.c: more configuration macros, support long conditional branches, additional
5011 asserts, fix epilog instrumentation.
5012 * mini-mips.h: use standard stack walk
5013 * cpu-mips.md: increase size of div, rem and conditional branches
5015 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
5017 * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
5020 2007-01-19 Zoltan Varga <vargaz@gmail.com>
5022 * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
5023 (compile_method): Ditto.
5025 * aot-runtime.c (decode_klass_info): Ditto.
5027 * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
5028 needed by the code generated by inssel.brg. Also fix a warning.
5030 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
5032 * mini.c: deal with enums that become genericinsts by
5033 being nested in a generic class (bug #79956).
5035 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
5037 * mini.c: match the generic definition to check for
5038 private access with generic types (bug #78431).
5040 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
5042 * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
5043 to make life easier for people cross-compiling that insist on not
5046 2007-01-17 Mark Mason <mason@broadcom.com>
5048 * inssel-long.brg: patch to deal with mips missing flags
5049 * inssel-long32-mips.brg: implement overflow checks
5050 * insset-mips.brg: implement overflow checks
5051 * mini-mips.h: implement conditional exception handling
5052 * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
5053 Remove unused code, minor cleanups.
5054 * exceptions-mips.c: minor cleanups
5055 * mini-ops.h: add mips conditional exception ops
5056 * cpu-mips.md: add mips conditional exception ops
5059 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
5061 * inssel.brg: patch from Mark Mason <mason@broadcom.com>
5062 to deal with mips missing of flags.
5064 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
5066 * exceptions-ppc.c: execute fault handlers.
5068 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
5070 * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
5072 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
5074 * mini.c: handle also floating point values in initialize_array.
5076 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
5078 * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
5079 array initialization and make it conditional on the intrins option.
5081 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
5083 * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
5084 relocations and put the patch info names close to the enum definition.
5086 2007-01-15 Mark Mason <mason@broadcom.com>
5088 * basic.cs, exceptions.cs: break up large tests to increase debugability.
5090 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5092 * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
5094 2007-01-12 Raja R Harinath <rharinath@novell.com>
5096 * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
5098 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
5100 * Makefile.am: distribute the mips sources.
5102 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5104 * mini-codegen.h: handle bug #80489 here, by excluding ecx
5107 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
5109 * cpu-x86.md: back out for now as this triggers other regressions.
5111 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
5113 * cpu-x86.md: force src1 and dest regpair for long shift instructions
5114 to eax:edx, so ecx can't get allocated to them (bug #80489).
5116 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
5118 * mini.c, mini-exceptions.c: enabled running fault handlers
5121 2007-01-03 Miguel de Icaza <miguel@novell.com>
5123 * driver.c: If nothing fail, do not use the string "failed",
5124 because it makes it very annoying to view test result logs on the
5127 2006-12-30 Miguel de Icaza <miguel@novell.com>
5129 * debug-debugger.c (mono_debugger_main): Rename "main" to
5130 "main_method" to prevent a warning.
5132 Remove a warning for unused field.
5134 2006-12-28 Martin Baulig <martin@ximian.com>
5137 (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
5139 2006-12-22 Martin Baulig <martin@ximian.com>
5141 * mdb-debug-info32.s, mdb-debug-info64.s: New files.
5142 Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
5143 seperate `.mdb_debug_info' section, so we can access it from the
5144 debugger even if the binary is stripped.
5146 * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
5147 from the `.mdb_debug_info' here to prevent the linker from
5148 removing that section.
5150 * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
5153 2006-12-19 Robert Jordan <robertj@gmx.net>
5155 * mini-x86: enable the code to return small structures in
5156 registers for FreeBSD as well. Fixes bug #80278.
5157 * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
5159 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5161 * mini-x86.c: align the stack when calling the profiler
5162 function instrumenting the prolog (on OSX).
5164 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
5166 * mini.c: emit a break opcode where Debugger.Break () is called.
5168 2006-12-13 Miguel de Icaza <miguel@novell.com>
5170 * mini.c (mono_method_to_ir): Provide useful information on this
5171 assert, to prevent others from debugging like I did.
5173 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5175 * mini.c: enable code which was incorrectly commented
5178 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5180 * mini-x86.c: enable on OSX, too, the code to return small
5181 structures in registers.
5183 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
5185 * mini-x86.c: remove the use of the dynamic code manager here, too.
5187 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
5189 * mini.h, debug-debugger.c, tramp-*.c: fixed
5190 mono_debugger_create_notification_function() to use
5191 mono_global_codeman_reserve () instead of a dynamic code manager.
5193 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
5195 * mini.c, jit-icalls.h, jit-icalls.c: remove the
5196 ves_array_element_address() jit icall and use a generated
5197 managed method instead (which is about 4 times faster for a rank 3
5200 2006-11-29 Mark Mason <mason@broadcom.com>
5202 * basic-calls.cs: additional tests for passing
5203 structures as function arguments.
5205 2006-11-29 Mark Mason <mason@broadcom.com>
5207 * mini-mips.h: disable custom exception handling
5208 * mini-mips.c: throw/rethrow should use jalr to call
5209 exception stubs. Fixed bug with passing structures
5210 by value. More support for tracing floating point
5213 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
5215 * mini.c: fixed typo in the soft-float ldind.r4 handling
5218 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5220 * mini.c, mini.h, driver.c: added --runtime command line
5221 option to select a different runtime than the autodetected one.
5222 * jit.h: added API for embedders to initialize with a specific
5225 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
5227 * mini.c: handle also boxing of r4 values (bug #80024).
5229 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
5231 * mini-ppc.c: force indirect calls until we reserve
5232 enough address space for all the generated code.
5234 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
5236 * exceptions-arm.c: workaround bugs in the libc definition
5239 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
5241 * inssel.brg: fixes from me and Mark Mason.
5243 2006-11-23 Dick Porter <dick@ximian.com>
5245 * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
5246 semaphore display now we've fixed the initial value
5248 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
5250 * inssel.brg: partially revert the last change to fix the build.
5252 2006-11-21 Mark Mason <mason@broadcom.com>
5254 * inssel.brg: Add and use compare-and-branch macros to support
5255 architectures that do not have condition code registers (ie. MIPS).
5256 * *-mips.{c,brg,md}: Fix copyright statements
5258 2006-11-20 Mark Mason <mason@broadcom.com>
5260 * Makefile.am: remove mini-codegen.c from list of MIPS sources
5261 * mini.c: Allow GET_CONTEXT to be specified by the arch port
5262 * mini.h: Added declaration for mono_print_ins()
5263 * mini-codegen.c: added ins_spec initializer for MIPS
5264 * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
5265 vreg to be virtual and hreg to be non-virtual.
5266 * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
5267 is not yet working/implemented correctly.
5268 * mini-codegen.c (print_ins): rename to mono_print_ins(), make
5269 non-static, fixup calls to print_ins() from other parts in the file.
5271 2006-11-20 Mark Mason <mason@broadcom.com>
5273 * basic-calls.cs: added tests for passing structures as arguments
5276 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
5278 * inssel-long32.brg: optimize signed division by power of two.
5280 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
5282 * mini-arm.c: added support for interworking with thumb code
5283 (mono must be still be built using the ARM instruction encoding).
5285 2006-11-19 Miguel de Icaza <miguel@novell.com>
5287 * mini.c (type_from_op): Separate the conditions for OP_EQ as the
5288 verifier has different rules for it. Fixes a few verifier issues
5291 * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
5292 at the end, so people know what happened.
5294 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
5296 * brach-opts.c: in optimize_exception_target() make sure we
5297 are in a catch clause (fixes bug #79871).
5299 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5301 * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
5302 more soft-float support fixes.
5304 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
5306 * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
5307 that are passed half on the stack and half in registers.
5309 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
5311 * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
5312 more mips integration work from Mark E Mason
5313 <mark.e.mason@broadcom.com>.
5315 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
5317 * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
5318 cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
5319 tramp-mips.c: added sources for the mips port, not
5320 integrated in the build yet. Contributed by
5321 Mark E Mason <mark.e.mason@broadcom.com>.
5323 2006-11-14 Neale Ferguson <neale@sinenomine.net>
5325 * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
5327 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
5329 * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
5330 put the soft-float rules in its own file since it seems to
5331 break s390 compilation.
5333 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
5335 * mini-arm.c: fixed wrnings.
5337 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
5339 * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
5340 inssel-arm.brg: ARM support for soft-float.
5342 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
5344 * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
5345 loads and stores of 32 bit fp values.
5347 2006-11-10 Zoltan Varga <vargaz@gmail.com>
5349 * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
5351 * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
5352 works. Fixes #79852 and #79463.
5354 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
5356 * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
5357 more soft-float support WIP and fixes.
5359 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
5361 * mini-arm.c: some VFP updates.
5363 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
5365 * mini-exceptions.c: 0 is a valid local var offset in some
5366 architectures, don't assert (bug #78508).
5368 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
5370 * exceptions-arm.c: fixed off by one error in stack walk code.
5372 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
5374 * mini.h, mini.c: more precise tracking of type load exceptions.
5376 2006-11-03 Robert Jordan <robertj@gmx.net>
5378 * Makefile.am: [WIN32] Add monow.exe target.
5379 * driver.c: [WIN32] Don't detach the console when debugging.
5382 2006-10-30 Miguel de Icaza <miguel@novell.com>
5384 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
5386 2006-10-23 Zoltan Varga <vargaz@gmail.com>
5388 * aot-compiler.c (emit_method_info): Add a case missed earlier.
5390 * driver.c (mini_regression): Fix --regression with AOT.
5392 * aot-compiler.c (emit_method_info): Fix AOT on amd64.
5394 2006-10-17 Zoltan Varga <vargaz@gmail.com>
5396 * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
5398 * mini-sparc.h: Don't use sigaction on sparc/linux.
5400 * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
5402 * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
5404 * mini-exceptions.c: Add proper include files for getpid ().
5406 2006-10-16 Zoltan Varga <vargaz@gmail.com>
5408 * aot-runtime.c (mono_aot_get_method): Change this to return the native code
5409 address instead of a MonoJitInfo* to avoid decoding the exception info for the
5412 * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
5413 name cache to reduce its size.
5415 * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
5417 2006-10-15 Zoltan Varga <vargaz@gmail.com>
5419 * mini-x86.c: Save/restore the current LMF structure more efficiently using
5420 the mono_lmf TLS variable.
5422 * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in
5423 trampoline lmf frames.
5425 * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
5427 2006-10-14 Zoltan Varga <vargaz@gmail.com>
5429 * mini-amd64.c: Save/restore the current LMF structure more efficiently using
5430 the mono_lmf TLS variable.
5432 * mini-exceptions.c: Access the LMF structure through accessors.
5434 * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS
5435 variable instead of in jit_tls->lmf.
5437 * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
5439 * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in
5440 trampoline lmf frames.
5442 * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
5444 2006-10-12 Zoltan Varga <vargaz@gmail.com>
5446 * mini.c trace.c mini-x86.c: Revert these too.
5448 * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
5451 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
5453 * genmdesc.c: removed now dead code.
5455 2006-10-09 Robert Jordan <robertj@gmx.net>
5457 * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
5459 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
5461 * mini.h: do not leave gaps in the opcode values.
5463 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
5465 * jit-icalls.h: flag functions as internal here, too.
5467 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
5469 * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
5470 functions with the internal attribute.
5472 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
5474 * aot-compiler.c: fclose the file descriptor in the profile read loop.
5476 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
5478 * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
5481 2006-10-05 Zoltan Varga <vargaz@gmail.com>
5483 * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
5484 tail calls as on other platforms.
5486 * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
5488 * iltests.il: Add a few tailcall tests.
5490 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5492 * driver.c: fix loop for old compilers (bug #79521).
5494 2006-10-02 Zoltan Varga <vargaz@gmail.com>
5496 * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
5498 * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
5500 * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
5501 metadata without any code.
5503 * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
5504 more precise debugging information using gdb.
5506 2006-09-30 Zoltan Varga <vargaz@gmail.com>
5508 * inssel-ia64.brg: Make the helper methods static.
5510 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5512 * inssel-x86.brg: make the helper methods static.
5514 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
5516 * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
5518 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
5520 * mini.c: updates for monoburg changes.
5521 * inssel.brg: make a few helper functions static as they should.
5523 2006-09-27 Zoltan Varga <vargaz@gmail.com>
5525 * Makefile.am: Move mini-codegen.c to common_sources.
5527 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
5529 * mini.h: instroduce inst_call in MonoInst for use in OUTARG
5531 * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
5532 mini-ppc.h: port to use the common local register allocator.
5534 2006-09-26 Zoltan Varga <vargaz@gmail.com>
5536 * mini.h: Remove the comment too then.
5538 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
5540 * mini.h: put back backend.data which is to be used shortly and
5541 doesn't increase the size of MonoInst. If any 64 bit arch aligned
5542 pointers on 4 byte boundaries it'd have much bigger issues running
5543 and you can ifdef it out anyway.
5545 2006-09-26 Zoltan Varga <vargaz@gmail.com>
5547 * mini.h (MonoInst): Remove backend.data field since it is unused and increases
5548 MonoInst size by 4 bytes on 64 bit machines.
5550 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
5552 * *.{c,h,brg}: long due removal of the unused field in MonoInst and
5553 replacement with more meaningful field names. Arch maintainers, please
5554 check the assigned names are good enough for your arch.
5556 2006-09-26 Zoltan Varga <vargaz@gmail.com>
5558 * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the
5559 OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
5561 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
5563 * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
5564 relocations and memory requirements, put the optimization flags
5565 definitions in their own file.
5567 2006-09-24 Zoltan Varga <vargaz@gmail.com>
5569 * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
5571 * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
5573 2006-09-22 Zoltan Varga <vargaz@gmail.com>
5575 * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
5577 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
5579 * inssel.brg: use the correct function to get the size of an item
5580 in an array, given an element class.
5581 * aot-compiler.c: do not access class->class_size directly.
5583 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
5585 * mini.h, debug-mini.c: added a debugging function to print
5586 info about local variables and arguments in a jitted method.
5588 2006-09-20 Zoltan Varga <vargaz@gmail.com>
5590 * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
5592 * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
5594 2006-09-19 Zoltan Varga <vargaz@gmail.com>
5596 * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
5597 inner and outer loops when passing vtypes.
5599 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
5601 * mini-ppc.c: take into account the cpu errata for cache flushing
5602 which caused some random errors (bug #79381).
5604 2006-09-19 Zoltan Varga <vargaz@gmail.com>
5606 * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to
5607 mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
5609 2006-09-17 Zoltan Varga <vargaz@gmail.com>
5611 * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
5614 * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
5617 * mini-amd64.c (emit_call): Avoid near calls on freebsd.
5618 (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
5620 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
5623 2006-09-13 Zoltan Varga <vargaz@gmail.com>
5625 * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
5627 2006-09-12 Zoltan Varga <vargaz@gmail.com>
5629 * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this
5630 macro does not have to be changed during debugging.
5632 * 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>.
5634 * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
5636 * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
5638 * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if
5639 MONO_ARCH_NO_EMULATE_MUL is defined.
5641 * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
5643 * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
5645 * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
5647 * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
5649 2006-09-11 Zoltan Varga <vargaz@gmail.com>
5651 * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
5652 stuff to mini-exceptions.c where it is used.
5654 * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
5655 setup code, the real one is in mini-exceptions.c.
5657 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
5658 layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
5659 some changes from the freebsd ports tree.
5661 * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
5664 * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
5666 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
5668 * mini.c: on Linux, check for /proc to be mounted
5669 (bug# 79351, novell bug#201204).
5671 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
5673 * mini.c: handle cases where pthread_attr_getstack() behaves
5674 incorrectly (bug #78096).
5676 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
5678 * mini-arm.c: support larger stack frames (bug #79272).
5680 2006-09-08 Zoltan Varga <vargaz@gmail.com>
5682 * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
5684 * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef
5687 * aot-runtime.c (mono_aot_get_class_from_name): New function used by
5688 mono_class_from_name () to find a class from its name.
5690 * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
5692 2006-09-07 Zoltan Varga <vargaz@gmail.com>
5694 * mini-amd64.c (emit_call): Avoid strstr () call if possible.
5696 2006-09-05 Kornél Pál <kornelpal@gmail.com>
5698 * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
5700 2006-09-04 Zoltan Varga <vargaz@gmail.com>
5702 * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
5703 callinfo->trampoline.
5705 * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
5707 (mono_arch_patch_code): Add some debug code to help track down similar failures in the
5710 2006-09-03 Zoltan Varga <vargaz@gmail.com>
5712 * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
5714 2006-09-02 Zoltan Varga <vargaz@gmail.com>
5716 * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
5717 stats.method_trampolines, it is already done by the generic trampoline code.
5719 * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
5721 2006-09-01 Zoltan Varga <vargaz@gmail.com>
5723 * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
5725 * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
5727 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
5729 * mini.c (print_jit_stats): Print mscorlib mempool size too.
5731 * mini.c (print_jit_stats): Print new stats.
5733 * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
5735 2006-08-31 Zoltan Varga <vargaz@gmail.com>
5737 * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
5738 Address on two dimensional arrays. Fixes #78729.
5740 * mini.h (MonoCompile): Add a 'skip_visibility' field.
5742 * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
5745 * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
5747 * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
5750 * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
5752 (mini_get_ldelema_ins): Ditto.
5754 2006-08-30 Zoltan Varga <vargaz@gmail.com>
5756 * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
5757 (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation.
5760 2006-08-29 Neale Ferguson <neale@sinenomine.net>
5762 * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
5763 mono_arch_get_patch_offset as a dummy entry point to allow successful link.
5765 * exceptions-s390x.c: Cosmetic change.
5767 * tramp-s390.c: Fix warning.
5769 * cpu-s390.md: Correct length of mul_imm.
5771 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
5773 * aot-compiler.c: added binary writer with ELF backend
5774 implementation (only on Linux/x86 for now).
5776 2006-08-18 Zoltan Varga <vargaz@gmail.com>
5778 * Makefile.am: Don't run net 2.0 AOT tests.
5780 * aot-compiler.c (compile_method): Skip methods with tail calls as well.
5781 (mono_compile_assembly): Skip net 2.0 assemblies as well.
5783 * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
5785 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
5787 * aot-compiler.c: simplified and refactored the asm-writing code
5788 to allow different backends.
5790 2006-08-18 Zoltan Varga <vargaz@gmail.com>
5792 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5794 * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a
5795 little. Share patches of type TYPE_FROM_HANDLE as well.
5797 * mini.c (mono_patch_info_equal): New helper function.
5798 (mono_patch_info_hash): Ditto.
5800 * aot-compiler.c (emit_method_code): Fix s390 build.
5802 * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
5803 is not handled because it is stored as a flag and not as a type ctor. Fixes
5806 2006-08-17 Zoltan Varga <vargaz@gmail.com>
5808 * aot-compiler.c: Fix computation of GOT slot statistics.
5810 * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
5811 Also remove support for not PIC AOT.
5813 * mini.h: Bump AOT file format version.
5815 * objects.cs: Add a test for #78990.
5817 * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
5818 (peter.dettman@iinet.net.au). Fixes #79087.
5820 * basic-long.cs: Add a test for the above.
5822 2006-08-16 Zoltan Varga <vargaz@gmail.com>
5824 * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
5826 * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
5829 2006-08-15 Zoltan Varga <vargaz@gmail.com>
5831 * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
5834 2006-08-10 Jonathan Chambers <joncham@gmail.com>
5836 * mini.c: Don't verify COM proxy invoke calls
5839 2006-08-10 Dick Porter <dick@ximian.com>
5841 * wapihandles.c (mini_wapi_seminfo): More info, to help track down
5842 which process is holding semaphores locked.
5844 2006-08-08 Zoltan Varga <vargaz@gmail.com>
5846 * mini-ia64.c mini-amd64.c: Fix #79027.
5848 * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
5850 * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
5852 * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
5853 implicit arguments in a vararg call. Fixes #79027.
5855 2006-08-07 Zoltan Varga <vargaz@freemail.hu>
5857 * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
5858 (mono_get_array_new_va_signature): Ditto.
5860 2006-08-05 Zoltan Varga <vargaz@gmail.com>
5862 * aot-runtime.c: Call init_plt lazily.
5864 * inssel-long.brg: Fix unsigned long->int conversion.
5866 * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
5868 * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
5869 that most data is now in the .rss/.data section.
5871 2006-08-04 Zoltan Varga <vargaz@gmail.com>
5873 * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.
5875 * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
5877 * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
5879 * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
5881 * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
5882 virtual call. Fixes #79010.
5884 * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method
5885 and use the result as the this argument in the real call.
5887 * generics.2.cs: Add a new test for #79010.
5889 2006-08-03 Zoltan Varga <vargaz@gmail.com>
5891 * mini-x86.c: Fix a warning.
5893 * aot-compiler.c: Add a bunch of statistics.
5895 * mini.c (inline_method): Disable inlining in out-of-line bblocks.
5897 2006-08-02 Zoltan Varga <vargaz@gmail.com>
5899 * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
5901 2006-08-01 Zoltan Varga <vargaz@gmail.com>
5903 * 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>.
5905 2006-07-13 Miguel de Icaza <miguel@novell.com>
5907 * mini.c (mono_method_to_ir): Obtain the original method in the
5908 CIL stream and use this to perform validation.
5912 2006-07-19 Zoltan Varga <vargaz@gmail.com>
5914 * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
5915 (mono_arch_call_opcode): Ditto.
5917 * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
5920 * mini.c (mono_patch_info_dup_mp): New helper function.
5922 * aot-compiler.c (compile_method): Fix some of the memory allocated during
5923 compilation. Fixes #78827.
5925 2006-07-18 Kornél Pál <kornelpal@gmail.com>
5927 * declsec.c: Use original security informations for
5928 MONO_WRAPPER_MANAGED_TO_MANAGED.
5930 2006-07-15 Jonathan Chambers <joncham@gmail.com>
5932 * mini.c: Allow Com Interop methods/classes and
5933 don't verify COM wrapper calls
5936 2006-07-13 Zoltan Varga <vargaz@gmail.com>
5938 * inssel-long32.brg: Fix long->i4 checked conversion.
5940 * exceptions.cs: Add a test for the above.
5942 2006-07-08 Zoltan Varga <vargaz@gmail.com>
5944 * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
5946 * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown
5949 * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
5952 2006-07-03 Zoltan Varga <vargaz@gmail.com>
5954 * mini.c: Fix solaris/x86 exception handling.
5956 * Makefile.am: Get rid of $(ICU_LIBS).
5958 2006-07-02 Zoltan Varga <vargaz@gmail.com>
5960 * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
5961 (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
5962 (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
5964 * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
5966 * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
5967 this function causes a SIGSEGV.
5969 2006-06-22 Zoltan Varga <vargaz@gmail.com>
5971 * mini.c: Remove unused solaris/x86 includes.
5973 2006-06-21 Zoltan Varga <vargaz@gmail.com>
5975 * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
5977 2006-06-20 Jb Evain <jbevain@gmail.com>
5979 * cpu-g4.md: fix max length of start_handler instruction.
5981 2006-06-20 Massimiliano Mantione <massi@ximian.com>
5982 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
5984 2006-06-16 Massimiliano Mantione <massi@ximian.com>
5985 * ssa.c: Fixed bug 78653 for SSA based deadce.
5986 * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
5987 MonoInst.flags, used in SSA based deadce.
5988 * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
5989 * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
5991 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
5993 * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
5994 it can end up using non executable memory on ppc64 systems
5995 running ppc32 userspace (fix from Johannes Berg).
5997 2006-06-14 Dick Porter <dick@ximian.com>
5999 * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
6002 2006-06-13 Massimiliano Mantione <massi@ximian.com>
6003 * mini.c: Made so that inline is locally disabled if it would
6004 trigger a .cctor, because too many apps depend on this behavior
6005 (which seems to be also the one of the MS CLR).
6007 2006-06-13 Zoltan Varga <vargaz@gmail.com>
6009 * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
6010 No idea why this worked before.
6012 * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
6013 which branch to outer exception clauses since they could skip the
6014 inner finally clauses. Fixes #78633.
6016 * exceptions.cs: Add a test for the above.
6018 * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
6021 * iltests.il: Add a test for the above.
6023 2006-06-12 Zoltan Varga <vargaz@gmail.com>
6025 * mini.c (remove_block_if_useless): Do not remove the bblock immediately
6026 after the end of a try bblock, to prevent asserts in mini_method_compile ().
6028 * iltests.il: Add a test for the above.
6030 2006-06-10 Zoltan Varga <vargaz@gmail.com>
6032 * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
6034 * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
6035 methods as instrinsics.
6037 2006-06-09 Wade Berrier <wberrier@novell.com>
6039 * Makefile.am: Fix sources list for svn rename so that make dist succeeds
6040 (simple-cee-ops.h ssapre-mini-ops.h)
6042 2006-06-09 Neale Ferguson <neale@sinenomine.net>
6044 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
6045 * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
6047 * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
6048 * cpu-s390x.md: Fix max. length values for a couple of instructions.
6050 2006-06-09 Jonathan Chambers <jonathan.chambers@ansys.com>
6052 * mini-exceptions.c: Minor fix for building mono in Visual Studio.
6054 2006-06-08 Massimiliano Mantione <massi@ximian.com>
6056 * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
6057 * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
6058 * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
6059 * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
6060 * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
6061 of opcodes, so that bug 78549 should not happen again.
6062 * ssapre.c: Updated to use the renamed files.
6064 2006-06-08 Zoltan Varga <vargaz@gmail.com>
6066 * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move
6067 in OP_ATOMIC_EXCHANGE_I4.
6069 2006-06-07 Wade Berrier <wberrier@novell.com>
6071 * tramp-s390.c: Fix s390 build (add missing pointer declarations
6072 in mono_debugger_create_notification_function)
6074 2006-06-06 Zoltan Varga <vargaz@gmail.com>
6076 * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
6078 * mini.c (type_from_stack_type): Disable some changes which do not
6081 * driver.c: Reenable opts.
6083 * mini.h (MonoStackSlot): New structure to keep track of the verification state
6084 of the evaluation stack.
6086 * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
6087 evaluation stack trace at entry to the bblock.
6089 * mini.c (merge_stacks): New function to perform verification of stack merges.
6090 Turned off by default.
6092 * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
6095 2006-06-06 Massimiliano Mantione <massi@ximian.com>
6097 * local-propagation.c: Fixed bug 78549.
6099 2006-06-04 Zoltan Varga <vargaz@gmail.com>
6101 * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
6103 2006-06-02 Miguel de Icaza <miguel@novell.com>
6105 * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
6106 tramp-arm.c, tramp-ia64.c
6107 (mono_debugger_create_notification_function): Update signature to
6108 new signature and use new protocol for creating the notification
6111 Should fix the build.
6113 2006-06-02 Geoff Norton <gnorton@customerdna.com>
6115 * exceptions-ppc.c (mono_jit_walk_stack)
6116 (ves_icall_get_frame_info): Fix the build
6118 2006-06-02 Zoltan Varga <vargaz@gmail.com>
6120 * mini.c (mono_set_defaults): Fix the handling of -O=-all.
6122 2006-05-31 Raja R Harinath <rharinath@novell.com>
6124 * il2tests.2.il: New file for generics CIL tests. Add test for
6126 * Makefile.am: Update.
6129 * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
6132 2006-05-30 Massimiliano Mantione <massi@ximian.com>
6134 * aliasing.c: Fixed bug 78311.
6136 2006-05-29 Martin Baulig <martin@ximian.com>
6138 * mini-exceptions.c (mono_find_jit_info): When computing the
6139 native offset, check whether we're actually inside the method's
6140 code; call mono_debug_print_stack_frame() to format the frame.
6141 (ves_icall_System_Exception_get_trace): Call
6142 mono_debug_print_stack_frame() to format the stack frame.
6143 (ves_icall_get_trace): Update to the new debugging API.
6144 (mono_jit_walk_stack_from_ctx): Likewise.
6145 (ves_icall_get_frame_info): Likewise.
6147 * mini.c (get_method_from_ip): Use the new debugging API.
6148 (mono_print_method_from_ip): Likewise.
6151 (mono_jit_walk_stack): Use the new debugging API.
6152 (ves_icall_get_frame_info): Likewise.
6154 2006-05-27 Zoltan Varga <vargaz@gmail.com>
6156 * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
6158 2006-05-25 Massimiliano Mantione <massi@ximian.com>
6160 * mini.c: Added "limitator" to inline for debugging.
6162 2006-05-24 Martin Baulig <martin@ximian.com>
6164 * debug-debugger.c (mono_debugger_init): Create a private,
6165 malloc()-based code manager for the notification function and
6166 intentionally leak it on exit. This fixes the crash-on-exit race
6170 (mono_debugger_create_notification_function): Added
6171 `MonoCodeManager *' argument.
6174 (mono_debugger_create_notification_function): Added
6175 `MonoCodeManager *' argument.
6177 2006-05-23 Massimiliano Mantione <massi@ximian.com>
6179 * aliasing.c: Fixed 64 bit issue.
6180 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6181 default since all known bugs are fixed (one more time!).
6183 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
6185 * mini.c: write barrier support.
6187 2006-05-23 Martin Baulig <martin@ximian.com>
6189 * debug-debugger.c: Revert Paolo's change. Add comment and #error
6190 check at the top of the file.
6192 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
6194 * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
6195 reverting changes without reason and without changelog entries.
6197 2006-05-18 Zoltan Varga <vargaz@gmail.com>
6199 * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
6200 to a few opcodes. Fixes #78439.
6202 * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
6203 consistency with other archs.
6205 * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
6207 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6209 * debug-debugger.c: fix the build.
6211 2006-05-17 Martin Baulig <martin@ximian.com>
6214 (debugger_thread_vtable): Moved here from ../metadata/threads.c.
6215 (debugger_init_threads): Formerly known as mono_debugger_init_threads().
6216 (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
6217 (debugger_attach): Call GC_mono_debugger_add_all_threads().
6219 2006-05-11 Zoltan Varga <vargaz@gmail.com>
6221 * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
6223 2006-05-10 Zoltan Varga <vargaz@gmail.com>
6225 * mini-x86.c (mono_arch_instrument_epilog): Fix handling of
6226 MONO_TYPE_GENERICINST.
6228 * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of
6229 MONO_TYPE_GENERICINST.
6231 2006-05-09 Zoltan Varga <vargaz@gmail.com>
6233 * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
6236 2006-05-08 Zoltan Varga <vargaz@gmail.com>
6238 * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
6240 (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
6242 2006-05-06 Zoltan Varga <vargaz@gmail.com>
6244 * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
6245 mono_trace_cleanup ().
6247 * iltests.il: Fix problem with the newly added test.
6249 * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
6250 due to register constraints, free up the previous hreg. Fixes #78314.
6252 * iltests.il: Add new test for #78314.
6254 * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
6255 Interlocked.Add. Fixes #78312.
6257 * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
6259 2006-05-05 Zoltan Varga <vargaz@gmail.com>
6261 * inssel.brg (mini_emit_virtual_call): Fix a warning.
6263 2006-05-05 Martin Baulig <martin@ximian.com>
6265 * debug-mini.c (mono_debug_open_block): New method.
6268 (mono_arch_output_basic_block): Call mono_debug_open_block() at
6269 the beginning of each basic block.
6272 (mono_arch_output_basic_block): Call mono_debug_open_block() at
6273 the beginning of each basic block.
6275 2006-05-04 Massimiliano Mantione <massi@ximian.com>
6277 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
6278 default until I understand why they break the build on amd64.
6280 2006-05-04 Zoltan Varga <vargaz@gmail.com>
6282 * mini.c (mini_cleanup): Call mono_cleanup ().
6284 * mini.c (UNVERIFIED): New macro to make it easier to track down verification
6287 2006-05-04 Massimiliano Mantione <massi@ximian.com>
6289 * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
6290 * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
6291 default since all known bugs are fixed, and I cannot reproduce bug
6292 77944... I'm asking Matt Hargett to test again after this commit.
6294 2006-04-28 Massimiliano Mantione <massi@ximian.com>
6296 * mini-codegen.c: Fixed typo that thrashed inline.
6298 2006-04-28 Zoltan Varga <vargaz@gmail.com>
6300 * dominators.c (compute_dominators): Avoid using a worklist since
6301 it is not correct in some cases. Instead, iterate over all bblocks as
6302 in the original paper. Fixes --compile-all -O=all System.Xml.dll.
6304 2006-04-28 Miguel de Icaza <miguel@novell.com>
6306 * mini.c (mono_jit_compile_method_inner): Use
6307 mono_prepare_exception_from_error that resets the value
6310 2006-04-27 Miguel de Icaza <miguel@novell.com>
6312 * mini.c: Move the mini_loader_error_to_exception to metadata.
6314 2006-04-27 Massimiliano Mantione <massi@ximian.com>
6316 * aliasing.c: Fixed bug 78210.
6318 2006-04-27 Massimiliano Mantione <massi@ximian.com>
6320 * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
6321 default until all their problems (or the ones they trigger) are fixed.
6323 2006-04-26 Zoltan Varga <vargaz@gmail.com>
6325 * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
6327 * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
6328 as loaded only after resolving patches since that could invoke the same method.
6330 * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
6332 * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
6335 * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
6338 * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
6341 * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
6342 made from AOT code through the PLT table.
6344 * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
6345 holding the plt offset when a call is made to the aot plt trampoline.
6347 2006-04-25 Zoltan Varga <vargaz@gmail.com>
6349 * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the
6352 * Makefile.am (common_sources): Fix build breakage.
6354 * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
6355 calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
6356 intra-assembly calls if possible.
6358 * tramp-*.c: Add new functions for patching/nullifying PLT entries.
6360 * mini-trampolines.c: Handle PLT entries.
6362 * mini.c: Avoid creating a GOT var for calls.
6364 * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
6367 * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
6370 * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
6373 * mini.h: Bump AOT file format version.
6375 * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
6378 2006-04-25 Martin Baulig <martin@ximian.com>
6380 * driver.c: Disable copyprop, consprop and inline when running
6381 inside the debugger.
6383 2006-04-25 Martin Baulig <martin@ximian.com>
6385 * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
6386 with `get_current_thread' and added `detach'.
6387 (MonoDebuggerMetadataInfo): Added `thread_size',
6388 `thread_tid_offset', `thread_stack_ptr_offset' and
6389 `thread_end_stack_offset'.
6391 2006-04-25 Zoltan Varga <vargaz@gmail.com>
6393 * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and
6396 * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
6397 ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
6399 * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
6401 * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
6403 * aot.c: Add support for ADJUSTED_IID.
6405 2006-04-24 Zoltan Varga <vargaz@gmail.com>
6407 * aot.c (emit_method_order): Don't align method_order_end.
6409 * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
6410 the interface ID changes.
6412 2006-04-21 Dick Porter <dick@ximian.com>
6414 * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
6415 cleaning up a thread. Fixes the new part of bug 77470.
6417 2006-04-20 Geoff Norton <gnorton@customerdna.com>
6419 * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
6422 2006-04-19 Zoltan Varga <vargaz@gmail.com>
6424 * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
6426 * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
6427 SIGSEGV. Fixes #78072.
6429 * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
6430 unregister our SIGABRT handler.
6432 2006-04-19 Massimiliano Mantione <massi@ximian.com>
6434 * mini.c: Disabled inline where it can alter the call stack in a
6435 way visible from managed code.
6436 * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
6439 2006-04-16 Zoltan Varga <vargaz@gmail.com>
6441 * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
6442 on other platforms. Fixes #78089.
6444 2006-04-13 Martin Baulig <martin@ximian.com>
6446 * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
6447 determine whether we're inside the debugger.
6450 (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
6452 2006-04-12 Zoltan Varga <vargaz@gmail.com>
6454 * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
6455 handler clauses. Fixes #78024.
6457 * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
6458 in the CALL_MEMBASE opcodes. Fixes #78088.
6459 (mono_arch_get_vcall_slot_addr): Ditto.
6461 2006-04-10 Martin Baulig <martin@ximian.com>
6463 * debug-debugger.c: The thread handling code has now been moved
6464 into ../metadata/threads.c.
6466 2006-04-10 Zoltan Varga <vargaz@gmail.com>
6468 * driver.c (mono_main): Fix --with-gc=none build.
6470 * mini-codegen.c (mono_spillvar_offset): Improve alignment.
6471 (mono_spillvar_offset_float): Ditto.
6472 (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
6473 hreg, not when its !global, since on ia64, there is a third category: stacked
6476 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
6478 * mini.c: set MonoInst->klass for load field address and a few other
6481 2006-04-10 Zoltan Varga <vargaz@gmail.com>
6483 * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
6485 2006-04-07 Zoltan Varga <vargaz@gmail.com>
6487 * dominators.c (compute_dominators): Fix yet another bug which surfaced after
6488 the branch opt changes.
6490 2006-04-06 Dick Porter <dick@ximian.com>
6492 * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
6494 * wapihandles.c (mini_wapi_seminfo):
6495 * driver.c (mono_main): Add semaphore info option
6497 2006-04-05 Zoltan Varga <vargaz@gmail.com>
6499 * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
6500 branch optimization changes. Fixes #78009.
6502 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
6504 * mini.c: ignore accessibility of methods in managed->native wrappers.
6506 2006-04-04 Zoltan Varga <vargaz@gmail.com>
6508 * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
6510 * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
6512 2006-04-03 Zoltan Varga <vargaz@gmail.com>
6514 * mini.c: Modify the branch optimizations to preserve the invariant that
6515 the entries inside the in_bb and out_bb arrays are unique.
6516 (mono_unlink_bblock): Avoid creation of new arrays.
6518 2006-04-02 Zoltan Varga <vargaz@gmail.com>
6520 * mini.c (mono_unlink_bblock): Fix regression caused by previous
6523 2006-04-01 Zoltan Varga <vargaz@gmail.com>
6525 * mini.c (optimize_branches): Remove the "optimizations" in
6526 the cbranch1/cbranch2 -> branch cases which were causing several
6527 problems in the past. Fixes #77986.
6529 2006-03-31 Chris Toshok <toshok@ximian.com>
6531 * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
6532 default optimizations :(
6534 2006-03-31 Zoltan Varga <vargaz@gmail.com>
6536 * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
6539 2006-03-31 Massimiliano Mantione <massi@ximian.com>
6541 * local-propagation.c: Added comments to structs and removed
6542 "Mono" prefixes from local tree mover types.
6544 2006-03-30 Zoltan Varga <vargaz@gmail.com>
6546 * Makefile.am (arch_sources): Define this for each architecture so
6547 libmono_la_SOURCES is defined in one place.
6549 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
6551 * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
6554 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
6556 * driver.c: print the GC name supplied by configure.
6558 2006-03-29 Massimiliano Mantione <massi@ximian.com>
6560 * local-propagation.c: Added tree mover, and moved here all the
6561 local propagation code from mini.c
6562 * mini.c: Added support for treeprop, and moved all the local
6563 propagation code to local-propagation.c
6564 * mini.h: Added support for treeprop
6565 * driver.c: Added support for treeprop, enabled consprop, copyprop,
6566 treeprop, inline and deadce by default
6567 * Makefile.am: Added local-propagation.c
6569 2006-03-25 Zoltan Varga <vargaz@gmail.com>
6571 * exceptions-sparc.c: Applied patch from David S. Miller <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
6573 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
6575 * debug-debugger.c: make it compile without the Boehm GC.
6577 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
6579 * mini.c: fixed issue with mismatch when an icall is registered
6580 with multiple names but same address.
6582 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6584 * declsec.c, mini-exceptions.c: use write barrier to set reference
6585 fields of managed objects.
6587 2006-03-19 Zoltan Varga <vargaz@gmail.com>
6589 * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
6590 (can_access_internals): Fix a warning.
6592 * mini.c (print_method_from_ip): Rename this to
6593 mono_print_method_from_ip so it gets exported.
6595 * trace.c: Deal with strings inside StringBuilder's containing garbage
6596 and fix memory leaks. Fixes #77848.
6598 2006-03-19 Zoltan Varga <vargaz@gmail.com>
6600 * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
6603 2006-03-16 Neale Ferguson <neale@sinenomine.net>
6605 * mini-s390.c: Remove OP_X86_TEST_NULL.
6607 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
6609 * mini.c: use the correct GetHashCode() for the moving collector.
6611 2006-03-16 Massimiliano Mantione <massi@ximian.com>
6613 * liveness.c: Regalloc spill cost tuning.
6615 2006-03-15 Neale Ferguson <neale@sinenomine.net>
6617 * mini-s390x.h: Correct S390_LONG macro.
6619 * mini-s390x.c: Cleanup unused code.
6621 2006-03-15 Zoltan Varga <vargaz@gmail.com>
6623 * jit-icalls.h: New file.
6625 * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
6626 icalls and include that instead of including jit-icalls.c.
6628 * mini-ppc.c (mono_arch_output_basic_block): Remove references to
6631 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
6633 * mini.c: when checking for member accessibility, also check for
6634 friend assemblies and for explicit interface implementations.
6636 2006-03-14 Zoltan Varga <vargaz@gmail.com>
6638 * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
6640 * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
6642 * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
6643 common cases are done first.
6645 * mini-ops.h: Only define platform specific opcodes on the given platform.
6647 * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
6650 2006-03-14 Martin Baulig <martin@ximian.com>
6652 Revert Paolo's change from r57348:
6654 * mini.h: don't use gboolean for bitfields.
6655 * mini.c: verifier changes for fields and methods accessibility.
6657 2006-03-13 Neale Ferguson <neale@sinenomine.net>
6659 * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
6661 * mini-s390x.c: Fix conv_r_un.
6663 * cpu-s390, cpu-s390x.md: Fix lengths.
6665 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
6667 * mini.c: nested types have access to all the nesting
6668 levels, not just the enclosing types.
6670 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
6672 * mini.c: added a few more verification checks.
6674 2006-03-12 Zoltan Varga <vargaz@gmail.com>
6676 * liveness.c: Merge optimizations from the linear-il branch.
6678 2006-03-11 Zoltan Varga <vargaz@gmail.com>
6680 * mini-ia64.c (emit_call): Add a comment.
6682 * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
6684 * tramp-ia64.c: Fix some warnings.
6686 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
6688 * mini.h: don't use gboolean for bitfields.
6689 * mini.c: verifier changes for fields and methods accessibility.
6691 2006-03-11 Zoltan Varga <vargaz@gmail.com>
6693 * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
6694 lazy icall wrapper changes.
6696 * dominators.c: Replace all the dominator algorithms with faster
6697 ones from the linear-il branch.
6699 * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
6702 * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
6703 common cases are done first.
6705 * mini-amd64.c: Fix some warnings.
6707 * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
6710 * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
6713 * mini.h: Add a missing prototype.
6715 2006-03-10 Zoltan Varga <vargaz@gmail.com>
6717 * mini.c: Compile icall wrappers lazily.
6719 * mini-codegen.c: Use printf instead of g_print since its much faster.
6721 * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
6724 * mini.c (optimize_branches): Cache the negative result from
6725 remove_block_if_useless ().
6727 * mini.c (optimize_branches): Avoid restarting the iteration after each change.
6728 Also fix some bblock linking issues.
6730 * helpers.c (mono_disassemble_code): Reduce the size of the temporary
6733 * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
6735 * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
6736 accessed fields first, for better cache behavior.
6738 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
6740 * mini.c: speedup IList<T> array accesses.
6742 2006-03-09 Zoltan Varga <vargaz@gmail.com>
6744 * mini.c (mono_method_to_ir): Handle large methods overflowing the
6745 inline_costs counter. Fixes #77190.
6747 2006-03-06 Zoltan Varga <vargaz@gmail.com>
6749 * mini-exceptions.c: Call mono_trace_is_enabled () before printing
6750 trace messages. Fixes #77706.
6752 2006-03-04 Martin Baulig <martin@ximian.com>
6754 * tramp-amd64.c, tramp-x86.c
6755 (mono_debugger_create_notification_function): Use
6756 mono_global_codeman_reserve() to allocate a buffer at runtime and
6759 * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
6761 * debug-debugger.c (mono_debugger_init): Dynamically allocate the
6762 notification function at runtime and then call `initialize' in the
6763 `MONO_DEBUGGER__debugger_info' vtable.
6765 2006-03-04 Zoltan Varga <vargaz@gmail.com>
6767 * iltests.il: Fix a visibility problem.
6769 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6771 * driver.c, mini.c: add hooks for the counters API.
6773 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
6775 * driver.c: show disabled options.
6777 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
6779 * linear-scan.c: always use cost-driven selection.
6781 2006-02-28 Raja R Harinath <rharinath@novell.com>
6783 * jit-icalls.c (helper_compile_generic_method): Revert change from
6786 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
6788 * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
6790 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
6792 * inssel.brg: style fixes, mostly to force the updated monoburg
6793 to run for people using svn.
6795 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
6797 * mini.c: match monoburg changes.
6799 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
6801 * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
6802 ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
6803 declaration in the header file.
6805 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
6807 * helpers.c: reduce relocations and mem usage.
6809 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
6811 * mini.h, mini-codegen.c: disable logging features if
6812 requested by configure.
6814 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
6816 * mini.c: tiny verifier changes.
6818 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6820 * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
6821 cpu-pentium.md: stack alignment changes for osx/x86,
6822 partially from Geoff Norton <gnorton@customerdna.com>.
6824 2006-02-24 Raja R Harinath <harinath@gmail.com>
6826 * jit-icalls.c (helper_compile_generic_method): Update to changes
6827 in metadata/class.c.
6829 2006-02-24 Zoltan Varga <vargaz@gmail.com>
6831 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
6833 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
6834 interface calls with large offsets.
6836 2006-02-23 Raja R Harinath <rharinath@novell.com>
6838 * jit-icalls.c (helper_compile_generic_method): Document the
6839 special-case we depend on so that we can inflate the method twice
6840 with the same context with no bad side-effects.
6842 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
6844 * mini-x86.c, mini-amd64.c: fix for case when xen support
6847 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
6849 * mini-x86.c, mini-amd64.c: generate code to access tls items
6850 in a faster way for Xen systems.
6852 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
6854 * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
6855 updates and compilation fixes for the OSX/x86 port, mostly from
6856 Geoff Norton <gnorton@customerdna.com>.
6858 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
6860 * inssel.brg: faster interface call implementation
6861 to sync with the interface_offsets MonoVTable changes.
6863 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
6865 * mini.c: more verification checks.
6867 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
6869 * mini.c: added a few more verification checks.
6871 2006-02-17 Neale Ferguson <neale@sinenomine.net>
6873 * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
6874 facility on the processor and use it if available.
6876 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
6878 * driver.c, aot.c, mini.c: throw exception if the IL code is
6879 invalid or unverifiable.
6881 2006-02-17 Raja R Harinath <rharinath@novell.com>
6883 * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
6886 2006-02-16 Zoltan Varga <vargaz@gmail.com>
6888 * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
6890 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6892 * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
6893 mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
6894 handling of instantiated generic valuetypes.
6896 2006-02-11 Zoltan Varga <vargaz@gmail.com>
6898 * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of
6899 MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
6902 * generics.2.cs: Revert the nullable reftypes tests.
6904 2006-02-10 Zoltan Varga <vargaz@gmail.com>
6906 * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
6907 using __builtin_frame_address (1) as it doesn't work in the presence
6908 of optimizations. Hopefully fixes #77273.
6910 * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
6911 -> generics.cs change as it doesn't work with some automake versions.
6913 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
6915 * mini.c: handle systems that sue a different way to
6916 retrieve the stack address of the current thread.
6918 2006-02-09 Zoltan Varga <vargaz@gmail.com>
6920 * Makefile.am generics.2.cs: Rename this to generics.cs and handle
6921 it specially in the makefile.
6923 * generics.2.cs: Add tests for nullable reference types.
6925 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
6927 * mini.c: always handle the case when mono_jit_init()
6928 is called in a thread different from the main thread,
6929 confusing libgc (bug #77309).
6931 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
6933 * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
6935 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
6937 * mini.c: change optimize_branches () to use a single loop
6938 and introduce a new optimization to simplify some range checks.
6940 2006-02-03 Martin Baulig <martin@ximian.com>
6942 * debug-debugger.c (debugger_thread_manager_thread_created): Removed
6943 and merged with debugger_thread_manager_add_thread().
6944 (mono_debugger_main): Call debugger_thread_manager_add_thread() to
6945 inform the debugger about the main thread.
6947 2006-02-03 Zoltan Varga <vargaz@gmail.com>
6949 * basic.cs: Add test for div.un/rem.un constant folding.
6951 2006-02-03 Neale Ferguson <neale@sinenomine.net>
6953 * cpu-s390x.md: correct int_xor_imm length
6955 2006-02-03 Zoltan Varga <vargaz@gmail.com>
6957 * generics.2.cs: New test for #77442.
6959 * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
6962 2006-02-02 Martin Baulig <martin@ximian.com>
6964 * tramp-x86.c, tramp-amd64.c: It's now safe to #include
6965 <mono/metadata/mono-debug-debugger.h>
6967 * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
6969 2006-02-02 Martin Baulig <martin@ximian.com>
6971 * debug-debugger.h: New header file for debug-debugger.c.
6973 * debug-debugger.c: Big API cleanup; don't run the managed Main()
6974 function is a separate thread anymore; add support for attaching.
6976 2006-02-01 Zoltan Varga <vargaz@gmail.com>
6978 * tramp-x86.c: Fix a warning.
6980 2006-01-31 Zoltan Varga <vargaz@gmail.com>
6982 * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
6983 on very large methods.
6985 * aot.c (load_patch_info): Fix a warning.
6987 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
6989 * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
6990 mini-ops.h: alu membase optimizations.
6992 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
6994 * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
6995 to speedup StringBuilder.
6997 2006-01-27 Zoltan Varga <vargaz@gmail.com>
6999 * dominators.c (mono_compute_natural_loops): Fix detection of
7000 loop body start blocks.
7002 * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
7004 2006-01-26 Zoltan Varga <vargaz@gmail.com>
7006 * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
7009 2006-01-25 Massimiliano Mantione <massi@ximian.com>
7011 * aliasing.c: Fixed aliasing issue on 64 bit archs.
7013 2006-01-25 Martin Baulig <martin@ximian.com>
7015 * debug-debugger.c: Moved the `MonoDebuggerManager' and
7016 `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
7017 started to cleanup this file a little bit.
7019 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
7021 * mini.c: optimize a codepath frequently happening in generics code.
7023 2006-01-23 Martin Baulig <martin@ximian.com>
7025 * Makefile.am: Only compile debug-debugger.c on supported platforms.
7027 * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
7030 * driver.c: debug-debugger.c is only available if
7031 `MONO_DEBUGGER_SUPPORTED' is defined.
7033 2006-01-23 Martin Baulig <martin@ximian.com>
7035 * debug-debugger.c: Only enable this on platforms where the Mono
7036 Debugger is working (x86 and x86_64).
7038 2006-01-21 Martin Baulig <martin@ximian.com>
7040 The Mono Debugger is now using the normal `mono' instead of the
7041 `mono-debugger-mini-wrapper' when executing managed code.
7043 * debug-debugger.c: New file; previously known as
7044 debugger/wrapper/wrapper.c.
7046 * debug-mini.c (mono_init_debugger): Removed.
7048 * driver.c (mono_main): Added new `--inside-mdb' command line
7049 argument which is used when running inside the debugger.
7051 2006-01-20 Zoltan Varga <vargaz@gmail.com>
7053 * liveness.c (mono_analyze_liveness): Remove some unused data
7056 2006-01-17 Zoltan Varga <vargaz@gmail.com>
7058 * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
7060 2006-01-16 Zoltan Varga <vargaz@gmail.com>
7062 * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
7063 depends on implementation details of monobitset.
7065 * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
7068 2006-01-15 Zoltan Varga <vargaz@gmail.com>
7070 * liveness.c: Update after monobitset changes.
7072 2006-01-14 Zoltan Varga <vargaz@gmail.com>
7074 * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
7076 2006-01-11 Neale Ferguson <neale@sinenomine.net>
7078 * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
7080 * mini-s390x.c: Remove warning messages.
7082 2006-01-11 Ben Maurer <bmaurer@andrew.cmu.edu>
7084 * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
7086 2006-01-10 Zoltan Varga <vargaz@gmail.com>
7088 * generics.2.cs: Add ldelem/stelem_any test.
7090 2006-01-10 Neale Ferguson <neale@sinenomine.net>
7092 * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
7094 2006-01-07 Zoltan Varga <vargaz@gmail.com>
7096 * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
7098 2006-01-06 Zoltan Varga <vargaz@gmail.com>
7100 * generics.2.cs: Reenable vtype tests.
7102 * inssel-x86.brg: Remove an icorrect valuetype rule.
7104 2006-01-06 Neale Ferguson <neale@sinenomine.net>
7106 * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
7107 initial support for OP_ABS.
7109 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7111 * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
7113 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7115 * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int
7116 conversion and implement LADD/LSUB.
7118 * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
7121 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7123 * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
7125 * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
7128 2006-01-05 Neale Ferguson <neale@sinenomine.net>
7130 * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when
7131 localloc is encountered. Fixes crash in test-183.cs when using gmcs
7132 (stack walk problem).
7134 2006-01-04 Zoltan Varga <vargaz@gmail.com>
7136 * aot.c (mono_aot_load_method): Fix a warning.
7138 2006-01-03 Neale Ferguson <neale@sinenomine.net>
7140 * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
7142 2006-01-03 Zoltan Varga <vargaz@gmail.com>
7144 * iltests.il: Add test for #77148.
7146 * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
7149 2006-01-03 Neale Ferguson <neale@sinenomine.net>
7151 * mini-s390x.c, inssel-s390x.brg: Remove debug statements
7153 2006-01-03 Neale Ferguson <neale@sinenomine.net>
7155 * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
7156 cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
7158 * basic-long.cs: Add lconv-to-r4/r8 tests.
7160 2006-01-03 Zoltan Varga <vargaz@gmail.com>
7162 * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
7164 * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
7165 here as on other archs.
7167 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7169 * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
7171 2005-12-29 Neale Ferguson <neale@sinenomine.net>
7173 * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
7175 * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
7177 * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
7178 instrument_prolog; Add memory_barrier instruction.
7180 2005-12-26 Zoltan Varga <vargaz@gmail.com>
7182 * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
7184 2005-12-23 Zoltan Varga <vargaz@gmail.com>
7186 * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
7188 * aliasing.c inssel.brg: Fix warnings.
7190 * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
7191 could skip initialization of some parts of memory.
7193 * mini.c mini-ia64.c: Fix warnings.
7195 * inssel-sparc.brg: Add an implementation of lneg which actually works.
7197 2005-12-22 Zoltan Varga <vargaz@gmail.com>
7199 * aliasing.c (mono_build_aliasing_information): Add a workaround for
7200 a crash seen on sparc.
7202 * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
7204 * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
7206 2005-12-21 Neale Ferguson <neale@sinenomine.net>
7208 * mini-ops.h: Add s390_backchain instruction
7210 * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
7212 * cpu-s390.md: Add s390_backchain instruction
7214 * mini-s390.c: Significant ABI changes
7216 * mini-s390.h: Cater for zero length structures
7218 2005-12-20 Neale Ferguson <neale@sinenomine.net>
7220 * mini-s390.c: ABI fixes
7222 * inssel-s390.brg: Remove debug statements
7224 * cpu-s390.md: Fix length of ATOMIC_xx operations
7226 2005-12-19 Zoltan Varga <vargaz@gmail.com>
7228 * basic-float.cs: Add float<->long conversion tests.
7230 2005-12-16 Neale Ferguson <neale@sinenomine.net>
7232 * mini-s390.c: Fix LOCALLOC processing.
7234 * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
7236 2005-12-15 Zoltan Varga <vargaz@gmail.com>
7238 * iltests.il: Add tests for some opcodes not covered by the other
7241 2005-12-15 Neale Ferguson <neale@sinenomine.net>
7243 * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct
7244 register loading for Tail processing; Correct trace output.
7246 * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
7248 * cpu-s390.md: Correct size of jmp instruction.
7250 2005-12-13 Neale Ferguson <neale@sinenomine.net>
7252 * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
7254 2005-12-13 Neale Ferguson <neale@sinenomine.net>
7256 * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
7257 Bring s390 up to current level.
7259 2005-12-12 Zltan Varga <vargaz@gmail.com>
7261 * generics.2.cs: Disable the newly added tests as they do not work yet.
7263 * generics.2.cs: Add valuetype tests.
7265 2005-12-09 Zoltan Varga <vargaz@gmail.com>
7267 * basic-long.cs: Add i4->u8 test.
7269 * objects.cs: Add tests for JIT intrinsic.
7271 * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
7272 optimizations lost by a mistake.
7274 2005-12-07 Zoltan Varga <vargaz@gmail.com>
7276 * basic-long.cs: Remove a test moved to objects.cs.
7278 * arrays.cs: Add more array tests.
7280 2005-12-06 Zoltan Varga <vargaz@gmail.com>
7282 * arrays.cs: Add new tests for multi-dimensional arrays.
7284 2005-12-06 Raja R Harinath <rharinath@novell.com>
7286 * Makefile.am (test_sources2): Add generics.2.cs.
7287 (EXTRA_DIST): Add test_sources2.
7289 2005-12-05 Ben Maurer <bmaurer@ximian.com>
7291 Support for boxing and unboxing nullable types as well as the
7292 isinst operation on nullables, per the CLI ammendment.
7294 * inssel.brg (CEE_ISINST): Special case for nullable
7296 * mini.c (handle_unbox_nullable): new method
7297 (handle_box): Special case for nullable types
7298 (mono_method_to_ir): Call handle_unbox_nullable in correct
7301 * generics.2.cs: New test suite
7303 * Makefile.am: Support for regression tests with generics.
7305 2005-12-03 Zoltan Varga <vargaz@gmail.com>
7307 * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
7308 allocated to registers. Fixes #76800.
7310 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
7312 * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
7314 2005-11-30 Zoltan Varga <vargaz@gmail.com>
7316 * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot
7319 2005-11-29 Zoltan Varga <vargaz@gmail.com>
7321 * objects.cs basic-calls.cs: Move a test depending on valuetypes to
7324 * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
7326 * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
7327 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
7329 * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
7330 single precision before storing to a single precision location.
7332 2005-11-28 Raja R Harinath <rharinath@novell.com>
7334 * Makefile.am (ILASM): Use profile-dependent location of ilasm.
7336 2005-11-27 Zoltan Varga <vargaz@gmail.com>
7338 * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
7341 * basic.cs: Remove test_0_byte_compares test which was moved to
7342 objects.cs a long time ago.
7344 2005-11-22 Massimiliano Mantione <massi@ximian.com>
7346 * aliasing.c: Fixed aliasing issue on 64 bit archs.
7348 2005-11-20 Zoltan Varga <vargaz@gmail.com>
7350 * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
7351 handlers are called.
7353 * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
7356 * mini-ia64.c: Add support for the throw->branch exception
7359 * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
7361 2005-11-18 Massimiliano Mantione <massi@ximian.com>
7363 * mini.c: Enabled "fastpath" deadce :-)
7365 2005-11-18 Massimiliano Mantione <massi@ximian.com>
7367 * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
7368 alias analysis pass to support it.
7371 * liveness.c: Likewise (liveness computation can use aliasing
7372 information to be more accurate).
7373 * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
7374 moreover made so that "--compile-all" uses the given optimization
7375 flags and not the default ones.
7376 * aliasing.c: Alias analysis (new file).
7377 * aliasing.h: Likewise.
7378 * Makefile.am: added "aliasing.c" and "aliasing.h".
7380 2005-11-17 Zoltan Varga <vargaz@gmail.com>
7382 * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
7385 2005-11-13 Zoltan Varga <vargaz@gmail.com>
7387 * mini-exceptions.c (mono_handle_exception_internal): Remove the
7388 fp >= end_of_stack exit condition, as it is not needed, and it might
7389 become true for fp eliminated frames.
7391 2005-11-11 Zoltan Varga <vargaz@gmail.com>
7393 * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
7396 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
7398 * mini-arm.c: fixed alignment of doubles/longs to match
7399 the C ABI (bug #76635).
7401 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
7403 * aot.c: fix compilation with --enable-minimal=aot.
7405 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
7407 * mini-arm.c: fixed compatibility with the new
7408 floating point emulator package for compares.
7410 2005-11-03 Atsushi Enomoto <atsushi@ximian.com?
7412 * mini.c : reverted sig->pinvoke changes (r51396-51397).
7414 2005-11-01 Zoltan Varga <vargaz@freemail.hu>
7416 * mini-exceptions.c (print_stack_frame): Output to stderr.
7417 (mono_handle_native_sigsegv): Ditto.
7419 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
7421 * mini-amd64.c (mono_arch_output_basic_block): Remove unused
7422 OP_LCONV_TO_OVF_I implementation.
7424 * mini-amd64.c: Add support for the throw->branch exception
7427 * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
7428 when the catch clause catches a more general exception, i.e. Object.
7430 2005-10-30 Zoltan Varga <vargaz@gmail.com>
7432 * cpu-ia64.md: Remove unused opcodes.
7434 * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
7435 specific defines for architectures defining USE_SIGACTION.
7437 * mini-ia64.c: Fix some warnings.
7439 * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
7440 version seemed to skip a frame.
7442 2005-10-30 Zoltan Varga <vargaz@freemail.hu>
7444 * mini.c: Clean up the usage of sig->pinvoke flag. Now
7445 only calls which are made to native code use this flag.
7447 2005-10-29 Zoltan Varga <vargaz@freemail.hu>
7449 * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
7450 varargs methods as well.
7452 * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
7453 which have save_lmf set. Reorganize methods prologs a bit.
7455 * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
7456 debugger to the proper place.
7458 2005-10-29 Martin Baulig <martin@ximian.com>
7460 * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
7461 when running inside the debugger until the debugger has support
7464 2005-10-26 Zoltan Varga <vargaz@gmail.com>
7466 * mini.h: Fix a warning.
7468 2005-10-24 Miguel de Icaza <miguel@novell.com>
7470 * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
7471 we expose publicly, this returns the string.
7473 2005-10-22 Zoltan Varga <vargaz@freemail.hu>
7475 * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
7476 with fp elimination.
7478 2005-10-21 Zoltan Varga <vargaz@gmail.com>
7480 * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
7481 native stacktrace using the glibc 'backtrace' function if available.
7483 2005-10-20 Zoltan Varga <vargaz@gmail.com>
7485 * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
7487 * mini-exceptions.c (mono_handle_native_sigsegv): New function to
7488 handle SIGSEGVs received while in native code.
7490 * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
7491 code, call mono_handle_native_sigsegv which will abort the runtime
7492 after printing some diagnostics, instead of converting it into a
7493 confusing NullReferenceException.
7495 2005-10-18 Zoltan Varga <vargaz@gmail.com>
7497 * cpu-pentium.md: Remove unused opcodes.
7499 2005-10-18 Zoltan Varga <vargaz@freemail.hu>
7501 * mini-amd64.h (MonoLMF): Add rsp field.
7503 * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
7506 2005-10-17 Zoltan Varga <vargaz@gmail.com>
7508 * mini-codegen.c (get_register_spilling): Fix some warnings.
7510 2005-10-16 Zoltan Varga <vargaz@freemail.hu>
7512 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
7513 elimination during exception handling. Enable fp elimination by
7516 * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
7519 2005-10-16 Martin Baulig <martin@ximian.com>
7522 (mono_debugger_run_finally): New public method for the debugger.
7524 2005-10-10 Zoltan Varga <vargaz@gmail.com>
7526 * debug-mini.c (mono_debug_init_method): Fix warning.
7528 * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
7529 the 'exname' parameter const to fix some warnings.
7531 2005-10-09 Zoltan Varga <vargaz@freemail.hu>
7533 * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
7534 introduced by the previous patch.
7536 2005-10-08 Zoltan Varga <vargaz@gmail.com>
7538 * basic-float.cs: Add test for precision of float arithmetic.
7540 * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
7541 when loading/storing single values from/to memory.
7543 * mini.c (mono_jit_compile_method_with_opt): Create the function
7544 pointers in the correct domain.
7546 2005-10-08 Zoltan Varga <vargaz@freemail.hu>
7548 * mini-exceptions.c (mono_handle_exception_internal): Fix bug
7549 introduced by previous patch.
7551 * mini-exceptions.c (mono_handle_exception_internal): Handle the case
7552 when out_filter_idx is NULL.
7554 * mini-exceptions.c: Don't run filter clauses twice during exception
7555 handling. Fixes #75755.
7557 2005-10-07 Zoltan Varga <vargaz@gmail.com>
7559 * aot.c: Add support for ldflda wrappers.
7561 * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
7564 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
7566 * mini.c, mini.h: do not consider exception handlers blocks when
7567 setting up interface variables.
7569 2005-10-04 Zoltan Varga <vargaz@freemail.hu>
7571 * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
7573 2005-10-03 Zoltan Varga <vargaz@gmail.com>
7575 * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
7576 causes a regression.
7578 * mini.c (mini_thread_cleanup): Fix reading of freed memory.
7580 2005-10-02 Zoltan Varga <vargaz@freemail.hu>
7582 * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
7583 of the OP_P definitions.
7585 * TODO: Add a proposal for dealing with the CEE/OP mess.
7587 * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm
7588 optimizations from the x86 port.
7590 * cpu-amd64.md: Ditto.
7592 * basic.cs basic-long.cs: Add tests.
7594 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
7596 * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
7597 Patrik Torstensson's implementation of my exception-handling
7598 optimization idea, when the exception object is not used
7601 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
7603 * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
7604 of the mul_imm optimizations from the old jit.
7606 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
7608 * mini.c, liveness.c: patch by Patrik Torstensson and
7609 Zoltan Varga to improve performance in methods with
7612 2005-09-30 Zoltan Varga <vargaz@gmail.com>
7614 * driver.c: Remove 'Globalization' entry from --version.
7616 2005-09-28 Zoltan Varga <vargaz@gmail.com>
7618 * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
7619 there is a profiler interested in JIT events.
7621 * aot.c: Load profile files produced by the AOT profiling module, and
7622 reorder methods based on the profiling info. Add a 'method_order' table
7623 to the AOT file to make mono_aot_find_jit_info work with the reordered
7626 * mini.h: Bump AOT file version info.
7628 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
7630 * mini-arm.h: work around what looks like a gcc bug when optimizations
7633 2005-09-28 Raja R Harinath <rharinath@novell.com>
7635 * Makefile.am (AM_CFLAGS): Don't use += to append inside
7636 conditionals. Use ...
7637 (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
7639 2005-09-27 Zoltan Varga <vargaz@freemail.hu>
7641 * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
7642 to determine the amount of memory to copy when passing valuetypes.
7644 * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
7645 4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
7647 2005-09-27 Zoltan Varga <vargaz@gmail.com>
7649 * mini.h mini.c aot.c: Add infrastructure to collect pagefault
7650 information about aot.
7652 2005-09-27 Ben Maurer <bmaurer@ximian.com>
7654 * *.c: Replace the use of {Enter,Leave}CriticalSection with
7655 macros. This will allow a deadlock debugger to easily be plugged
7658 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
7660 * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
7662 2005-09-27 Raja R Harinath <rharinath@novell.com>
7664 * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
7665 (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
7666 (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
7667 ($(arch_built)) [CROSS_COMPILING]: Error out.
7669 2005-09-26 Zoltan Varga <vargaz@gmail.com>
7671 * aot.c: Add support for the no_special_static flag for classes.
7673 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
7675 * Reapply reverted patches.
7677 * *: Revert r50174 as well.
7679 * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
7681 2005-09-24 Zoltan Varga <vargaz@freemail.hu>
7683 * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
7685 2005-09-23 Miguel de Icaza <miguel@novell.com>
7687 * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
7688 part of the SIG_HANDLER_SIGNATURE.
7690 2005-09-23 Zoltan Varga <vargaz@gmail.com>
7692 * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
7695 * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention
7696 introduced by previous patch.
7698 2005-09-21 Zoltan Varga <vargaz@gmail.com>
7700 * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
7701 saved registers too.
7703 * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based
7704 upon the information returned by get_call_info ().
7706 * mini-x86.c (add_float): Fix stack size calculation.
7707 (mono_arch_call_opcode): Rewrite this so it works based up the
7708 information returned by get_call_info ().
7709 (mono_arch_get_this_vret_args): Ditto.
7711 2005-09-21 Zoltan Varga <vargaz@freemail.hu>
7713 * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
7714 in cinfo to determine the registers which need to be used.
7716 2005-09-20 Miguel de Icaza <miguel@novell.com>
7718 * driver.c (mono_main): Add --server and --desktop flags.
7720 2005-09-16 Zoltan Varga <vargaz@gmail.com>
7722 * mini-ia64.h: Make register masks 64 bit. Don't treat argument
7723 registers as global registers.
7725 * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no
7726 longer needed with the new register allocator.
7728 * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
7730 * cpu-ia64.md: Remove unused opcodes.
7732 * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
7734 2005-09-16 Zoltan Varga <vargaz@freemail.hu>
7736 * cpu-amd64.md: Remove unused opcodes.
7738 * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
7739 needed with the new register allocator.
7741 * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
7744 2005-09-16 Raja R Harinath <rharinath@novell.com>
7746 * Makefile.am (check-local): Don't invoke semdel-wrapper.
7748 2005-09-16 Martin Baulig <martin@ximian.com>
7750 * exceptions-amd64.c
7751 (throw_exception): Don't call mono_debugger_throw_exception() if
7752 we're a rethrow - see the FIXME in the code.
7754 2005-09-15 Geoff Norton <gnorton@customerdna.com>
7756 * mini.c (mono_init_exceptions): This only works on some architectures.
7758 2005-09-15 Zoltan Varga <vargaz@gmail.com>
7760 * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
7763 * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
7765 * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
7766 now in mini-exceptions.c.
7768 2005-09-15 Zoltan Varga <vargaz@freemail.hu>
7770 * mini-amd64.h mini-am64.c: Remove the altstack support code which is
7771 now in mini-exceptions.c.
7773 2005-09-15 Zoltan Varga <vargaz@gmail.com>
7775 * exceptions-x86.c: Applied patch from Patrik Torstensson
7776 <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
7778 * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
7779 code into mini-exceptions.c. Add some assertions to it.
7781 2005-09-12 Zoltan Varga <vargaz@gmail.com>
7783 * aot.c (emit_section_change): Applied patch from "The Software Team"
7784 (<software@solmersa.com>). Fix as errors on windows.
7786 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
7788 * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
7789 method info into the LMF.
7791 2005-09-11 Zoltan Varga <vargaz@gmail.com>
7793 * mini-ia64.c: Add proper unwind info for method epilogs.
7795 * exceptions-ia64.c: Add some code to help debugging.
7797 * mini-ia64.c mini-ia64.h: Add sigaltstack support.
7799 * mini-exceptions.c: Fix warning.
7801 2005-09-11 Zoltan Varga <vargaz@freemail.hu>
7803 * mini.c: Really fix build.
7805 * mini-x86.c mini-amd64.c: Fix build.
7807 2005-09-11 Zoltan Varga <vargaz@gmail.com>
7809 * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
7811 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
7812 some Interlocked methods as intrinsics.
7814 * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
7815 for Thread methods as well.
7817 * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
7819 * inssel.brg: Add rule for OP_MEMORY_BARRIER.
7821 * mini-ia64.c mini-x86.c mini-amd64.c
7822 cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of
7825 * mini.c (mono_init_exceptions): Fix build breakage.
7827 2005-09-10 Zoltan Varga <vargaz@gmail.com>
7829 * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
7830 of instructions. Use the new ia64_unw_op macros for emitting unwind
7833 * mini.c (mono_init_exceptions): Initialize exception handling
7834 related trampolines at startup.
7836 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
7838 * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
7840 2005-09-09 Zoltan Varga <vargaz@gmail.com>
7842 * mini.c: Handle type loading errors gracefully during compilation and
7843 throw the appropriate exception.
7845 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
7847 * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
7848 for the mono binary.
7850 2005-09-09 Martin Baulig <martin@ximian.com>
7852 * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
7855 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
7857 * mini-arm.h: use emulation for conv.r.un for the release.
7859 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
7861 * mini-arm.c, objects.cs: more fixes and tests for them.
7863 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
7865 * mini-arm.c: align structures to at least 4 bytes to be able
7866 to keep our current optimized memcpy.
7868 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
7870 * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
7872 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
7874 * mini.c: ignore SIGPIPE.
7876 2005-09-04 Zoltan Varga <vargaz@gmail.com>
7878 * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
7880 * mini-ia64.h mini-ia64.c: Add some minor optimizations.
7882 2005-09-02 Zoltan Varga <vargaz@gmail.com>
7884 * mini.h: Add prototype for mono_allocate_stack_slots_full.
7886 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
7888 * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
7889 exception handling support.
7890 * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
7891 patch by Brian Koropoff <briank@marakicorp.com>).
7893 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
7895 * mini.c: revert another 'optimization' which breaks when
7896 items on the eval stack need to be saved at a basic block end
7899 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
7901 * jit-icalls.c: for arrays, ensure we always provide
7904 2005-08-30 Zoltan Varga <vargaz@gmail.com>
7906 * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
7908 * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
7910 2005-08-29 Zoltan Varga <vargaz@gmail.com>
7912 * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
7913 arguments in their original register.
7915 2005-08-28 Zoltan Varga <vargaz@gmail.com>
7917 * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
7920 * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
7921 when ssapre is enabled.
7923 * inssel-long.brg: Fix bug in previous patch.
7925 * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize
7926 multiplication by a constant.
7928 2005-08-27 Zoltan Varga <vargaz@gmail.com>
7930 * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
7933 * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
7936 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
7938 * inssel-arm.brg: apply changes tested by Brian Koropoff
7939 <briank@marakicorp.com>.
7941 2005-08-25 Zoltan Varga <vargaz@gmail.com>
7943 * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
7945 2005-08-24 Zoltan Varga <vargaz@gmail.com>
7947 * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
7948 to the same register if dreg is just a base register.
7949 (print_ins): Improve printing of membase opcodes.
7951 * inssel-x86.brg: Add optimized ldind(reg) rules.
7953 * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
7955 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
7957 * mini.c: when running under valgrind, set the stack bottom for
7958 the GC at the actual approximate stack for the app (fixes running
7959 mono with valgrind).
7961 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
7963 * mini.c: do no break at the first valuetype to init found
7966 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
7968 * cpu-arm.md, mini-arm.c: more fixes and LMF support.
7970 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
7972 * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
7974 2005-08-23 Zoltan Varga <vargaz@freemail.hu>
7976 * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
7978 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
7980 * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
7982 * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
7985 * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
7988 * mini.c (optimize_branches): Don't quit after 1000 iterations on large
7991 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
7993 * tramp-arm.c: allocate less memory for the trampoline and fix typo.
7995 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
7997 * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
7998 in the tail recursion optimization.
8000 * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as
8001 debug info into the assembly file.
8003 * iltests.il: Add test for filter regions.
8005 * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
8006 initial stack of filter regions. Fixes #75755.
8008 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
8010 * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
8013 2005-08-22 Zoltan Varga <vargaz@freemail.hu>
8015 * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
8016 the check for an already compiled method on non-ia64 platforms.
8017 (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
8020 * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
8022 * inssel-x86.brg: Add some optimized call rules.
8024 2005-08-21 Zoltan Varga <vargaz@freemail.hu>
8026 * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
8029 * mini.h mini-trampolines.c: Pass the trampoline argument to
8030 mono_arch_patch_delegate_trampoline.
8032 * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
8034 * mini-trampolines.c: Fix build.
8036 * mini-amd64.h: Add delegate trampolines.
8038 * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
8040 * inssel-amd64.brg: Add optimized call rules.
8042 * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
8044 * inssel-ia64.brg: Add optimized ldind(reg) rules.
8046 2005-08-20 Zoltan Varga <vargaz@freemail.hu>
8048 * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
8051 * mini-ia64.c: Remove LMF fixmes.
8053 * mini-ia64.h: Remove most fields from LMF.
8055 * inssel-ia64.brg (stmt): Fix unaligned access errors.
8057 * mini-trampolines.c: Add support for IA64 function descriptors.
8059 * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
8060 for IA64 function descriptors.
8062 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
8064 * tramp-arm.c: patch the vtable for virtual calls. Added
8065 support code to register/unregister the LMF.
8066 * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
8069 2005-08-19 Dick Porter <dick@ximian.com>
8071 * mini.c: Use a gsize to store the thread ID, so it can hold a 64
8072 bit value if needed.
8074 2005-08-19 Zoltan Varga <vargaz@freemail.hu>
8076 * mini.c (mini_get_method): Move handling of wrapper data here.
8078 * mini.c (mono_method_to_ir): Add support for dynamic methods.
8080 * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
8083 * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so
8084 bblock->code does not remain empty.
8086 2005-08-17 Zoltan Varga <vargaz@freemail.hu>
8088 * arrays.cs: Add regression test for #75832.
8090 * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
8091 rules. Fixes #75832.
8093 * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
8094 instruction scheduling.
8096 2005-08-12 Zoltan Varga <vargaz@freemail.hu>
8098 * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
8100 2005-08-11 Zoltan Varga <vargaz@freemail.hu>
8102 * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
8104 * mini-codegen.c: Fix VC build.
8106 * cpu-pentium.md: Increase length of atomic_exhange_i4.
8108 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8110 * mini.h: fix signature for mono_register_opcode_emulation.
8112 2005-08-09 Zoltan Varga <vargaz@freemail.hu>
8114 * mini.c: Get rid of most of the helper_sig_... constants using
8115 mono_create_icall_signature ().
8117 2005-08-08 Zoltan Varga <vargaz@freemail.hu>
8119 * jit-icalls.c (helper_ldstr): New helper function.
8121 * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
8123 * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
8124 throw, load the string using a helper call instead of creating a string object.
8126 * aot.c: Update after LDSTR changes.
8128 * mini.h: Bump AOT file version.
8130 * aot.c: Save class size info into the AOT file. Print more statistics during
8133 * mini.h: Bump AOT file version.
8135 * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8136 ordering of disasm cases. Fixes #74957.
8138 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
8140 * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
8141 jit-icalls.c, mini-codegen.c, Makefile.am: changes in
8142 the generic code needed for the ARM port.
8144 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
8146 * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
8147 inssel-arm.brg: more ARM features and fixes.
8149 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
8151 * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
8152 ARM port work in progress.
8154 2005-07-30 Zoltan Varga <vargaz@freemail.hu>
8156 * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
8158 * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
8160 * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
8162 * inssel.brg (mini_emit_memset): Add support for unaligned access.
8164 * *-ia64.*: Ongoing IA64 work.
8166 * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
8168 2005-07-28 Zoltan Varga <vargaz@freemail.hu>
8170 * TODO: Remove out-of-data todo stuff.
8172 * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
8175 * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
8177 * mini.h: Bump corlib version.
8179 2005-07-27 Martin Baulig <martin@ximian.com>
8182 (create_copy_ins): Added `const unsigned char *ip' argument; set
8183 `copy->cil_code' from it.
8185 2005-07-27 Martin Baulig <martin@ximian.com>
8187 * mini-exceptions.c (mono_handle_exception): Don't call
8188 mono_debugger_handle_exception() for filters.
8190 2005-07-27 Zoltan Varga <vargaz@freemail.hu>
8192 * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
8195 2005-07-26 Martin Baulig <martin@ximian.com>
8197 Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
8199 * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
8200 helper_compile_generic_method() if the method is actually virtual
8203 2005-07-26 Martin Baulig <martin@ximian.com>
8206 (trampoline_code): Renamed to `mono_trampoline_code' and made it
8207 public; this is now accessed directly by the debugger.
8208 (mono_generic_trampoline_code): Removed.
8211 (mono_debug_init_method): Also add interncalls and wrappers.
8213 2005-07-23 Zoltan Varga <vargaz@freemail.hu>
8215 * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
8217 2005-07-22 Zoltan Varga <vargaz@freemail.hu>
8219 * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
8221 2005-07-21 Zoltan Varga <vargaz@freemail.hu>
8223 * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
8225 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
8227 * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
8228 getting TLS offsets on AMD64 too.
8230 2005-07-20 Kornél Pál <kornelpal@hotmail.com>
8232 * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
8234 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
8236 * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
8237 inssel-arm.brg, mini-arm.h: ARM port work in progress.
8239 2005-07-20 Zoltan Varga <vargaz@freemail.hu>
8241 * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
8243 * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
8246 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call
8247 mono_sparc_is_virtual_call ().
8249 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
8251 * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
8252 trampoline parameters.
8254 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
8256 * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
8257 to mono_arch_get_vcall_slot_addr.
8259 * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
8262 * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
8264 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
8266 * mini-ia64.h mini-ia64.c: Finish pinvoke support.
8268 2005-07-19 Martin Baulig <martin@ximian.com>
8270 * exceptions-amd64.c (throw_exception): Call
8271 mono_debugger_throw_exception() here like we're doing it on i386.
8273 2005-07-19 Zoltan Varga <vargaz@freemail.hu>
8275 * mini-ia64.c: Add optimized TLS access support.
8277 2005-07-18 Zoltan Varga <vargaz@freemail.hu>
8279 * mini-exceptions.c: Ongoing IA64 work.
8281 * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
8283 * mini.c: Use the default optimization set when embedding. Fixes
8286 2005-07-11 Zoltan Varga <vargaz@freemail.hu>
8288 * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts
8289 of trampolines to a separate file.
8291 * mini-trampolines.c: New file.
8293 * mini.h tramp-x86.c: Move arch independent parts of trampolines to a
8296 * tramp-x86.c: Reorganize the trampoline code to be similar to the
8299 * mini-codegen.c: Fix cygwin build.
8301 2005-07-10 Zoltan Varga <vargaz@freemail.hu>
8303 * mini.c: Add some minor changes needed by the IA64 port.
8305 * *-ia64.*: Ongoing IA64 work.
8307 2005-07-09 Zoltan Varga <vargaz@freemail.hu>
8309 * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split
8310 trampolines into arch-independent and arch-dependent parts.
8312 * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
8314 2005-07-08 Zoltan Varga <vargaz@freemail.hu>
8316 * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
8318 * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
8319 the xp-regalloc-branch for amd64.
8321 * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
8322 xp-regalloc-branch for x86.
8324 2005-07-07 Zoltan Varga <vargaz@freemail.hu>
8326 * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
8328 2005-07-06 Martin Baulig <martin@ximian.com>
8331 (mono_jit_compile_method_inner): Call mono_get_inflated_method().
8332 (mono_jit_runtime_invoke): Likewise.
8334 2005-07-05 Zoltan Varga <vargaz@freemail.hu>
8336 * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
8339 * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
8340 without loading their metadata. Reorganize the file format so exception handling+
8341 debug info is kept separate from normal method info. Create MonoJitInfo
8342 structures for methods lazily.
8344 * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
8346 (x86_class_init_trampoline): Patch AOT class init trampolines too.
8348 * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
8350 * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
8353 * mini.h: Bump AOT file version.
8355 2005-07-04 Zoltan Varga <vargaz@freemail.hu>
8357 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
8359 2005-07-01 Raja R Harinath <rharinath@novell.com>
8361 * Makefile.am (check-local): Call semdel-wrapper.
8363 2005-06-29 Zoltan Varga <vargaz@freemail.hu>
8365 * mini-x86.c: Revert the last change as it seems to break the build..
8367 2005-06-28 Zoltan Varga <vargaz@freemail.hu>
8369 * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
8371 * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
8373 2005-06-27 Ben Maurer <bmaurer@ximian.com>
8375 * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
8376 outside of the macro, so strange stuff doesn't happen with gcc4
8377 (NEW_AOTCONST_TOKEN): Likewise.
8379 2005-06-28 Martin Baulig <martin@ximian.com>
8381 * mini.c (mini_class_is_system_array): New static method; use this
8382 instead of `klass->parent == mono_defaults.array_class' everywhere
8383 since this also works for the new generic array class.
8385 2005-06-26 Ben Maurer <bmaurer@ximian.com>
8387 * inssel.brg: Remove warnings.
8389 2005-06-24 Zoltan Varga <vargaz@freemail.hu>
8391 * mini-ia64.c: Ongoing IA64 work.
8393 * basic-float.cs: Add float->i1 conversion test.
8395 * iltests.il: Add conv.u4 test.
8397 2005-06-23 Zoltan Varga <vargaz@freemail.hu>
8399 * inssel-long.brg: Fix bug caused by last change.
8401 2005-06-23 Geoff Norton <gnorton@customerdna.com>
8403 * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other
8404 BSDs. Allows the x86 JIT to work on OSX86
8406 2005-06-22 Zoltan Varga <vargaz@freemail.hu>
8408 * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
8411 * mini-ia64.c: Ongoing IA64 work.
8413 2005-06-19 Zoltan Varga <vargaz@freemail.hu>
8415 * mini-ia64.c: Ongoing IA64 work.
8417 * driver.c: Clean up jit_code_hash as well when using --regression.
8419 * inssel-long.brg: Fix long->i4/u4 conversion rules.
8421 * basic-long.cs: Add tests for long->u4 conversion.
8423 2005-06-18 Ben Maurer <bmaurer@ximian.com>
8425 * mini.c: Take mono_get_domainvar out of macros. This makes sure
8426 that we do not depend on undefined C behavior: the order stuff
8427 gets evaluated within an expression. Fixes mono when compiled on
8430 2005-06-18 Zoltan Varga <vargaz@freemail.hu>
8432 * *-ia64.*: Ongoing IA64 work.
8434 * aot.c: Lower memory usage while loading AOT methods.
8436 * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
8438 * mini.h: Bump AOT file format version.
8440 2005-06-17 Zoltan Varga <vargaz@freemail.hu>
8442 * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
8444 2005-06-16 Sebastien Pouliot <sebastien@ximian.com>
8446 * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
8447 not on callee assembly). Fixed some comments.
8449 2005-06-16 Zoltan Varga <vargaz@freemail.hu>
8451 * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
8452 it gets proper disassembly.
8453 (emit_method_info): Remove some dead code.
8455 * mini.c (mini_method_compile): Allways allocate the GOT var in
8456 mono_method_to_ir for emulating opcodes.
8458 2005-06-13 Zoltan Varga <vargaz@freemail.hu>
8460 * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
8461 before freeing the code memory. Fixes #74990.
8463 * objects.cs: Add regression test for #74992.
8465 * liveness.c: Extend live ranges of arguments to the beginning of the
8466 method. Fixes #74992.
8468 * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
8469 so it points into the faulting instruction.
8471 2005-06-12 Zoltan Varga <vargaz@freemail.hu>
8473 * jit-icalls.c (mono_imul_ovf): Add exception handling.
8475 * *-ia64.*: Ongoing IA64 work.
8477 * mini.c (mini_init): Fix signature of mono_delegate_ctor.
8479 2005-06-11 Zoltan Varga <vargaz@freemail.hu>
8481 * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
8483 * *-ia64.*: Ongoing IA64 work.
8485 2005-06-10 Zoltan Varga <vargaz@freemail.hu>
8487 * basic-long.cs: Add tests for add/sub.ovf.
8489 * basic.cs: Add tests for sub.ovf.
8491 * *-ia64.*: Ongoing IA64 work.
8493 2005-06-09 Zoltan Varga <vargaz@freemail.hu>
8495 * *-ia64.*: Ongoing IA64 work.
8497 * basic.cs: Add conv.ovf.i4.un test.
8499 2005-06-09 Massimiliano Mantione <massi@ximian.com>
8501 * mini.c: (remove_block_if_useless) Fixed bug 75061.
8503 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8505 * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
8507 2005-06-07 Zoltan Varga <vargaz@freemail.hu>
8509 * *-ia64.*: Ongoing IA64 work.
8511 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
8514 * mini.c: added the ability to toggle trace on/off using SIGUSR2.
8516 2005-06-04 Zoltan Varga <vargaz@freemail.hu>
8518 * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
8520 2005-06-03 Zoltan Varga <vargaz@freemail.hu>
8522 * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
8524 * mini-amd64.c (amd64_patch): Add an assert to check that the destination
8525 of a call is callable by a near call.
8527 2005-05-31 Zoltan Varga <vargaz@freemail.hu>
8529 * mini-ia64.c: Ongoing IA64 work.
8531 2005-05-29 Zoltan Varga <vargaz@freemail.hu>
8533 * genmdesc.c: Make the generated array non-static.
8535 * inssel-long.brg: Fix LSHR_IMM rule.
8537 * *-ia64.*: Ongoing IA64 work.
8539 * *-ia64.*: Ongoing IA64 work.
8541 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
8543 * *-ia64.*: Ongoing IA64 work.
8545 * *-ia64.*: Ongoing IA64 work.
8547 * mini-ia64.c: Ongoing IA64 work.
8549 * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
8551 2005-05-28 Zoltan Varga <vargaz@freemail.hu>
8553 * objects.cs basic-calls.cs: Move some tests to objects.cs.
8555 * objects.cs basic-long.cs: Move some tests to objects.cs.
8557 2005-05-26 Zoltan Varga <vargaz@freemail.hu>
8559 * *-ia64.*: Ongoing IA64 work.
8561 * iltests.il: Add a new test.
8563 * mini.c (mono_method_to_ir): Initialize valuetypes when created using
8564 newobj. Fixes #75042.
8566 2005-05-22 Zoltan Varga <vargaz@freemail.hu>
8568 * *-ia64.*: Ongoing IA64 work.
8570 * *-ia64.*: Ongoing IA64 work.
8572 * *-ia64.*: Ongoing IA64 work.
8574 * basic.cs objects.cs: Move tests accessing static variables as well.
8576 * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
8578 2005-05-21 Zoltan Varga <vargaz@freemail.hu>
8580 * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
8582 * driver.c: Always print failed tests.
8584 * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
8587 * *ia64*: Ongoing IA64 work.
8589 2005-05-20 Zoltan Varga <vargaz@freemail.hu>
8591 * basic.cs: Add tests for add.ovf. Fix warnings.
8593 2005-05-18 Miguel de Icaza <miguel@novell.com>
8595 * driver.c (mono_main): Avoid crash if no argument is passed to
8596 --break; Do not use g_error, but f_printf. And fix all other
8597 ocurrences of the same crash.
8599 2005-05-17 Zoltan Varga <vargaz@freemail.hu>
8601 * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
8602 and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
8605 2005-05-14 Zoltan Varga <vargaz@freemail.hu>
8607 * *-ia64.*: Add beginnings of IA64 backend.
8609 * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.
8611 2005-05-13 Zoltan Varga <vargaz@freemail.hu>
8613 * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
8616 * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
8618 * mini-amd64.c: Fix a warning.
8620 2005-05-10 Zoltan Varga <vargaz@freemail.hu>
8622 * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
8623 in float_neg. Fixes #74897.
8625 * mini-amd64.c (emit_call): Fix another near call bug.
8627 2005-05-06 Sebastien Pouliot <sebastien@ximian.com>
8629 * declsec.c: Keep the appdomain information in the structure. Added a
8630 missing "return FALSE" for Unmanaged if FullTrust is set (or else the
8631 value gets overwritten).
8632 * declsec.h: Set the default MonoArray for the the stack to 6. Added
8633 an MonoAppDomain member to MonoSecurityFrame.
8634 * mini-exceptions.c: Do not use a glist to keep GC allocated objects
8635 used in the stack walk. Now use a MonoArray which grow (double) when
8638 2005-05-05 Lluis Sanchez Gual <lluis@novell.com>
8640 * mini.c: Re-enabled runtime cleanup, since running threads should
8641 now properly stop when exiting.
8643 2005-05-05 Zoltan Varga <vargaz@freemail.hu>
8645 * mini-codegen.c: New file contaning the arch-independent local
8646 register allocator. Not used by any architectures yet.
8648 * mini.h linear-scan.c: Merge some changes from the
8649 mini-xp-local-regalloc branch.
8651 2005-04-28 Zoltan Varga <vargaz@freemail.hu>
8653 * mini-amd64.c (emit_call): Fix calls to native functions when the
8654 runtime is compiled as a shared library. Fixes #74756.
8656 * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
8657 on a literal field. Fixes #74751.
8659 2005-04-25 Raja R Harinath <rharinath@novell.com>
8661 * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
8663 2005-04-23 Zoltan Varga <vargaz@freemail.hu>
8665 * objects.cs: Add missing null casting test.
8667 2005-04-22 Zoltan Varga <vargaz@freemail.hu>
8669 * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
8670 in wrapper methods. Also rename 'address' variable to 'offset'.
8672 2005-04-20 Zoltan Varga <vargaz@freemail.hu>
8674 * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
8677 * Makefile.am (MCS): Use -unsafe instead of --unsafe.
8679 * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
8682 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
8684 * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
8686 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
8688 * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
8689 just the last bytes.
8691 2005-04-17 Zoltan Varga <vargaz@freemail.hu>
8693 * aot.c (mono_compile_assembly): Fix warning.
8695 * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
8696 by the _MSC_VER stuff.
8698 2005-04-16 Zoltan Varga <vargaz@freemail.hu>
8700 * inssel-long.brg: Fix #74588.
8702 * cpu-amd64.md: Fix #74591.
8704 * iltests.il: Add new regression tests.
8706 2005-04-13 Zoltan Varga <vargaz@freemail.hu>
8708 * trace.c (mono_trace_enter_method): Print enums as an int, not as a
8711 2005-04-11 Zoltan Varga <vargaz@freemail.hu>
8713 * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
8715 * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches
8716 from Bill Middleton <flashdict@gmail.com>.
8718 2005-04-10 Zoltan Varga <vargaz@freemail.hu>
8720 * arrays.cs: Add new regression test. Fix warnings.
8722 2005-04-09 Zoltan Varga <vargaz@freemail.hu>
8724 * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
8725 and leakage in CKFINITE.
8727 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
8728 this to a null op since it is called on amd64 too.
8730 * exceptions-amd64.c (get_throw_trampoline): Align stack.
8732 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
8733 body since this is not used on amd64.
8735 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
8737 * mini-amd64.c: Remove obsolete fixmes.
8739 * mini.c (print_method_from_ip): Fix debugging support.
8741 2005-2-1 Massimiliano Mantione <massi@ximian.com>
8743 * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
8744 so that expressions that don't give much gain are not reduced.
8745 * ssapre.h: Likewise.
8747 2005-04-04 Zoltan Varga <vargaz@freemail.hu>
8749 * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
8751 * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
8753 * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
8755 2005-04-01 Zoltan Varga <vargaz@freemail.hu>
8757 * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
8759 * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
8761 2005-03-31 Zoltan Varga <vargaz@freemail.hu>
8763 * mini-x86.c: If sigaltstack support is enabled, perform win32 style
8766 * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
8768 * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
8770 * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
8772 * mini-x86.h mini-x86.c exceptions-x86.c: Add support for
8773 MONO_ARCH_USE_SIGACTION. Fixes #74252.
8775 * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
8777 * mini-x86.c: Fix up stack overflow handling.
8779 * exceptions.cs: Add new regression test.
8781 2005-03-30 Zoltan Varga <vargaz@freemail.hu>
8783 * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
8784 mono_jit_thread_attach.
8786 * mini.c (mono_method_to_ir): Verify called method is not abstract.
8788 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
8790 * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
8791 avoid calling constructors using callvirt.
8793 * inssel.brg: Fix #74073.
8795 2005-03-29 Sebastien Pouliot <sebastien@ximian.com>
8797 * aot.c, mini.h: Added mono-compiler.h header to allow/ease
8798 compilation with non-GCC compilers.
8799 * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
8800 possible using VS.NET. Adapted from the work of J Lothian (for VC6).
8802 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
8804 * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
8805 klass->interface_offsets (will likely fix bug#74073).
8807 2005-03-29 Zoltan Varga <vargaz@freemail.hu>
8809 * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
8811 2005-03-28 Zoltan Varga <vargaz@freemail.hu>
8813 * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
8814 to amd64_div_reg_size ().
8816 * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
8818 2005-03-27 Zoltan Varga <vargaz@freemail.hu>
8820 * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
8822 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
8824 * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
8826 2005-03-24 Zoltan Varga <vargaz@freemail.hu>
8828 * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
8830 * mini.c (mono_precompile_assembly): Load and precompile referenced
8831 assemblies as well. Fixes #74015.
8833 2005-03-23 Zoltan Varga <vargaz@freemail.hu>
8835 * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
8837 2005-03-23 Sebastien Pouliot <sebastien@ximian.com>
8839 * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
8840 a lot of checks and (anyway) permissions cannot work until corlib is
8843 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
8845 * mini-ppc.c: fixed ABI issue on sysv/ppc.
8847 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
8849 * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
8850 calls (fixes bug#72824).
8852 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
8854 * mini.c: fix tail recursion elimination (see test in bug#73936).
8856 2005-03-21 Zoltan Varga <vargaz@freemail.hu>
8858 * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
8859 some fp functions in sse2 mode.
8861 2005-03-20 Zoltan Varga <vargaz@freemail.hu>
8863 * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
8865 2005-03-19 Zoltan Varga <vargaz@freemail.hu>
8867 * mini.h mini.c: Add mono_get_jit_tls_key ().
8869 * mini-x86.c: Enable fast TLS support on windows.
8871 2005-03-17 Sebastien Pouliot <sebastien@ximian.com>
8873 * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
8874 * mini.c: Check for p/invoke method when generating code. If a
8875 p/invoke method, or it's class, isn't decorated with [Suppress
8876 UnmanagedCodeSecurity] then generate code to call System.Security.
8877 UnmanagedDemand (only if the security manager is active).
8879 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
8881 * tramp-amd64.c (create_specific_trampoline): Revert parts of the
8882 last change as it seems to cause strange crashes.
8884 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
8886 * *.c: handle unsafe function pointers where needed.
8888 2005-03-16 Zoltan Varga <vargaz@freemail.hu>
8890 * mini.c (mono_jit_free_method): Remove the fixme too.
8892 2005-03-15 Miguel de Icaza <miguel@novell.com>
8894 * mini.c: As discussed, make the code actually free the delegate
8895 thunk now, to enable the debugging of delegate problems, use
8896 MONO_DEBUG=1 when running Mono.
8898 This takes also care of parts of the leaks as seen by Joe.
8900 2005-03-15 Zoltan Varga <vargaz@freemail.hu>
8902 * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable
8903 thread_tls_offset calculation.
8905 2005-03-14 Sebastien Pouliot <sebastien@ximian.com>
8907 * declsec.c: Reworked linkdemand checks for icall. The previous code
8908 was using the declaration code (untrusted) and didn't work as expected
8909 with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
8912 2005-03-13 Zoltan Varga <vargaz@freemail.hu>
8914 * iltests.il: Add new localloc test.
8916 * mini-amd64.c: Handle large stack allocations the same way as on
8917 windows if stack overflow handling is working.
8919 * mini-amd64.c: Allocate the signal stack using mmap.
8921 * mini.c (sigsegv_signal_handler): Fix reading of context.
8923 * mini-exceptions.c: Fix up stack overflow handling.
8925 * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
8927 * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
8929 * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
8931 * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
8933 * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
8934 tramp_init functions as they are no longer needed.
8936 2005-03-12 Zoltan Varga <vargaz@freemail.hu>
8938 * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
8940 * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
8942 * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
8944 * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
8947 * mini-ops.h: Add OP_LMUL_IMM.
8949 * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
8950 long mul/div opcodes as intrinsic.
8952 * mini-amd64.c (emit_call): Handle the case when the callee might be
8955 2005-03-11 Zoltan Varga <vargaz@freemail.hu>
8957 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
8960 * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
8962 * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
8964 2005-03-09 Ben Maurer <bmaurer@ximian.com>
8966 * mini.c (mono_codegen): Don't leak here, to help people running
8969 2005-03-08 Zoltan Varga <vargaz@freemail.hu>
8971 * mini-amd64.c (mono_arch_output_basic_block): Fix int->float
8972 conversions in sse2 mode.
8974 * basic-float.cs: Add regression test.
8976 * mini-amd64.c: Reenable sse2.
8978 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
8980 * mini-amd64.c: Disable sse2 until some regressions are fixed.
8982 2005-03-07 Joerg Rosenkranz <joergr@voelcker.com>
8984 * driver.c: Copyright text should include 2005.
8986 2005-03-07 Zoltan Varga <vargaz@freemail.hu>
8988 * cpu-amd64.md (load_membase): Fix more max lengths.
8990 2005-03-06 Zoltan Varga <vargaz@freemail.hu>
8992 * cpu-amd64.md (load_membase): Fix max length.
8994 * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
8996 * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
8998 * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
8999 support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
9001 * basic-float.cs: Add rounding regression test.
9003 * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
9005 2005-03-04 Neale Ferguson <NealeFerguson@earthlink.net>
9007 * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
9008 structures in registers for pinvoke wrappers.
9010 2005-03-04 Zoltan Varga <vargaz@freemail.hu>
9012 * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
9014 2005-03-03 Zoltan Varga <vargaz@freemail.hu>
9016 * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
9017 wrapper to mono_jit_thread_attach.
9019 * mini.c (mini_jit_thread_attach): New jit icall.
9021 * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in
9022 native->managed wrappers.
9024 * exceptions.cs: Add new regression test.
9026 * mini.c (optimize_branches): Check regions in the cbranch to throw
9027 block case as well. Fixes #73242.
9029 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
9031 * mini.c: thread safety fixes.
9033 2005-02-27 Zoltan Varga <vargaz@freemail.hu>
9035 * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
9036 patching stuff, since delegates use jump trampolines so there is
9039 * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in
9042 * tramp-amd64.c: Fix build.
9044 * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
9045 it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
9047 * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
9048 Rename this to mono_arch....
9049 (mono_amd64_get_delegate_method_ptr_addr): Ditto.
9051 * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
9053 * mini-amd64.c (emit_call): If both the caller and the callee is
9054 guaranteed to have 32 bit addresses, emit a normal call.
9056 * tramp-amd64.c: Adapt to changes in mini-amd64.c.
9058 * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines.
9059 * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
9060 method_ptr inside delegates.
9062 2005-02-26 Zoltan Varga <vargaz@freemail.hu>
9064 * mini.c (mono_jit_free_method): Free the method info even if the native code is
9065 invalidated. Fixes #73001.
9067 * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
9069 * mini-x86.c: Only use stdcall for pinvokes on windows.
9071 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
9073 * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
9074 * mini-x86.c: remove unreliable __thread var offset detection,
9075 use the correct accessors and enable by default.
9077 2005-02-23 Zoltan Varga <vargaz@freemail.hu>
9079 * mini.c (mono_jit_free_method): Fix memory leak.
9081 2005-02-22 Zoltan Varga <vargaz@freemail.hu>
9083 * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW.
9085 2005-02-21 Zoltan Varga <vargaz@freemail.hu>
9087 * cpu-amd64.md: Fix lengths of atomic opcodes.
9089 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
9091 * driver.c: try to not imply using ICU is any good.
9093 2005-02-20 Zoltan Varga <vargaz@freemail.hu>
9095 * mini-amd64.c (mono_arch_get_inst_for_method): Implement more
9096 functions as inline ops.
9098 * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
9099 some Interlocked functions as inline ops.
9101 * mini.c (move_basic_block_to_end): Fix bug in last patch.
9103 * mini.h (MonoBasicBlock): Reorganize fields a bit.
9105 * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
9107 * mini.c: Add support for OP_NOT_TAKEN.
9109 * mini-amd64.h mini-amd64.c: Add support for passing/returning small
9110 structures in registers for pinvoke wrappers.
9112 * mini-amd64.c: Fix warnings.
9114 2005-02-19 Zoltan Varga <vargaz@freemail.hu>
9116 * mini.h (MonoCompile): Add 'ret_var_is_local' field.
9118 * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
9120 * mini.c (NEW_RETLOADA): If the ret variable is a local, use its
9121 address instead of loading the address from it.
9123 * mini-x86.c: Add support for returning small structs in registers
9124 on Win32. Fixes part of #70864.
9126 2005-02-18 Zoltan Varga <vargaz@freemail.hu>
9128 * trace.c (get_token): Improve error checking.
9130 2005-02-17 Zoltan Varga <vargaz@freemail.hu>
9132 * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
9134 2005-02-17 Sebastien Pouliot <sebastien@ximian.com>
9136 * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
9137 it can be reused for MonoClass.
9138 * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
9141 2005-02-15 Sebastien Pouliot <sebastien@ximian.com>
9143 * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code
9144 instead of a MonoReflectionMethod. The method information wasn't used
9145 when displaying SecurityException details (but will be now).
9147 2005-02-15 Atsushi Enomoto <atsushi@ximian.com>
9149 * Makefile.am : windows build fix.
9151 2005-02-14 Zoltan Varga <vargaz@freemail.hu>
9153 * iltests.il: Add new regression test.
9155 * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
9158 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
9160 * mini.c: Moved linkdemand check into helper function check_linkdemand
9161 to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP,
9164 2004-02-13 Sebastien Pouliot <sebastien@ximian.com>
9166 * declsec.c: Added statistics counter for different kinds of
9168 * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
9169 (and commented) declaration.
9170 * mini.c: Added statistics counter for security Demand code
9171 generation. Added display of security statistics.
9173 2005-02-13 Zoltan Varga <vargaz@freemail.hu>
9175 * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
9176 Fix compilation errors under gcc-2.95.
9178 2005-02-12 Ben Maurer <bmaurer@ximian.com>
9180 * mini.c, driver.c: Use the new jit trampoline hashtable
9182 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9184 * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
9186 2005-02-11 Martin Baulig <martin@ximian.com>
9188 * debug-mini.c (mono_debug_close_method): Free the line number array.
9190 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
9192 * aot.c: Break up large methods into smaller ones. Share GOT slots for
9195 * mini.h: Bump AOT file format version.
9197 2005-02-10 Sebastien Pouliot <sebastien@ximian.com>
9199 * declsec.c: Added LinkDemand support and it's special cases for ECMA,
9201 * declsec.h: Added macros to get/set lazyly initialized security
9202 informations about assemblies. Added new enum for different type of
9203 possible LinkDemand violation. Added function to check LinkDemands.
9204 * mini.h: Added a field to MonoCompile to hold any security violation
9205 detected when JITting a method (so it can be thrown later).
9206 * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL
9207 and CEE_CALLVIRT. Added code to throw exception at the end of
9208 mini_method_compile (note: the exception is unhandled right now).
9210 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
9212 * mini.c, jit-icalls.c: use the managed implementation of
9213 memset for initobj and memset, to avoid managed <-> unmanaged
9216 2005-02-10 Zoltan Varga <vargaz@freemail.hu>
9218 * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
9219 optimization if it would need a GOT var.
9221 * basic.cs: Add tests for constant propagation and switch statements.
9223 * ssa.c: Fix out-of-range constant propagation and switch statements.
9225 2005-02-09 <vargaz@freemail.hu>
9227 * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
9229 2005-02-08 Zoltan Varga <vargaz@freemail.hu>
9231 * cpu-amd64.md (load_membase): Fix max length of load_membase.
9233 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
9235 * mini.c: update to new signature of mono_class_get_allocation_ftn().
9237 2005-02-06 Neale Ferguson <NealeFerguson@earthlink.net>
9239 * cpu-s390.md, mini-s390.c: Correct bug with register usage on certain
9240 arithmetic operations.
9242 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
9244 * mini-ppc.c: add a workaround for broken user code that
9245 DllImports vararg functions with non-vararg signatures.
9247 2005-02-05 Zoltan Varga <vargaz@freemail.hu>
9249 * mini.c (mono_jit_compile_method_inner): Add detection and a
9250 meaningfull error message for assemblies written in Managed C++.
9252 * tramp-amd64.c mini-amd64.h: Add support for
9253 create_trampoline_from_token ().
9255 * aot.c mini-x86.c abcremoval.c: Applied patch from
9256 Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
9258 2005-02-04 Zoltan Varga <vargaz@freemail.hu>
9260 * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline
9261 which takes a MonoImage/token as parameter instead of a MonoMethod.
9263 * aot.c: Use the new trampoline for initializing vtables.
9265 * aot.c: Add support for ldfld/stfld_remote wrappers.
9267 * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
9268 rules for compare <MEM>, IMM.
9270 * mini.h (MONO_AOT_FILE_VERSION): Bump it.
9272 * aot.c: Handle inherited finalizers correctly.
9274 2005-02-03 Zoltan Varga <vargaz@freemail.hu>
9276 * inssel.brg (stmt): Add a missing _setup_... ().
9278 * aot.c: Save some parts of the class state to the AOT file and use it
9279 to recompute that state when a class is initialized.
9281 * mini.c: Install AOT hooks into the runtime.
9283 * mini.h: Bump AOT file format version.
9285 * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
9288 * iltests.il: Add new test.
9290 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
9294 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
9296 * mini.c: setup the statistical profiler in the thread attach
9297 callback to cope with the new single thread code.
9299 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
9301 * mini-ppc.c: ensure we have enough room for the profiler
9302 calls (fixed bug#72084).
9304 2005-02-02 Zoltan Varga <vargaz@freemail.hu>
9306 * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding
9309 2005-2-1 Massimiliano Mantione <massi@ximian.com>
9311 * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
9313 2005-2-1 Massimiliano Mantione <massi@ximian.com>
9315 * ssapre.c: Fixed an issue with down safety (this allows IronPython
9316 to succesfully execute parrotbench).
9317 * ssapre.h: Likewise.
9319 2005-2-1 Massimiliano Mantione <massi@ximian.com>
9321 * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
9322 variable for stores to method arguments (fixes a SSAPRE issue).
9324 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9326 * mini.c: handle value types in dup, fixes gen-112.cs.
9328 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
9330 * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
9331 sequence for calls in dynamic methods to avoid thunks.
9333 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
9335 * mini.c: correctly remove dynamic methods from the hashtable.
9337 2005-1-20 Massimiliano Mantione <massi@ximian.com>
9339 * driver.c: Disabled SSAPRE until fix the bug that appears
9340 in IronPython's parrotbench.
9342 2005-01-31 Zoltan Varga <vargaz@freemail.hu>
9344 * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
9346 * mini.c (mono_method_to_ir): Revert the previous change.
9348 * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
9351 * tramp-x86.c (x86_magic_trampoline): Avoid calls to
9352 mono_jit_info_table_find () etc. when running under valgrind.
9354 * inssel.brg: Fix warnings.
9356 * mini-exceptions.c: Fix warnings.
9358 2005-01-31 Martin Baulig <martin@ximian.com>
9360 * driver.c (compile_all_methods_thread_main): Don't try to compile
9361 generic methods or anything which has type parameters.
9363 2005-01-30 Zoltan Varga <vargaz@freemail.hu>
9365 * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
9367 * TestDriver.cs: Add --verbose flags.
9369 * graph.c ssa.c: Fix 64 bit warnings.
9371 * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c
9372 trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
9373 Fix 64 bit warnings.
9375 * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
9376 variable not spotted by gcc.
9378 * mini-amd64.c inssel-amd64.brg: Applied patch from
9379 Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of
9380 X86_COMPARE_MEMBASE opcodes.
9382 * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
9384 2005-01-29 Ben Maurer <bmaurer@ximian.com>
9386 * *: MonoMethod->signature might be NULL now. You *MUST* use
9387 mono_method_signature.
9389 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
9391 * driver.c (compile_all_methods_thread_main): Compile the methods
9392 without invoking cctors.
9394 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
9396 * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
9397 * basic-calls.cs: test for the above.
9399 2005-01-28 Zoltan Varga <vargaz@freemail.hu>
9401 * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after
9402 MonoJitInfo changes.
9404 2005-01-27 Zoltan Varga <vargaz@freemail.hu>
9406 * mini-exceptions.c (mono_handle_exception): Compute the stack trace
9407 eagerly if it contains dynamic methods.
9409 * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
9411 * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
9412 trace, it is now computed by an icall from trace_ips.
9414 * mini-exceptions.c: Fix a warning.
9416 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
9418 * mini-exceptions.c: don't bother getting stack trace info if
9419 it's not going to be used.
9421 2005-01-27 Raja R Harinath <rharinath@novell.com>
9423 * Makefile.am (common_sources): Add ssapre-cee-ops.h and
9426 2005-01-26 Zoltan Varga <vargaz@freemail.hu>
9428 * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
9430 * aot.c: Avoid calling mono_method_get_header () if not needed.
9432 * mini.h: Bump AOT file format version.
9434 * mini.c (mono_emit_native_call): Allocate a GOT var here.
9436 * mini.c (mono_print_tree): Print more info for calls.
9438 2005-01-26 Sebastien Pouliot <sebastien@ximian.com>
9440 * declsec.h: Remove warning by adding missing include for marshal.h
9442 2005-01-26 Martin Baulig <martin@ximian.com>
9444 * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
9447 2005-01-25 Zoltan Varga <vargaz@freemail.hu>
9449 * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
9452 * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
9454 * aot.c (mono_compile_assembly): Fix a warning.
9456 2005-01-25 Sebastien Pouliot <sebastien@ximian.com>
9458 * declsec.c: Look for security attributes on the original MonoMethod
9459 (and not the wrapped one). This fix permissions on icalls.
9461 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
9463 * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9465 * mini.c (mono_allocate_stack_slots): Add a fixme.
9467 * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
9469 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
9471 * inssel.brg: optimize casts of sealed types (more
9472 optimizations waiting for fixes in remoting).
9474 2005-01-23 Zoltan Varga <vargaz@freemail.hu>
9476 * inssel.brg (stmt): Add another dummy rule.
9478 * driver.c: Fix warnings.
9480 * driver.c (mono_main): If running under valgrind, instruct glib to use
9481 the system allocation functions so valgrind can track the memory
9482 allocated by the g_... functions.
9484 * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
9486 * mini-ops.h: Add OP_DUMMY_STORE opcode.
9488 * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
9490 * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
9491 variables in try regions.
9493 * mini.c (mini_method_compile): Don't disable optimizations on large
9494 methods when AOT compiling.
9496 * mini.c (mono_allocate_stack_slots): New arch independent method to
9497 allocate stack slots. Not yet used.
9499 2005-01-22 Ben Maurer <bmaurer@ximian.com>
9501 * debug-mini.c (mono_debug_close_method): Plug some leaks.
9503 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
9505 * mini-ppc.c: make the branch info relative as the code
9506 buffer can be reallocated.
9508 2005-01-22 Sebastien Pouliot <sebastien@ximian.com>
9510 * aot.c: Allow decoding of the new MONO_PATCH_INFO_DECLSEC.
9511 * driver.c: Removed the AOT/security restriction. Now initialize the
9512 security manager (in metadata) if --security is used.
9513 * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
9514 rather than the pointer to declarative security, when AOT is used.
9516 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
9518 * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
9519 basic blocks, reduced intrinsic exception throwing code size.
9521 2005-01-22 Miguel de Icaza <miguel@ximian.com>
9523 * driver.c (mini_usage): Reorder the usage screen.
9525 2005-01-21 Zoltan Varga <vargaz@freemail.hu>
9527 * mini.c (mono_resolve_patch_target): Fix warning.
9529 2005-01-20 Zoltan Varga <vargaz@freemail.hu>
9531 * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
9534 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
9536 * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
9537 breaks the amd64 build.
9539 * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem
9540 register allocation. Fixes #71454.
9542 * mini-amd64.c (mono_arch_local_regalloc): Ditto.
9544 * arrays.cs: Add new regression test.
9546 2005-1-20 Massimiliano Mantione <massi@ximian.com>
9548 * ssapre.c: Turned usage of snprintf to GString.
9549 * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
9550 (I left it on by mistake in my previous commit).
9552 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
9554 * mini.c, cfold.c, basic-calls.cs: preserve side effects
9555 on cond branch optimization (fixes bug# 71515).
9557 2005-1-20 Massimiliano Mantione <massi@ximian.com>
9559 * abcremoval.c: Fixed bug 71062.
9560 * abcremoval.h: Likewise.
9562 2005-1-20 Massimiliano Mantione <massi@ximian.com>
9564 * mini.c: Added a new functionality to optimize_branches, the removal
9565 of useless basic blocks, and fixed some problem in the removal of
9566 critical edges; some utility functions added for both purposes.
9567 * ssapre.c: Added complex expression support, and fixed bug 70637.
9568 * ssapre.h: Likewise.
9569 * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
9571 * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
9572 * driver.c: Re-enabled SSAPRE.
9574 2005-01-19 Martin Baulig <martin@ximian.com>
9576 * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
9577 the result of mono_get_method_constrained().
9579 2005-01-18 Neale Ferguson <NealeFerguson@earthlink.net>
9581 * exceptions-s390.c tramp-s390.c: Allocate code using the global code
9584 2005-01-18 Geoff Norton <gnorton@customerdna.com>
9586 * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
9587 be detected. Fixes #59296.
9589 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
9591 * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
9592 which can happen. Fixes #71361.
9594 2005-01-18 Zoltan Varga <vargaz@freemail.hu>
9596 * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
9599 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
9601 * mini.c (mono_create_jump_trampoline): Revert last change as it causes
9602 appdomain-unload.exe to fail.
9604 * mini.c: Fix some memory leaks.
9606 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
9608 * inssel.brg: handle the new size of rank, idepth, max_interface_id.
9609 Fixed bug and sped up some codepaths.
9611 2005-01-17 Zoltan Varga <vargaz@freemail.hu>
9613 * mini.c: Fix some memory leaks.
9615 * exceptions.cs basic-long.cs: Add test for checked ulong->int
9618 * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
9620 * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
9623 * iltests.il: Add regression test for #71320.
9625 2005-01-16 Zoltan Varga <vargaz@freemail.hu>
9627 * mini.c (mono_codegen): Fix installation of profiler hooks.
9629 * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
9631 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
9633 * mini.h, mini.c, cfold.c: optimize access to enum
9634 readonly fields, too. Eval conditional branches if possible
9635 to perform unreachable code removal in more cases.
9637 2005-01-15 Zoltan Varga <vargaz@freemail.hu>
9639 * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
9641 * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
9644 * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
9645 WinXP DEP. Fixes #71244.
9647 2005-01-14 Zoltan Varga <vargaz@freemail.hu>
9649 * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
9651 2005-01-13 Zoltan Varga <vargaz@freemail.hu>
9653 * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
9655 2005-01-11 Zoltan Varga <vargaz@freemail.hu>
9657 * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo
9660 * mini.h: Bump AOT version.
9662 * mini.h (MonoCompile): Change exvar to a hash table.
9664 * mini.c: Allocate a separate exvar for each handler block.
9666 * mini.c: Get rid of the computation of filter_lengths, its not needed.
9668 * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
9669 ex var with the pending exception and only throw if the two are equal.
9672 * exceptions.cs: Add tests for rethrow and nested catch clauses.
9674 * mini-x86.c: Fix warnings.
9676 * Makefile.am (common_sources): Move mini-exceptions.c here as it is
9677 used by all the ports now.
9679 * aot.c: Add write-symbols and save-temps options.
9681 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
9683 * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
9685 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
9687 * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx
9690 * tramp-s390.c: Check vtable slot belongs to the domain.
9692 * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
9693 as per other platforms.
9695 * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
9697 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
9699 * driver.c: we don't run the Main() code in a subthread anymore.
9701 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
9703 * mini.c: added experimental rtc support in the statistical
9704 profiler: if the user has the permission, more accurate statistics
9705 are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
9706 The MONO_RTC value must be restricted to what the linux rtc allows:
9707 power of two from 64 to 8192 Hz.
9709 2005-01-10 Zoltan Varga <vargaz@freemail.hu>
9711 * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
9713 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
9715 * mini-ppc.c: better icache flush for smp.
9717 2005-01-09 Zoltan Varga <vargaz@freemail.hu>
9719 * mini-amd64.c (emit_move_return_value): Fix memory leak.
9721 * mini-x86.c (get_call_info): Add the get_call_info () code from the
9722 amd64 port, not yet used.
9724 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
9726 * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
9729 2005-01-07 Sebastien Pouliot <sebastien@ximian.com>
9731 * driver.c: Added --security option to activate the security manager.
9732 Right now this will allow code generation for declarative demands and
9733 is disabled when AOT is specified.
9734 * mini.c: Add code generation for declarative security demands.
9735 * mini.h: Add mono_use_security_manager as an extern gboolean.
9737 2005-01-07 Zoltan Varga <vargaz@freemail.hu>
9739 * aot.c (mono_compile_assembly): Speed up compilation a bit by
9740 emitting more dense assembly code.
9742 * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
9743 exception throwing stuff.
9745 2005-01-06 Zoltan Varga <vargaz@freemail.hu>
9747 * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
9750 * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
9753 * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is
9756 * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
9758 * tramp-*.c: Only patch vtable slots if the object is in the current
9759 domain. Fixes appdomain-unload.exe.
9761 * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
9763 * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
9766 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
9768 * mini.c (reverse_branch_op): New helper function.
9770 * mini.c (optimize_branches): Run the new optimization only on
9771 platforms which support it. Also reverse all kinds of branches.
9773 * mini.h (MonoBasicBlock): Add 'out_of_line' field.
9775 * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
9778 * mini.c (optimize_branches): Reverse not-equals branches if the false
9779 bblock is a throw. This happens a lot of time with argument checking in
9782 * mini.c (mono_codegen): Add support for placing basic blocks after
9783 the function epilogue.
9785 * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
9788 2005-01-05 Miguel de Icaza <miguel@ximian.com>
9790 * mini.c (setup_stat_profiler): Only set this up if the platform
9791 supports ITIMER_PROF.
9793 2005-01-05 Zoltan Varga <vargaz@freemail.hu>
9795 * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
9798 * inssel.brg: Fix a warning.
9800 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
9802 * mini.c: added support for statistical profiler
9803 (run with: --profile=default:stat).
9805 2005-01-04 Zoltan Varga <vargaz@freemail.hu>
9807 * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
9809 * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
9811 * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes
9812 related to global registers from the amd64 port.
9814 2005-01-03 Zoltan Varga <vargaz@freemail.hu>
9816 * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
9818 * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
9819 with global registers.
9820 (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
9822 * aot.c (emit_method_code): Fix the 'method emitted as' messages.
9824 2004-12-31 Zoltan Varga <vargaz@freemail.hu>
9826 * debug-mini.c (encode_value): Fix off-by-one.
9828 * aot.c (encode_value): Likewise.
9830 * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
9832 2004-12-30 Zoltan Varga <vargaz@freemail.hu>
9834 * mini.c linear-scan.c: Add a workaround for the mcs crash when using
9837 * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
9839 * aot.c (emit_method_info): Increase size of temp buffer.
9841 * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in
9844 2004-12-28 Zoltan Varga <vargaz@freemail.hu>
9846 * aot.c (emit_method_info): Fix build.
9848 * aot.c: Further rework of the AOT file format to reduce the size of
9849 the method info data.
9851 * mini.h: Bump AOT file format version.
9853 2004-12-27 Martin Baulig <martin@ximian.com>
9855 * mini.c (mini_get_method): New static method; call
9856 mono_get_method_full() and mono_get_inflated_method().
9857 (mono_method_to_ir): Use mini_get_method() instead of
9858 mono_get_method_full().
9860 2004-12-26 Patrik Torstensson <patrik.torstensson@gmail.com>
9862 * mini-x86.c (atomic ops): fixed bug interlocked bug #70784.
9864 2004-12-25 Zoltan Varga <vargaz@freemail.hu>
9866 * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
9868 * inssel-amd64.brg: Add some optimization rules.
9870 2004-12-24 Ben Maurer <bmaurer@ximian.com>
9872 * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
9873 standard not GC'd stuff is fine.
9875 2004-12-24 Zoltan Varga <vargaz@freemail.hu>
9877 * aot.c: Rework the AOT file format to get rid of most of the global
9878 symbols. This reduces the size of the mscorlib.dll.so by 1MB.
9880 * mini.h: Bump AOT file format version.
9882 2004-12-23 Zoltan Varga <vargaz@freemail.hu>
9884 * mini.h: Bump AOT file format version.
9886 * aot.c (mono_aot_is_got_entry): New function to determine if an
9887 address is inside a GOT.
9889 * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
9891 * cpu-pentium.md: Increase the maximum size of some instructions which
9892 might involve a got access.
9894 * mini.c (get_method_from_ip): Another debug helper function.
9896 * mini.c: Call mono_get_got_var () in a couple places. Handle the case
9897 when got var accesses are created during the decompose phase.
9899 * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
9901 * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
9902 argument mini_compile_method and to MonoCompile, and use this to
9903 determine whenever a given method is compiled for AOT. This allows the
9904 other methods compiled during AOT compilation to be free of AOT stuff,
9905 so the backends does not need to add special support for them by
9906 creating a fake GOT etc.
9908 * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
9911 2004-12-21 Ben Maurer <bmaurer@ximian.com>
9913 * mini.c (mono_method_to_ir): It turns out that some of the
9914 x-appdomain wrappers are lax with types, so just ignore this for
9917 * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
9918 at the vtable->klass. If it is non-shared code we can just use the
9921 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
9923 * mini-ppc.c: access MonoDomain from tls, too.
9925 2004-12-21 Sebastien Pouliot <sebastien@ximian.com>
9927 * declsec.c: Removed unused variable (and related warning ;-)
9929 2004-12-21 Ben Maurer <bmaurer@ximian.com>
9931 * iltests.il: New test for LDELEMA on an array of ref types.
9933 * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
9934 all ldelema's on reftypes.
9935 (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
9936 it was the wrong place to put it.
9938 * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
9939 register to pop to make this cleaner, at the request of Paolo.
9941 2004-12-20 Ben Maurer <bmaurer@ximian.com>
9943 * mini-ops.h (OP_GETHASHCODE): New op.
9945 * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
9947 * mini.c (mini_get_inst_for_method): Create the intrinsic hash
9950 For a microbenchmark, this reduces the cost of Hashtable.get_Item
9953 * mini-x86.c (mono_arch_output_basic_block): Rather than
9961 The first is 3 bytes while the second is 1. This saves 36 kb on
9962 mscorlib, quite a big saving. When bootstraping mcs, I was able to
9963 see a small boost because of icache locality.
9965 * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
9967 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
9969 * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
9970 started code sharing with the generic code.
9972 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
9974 * mini-ppc.c, cpu-g4.md: added code for direct access to
9977 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
9979 * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
9980 mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
9983 2004-12-20 Sebastien Pouliot <sebastien@ximian.com>
9985 * declsec.c|h: Added functions to cache the declarative stack modifiers
9986 in MonoJitInfo and to create a security frame from a MonoJitInfo
9988 * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
9989 created. Register internal calls for System.Security.SecurityFrame::
9990 _GetSecurityFrame and _GetSecurityStack.
9991 * mini.h: Added definition for new icalls (in mini-exceptions.c) and
9992 the definitions for the new stack walk/callback mechanism.
9993 * mini-exceptions.c: Added internal call GetSecurityFrame (to get the
9994 first security frame for LinkDemands and InheritanceDemands) and
9995 GetSecurityStack for Demands. Both use the new mono_walk_stack code
9997 * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
9998 walk initialization (lupus).
10000 2004-12-20 Ben Maurer <bmaurer@ximian.com>
10002 * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
10004 (handle_loaded_temps): Do not create a temporary variable for
10005 things that we know are temps. They will never be modified.
10006 (mono_spill_call): Set MONO_INST_IS_TEMP
10007 (mono_emulate_opcode): ditto
10009 (mono_method_to_ir.CEE_DUP): ditto
10011 2004-12-19 Ben Maurer <bmaurer@ximian.com>
10013 * mini.c (type_to_eval_stack_type): Make this handle the void type
10014 (mono_emit_call_args): set the call->type with type_to_eval_stack_type
10015 (emit_tree): use ip_in_bb to special case some common idioms
10016 Update all callers to pass in the IP.
10017 (mono_method_to_ir): Make CEE_CALL* do the above as well.
10019 This gives us a nice 2% speedup in mcs bootstrap.
10021 * mini-x86.c (peephole_pass): Peephole pass to make
10030 * mini.c (ip_in_bb): new method.
10031 (mono_method_to_ir): use this method rather than doing the hash
10034 * linear-scan.c (mono_linear_scan): When expiring actives, you
10035 don't need to keep around variables that expire on this
10036 instruction. This makes it so that:
10039 store (ebx add (ebx, 1))
10043 2004-12-19 Zoltan Varga <vargaz@freemail.hu>
10045 * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc
10046 combination to avoid doing two copies. Fix up problems with previous
10049 * mini.c: Fix 64 bit warnings.
10051 * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
10053 2004-12-17 Zoltan Varga <vargaz@freemail.hu>
10055 * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
10056 changes from the x86 code.
10058 * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
10060 2004-12-16 Zoltan Varga <vargaz@freemail.hu>
10062 * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
10063 throwing code to reduce its size, unify the AOT and non-aot code and
10064 get rid of relocations in the AOT case.
10066 * mini-x86.h mini.c exceptions-x86.c
10067 (mono_arch_get_throw_corlib_exception): New arch specific function to
10068 raise corlib exceptions which doesn't require relocations in the
10071 * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
10073 2004-12-15 Zoltan Varga <vargaz@freemail.hu>
10075 * mini.c (mono_emit_method_call): Only allocate the got var when it is
10078 * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
10081 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
10083 * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
10084 with add function when used from Inc/dec atomic
10085 functions. Re-enabled optimization on x86.
10086 * mini-ops.h: renamed atomic_add functions to
10087 allow _add to match the Interlocked::Add and
10088 _add_next to match Interlocked::Inc/Dec.
10090 2004-12-15 Massimiliano Mantione <massi@ximian.com>
10092 * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
10093 linking of BBs to the end BB, and enabled SSAPRE also with
10094 consprop and copyprop (which was prevented by that bug).
10096 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
10098 * mini-x86.c: disabling the Interlocked optimizing code.
10100 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
10102 * aot.c (load_aot_module): Move reading of got_addr after the AOT
10103 file version check.
10105 2004-12-14 Patrik Torstensson <patrik.torstensson@gmail.com>
10107 * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm
10108 interlocked optimization due lack of support on x86, rewrote
10109 exchange to take into account that base may be in eax.
10111 xsp works again; activated Interlocked optimizing code.
10113 2004-12-14 Zoltan Varga <vargaz@freemail.hu>
10115 * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
10117 2004-12-13 Zoltan Varga <vargaz@freemail.hu>
10119 * mini-ops.h: Add new opcodes.
10121 * mini.h: Add new patch types. Add got_var to MonoCompile.
10123 * mini.h mini-x86.c mini-amd64.c aot.c: Rename
10124 mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
10125 make it work with all kinds of patchable code.
10127 * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
10128 address of the GOT, and referencing entries in the GOT.
10130 * mini.c: Add code to load the GOT address if needed by an opcode.
10132 * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position
10133 independent AOT code on the x86 using an elf-style Global Offset Table.
10135 2004-12-14 Raja R Harinath <rharinath@novell.com>
10137 * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
10139 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10141 * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
10144 2004-12-13 Patrik Torstensson <patrik.torstensson@gmail.com>
10146 * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
10147 of Interlocked:Increment/Decrement/Add as inline ops.
10148 (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
10150 2004-12-12 Geoff Norton <gnorton@customerdna.com>
10152 * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
10153 * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
10155 2004-12-12 Duncan Mak <duncan@ximian.com>
10157 * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
10158 again. `patch_info->table_size' is no longer valid after Zoltan's
10161 2004-12-12 Martin Baulig <martin@ximian.com>
10163 * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
10164 if we are the "real" method, ie. not an inlined method inside it.
10166 2004-12-11 Ben Maurer <bmaurer@ximian.com>
10168 * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
10169 before we look in the special fields table. This fixes
10170 ../tests/thread-static-init.cs.
10172 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10174 * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
10175 for Array get_Rank and get_Length. Fixes bug #70465.
10177 2004-12-11 Zoltan Varga <vargaz@freemail.hu>
10179 * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
10180 separate structure to reduce the size of MonoJumpInfo.
10182 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
10184 * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
10186 2004-12-10 Patrik Torstensson <patrik.torstensson@gmail.com>
10188 * mini.c (mini_get_inst_for_method): Changed to allow ports
10189 to return a MonoInst instead of opcode
10190 (renamed mini_get_opcode_for_method to better reflect the new functionality)
10192 * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method):
10193 Allow ports to return a created MonoInst instead of op-code, will enable
10195 (renamed mini_get_opcode_for_method to better reflected the functionality)
10197 2004-12-09 Zoltan Varga <vargaz@freemail.hu>
10199 * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
10201 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
10203 * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
10206 2004-12-08 Martin Baulig <martin@ximian.com>
10208 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
10209 if we're a CEE_CONSTRAINED call. Fixes gen-118.cs.
10211 2004-12-08 Zoltan Varga <vargaz@freemail.hu>
10213 * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
10216 * exceptions.cs: Disable some tests which depend on properties of x86 fp
10219 2004-12-08 Raja R Harinath <rharinath@novell.com>
10221 * Makefile.am (CLEANFILES): Add *.exe, *.dll.
10223 2004-12-07 Zoltan Varga <vargaz@freemail.hu>
10225 * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
10226 bug introduced by the previous patch.
10228 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10230 * mini-ppc.c, objectc.cs: handle large structs passed by value
10231 (fixes bug #69972).
10233 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
10235 * mini-ppc.c: OP_ARGLIST implementation from
10236 Geoff Norton <gnorton@customerdna.com>.
10238 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
10240 * inssel-x86.brg, inssel-ppc.brg: fix reference to register
10241 in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
10243 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
10245 * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
10247 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10249 * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
10252 2004-12-06 Zoltan Varga <vargaz@freemail.hu>
10254 * mini-sparc.c: Zero out localled-ed memory.
10256 * iltests.il: Add tests for zeroing out localloc-ed memory.
10258 2004-12-04 Martin Baulig <martin@ximian.com>
10260 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
10261 mono_method_get_signature_full().
10263 2004-12-03 Massimiliano Mantione <massi@ximian.com>
10265 * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
10266 and some utility functions (always for SSAPRE), integrated SSAPRE.
10267 * mini.h: Likewise.
10268 * driver.c: Added ssapre option.
10269 * ssa.c: Small fix on OP_ARG handling.
10270 * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
10271 * Makefile.am: Likewise.
10273 2004-12-02 Zoltan Varga <vargaz@freemail.hu>
10275 * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
10276 now in the xp code.
10278 * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
10281 2004-12-01 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10283 * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
10285 * cpu-s390.md : Increase instruction length of oparglist.
10287 * mini-s390.c : Implement vararg and TYPEDEBYREF support.
10289 2004-11-30 Martin Baulig <martin@ximian.com>
10291 * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
10292 virtual generic methods. We call a special helper_compile_generic_method()
10293 icall to retrieve the method from the vtable, inflate and compile
10294 it and then do a CEE_CALLI. Thanks a lot to Paolo for this idea.
10296 * jit-icalls.c (helper_compile_generic_method): New JIT icall.
10298 2004-11-30 Zoltan Varga <vargaz@freemail.hu>
10300 * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
10302 2004-11-29 Zoltan Varga <vargaz@freemail.hu>
10304 * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
10307 2004-11-27 Ben Maurer <bmaurer@ximian.com>
10309 * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
10310 platforms with PIC aot.
10312 2004-11-28 Martin Baulig <martin@ximian.com>
10314 * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
10317 2004-11-28 Martin Baulig <martin@ximian.com>
10319 * mini-x86.c (mono_arch_call_opcode): Use the original type, not
10320 the result of mono_type_get_underlying_type() to check whether
10323 2004-11-26 Martin Baulig <martin@ximian.com>
10326 (mono_method_to_ir): Use `!method->signature->has_type_parameters'
10329 2004-11-26 Zoltan Varga <vargaz@freemail.hu>
10331 * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
10332 the same way as the other arguments so they won't get clobbered.
10334 * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual
10335 calls through R11 since it is clobbered by the trampoline code.
10337 2004-11-26 Raja R Harinath <rharinath@novell.com>
10339 * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
10340 pick up in-tree mscorlib.dll.
10342 2004-11-25 Zoltan Varga <vargaz@freemail.hu>
10344 * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
10346 * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to
10347 runtime data/code are now stored in a table similar to the GOT in ELF.
10348 This allows the code itself to be position independent.
10350 * aot.c: Fix loading of referenced assemblies after the lazy assembly
10353 * aot.c: Attach ELF type (object/function) directives to all global
10356 * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
10358 * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
10360 * mini-amd64.h: Turn on PIC AOT code.
10362 * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
10363 returning the offset within an OP_AOTCONST instruction where the GOT
10364 offset needs to be added.
10366 * mini.h: Bump AOT file format version.
10368 2004-11-25 Martin Baulig <martin@ximian.com>
10370 * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
10371 uninflated generic methods.
10373 2004-11-25 Martin Baulig <martin@ximian.com>
10375 * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
10377 2004-11-24 Martin Baulig <martin@ximian.com>
10379 * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
10380 original klass (this only applies for generic instances).
10382 2004-11-24 Martin Baulig <martin@ximian.com>
10384 * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
10385 `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
10388 2004-11-24 Zoltan Varga <vargaz@freemail.hu>
10390 * mini.c (mono_method_to_ir): Disable inlining for methods containing
10391 localloc. Fixes #69678.
10393 * iltests.il (test_0_localloc_inline): Add regression test for #69678.
10395 2004-11-23 Zoltan Varga <vargaz@freemail.hu>
10397 * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
10398 used SSE registers on pinvoke calls. Fixes #69774.
10400 2004-11-23 Geoff Norton <gnorton@customerdna.com>
10402 * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
10403 vt->inst_vtype->data.klass. This fixes generic structs and bug #69766
10405 2004-11-23 Raja R Harinath <rharinath@novell.com>
10407 * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
10408 Refer directly to the mcs/ tree.
10410 2004-11-19 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10412 * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
10413 Check if a trampoline for a synchronized method is required.
10415 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
10417 * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
10418 with localloc if needed. Throe arithmetric exception in
10419 div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
10420 Adapted from a patch by Geoff Norton <gnorton@customerdna.com>.
10422 2004-11-19 Geoff Norton <gnorton@customerdna.com>
10424 * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
10425 types before switching on type. Fixes #69622.
10427 2004-11-19 Raja R Harinath <rharinath@novell.com>
10429 * Makefile.am (check-local): New. Integrate into 'make check'.
10430 (MCS,RUNTIME): Define using in-tree mono and mcs.
10432 (%.exe): Use $(ILASM).
10434 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
10436 * mini-ppc.c: adjust initial prolog size (bug #69691).
10438 2004-11-18 Zoltan Varga <vargaz@freemail.hu>
10440 * cpu-pentium.md (localloc): Increase max instruction len. Fixes
10443 2004-11-17 Raja R Harinath <rharinath@novell.com>
10445 * Makefile.am (clean-local): Rename from 'clean'.
10447 2004-11-15 Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10449 * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
10450 to mono_arch_is_int_overflow.
10451 * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
10454 2004-11-15 Sebastien Pouliot <sebastien@ximian.com>
10456 * declsec.c|h: New files to support declarative security attributes.
10457 Added function to check if a method has (applicable) security.
10458 * mini.c|h: Add check for declarative security attributes in
10459 mono_method_check_inlining.
10460 * Makefile.am: Added declsec.c and declsec.h to the build.
10462 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
10464 * mini.c, mini.h: update to keep dynamic code info per-domain.
10466 2004-11-12 Zoltan Varga <vargaz@freemail.hu>
10468 * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
10469 (mini_init): Get rid of it from here too.
10471 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
10473 * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
10474 implemented OP_RETHROW (patch by Geoff Norton
10475 <gnorton@customerdna.com>).
10477 2004-11-10 Geoff Norton <gnorton@customerdna.com>
10479 * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
10480 between appdomains. Fixes appdomain-unload on PPC.
10482 2004-10-26 Lluis Sanchez Gual <lluis@novell.com>
10484 * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10485 mini-exceptions.c: handle the new wrapper types.
10486 * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
10487 token value as a MonoClass* when compiling a wrapper.
10488 mono_jit_create_remoting_trampoline now takes an additional
10489 MonoRemotingTarget parameter.
10491 2004-11-10 Martin Baulig <martin@localhost>
10493 * mini.c (mono_method_to_ir): Use `generic_container->context'
10494 rather than creating a new one.
10496 2004-11-09 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10498 * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
10500 * inssel-390.md, mini-s390.c: Correct register allocation for globals.
10502 2004-11-09 Zoltan Varga <vargaz@freemail.hu>
10504 * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
10505 the experimental aot cache stuff.
10507 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
10509 * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10510 mini-exceptions.c: update to exception clause structure changes.
10512 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
10514 * exceptions-x86.c (throw_exception): Fix warnings.
10516 * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support
10519 2004-11-08 Zoltan Varga <vargaz@freemail.hu>
10521 * exceptions-sparc.c (get_throw_exception): Really fix this.
10523 2004-11-07 Ben Maurer <bmaurer@ximian.com>
10525 * tramp-*.c: we no longer support icalls without wrappers, so
10526 a bit of code can be removed here
10528 2004-11-07 Zoltan Varga <vargaz@freemail.hu>
10530 * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
10533 * cpu-sparc.md: Add op_rethrow.
10535 * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
10537 * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
10539 * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
10540 * mini-ops.h: Add OP_RETHROW.
10542 * mini.c inssel.brg: Distinguish between THROW and RETHROW.
10544 * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
10546 2004-11-05 Geoff Norton <gnorton@customerdna.com>
10548 * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
10549 Makes the output much easier to read
10551 2004-11-05 Ben Maurer <bmaurer@ximian.com>
10553 * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
10554 prevents another huge leak when compiling with ssa. Secondly, the
10555 performance of doing this rather than freeing the lists is much
10556 better. GList does a lock every time you allocate a list link,
10557 so that it can use a memory pool. So, it is better to just use
10558 a memory pool of our own.
10560 * ssa.c, linear-scan.c: replace g_list_remove_link with
10561 g_list_delete. The remove one does not free the GList, so we were
10562 leaking memory. On -O=all --compile-all with corlib, this cut down
10563 3 MB of allocations.
10565 2004-11-05 Zoltan Varga <vargaz@freemail.hu>
10567 * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
10569 * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
10571 * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
10572 into a new function mono_create_jit_trampoline ().
10574 2004-11-02 Zoltan Varga <vargaz@freemail.hu>
10576 * trace.c (get_spec): Allow tracing of classes without a namespace.
10578 2004-11-02 Sebastien Pouliot <sebastien@ximian.com>
10580 * mini.c: Fix pointer overwrite in mini_method_compile.
10582 2004-11-2 Geoff Norton <gnorton@customerdna.com>
10584 * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
10585 The darwin ABI needs some special handling for 1 and 2 byte structs
10586 Lets use lbz/lhz instead of lwz everywhere.
10587 * mini-ppc.c (calculate_sizes): The Darwin ABI needs from special handling
10588 for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
10589 Use stb/sth for the former, and put the latter always on stack instead of in
10590 argument registers.
10592 2004-10-30 Zoltan Varga <vargaz@freemail.hu>
10594 * trace.c (is_filenamechar): Add '_'.
10596 2004-10-29 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10598 * mini-s390.c: Fix prolog length to allow for large trace requirements.
10600 * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
10602 2004-10-29 Zoltan Varga <vargaz@freemail.hu>
10604 * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
10605 depends on libmonogc. Fixes #68805.
10607 2004-10-26 Miguel de Icaza <miguel@ximian.com>
10609 * mini.c (mono_jit_free_method): Provide extra information for
10610 this error. Currently this leaks, but will be turned into a
10611 developer option in the future.
10613 2004-10-26 Zoltan Varga <vargaz@freemail.hu>
10615 * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
10617 2004-10-25 Zoltan Varga <vargaz@freemail.hu>
10619 * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte
10620 boundary. Fixes reading of PATCH_INFO_R4 and R8.
10621 (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
10623 2004-10-24 Zoltan Varga <vargaz@freemail.hu>
10625 * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
10626 trampolines for AOT code.
10628 2004-10-22 <vargaz@freemail.hu>
10630 * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
10631 constructed types. Fixes #68136.
10633 2004-10-21 Martin Baulig <martin@ximian.com>
10635 * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
10636 if it returns true, unwind the stack to the call instruction.
10638 2004-10-21 <vargaz@freemail.hu>
10640 * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
10642 * mini.h: Bump AOT version number.
10644 * objects.cs: Add another test for unbox trampolines.
10646 * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for
10649 2004-10-20 <vargaz@freemail.hu>
10651 * driver.c: Add SHARED to the set of optimizations tested.
10653 * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
10655 * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
10656 used by CEE_NEWARR.
10658 * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
10660 2004-10-20 Martin Baulig <martin@ximian.com>
10662 * mini-exceptions.c (mono_handle_exception): Call
10663 mono_debugger_handle_exception() to tell the debugger about
10664 catch/finally clauses.
10666 2004-10-18 Zoltan Varga <vargaz@freemail.hu>
10668 * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
10670 * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
10673 2004-10-15 Geoff Norton <gnorton@customerdna.com>
10675 * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
10676 methods as their native size, fixed bug #57543, #57545.
10677 * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
10678 This saves a temporary register and mullw call down into 1 (minor perf
10679 increase for cases like sum = sum * 5; This use to translate into:
10682 It now translates to
10685 2004-10-15 Zoltan Varga <vargaz@freemail.hu>
10687 * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
10690 2004-10-11 Martin Baulig <martin@ximian.com>
10692 * mini.c (mono_method_to_ir): If we're a generic method, get the
10693 MonoGenericContainer from our MonoMethodNormal and create a
10694 MonoGenericContext from it.
10696 2004-10-08 Zoltan Varga <vargaz@freemail.hu>
10698 * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
10700 * basic-long.cs: Add test for checked i8->i2 cast.
10702 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
10704 * inssel-ppc.brg: added a couple of speedup rules.
10706 2004-10-05 Zoltan Varga <vargaz@freemail.hu>
10708 * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
10709 to speed up rebuilds.
10711 2004-10-04 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10713 * mini-s390.c: Minor fix to OP_OR_IMM.
10715 2004-10-03 Zoltan Varga <vargaz@freemail.hu>
10717 * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
10718 better. Fixes appdomain-unload.exe on sparc.
10720 2004-10-02 Massimiliano Mantione <massi@ximian.com>
10722 * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
10723 simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
10726 2004-10-02 Zoltan Varga <vargaz@freemail.hu>
10728 * jit-icalls.c: Handle a nonexisting trunc function more correctly.
10730 2004-09-30 Lluis Sanchez Gual <lluis@novell.com>
10732 * mini.c: Always generate a field read/write wrapper for members
10733 of the class MarshalByRefObject since the actual instance could
10736 2004-09-28 Lluis Sanchez Gual <lluis@novell.com>
10738 * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
10740 2004-09-28 Zoltan Varga <vargaz@freemail.hu>
10742 * driver.c mini.h trace.c: Move the setting of the main assembly into
10743 a separate function called mono_trace_set_assembly () and call it after
10744 actually loading the main assembly. Fixes #66872.
10746 2004-09-25 Zoltan Varga <vargaz@freemail.hu>
10748 * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
10749 using the code manager.
10751 2004-09-24 Zoltan Varga <vargaz@freemail.hu>
10753 * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
10755 2004-09-23 Zoltan Varga <vargaz@freemail.hu>
10757 * cpu-amd64.md: Fix bug in previous patch.
10759 * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
10762 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
10764 * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
10765 mini-exceptions.c: updates for changed stack walk interface.
10767 2004-09-21 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
10769 * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
10771 2004-09-17 Zoltan Varga <vargaz@freemail.hu>
10773 * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
10775 2004-09-13 Zoltan Varga <vargaz@freemail.hu>
10777 * driver.c (mini_regression_list): Do not call mono_assembly_close
10778 since assemblies can't be unloaded.
10780 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
10782 * cpu-amd64.md: Fix more instruction lengths.
10784 * cpu-amd64.md: Fix lengths of some instructions.
10786 2004-09-11 Ben Maurer <bmaurer@users.sourceforge.net>
10788 * inssel.brg: Make the array ldelema check aot friendly.
10790 2004-09-11 Zoltan Varga <vargaz@freemail.hu>
10792 * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
10794 * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
10796 2004-09-10 Zoltan Varga <vargaz@freemail.hu>
10798 * mini-x86.c: Fix build.
10800 * mini-sparc.c mini-x86.c mini-amd64.c: Use the new
10801 mono_type_get_underlying_type () helper function to simplify code.
10803 2004-09-09 Martin Baulig <martin@ximian.com>
10805 * mini-amd64.c: Don't access `type->data.klass' directly, call
10806 mono_class_from_mono_type() instead since the type may be a
10809 2004-09-09 Martin Baulig <martin@ximian.com>
10811 * mini-amd64.c (get_call_info): Fix support for generic instances.
10812 (add_valuetype): Use mono_class_from_mono_type() to get the class
10813 since we can be a generic instance.
10815 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
10817 * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
10819 2004-09-07 Ben Maurer <bmaurer@users.sourceforge.net>
10821 * liveness.c: reset spill costs on each scan: bug 62107
10823 2004-09-07 Bernie Solomon <bernard@ugsolutions.com>
10825 * exceptions-sparc.c (mono_arch_find_jit_info): remove
10826 unnecessary line that doesn't compile
10828 2004-09-07 Zoltan Varga <vargaz@freemail.hu>
10830 * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
10831 trampolines, make them call an error function so people can fix their
10834 2004-09-06 Martin Baulig <martin@ximian.com>
10836 * mini.c (mono_method_to_ir): When initializing locals, handle a
10837 generic instances like a valuetype if it's a valuetype and like a
10838 class if it's a class.
10840 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
10842 * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
10843 stack. Fixes #64674.
10845 * exceptions.cs: Add test for unwinding of call arguments.
10847 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
10849 * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
10850 OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
10851 set the carry/borrow flag). The sparc and s390 implementations
10852 can now use optimized versions (and simplify the code). ppc bugfixes.
10854 2004-09-06 Zoltan Varga <vargaz@freemail.hu>
10856 * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
10858 2004-09-05 Zoltan Varga <vargaz@freemail.hu>
10860 * inssel-amd64.brg: Remove leftover 32 bit rule.
10862 * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
10864 2004-09-04 Zoltan Varga <vargaz@freemail.hu>
10866 * mini-exceptions.c (mono_find_jit_info): Refactor common code from
10867 mono_arch_find_jit_info functions into a new function. Fix a memory
10870 * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
10873 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
10875 * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
10878 * exceptions.cs: Add array size tests.
10880 * mini.c: Allocate a separate icall wrapper for each arity of
10881 mono_array_new_va. Fixes #59509.
10883 * exceptions.cs: Add testcase for 64578.
10885 * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
10887 * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
10889 2004-09-02 Martin Baulig <martin@ximian.com>
10891 * mini.c (mono_method_to_ir): When initializing the locals, call
10892 handle_initobj() on the generic instance itself, not its
10895 2004-09-02 Zoltan Varga <vargaz@freemail.hu>
10897 * mini.h (MonoJitDynamicMethodInfo): New structure, extension of
10898 MonoJitInfo for dynamic methods.
10900 * mini.c: Rename trampoline_hash_mutex to jit_mutex.
10902 * mini.c: Add support for freeing JIT data for dynamic methods.
10904 2004-09-01 Martin Baulig <martin@ximian.com>
10906 * mini-x86.c (is_regsize_var): Added support for generic
10908 (mono_arch_emit_prolog): Make this compile again, use
10909 `x86_push_imm_template (code)'.
10911 2004-08-30 Ben Maurer <bmaurer@users.sourceforge.net>
10913 * mini-x86.c: make all push_imm instructions that get
10914 patched always emit the long form
10916 2004-08-30 Zoltan Varga <vargaz@freemail.hu>
10918 * mini.c (mono_create_jump_trampoline): Store the jump trampolines
10919 in a per-domain hash.
10921 * mini-amd64.c (merge_argument_class_from_type): Handle generic
10924 2004-08-29 Zoltan Varga <vargaz@freemail.hu>
10926 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
10929 * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
10932 * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
10933 Beginnings of SSE2 support.
10935 * exceptions.cs: Add more tests for checked int<->uint casts.
10937 2004-08-28 Martin Baulig <martin@ximian.com>
10939 * mini-x86.c (mono_arch_instrument_epilog): Added support for
10943 (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
10944 Handle generic instances recursively.
10946 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
10948 * iltests.il: test for conv.u8 on a constant
10950 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
10952 * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
10953 LCONV_x4 (shrun_32 (membase)).
10955 2004-08-27 Ben Maurer <bmaurer@users.sourceforge.net>
10957 * inssel-x86.brg: c&p rules for push/setret of long
10959 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
10961 * inssel-x86.brg: c&p rules for compare (base, regvar) and
10962 compare (regvar, base)
10964 * inssel-x86.brg: more burg love
10966 * inssel.brg: more cleanup
10968 * inssel-x86.brg, inssel-long32.brg: burg cleanup.
10970 2004-08-26 Ben Maurer <bmaurer@users.sourceforge.net>
10972 * basic-long.cs, basic-calls.cs: new tests for optimization.
10974 2004-08-26 Zoltan Varga <vargaz@freemail.hu>
10976 * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
10979 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
10981 * mini-amd64.c (read_tls_offset_from_method): Add another case.
10983 2004-08-25 Bernie Solomon <bernard@ugsolutions.com>
10985 * inssel.brg (mini_emit_memcpy): use
10986 NO_UNALIGNED_ACCESS to disable memcpy optimization
10988 2004-08-25 Zoltan Varga <vargaz@freemail.hu>
10990 * mini-amd64.c: Handle generic types in various places.
10992 * mini.c (mono_method_to_ir): Handle generic types in init locals.
10994 2004-08-24 Zoltan Varga <vargaz@freemail.hu>
10996 * mini.c (handle_box): Fix warning.
10998 * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
11000 * mini-amd64.h: Enable the emit_state optimization.
11002 * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
11004 * mini-amd64.c: Add some new 64 bit peephole opts.
11006 * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
11008 * cpu-amd64.md: sreg1 of div instructions must be %rax.
11010 * mini-amd64.c: Register allocator fixes.
11012 * mini.c: Add an optimization to emit_state to avoid allocation of new
11013 registers on some platforms.
11015 2004-08-23 Zoltan Varga <vargaz@freemail.hu>
11017 * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
11019 * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
11020 allocation. Fixes #63085.
11022 * basic-long.cs: Add new regression test.
11024 * mini-amd64.c: Register allocator improvements.
11026 2004-08-21 Zoltan Varga <vargaz@freemail.hu>
11028 * mini-amd64.c (read_tls_offset_from_method): Add another code
11031 * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
11032 instruction sequence for nullifying class init trampolines.
11034 * objects.cs: Add new regalloc test.
11036 * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
11038 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
11040 * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
11042 * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
11045 * driver.c: Fix profiling after TLS changes.
11047 * driver.c (mono_main): Set mono_stats.enabled if needed.
11049 * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
11052 2004-08-20 Ben Maurer <bmaurer@users.sourceforge.net>
11054 * mini-x86.c: use a 1 op rather than a 2 op tls access
11055 instruction -> faster.
11057 2004-08-20 Zoltan Varga <vargaz@freemail.hu>
11059 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
11062 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
11064 * exceptions-sparc.c (throw_exception): fix typo
11066 2004-08-19 Ben Maurer <bmaurer@users.sourceforge.net>
11068 * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
11069 set tree->dreg correctly with tls. Allow any
11070 register to be used.
11072 * mini-x86.c (read_tls_offset_from_method): add new code
11073 generation pattern seen with GCC.
11076 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
11078 * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
11079 exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
11080 exceptions-sparc.c: fix some performance issues in exception
11081 handling and setting of the stack trace for exceptions that were
11084 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
11086 * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
11089 * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible
11092 2004-08-18 Ben Maurer <bmaurer@users.sourceforge.net>
11094 This patch inlines tls access, when possible.
11096 * mini.h: new arch functions for TLS intrinsics.
11097 All platforms updated with a stub.
11099 * mini.c: use the new intrinsics
11101 * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
11102 arch specific intrinsic for tls variables
11104 2004-08-18 Zoltan Varga <vargaz@freemail.hu>
11106 * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
11109 2004-08-17 Ben Maurer <bmaurer@users.sourceforge.net>
11111 * mini.c: thread local allocation
11113 2004-08-16 Zoltan Varga <vargaz@freemail.hu>
11115 * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
11117 * Makefile.am: Link against the static version of libmonogc.
11119 * Makefile.am: Link the static versions of the convenience libraries
11120 into the mono executable.
11122 * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
11124 2004-08-15 Zoltan Varga <vargaz@freemail.hu>
11126 * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
11127 on integer overflow.
11129 * mini-amd64.c: Reorganize function call code.
11131 * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
11133 2004-08-14 Ben Maurer <bmaurer@ximian.com>
11135 * inssel-x86.brg: use xor eax,eax.
11137 * basic.cs: new tests
11139 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
11141 * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
11142 in exception throwing code.
11144 2004-08-14 Ben Maurer <bmaurer@ximian.com>
11146 * inssel-x86.brg: use xor esi,esi.
11148 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
11150 * driver.c (mono_main): Call mono_trace_parse_options earlier so it
11151 can trace methods compiled during mini_init () too.
11153 * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle
11156 2004-08-14 Ben Maurer <bmaurer@ximian.com>
11158 * Makefile.am: static link on x86 (r=zoltan)
11160 2004-08-14 Zoltan Varga <vargaz@freemail.hu>
11162 * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
11163 code since it causes some programs to fail.
11165 2004-08-12 Zoltan Varga <vargaz@freemail.hu>
11167 * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
11169 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
11171 * mini.c: ovfops_op_map - add STACK_OBJ case for
11173 * basic.cs: add test_0_pin_string as test
11176 2004-08-11 Bernie Solomon <bernard@ugsolutions.com>
11178 * Makefile.am: build C# if srcdir != builddir
11180 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
11182 * dominators.c, mini.h, mini-x86.c: fix loop alignment with
11183 fall-through blocks.
11185 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11187 * driver.c: enable loop by default again and include abcrem in -O=all.
11189 2004-08-08 Zoltan Varga <vargaz@freemail.hu>
11191 * iltests.il: Add some localloc tests.
11193 * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
11195 * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly.
11198 * inssel-amd64.brg: Add some optimizations.
11200 * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
11203 * Makefile.am: Statically link mono against libmono on AMD64.
11205 * mini-amd64.c inssel-amd64.brg: Optimizations.
11207 2004-08-07 Zoltan Varga <vargaz@freemail.hu>
11209 * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
11211 * tramp-amd64.c: Patch calling code in trampolines.
11213 2004-08-06 Zoltan Varga <vargaz@freemail.hu>
11215 * mini-amd64.c: pinvoke struct passing fixes.
11217 2004-08-05 Bernie Solomon <bernard@ugsolutions.com>
11219 * mini-sparc.c: redo change, make mono_arch_cpu_init call
11220 mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
11222 2004-08-05 Duncan Mak <duncan@ximian.com>
11224 * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
11227 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
11229 * mini-amd64.c (emit_move_return_value): Move return value for normal
11232 2004-08-05 Martin Baulig <martin@ximian.com>
11234 * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
11235 `type->type'; just modify `type' itself when dealing with enums
11236 and generic instances.
11237 (check_call_signature): Make `simple_type' a `MonoType *'.
11239 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
11241 * mini.c: Use OP_PADD to add offsets to addresses.
11243 * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
11245 2004-08-04 Bernie Solomon <bernard@ugsolutions.com>
11247 * mini-sparc.c (mono_arch_emit_epilog): fix check
11248 for folding last op into restore instruction
11250 2004-08-05 Zoltan Varga <vargaz@freemail.hu>
11252 * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
11253 helper methods using the code manager.
11255 * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
11257 * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
11259 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11261 * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
11262 cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
11264 * mini-s390.c: fix tail processing
11266 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
11268 * mini-ppc.c: mul.ovf.un exception name fix.
11270 2004-08-03 Martin Baulig <martin@ximian.com>
11272 * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
11273 instances; before jumping to `handle_enum', also modify `ptype'.
11275 2004-08-02 Bernie Solomon <bernard@ugsolutions.com>
11277 * cpu-sparc.md: fcall maximal length too small.
11279 2004-08-02 Zoltan Varga <vargaz@freemail.hu>
11281 * mini-amd64.c mini.h: Add initial support for passing/returning
11282 structures to/from pinvoked methods.
11284 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
11286 * mini-ppc.c: reg allocator fix.
11288 2004-07-31 Zoltan Varga <vargaz@freemail.hu>
11290 * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
11292 * inssel.brg: Optimize memset on 64 bit machines.
11294 * mini-amd64.c: Fix some vararg cases.
11296 2004-07-30 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
11298 * mini-s390.c: Corrected macro in emit_float_to_int
11300 * s390-abi.cs: Tests to exercise the s390 ABI
11302 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
11304 * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
11307 * basic.cs: Add a test for add.ovf.un.
11309 2004-07-30 Bernie Solomon <bernard@ugsolutions.com>
11311 * mini-sparc.c: add case for OP_IDIV_UN
11313 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
11315 * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
11317 * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
11319 2004-07-30 Ben Maurer <bmaurer@ximian.com>
11321 * basic.cs: regression tests.
11323 * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
11326 2004-07-30 Zoltan Varga <vargaz@freemail.hu>
11328 * basic.cs: Add a new test.
11330 * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling
11331 and AOT. Various fixes and optimizations.
11333 * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
11335 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
11337 * mini-ppc.c: make sure temp regs are not used for global reg
11340 2004-07-29 Bernie Solomon <bernard@ugsolutions.com>
11342 * cpu-sparc.md: conv_i8 fix for 64bits
11344 * mini-sparc.c: add cases for OP_IXXX codes for 64bits
11346 2004-07-29 Ben Maurer <bmaurer@ximian.com>
11348 * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
11349 add opcode for cmp BYTE PTR [eax], imm.
11351 * inssel.brg: Make memcpy and memset takes bases.
11353 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
11355 * *-amd64.*: More AMD64 work.
11357 2004-07-28 Ben Maurer <bmaurer@ximian.com>
11359 * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
11360 add a compare-not-equal opcode.
11362 2004-07-28 Lluis Sanchez Gual <lluis@novell.com>
11364 * mini.c: Use mono_init_from_assembly instead of mono_init.
11366 2004-07-28 Zoltan Varga <vargaz@freemail.hu>
11368 * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
11370 * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
11372 * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
11374 * inssel.brg: 64 bit fixes.
11376 * mini.h (MonoCallInst): Add some AMD64 specific data.
11378 * mini.h: Add some OP_P opcodes.
11380 2004-07-28 Ben Maurer <bmaurer@ximian.com>
11382 * basic.cs: tests for 61797 and 61740
11384 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
11386 * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
11387 numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
11389 2004-07-24 Zoltan Varga <vargaz@freemail.hu>
11391 * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
11393 * *-amd64*.*: Ongoing AMD64 work.
11395 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
11397 * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
11399 * *-amd64*: Ongoing AMD64 work.
11401 * mini-arch.h: Add AMD64 support.
11403 * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
11405 * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
11407 * mini-ops.h: Add new opcodes.
11409 * Makefile.am: Add AMD64 support.
11411 * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
11412 rules into the inssel-long*.brg files.
11414 * *-amd64.*: Add beginnings of AMD64 backend.
11416 2004-07-22 Ben Maurer <bmaurer@ximian.com>
11418 * mini.c (print_dfn): commenting out the code that prints
11419 the cil. With -O=deadce, this makes -v -v crash.
11421 * cpu-pentium.md: make checkthis have a length of 2
11423 2004-04-21 Bernie Solomon <bernard@ugsolutions.com>
11425 * mini-sparc.h: fix implementations of __builtin
11426 functions for Sun compiler for V9.
11428 2004-07-16 Ben Maurer <bmaurer@ximain.com>
11430 * mini.c: use the new stelem.ref wrapper
11431 * exceptions.cs, arrays.cs: new stelem.ref tests
11433 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
11435 * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
11436 new XSP should work with these changes).
11438 2004-07-14 Ben Maurer <bmaurer@ximain.com>
11440 * inssel-{long32,x86,}.brg: trivial optimizations.
11442 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
11444 * mini.c: load value when emitting box operation in
11447 2004-07-12 Ben Maurer <bmaurer@ximian.com>
11449 * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
11450 is one byte shorter than cmp DWORD PTR [eax], 0.
11452 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
11454 * inssel-ppc.brg: arguments on the stack are always
11455 relative to the stack pointer (spotted by Neale Ferguson).
11457 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11459 * exceptions-x86.c: delay appending the method name to the trace until
11460 after mono_jit_info_table_find is called, as this gets the real
11463 2004-07-09 Ben Maurer <bmaurer@ximian.com>
11465 * aot.c: register roots
11467 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
11469 * aot.c : I could just use PLATFORM_WIN32 flag.
11471 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
11473 * aot.c : Reverting the previous fix. This time it broke linux build.
11475 2004-07-09 Atsushi Enomoto <atsushi@ximian.com>
11477 * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
11479 2004-07-08 Zoltan Varga <vargaz@freemail.hu>
11481 * mini.c (handle_stack_args): Remove some more debugging code.
11483 * mini.c (handle_stack_args): Remove debug output left in by mistake.
11485 * driver.c mini.h aot.c: Allow additional options to be specified with
11486 --aot and pass them to mono_compile_assembly.
11488 * aot.c: Add experimental code to AOT compile all loaded assemblies
11489 on demand and save the code into a cache in the filesystem.
11491 * aot.c: Add support for more wrapper methods.
11493 * mini.c (handle_stack_args): Handle some corner cases. Fixes
11496 * cpu-*.md: Remove removed opcodes.
11498 * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
11499 CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
11500 related icalls to marshal.c.
11502 2004-07-06 Zoltan Varga <vargaz@freemail.hu>
11504 * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
11506 * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
11508 * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
11510 2004-07-06 Ben Maurer <bmaurer@ximian.com>
11511 * liveness.c: If liveness is recomputated we need to reset the information
11512 for each variable. This way, if the liveness range has been narrowed
11513 by optimizations that happened after the last computation, we can return
11516 For example, if you have
11521 // Tons of code that does not affect i
11527 i = 0 is dead code and will be removed by SSA. However, when
11528 linear scan gets to the code, i will still appear to be live
11529 throughout the entire block. This prevents good register allocation.
11531 2004-07-06 Martin Baulig <martin@ximian.com>
11533 * debug-mini.c (mono_debug_init_method): Allow
11534 MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
11535 (mono_debug_add_icall_wrapper): New method.
11537 * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
11539 2004-07-05 Zoltan Varga <vargaz@freemail.hu>
11541 * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
11544 2004-07-03 Zoltan Varga <vargaz@freemail.hu>
11546 * aot.c (mono_aot_load_method): Fix loading of debug info.
11548 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
11550 * aot.c: Add logging support.
11552 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
11554 * mini.h: Add prototype for mono_print_method_from_ip.
11556 * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
11558 * inssel.brg: 64 bit fixes.
11560 * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to
11563 * Makefile.am: Add SPARC64 support.
11565 2004-07-02 Zoltan Varga <vargaz@freemail.hu>
11567 * aot.c: Fix alignment problems on 32 bit platforms.
11569 2004-07-01 Zoltan Varga <vargaz@freemail.hu>
11571 * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
11574 * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
11577 * mini.h: Bump AOT file version. Some 64 bit fixes.
11579 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
11581 * inssel-sparc.brg: Add new rule to avoid register moves.
11583 * inssel.brg: Add ldind_to_load_membase helper function.
11585 2004-06-30 Ben Maurer <bmaurer@ximian.com>
11587 * mini.c: OffsetToStringData intrinsic.
11589 2004-06-30 Zoltan Varga <vargaz@freemail.hu>
11591 * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
11593 * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
11596 * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
11597 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
11599 * mini.c: reinstated mono_compile_get_interface_var()
11600 on x86, too, since the change breaks the Gtk# build there as well.
11602 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11604 * driver.c: remove loop from the default optimizations: it seems to
11605 interact badly with some of the other options (see bug #60613).
11607 2004-06-25 Zoltan Varga <vargaz@freemail.hu>
11609 * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann
11610 (fld@informatik.uni-bremen.de): Add Solaris x86 support.
11612 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
11614 * mini-ppc.c, cpu-g4.md: small updates to be able to compile
11615 vararg-using methods.
11617 2004-06-21 Martin Baulig <martin@ximian.com>
11619 * mini/mini-exceptions.c
11620 (mono_handle_exception): Added `gpointer original_ip' argument.
11621 After calling mono_unhandled_exception(), call
11622 mono_debugger_unhandled_exception() and if that returns true,
11623 restore the context and return.
11625 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
11627 * mini-ppc.c: prefer the use of relative branches so
11628 they won't need to be patched in aot code (patch from Patrick Beard).
11630 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
11632 * aot.c: patch from Patrick Beard to make the output assembly
11633 more correct for the MacOSX assembler. Small tweak to
11634 generate sane images on Linux/PPC, too.
11636 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11638 * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
11639 case until bug #59509 is fixed (shows up in #60332).
11641 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11643 * mini.c: make sure the needed wrappers are compiled, too, with
11646 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
11648 * driver.c: remove NPTL reference in --version output.
11650 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
11652 * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
11653 generate valid assembly for the Mach-O assembler.
11655 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
11657 * driver.c: don't include abcrem in the all optimization specifier
11658 since it slows down jit compilation too much for now.
11660 2004-06-12 Ben Maurer <bmaurer@users.sourceforge.net>
11662 * mini.c: use BIGMUL only if both operands have the same signage.
11663 * iltests.il: Test for bug 60056. (errors related to signage in
11668 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
11670 * mini.c, aot.c: memory leak fixes.
11672 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
11674 * inssel-long32.brg: implemented a few missing ulong cast opcodes.
11676 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
11678 * Makefile.am: remove the -static hack completely, it links in
11679 statically glib as well.
11681 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
11683 * iltests.il, mini.c: fixed bug#59580 in branch optimization.
11684 * exceptions.cs: make it compile with new mcs/csc.
11686 2004-06-03 Massimiliano Mantione <massi@ximian.com>
11687 * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
11688 and added relevant test case.
11690 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
11692 * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
11693 regressions in gtk-sharp.
11695 2004-05-29 Zoltan Varga <vargaz@freemail.hu>
11697 * exceptions.cs: New regression tests.
11699 * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
11701 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
11703 * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
11705 2004-05-28 Zoltan Varga <vargaz@freemail.hu>
11707 * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
11709 * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
11711 2004-05-28 Patrik Torstensson <totte@hiddenpeaks.com>
11713 * mini.c (mono_jit_runtime_invoke): Init class in this
11714 method instead of trusting mono_jit_compile_method to
11715 do the work (because wrappers can be in object class)
11717 2004-05-27 Zoltan Varga <vargaz@freemail.hu>
11719 * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
11721 * basic-long.cs: New regression test.
11723 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
11725 * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
11726 and div/rem checks.
11728 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
11730 * Makefile.am: fix miguel's change to build mono statically against
11731 libmono (track build dependencies).
11733 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
11735 * cfold.c: Some glib versions do not have G_MININT32.
11737 2004-05-26 Massimiliano Mantione <massi@ximian.com>
11739 * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
11740 with precision of tan, atan, sin and cos, and implemented related
11741 regressions tests (fixes bug 54467, but one new problem appeared and
11744 2004-05-26 Zoltan Varga <vargaz@freemail.hu>
11746 * cfold.c (FOLD_BINOPZ): Avoid division by zero.
11748 * exceptions.cs: Add test for constant folding && division by zero.
11750 * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
11751 since driver.c is in libmono too, so the optimization was useless.
11753 * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS
11754 variable to driver.c so the compiler can emit more efficient code to
11757 2004-05-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11759 * Makefile.am: don't distribute generated inssel.[ch] files.
11761 2004-05-25 Zoltan Varga <vargaz@freemail.hu>
11763 * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
11764 into the default appdomain. Fixes #58707.
11766 * jit-icalls.c: Remove the broken approximation for truncl, doing
11767 no conversion is better.
11769 * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
11772 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
11774 * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
11775 of the mcrxr instruction which is not available on some processors
11776 even if it's documented to be. Implement add and sub overflow correctly
11777 (still not complete for long unsigned). Speed up icalls a bit.
11779 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
11781 * mini.c (mono_jit_compile_method_with_opt): Make sure that
11782 we run .cctor in the current domain instead of target_domain.
11784 Fixes bug #58558, .cctor not being called in -O=shared.
11786 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
11788 * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
11790 2004-05-24 Ben Maurer <bmaurer@users.sourceforge.net>
11792 * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
11793 which can be done with an imm8, do it that way.
11794 (mono_arch_output_basic_block): ditto for a jmp
11795 (mono_arch_emit_prolog): Computate maximum offset of a label.
11797 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
11799 * mini-x86.c (mono_arch_local_regalloc): the reg allocator
11800 now tries to allocate prefered physical reg's for virtual
11801 regs. This reduces the number of emited spills/loads with
11802 20-30% on our core assemblies.
11804 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
11806 * jit-icalls.c: truncl() is not needed and trunc() is
11807 the correct thing to do anyway (bug #58287).
11809 2004-05-24 Zoltan Varga <vargaz@freemail.hu>
11811 * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
11814 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
11816 * driver.c: enable loop optimizations by default.
11818 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
11820 * mini-x86.c: fix calc of max loop size when aligning loops start.
11822 2004-05-23 Zoltan Varga <vargaz@freemail.hu>
11824 * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
11827 2004-05-22 Zoltan Varga <vargaz@freemail.hu>
11829 * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
11832 * basic-long.cs: Add tests for add/subtract of immediates with carry.
11834 * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
11836 * mini.c (inline_method): Allways inline some wrappers even if the cost
11837 is too large. Fixes #58785.
11839 * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
11841 2004-05-21 Zoltan Varga <vargaz@freemail.hu>
11843 * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
11844 (crichton@gimp.org). Beginning of support for sparc/linux.
11846 * mini-sparc.c: Optimize retrieval of LMF address.
11848 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
11850 * exceptions-ppc.c: handle alloca in methods with clauses.
11852 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
11854 * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
11856 2004-05-20 Lluis Sanchez Gual <lluis@ximian.com>
11858 * mini.c: Delegate most of the abort signal work to
11859 mono_thread_request_interruption, which also handles Stop and Suspend
11862 2004-05-20 Zoltan Varga <vargaz@freemail.hu>
11864 * mini.c mini.h: Allow inlining of icall wrappers if the backend
11865 supports the save/restore lmf opcodes.
11867 2004-05-19 Zoltan Varga <vargaz@freemail.hu>
11869 * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
11870 by gcc-3.4 as well.
11872 * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
11874 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
11876 * mini.h mini.c (mini_method_compile): Only run abc removal pass on
11877 methods which contain array accesses.
11879 * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
11880 boundaries. Fixes #58537.
11882 * iltests.il: Add regression test for #58537.
11884 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
11886 * mini-x86.c (mono_arch_local_regalloc): Last part of
11887 fix for bug #58633 (releasing register to early).
11889 2004-05-18 Miguel de Icaza <miguel@ximian.com>
11891 * basic-long.cs: Add new regression test.
11893 2004-05-18 Patrik Torstensson <totte@hiddenpeaks.com>
11895 * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
11896 register too early on the chain.
11898 2004-05-18 Zoltan Varga <vargaz@freemail.hu>
11900 * mini.c (create_helper_signature): Use a helper function to reduce
11901 the code which needs to be written. Also set the calling convention of
11902 icalls on windows. Fixes #57840.
11904 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
11906 * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
11907 exceptions-ppc.c: added helper function to get the instruction address
11908 from a signal handler context.
11910 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
11912 * helpers.c: use g_get_tmp_dir. Invokes happyness
11915 2004-05-17 Ben Maurer <bmaurer@users.sourceforge.net>
11917 * helpers.c: Add new env variable to pass args to objdump.
11918 Specifically for those of us who love -Mintel. r=miguel, gonzalo.
11920 2004-05-17 Radek Doulik <rodo@ximian.com>
11922 * Makefile.am (common_sources): added abcremoval.h so it get
11923 disted and daily mono packages on go-mono.com will build again
11925 2004-05-17 Massimiliano Mantione <massi@ximian.com>
11927 * abcremoval.c: Fixed coding style, added copyright header.
11929 * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
11931 * mini.h: Added prototype for abc removal main function.
11933 * build_relations_propagation_table.pl: Added copyright header.
11935 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
11937 * basic-long.cs: reg test for complex ceq_long bug.
11939 2004-05-16 Patrik Torstensson <totte@hiddenpeaks.com>
11941 * mini-x86.c (mono_arch_local_regalloc): Correctly free
11942 reg in long and clob case (bug #58343). Fixed/added comments.
11944 2004-05-14 Ben Maurer <bmaurer@users.sourceforge.net>
11946 * mini.c (mono_jit_runtime_invoke): Follow new convention
11947 of calling the invoke method with an function pointer.
11949 2004-05-14 Zoltan Varga <vargaz@freemail.hu>
11951 * ChangeLog: Fix author of memory leak patch.
11953 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
11955 * Makefile.am: fix make dist as well...
11958 2004-05-14 Massimiliano Mantione <massi@ximian.com>
11960 * cfold.c: Made so that conversions from pointer to int4 are no-ops
11961 on archs where pointers are 4 bytes long.
11963 * Makefile.am: Added abcremoval.c source file.
11965 * abcremoval.c: Added abcremoval.c.
11967 * abcremoval.h: Added abcremoval.h.
11969 * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
11971 * inssel.brg: Enabled bounds check removal.
11973 * mini.c: Added support for abcrem optimization.
11975 * mini.h: Added abcrem optimization label.
11977 * driver.c: Added support for abcrem optimization.
11979 * propagated_relations_table.def: Added propagated_relations_table.def.
11981 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
11983 * mini.c, cfold.c: fix style.
11985 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
11987 * mini.c: handle issue with the low-level implementation of
11988 some long opcodes (bug #54209).
11990 2004-05-13 Ben Maurer <bmaurer@users.sourceforge.net>
11992 * basic.cs: test for my new cmov stuff.
11994 2004-05-13 Patrik Torstensson
11996 * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
11997 opt and added peephole documentation.
11999 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
12001 * tramp-ppc.c: rewrote the generic trampoline code.
12003 2004-05-11 Patrik Torstensson
12005 * mini-x86.c: optimize long shl/shr asm code (one less branch)
12007 2004-05-11 Zoltan Varga <vargaz@freemail.hu>
12009 * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
12011 * mini.h mini.c dominators.c: Applied patch from Derek Woo
12012 (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
12014 * mini.c: Add new icalls for AsAny marshalling.
12016 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
12018 * tramp-ppc.c, mini-ppc.c: more cleanups.
12020 2004-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12022 * mini.c: no warnings.
12024 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12026 * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
12028 2004-05-11 Lluis Sanchez Gual <lluis@ximian.com>
12030 * mini.c: In the thread abort signal handler, if the thread is in the
12031 process of being stoped, don't throw the Abort exception, just stop the
12034 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
12036 * tramp-ppc.c: removed old code.
12038 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12040 * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
12041 do some simple speed optimizations on ppc.
12043 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
12045 * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
12046 and large offsets in load/store.
12048 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
12050 * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
12051 it causes regressions.
12053 2004-05-07 Zoltan Varga <vargaz@freemail.hu>
12055 * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
12058 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
12060 * jit-icalls.c: remove warnings.
12061 * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
12062 speedups for unsafe code.
12064 2004-05-07 Ben Maurer <bmaurer@users.sourceforge.net>
12066 * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
12068 2004-05-06 Zoltan Varga <vargaz@freemail.hu>
12070 * basic-calls.cs: Add new regression test.
12072 * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
12075 * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
12077 * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
12080 2004-05-06 Patrik Torstensson
12082 * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
12083 long reg allocation in any reg (not only eax:edx) and implemented
12084 long shl/shr ops in asm instead of helpers.
12086 2004-05-05 Zoltan Varga <vargaz@freemail.hu>
12088 * mini-sparc.h: Fix warnings.
12090 * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
12093 * mini-exceptions.c (mono_handle_exception): Call the filter in a
12094 separate statement for clarity.
12096 * mini-sparc.c: Update status.
12098 2004-05-04 Zoltan Varga <vargaz@freemail.hu>
12100 * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
12103 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12105 * inssel-ppc.brg: another small pre-release workaround:
12106 we don't do overflow detection for long_sub_un.
12108 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12110 * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
12111 (also works around a weird ppc bug: 57957).
12113 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
12115 * tramp-ppc.c: trampoline fixes.
12117 Fri Apr 30 15:54:26 EDT 2004 Paolo Molaro <lupus@ximian.com>
12119 * mini-ppc.c: fixed typos.
12121 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
12123 * mini-ppc.c, exceptions-ppc.c: more code saves registers
12124 at the top of the stack. Fixed typos. Use a frame registers
12125 for all the methods with exception clauses.
12127 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12129 * exceptions-ppc.c: restore fp registers.
12131 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
12133 * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
12134 order from the stack top (moved the stack room to save the
12135 return value for trace after the param area). Fixed corruption
12136 in restoring registers on unwind.
12138 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
12140 * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
12142 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12144 * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
12145 and prolog/epilog for methods that use it. Allow
12146 enough param area room for varargs methods. Fix miguel's
12147 breakage in exception handling.
12149 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
12151 * Makefile.am: run genmdesc only on current arch.
12153 2004-04-29 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12155 * exceptions-x86.c:
12156 * mini-x86.h: fix the build on windows.
12158 2004-04-28 Zoltan Varga <vargaz@freemail.hu>
12160 * 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.
12162 * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
12164 * mini-exceptions.c: New file.
12166 * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
12167 Move some parts of the x86 exception handling code to an
12168 arch-independent file so it can be shared with other ports.
12170 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
12172 * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
12174 2004-04-26 David Waite <mass@akuma.org>
12176 * driver.c: remove comma from end of enumeration declaration
12178 2004-04-26 Jackson Harper <jackson@ximian.com>
12180 * driver.c: parse config file before loading first assembly. This
12181 allows the user gac to be enabled/disabled.
12183 2004-04-23 Miguel de Icaza <miguel@ximian.com>
12185 * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
12186 simpler mechanism: we do not care what is encoded initially
12187 (branch absolute or relative), we care about the code and its
12188 target. I kept the old code for reference for now.
12190 The new code tries first to determine if the jump is anywhere in
12191 the -/+32 absolute meg range, if it succeeds, it encodes using the
12192 absolute branch; If not, it tried to find something in the
12193 relative range, if not, it uses the handle_thunk code.
12195 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
12197 * exceptions-ppc.c: use the correct ip register on macosx.
12199 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
12201 * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
12203 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
12205 * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
12206 Raise exception on integer divide by zero by hand since the hw
12207 doesn't support it. Handle NaNs in FP compares.
12209 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
12211 * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
12212 code reducing duplication between the platforms and enabled
12213 signal exception handling (on linux for now).
12215 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
12217 * exceptions-ppc.c: more macosx support.
12219 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
12221 * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
12223 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
12225 * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
12227 2004-04-19 Ben Maurer <bmaurer@users.sourceforge.net>
12229 * iltests.il: more tests.
12231 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
12233 * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
12236 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
12238 * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
12240 2004-04-19 Zoltan Varga <vargaz@freemail.hu>
12242 * liveness.c: Mark variables as volatile in all basic blocks reachable
12243 from exception clauses.
12245 2004-04-18 Zoltan Varga <vargaz@freemail.hu>
12247 * exceptions.cs (test_0_rethow_stacktrace): Make this work with
12250 2004-04-18 Ben Maurer <bmaurer@users.sourceforge.net>
12252 * iltests.il, basic.cs: more tests for regalloc.
12254 2004-04-17 Ben Maurer <bmaurer@users.sourceforge.net>
12256 * iltests.il: Some tests for register allocation modifications
12259 2004-04-16 Zoltan Varga <vargaz@freemail.hu>
12261 * exceptions.cs: Add regression test for bug #56782.
12263 * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
12264 original stack trace if an exception is rethrown. Fixes #56782. Oh,
12265 the beauty of fixing the same thing in 5 different files...
12267 2004-04-15 Zoltan Varga <vargaz@freemail.hu>
12269 * mini.c (mono_method_to_ir): Do not compute coverage for inlined
12272 2004-04-14 Zoltan Varga <vargaz@freemail.hu>
12274 * mini.c: Add support for STRWLPARRAY marshalling convention.
12276 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
12278 * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
12279 to init the context to setup the regs pointer).
12281 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
12283 * exceptions-ppc.c: more exceptions work.
12285 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
12287 * mini.c: avoid reusing the same MonoInst on multiple trees: this is
12290 2004-04-13 Miguel de Icaza <miguel@ximian.com>
12292 * inssel-x86.brg (reg): Add new rules for add, sub and mul that
12293 can use the memory directly.
12295 * cpu-pentium.md: Update documentation from a post from Zoltan.
12297 add x86_add_membase, x86_sub_membase, x86_mul_membase
12299 2004-04-13 Miguel de Icaza <miguel@ximian.com>
12301 * mini-ppc.c: Remove unused definitions FLOAT_REGS and
12302 GENERAL_REGS they were also hardcoded for all PPC ports.
12304 (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
12306 Remove hard-coded limit for floating point registers, use
12307 PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
12309 Notice that in MacOS X calling conventions you can fit a lot more
12310 floating point values in registers, so I should update the PInvoke
12311 test to excercise the passing of floating point values on the
12312 stack (currently broken).
12314 2004-04-06 Miguel de Icaza <miguel@ximian.com>
12316 * tramp-ppc.c (create_trampoline_code): Added
12317 JUMP_TRAMPOLINE_SIZE.
12318 (ppc_magic_trampoline): Follow the pattern from
12319 x86_magic_trampoline: if code is set to zero, return.
12320 (create_trampoline_code): Always pass MonoMethod to the jump
12321 trampoline, before it was passing a null.
12322 (mono_arch_create_jump_trampoline): Implement the jump stub, could
12323 share the code with mono_arch_create_jit_trampoline.
12325 * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
12327 (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
12330 * cpu-g4.md: Added length for jmp instruction, the worst case
12331 scenario is 92 bytes (4 mandatory bytes, potential 19 registers
12334 2004-04-08 Zoltan Varga <vargaz@freemail.hu>
12336 * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
12338 2004-04-07 Zoltan Varga <vargaz@freemail.hu>
12340 * mini.c: Only set bblock->real_offset when adding a new bblock, and
12341 before each IL instruction.
12343 * mini.c (CEE_BOX): Fix warnings.
12345 2004-04-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12347 * mini.c: removed a few unused vars and extra whitespace.
12349 2004-04-05 Ben Maurer <bmaurer@users.sourceforge.net>
12351 * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
12353 (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
12355 (OP_GETCHR): use the above
12356 (CEE_LDELEMA): use the above.
12358 * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
12359 version of the generic impl.
12360 (MONO_EMIT_BOUNDS_CHECK_IMM): the same
12361 (CEE_LDELEMA): use the above.
12363 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
12365 * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
12368 * iltests.il: Added new regression test for #56317.
12370 2004-04-05 Zoltan Varga <vargaz@freemail.hu>
12372 * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
12373 under NetBSD. Fixes #56450.
12375 * liveness.c (update_gen_kill_set): Fix previous patch.
12377 2004-04-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12379 * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
12381 2004-04-02 Zoltan Varga <vargaz@freemail.hu>
12383 * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
12384 ldsfld and ldsflda.
12386 * inssel-sparc.brg: Add more optimizations.
12388 * mini-sparc.c: Replace multiply/divide with shifts if possible.
12390 2004-04-01 Martin Baulig <martin@ximian.com>
12392 * mini.c (handle_box): New static function; moved the
12393 implementation of CEE_BOX here.
12394 (mono_method_to_ir): Added `constrained_call' variable.
12395 (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
12396 (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
12397 mono_method_get_constrained() to get the method.
12399 2004-04-01 Martin Baulig <martin@ximian.com>
12401 * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
12402 (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
12403 (mono_method_to_ir): We don't need these macros anymore since
12404 mono_class_get_full() already takes care of it.
12406 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12408 * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
12409 use @function (as doesn't accept #function here) and check the return
12410 value of system and stop if fails.
12412 2004-03-31 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12414 * mini.c: set the timeout to 2s when calling mono_domain_finalize.
12416 2004-03-31 Zoltan Varga <vargaz@freemail.hu>
12418 * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
12420 * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
12422 * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
12425 * basic-long.cs: Add test for negation of Int64.MinValue.
12427 2004-03-30 Zoltan Varga <vargaz@freemail.hu>
12429 * mini-sparc.c: Update status.
12431 * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
12433 * exceptions-sparc.c: Fix return value in filters.
12435 * inssel-sparc.brg: Fix register allocation in some rules.
12437 2004-03-28 Martin Baulig <martin@ximian.com>
12439 * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
12442 2004-03-28 Zoltan Varga <vargaz@freemail.hu>
12444 * mini-x86.c (mono_arch_patch_code): Fix warnings.
12446 * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if
12447 dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
12448 remove unused conv_u4 opcode.
12450 * mini-x86.c: Remove valgrind workaround since it slows down things
12451 even when mono is not run under valgrind.
12453 2004-03-26 Zoltan Varga <vargaz@freemail.hu>
12455 * mini-sparc.c: Update status.
12457 * inssel-sparc.brg: Add some optimizations.
12459 * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
12460 future delay slot filling. Add support for varargs, tail calls and JMP.
12462 * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of
12463 CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
12465 * inssel.brg: Fix register allocation in OP_ARGLIST.
12467 * inssel.brg: Fix warnings.
12469 2004-03-25 Martin Baulig <martin@ximian.com>
12471 * mini.c (inflate_generic_field): Removed.
12472 (mini_get_method): Removed, use mono_get_method_full(),
12473 (mini_get_class): Removed, use mono_class_get_full().
12474 (mono_method_to_ir): Pass our generic context to
12475 mono_field_from_token().
12477 2004-03-25 Martin Baulig <martin@ximian.com>
12479 * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
12480 of a `MonoMethod *'.
12481 (mini_get_method): Take a `MonoGenericContext *' instead
12482 of a `MonoMethod *'.
12483 (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
12484 a new local variable called `generic_context' which holds the
12485 current `MonoGenericContext *'; use it to lookup things.
12487 2004-03-24 Martin Baulig <martin@ximian.com>
12489 * mini.c (mini_get_class): New static method; if we're inside a
12490 generic instance, inflate the class if neccessary.
12491 (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
12493 2004-03-24 Zoltan Varga <vargaz@freemail.hu>
12495 * iltests.il: New regression test for #55976.
12497 * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
12500 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
12502 * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
12505 2004-03-23 Zoltan Varga <vargaz@freemail.hu>
12507 * liveness.c: Consider SSA stores as well as loads when making vars
12510 * exceptions.cs: New regression tests for register allocation.
12512 2004-03-22 Lluis Sanchez Gual <lluis@ximian.com>
12514 * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
12515 * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
12516 domain lock only to protect puntual access to data structures.
12517 Added access lock for sighash, jit_icall_hash_name,
12518 jit_icall_hash_addr and domain->code_mp.
12520 2004-03-20 Zoltan Varga <vargaz@freemail.hu>
12522 * driver.c: Print SIGSEGV handling method.
12524 * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
12526 * mini.c (setup_jit_tls_data): Handle case when this is called
12527 multiple times for a thread.
12529 * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx
12530 is different from fbxx_un. Fixes #54303. Also use constants instead of
12531 magic numbers in a lot of places.
12533 2004-03-19 Zoltan Varga <vargaz@freemail.hu>
12535 * exceptions.cs: Fix cctor test when --regression is used.
12537 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
12539 * mini-ppc.c, exceptions-ppc.c: basic exceptions support
12542 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
12544 * inssel-ppc.brg: fixed register assignments for some rules.
12546 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
12548 * exceptions.cs: Add test for exceptions in static constructors.
12550 * mini.c (mono_jit_compile_method_with_out): Move the calling of
12551 static constructors outside the domain lock. Fixes #55720.
12553 2004-03-17 Martin Baulig <martin@ximian.com>
12555 * mini.c (get_generic_field_inst): Removed, this'll never happen.
12556 (inflate_generic_field): Take the `MonoMethod *' instead of the
12557 `MonoClass *' and added support for generic method.
12558 (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
12559 have a `field->parent->gen_params', only inflate the field if it's
12560 an open constructed type.
12562 2004-03-17 Zoltan Varga <vargaz@freemail.hu>
12564 * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
12565 exception object instead of the preconstructed ones.
12567 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12569 * mini.c: reverted changed to sigsegv_signal_handler commited
12570 accidentally in the previous patch.
12572 2004-03-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12575 (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
12576 running --aot with an old assembly.
12578 2004-03-16 Zoltan Varga <vargaz@freemail.hu>
12580 * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
12583 * mini-sparc.c: Add support for v9 branches with prediction.
12585 2004-03-15 Bernie Solomon <bernard@ugsolutions.com>
12587 * mini.c (mini_init): #warning is GNUC only
12589 * mini-sparc.h: implement __builtin_frame_address
12590 and __builtin_return_address for Sun C compiler
12592 2004-03-15 Zoltan Varga <vargaz@freemail.hu>
12594 * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
12596 2004-03-14 Zoltan Varga <vargaz@freemail.hu>
12598 * basic-calls.cs: Add test for unaligned byref long argument passing.
12600 * mini-ops.h: Add sparcv9 compare and branch instructions.
12602 * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
12603 v9 instructions if we have a v9 cpu.
12605 * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
12606 registers for global allocation.
12608 * exceptions-sparc.c: Fixes.
12610 2004-03-11 Zoltan Varga <vargaz@freemail.hu>
12612 * liveness.c (mono_analyze_liveness): Optimized version.
12614 * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
12616 * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
12619 * basic-float.cs basic-calls.cs: New regression tests.
12621 2004-03-10 Zoltan Varga <vargaz@freemail.hu>
12623 * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
12624 sigaltstack implementation.
12626 * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
12628 * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
12629 stuff if SIGSEGV_ON_ALTSTACK is not defined.
12631 2004-03-09 Zoltan Varga <vargaz@freemail.hu>
12633 * mini.c: Fix warnings.
12635 * mini.c (mono_resolve_patch_target): New function which contains the
12636 arch independent part of the patching process.
12638 * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
12639 patching code to a separate function.
12641 2004-03-09 Bernie Solomon <bernard@ugsolutions.com>
12643 * mini.c (add_signal_handler): ifdef out on Windows
12645 2004-03-08 Zoltan Varga <vargaz@freemail.hu>
12647 * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c
12648 cpu-sparc.md: Add exception handling support + other fixes.
12650 * driver.c: Print --help output to stdout. Fixes #55261. Also fix
12651 typed GC detection in --version.
12653 * basic.cs exceptions.cs: New regression tests.
12655 * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
12656 the arch specific code can store data during a compilation.
12658 * mini-ops.h: Add OP_SETFRET.
12660 * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
12661 function, register a separate icall for each arity, so the icalls can
12664 * mini.c (mono_print_tree): Print negative offsets in a more readable
12667 * mini.c: Make signal handling work on sparc.
12669 * mini.c (mini_init): Add emulation for lconv_to_r8_un.
12671 * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
12673 * jit-icalls.c: Emulate truncl by aintl on solaris.
12675 * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
12677 2004-03-05 Zoltan Varga <vargaz@freemail.hu>
12679 * mini.c (mini_init): fconv_to_ovf can raise exceptions.
12681 2004-03-04 Lluis Sanchez Gual <lluis@ximian.com>
12683 * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
12684 a MarshalByRef type, inline a method that performs the check, taking into
12685 account that the object can be a proxy. Also implemented tow new opcodes:
12686 CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
12687 * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and
12688 OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
12690 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
12692 * mini-ppc.c: if a relative branch displacement is too big
12693 but it points to and area reachable with an absolute branch,
12696 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
12698 * mini.c: optimize small copies in cpblk.
12700 2004-03-01 Zoltan Varga <vargaz@freemail.hu>
12702 * basic-calls.cs basic-float.cs: New regression tests.
12704 * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at
12705 negative offsets from %fp. Implement localloc. Fix local register
12706 allocation. Fix the case when the this argument needs to be saved to
12707 the stack. Implement some missing opcodes.
12709 2004-02-26 Zoltan Varga <vargaz@freemail.hu>
12711 * mini.c (mini_method_compile): Reenable global regalloc in methods
12712 with exception handlers.
12714 * linear-scan.c (mono_varlist_sort): Fix warning.
12716 * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
12718 * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
12721 * liveness.c: Make all variables uses in exception clauses volatile, to
12722 prevent them from being allocated to registers. Fixes #42136.
12724 2004-02-25 Zoltan Varga <vargaz@freemail.hu>
12726 * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
12727 causes regressions.
12729 * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
12730 argument to mono_arch_regalloc_cost.
12732 * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs
12735 2004-02-24 Zoltan Varga <vargaz@freemail.hu>
12737 * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c:
12738 Make the cost of allocating a variable to a register arch dependent.
12740 * basic-calls.cs: Fix compilation of tests.
12742 * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
12743 helper function to cut back on the number of #ifdefs needed.
12745 * mini-ppc.c: Fix compilation.
12747 * basic-calls.cs: New regression tests.
12749 * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
12751 * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
12752 of l0 since that is callee saved.
12754 * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
12757 * mini-sparc.c: Ongoing work + flag virtual calls with a special kind
12758 of delay instruction.
12760 * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
12762 * mini.h (MonoCallInst): Add 'virtual' flag.
12764 * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
12766 2004-02-23 Zoltan Varga <vargaz@freemail.hu>
12768 * *.cs: New regression tests.
12770 * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc
12773 * mini.c (mono_runtime_install_handlers): Fix build.
12775 * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
12776 'signal_stack_size' members.
12778 * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an
12779 alternate signal stack.
12781 * exceptions-x86.c: Add stack overflow handling.
12783 * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing
12784 functions to arch independent code.
12786 * mini.c (mono_print_tree): Print more detailed info for load_membase
12789 2004-02-23 Martin Baulig <martin@ximian.com>
12791 * mini.c (mini_get_method): Set `gmethod->generic_inst'.
12793 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
12795 * mini-x86.c: fixed reg allocation for div/rem.
12797 2004-02-22 Miguel de Icaza <miguel@ximian.com>
12799 * driver.c (mono_main): Report some configuratio options on --version.
12801 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
12803 * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
12804 low in the address space. Correctly flush memory in thunks where we
12805 output native code.
12807 2004-02-20 Martin Baulig <martin@ximian.com>
12809 * mini.c (mini_get_method): New static method; inflate all generic
12810 methods and methods in open generic instances.
12811 (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
12812 (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
12814 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
12816 * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
12818 * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
12820 2004-02-19 Bernie Solomon <bernard@ugsolutions.com>
12822 * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
12824 * mini-sparc.c (flushi mono_arch_output_basic_block): make
12825 it compile using Sun's compiler.
12827 2004-02-19 Zoltan Varga <vargaz@freemail.hu>
12829 * 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.
12831 * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
12833 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12835 * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
12837 * mini-ppc.c: handle calls outside of the allowed range with thunks
12838 allocated using the code manager.
12839 * tramp-ppc.c: use the code manager to hold generated native code.
12840 Fixed the magic trampoline to just patch vtable entries.
12842 2004-02-17 Zoltan Varga <vargaz@freemail.hu>
12844 * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
12847 2004-02-16 Zoltan Varga <vargaz@freemail.hu>
12849 * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
12852 * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
12853 if we have a working __thread implementation.
12855 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove
12856 OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
12858 2004-02-15 Zoltan Varga <vargaz@freemail.hu>
12860 * mini-x86.c: Fix compilation under gcc 2.
12862 2004-02-14 Zoltan Varga <vargaz@freemail.hu>
12864 * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
12865 contains a call to the wrapped function.
12867 * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add
12868 OP_<CALL>_IMM opcodes, and use them under X86.
12870 * mini.c (mono_jit_find_compiled_method): Fix warning.
12872 * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
12874 * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
12876 * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
12877 functionality to mini.c.
12879 * mini.c (mono_create_jump_trampoline): New function to create a jump
12880 trampoline. Return a compiled method instead of a trampoline if it
12881 exists. Add a cache for jump trampolines.
12883 * mini.c (mono_jit_find_compiled_method): New function to return a
12884 compiled method if it exists.
12886 * mini-x86.c: Call mono_create_jump_trampoline instead of
12887 mono_arch_create_jit_trampoline.
12889 * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
12890 a jump trampoline. Fixes #52092.
12892 2004-02-11 Zoltan Varga <vargaz@freemail.hu>
12894 * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
12895 which is not up-to-date. Add check_corlib_version () instead.
12897 * mini.c (mini_init): Call mono_thread_attach () so embedders do not
12900 * mini.c (mono_runtime_install_handlers): Remove check for valgrind
12901 since newer valgrind versions do not need it.
12903 * mini.c (mono_jit_compile_method_with_opt): New helper function to
12904 compile a method with a given set of optimizations.
12906 * mini.c: Compile icall wrappers on-demand instead of at startup.
12908 * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
12909 wrapper for an icall.
12911 2004-02-10 Zoltan Varga <vargaz@freemail.hu>
12913 * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
12916 * iltests.il: Add test for non-empty stack before switch instruction.
12918 2004-02-02 Zoltan Varga <vargaz@freemail.hu>
12920 * mini.c: Add support for new stringbuilder marshalling conventions.
12922 * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
12924 2004-02-01 Martin Baulig <martin@ximian.com>
12926 * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
12927 in `ginst->mtype_argv'.
12929 2004-01-31 Miguel de Icaza <miguel@ximian.com>
12931 * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
12932 facilitate grepping.
12934 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
12936 * mini.c: fixed buglet in initobj generic implementation for references.
12938 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
12940 * Makefile.am: make the version script conditional.
12941 * jit-icalls.c: handle missing truncl().
12943 2004-01-23 Zoltan Varga <vargaz@freemail.hu>
12945 * exceptions.cs: Add more tests for double->int conversion.
12947 * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
12948 we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
12950 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
12952 * driver.c: make --verbose --version emit an error
12953 if the loaded corlib doesn't match the runtime version.
12955 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
12957 * mini-ppc.h: export ppc_patch().
12958 * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
12959 * tramp-ppc.c: call convention fixes: Linux/PPC support should be
12960 on par or better than on MacOSX.
12962 2004-01-19 Zoltan Varga <vargaz@freemail.hu>
12964 * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
12965 mono_lookup_pinvoke_call.
12967 * mini-x86.c: Under windows, the default pinvoke calling convention is
12968 stdcall. Fixes #52834.
12970 * mini.c (optimize_branches): Add an upper bound to the number of
12971 iterations to prevent infinite loops on strange loops. Fixes #53003.
12973 2004-01-16 Zoltan Varga <vargaz@freemail.hu>
12975 * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
12976 and ISINST. Fixes #52093.
12978 * objects.cs (test_0_vector_array_cast): New tests.
12980 2004-01-15 Zoltan Varga <vargaz@freemail.hu>
12982 * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
12983 checking in Array.Set ().
12985 * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
12988 * object.cs (test_0_multi_array_cast): New regression test.
12990 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
12992 * exceptions-ppc.c: fix build on Linux/PPC.
12994 2004-01-14 Zoltan Varga <vargaz@freemail.hu>
12996 * tramp-x86.c (x86_magic_trampoline): Disable code patching when
12997 running under valgrind.
12998 (x86_magic_trampoline): Fix build bustage.
13000 * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
13001 negative values as well. This is needed for the encoding of the line number
13002 info, since sometimes the line numbers are not in increasing order.
13004 2004-01-13 Zoltan Varga <vargaz@freemail.hu>
13006 * cpu-pentium.md (localloc): Increase the size of the localloc
13007 instruction since it is a loop under Win32.
13009 * debug-mini.c (record_line_number): Get rid of unneccesary memory
13012 2004-01-09 Zoltan Varga <vargaz@freemail.hu>
13014 * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c
13015 tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from
13016 Max Horn (max@quendi.de). Fix file names in comments.
13018 2004-01-03 Zoltan Varga <vargaz@freemail.hu>
13020 * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
13021 avoid stack overflow.
13022 (replace_usage): Avoid uninitialized variable warnings.
13024 * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
13025 and taking the address of valuetype variables.
13027 2004-01-03 Patrik Torstensson
13029 * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
13030 for other purposes than FP later on.
13032 2004-01-02 Zoltan Varga <vargaz@freemail.hu>
13034 * mini.c (mono_method_to_ir): Prevent register allocation for arguments
13037 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13039 * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
13041 2003-12-30 Patrik Torstensson <p@rxc.se>
13043 * mini-x86.h: Decreased number of availiable fp regs.
13044 Solves corner cases with FP spilling.
13046 2003-12-23 Patrik Torstensson <p@rxc.se>
13048 * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
13049 for floating point stack tracking / spilling on x86.
13052 * basic-float.cs: added float mul overflow test.
13054 2003-12-23 Zoltan Varga <vargaz@freemail.hu>
13056 * mini.c (mono_method_to_ir): Add workaround for bug #51126.
13058 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13060 * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
13061 supports for cond branches that overflow the immediate
13062 overflow offset. mcs can compile simple programs.
13064 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
13066 * exceptions-ppc.c: exception handling support wip:
13067 finally handlers get run on exception.
13069 2003-12-19 Zoltan Varga <vargaz@freemail.hu>
13071 * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while
13074 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13076 * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
13077 initial support for stack walking and unwinding.
13079 2003-12-18 Zoltan Varga <vargaz@freemail.hu>
13081 * driver.c (mono_main): Make corlib-out-of-sync message more
13082 descriptive. Also remove verify_corlib call.
13084 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13086 * mini.c: make CEE_NEWARR calls and other emulated opcodes
13087 not overlap with other call's arguments, too.
13089 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
13091 * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c:
13092 move to arch-specific code the choice of arch-specific
13093 intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
13094 * mini.c: ensure emulation calls will not interleave
13097 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
13099 * tramp-ppc.c, basic-calls.cs: rework trampolines so that
13100 the magic trampoline stack frame is dropped before executing
13103 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
13105 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
13106 and integer to fp conversions. Added support for overflowing
13107 arguments on the stack. Reserve a couple more registers as temps.
13108 Added support for aot compilation (as output still needs to be
13111 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13113 * mini-ppc.c, basic-long.cs: fix jumps to known labels.
13114 Don't overwrite return register in some corner cases.
13116 2003-12-13 Zoltan Varga <vargaz@freemail.hu>
13118 * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
13119 static constructors when AOT compiling.
13121 * driver.c (mono_main): Call mono_check_corlib_version.
13123 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13125 * cpu-g4.md, basic.cs: fixed div target register.
13127 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
13129 * mini-ppc.c, basic.cs: shl_imm fix with test.
13131 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13133 * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing
13134 structures by value. Misc fixes.
13135 * objects.cs: more tests.
13137 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
13139 * mini-ppc.c: lconv.ovf.i implemented.
13141 2003-12-10 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13144 (mini_init): don't error out if someone already called g_thread_init.
13146 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
13148 * exceptions-x86.c, exceptions-ppc.c: allow the exception object
13149 to be any type per the spec. Fix abnormal memory usage when
13150 the same object is repeatedly thrown.
13152 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
13154 * mini.c: check for overruns in IL code.
13156 2003-12-09 Zoltan Varga <vargaz@freemail.hu>
13158 * TODO: Add/remove some todo entries.
13160 2003-12-08 Zoltan Varga <vargaz@freemail.hu>
13162 * driver.c (mono_main): Call mono_verify_corlib.
13164 2003-12-07 Lluis Sanchez Gual <lluis@ximian.com>
13166 * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy.
13167 This has been moved to mini.c
13168 * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
13169 type being casted is marshalbyref it could be a proxy, so instead of
13170 emitting the type check code, emit a call to a runtime method that will
13171 perform the check by calling CanCastTo if needed.
13173 2003-12-06 Zoltan Varga <vargaz@freemail.hu>
13175 * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
13176 methods with large stack frames under Win32.
13178 2003-12-04 Zoltan Varga <vargaz@freemail.hu>
13180 * Makefile.am: Distribute regression tests.
13182 * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
13183 at the end instead of inserting each variable into the sorted list.
13185 * linear-scan.c (mono_varlist_sort): New helper function.
13187 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
13189 * mini.c: ensure arguments and locals are within bounds.
13191 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
13193 * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and
13196 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
13198 * mini.c (mono_cprop_copy_values): Fix crash.
13200 * aot.c: Set verbosity back to 0.
13202 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13204 * regalloc.c: complete memory leak fix by Laurent Morichetti
13207 2003-12-03 Zoltan Varga <vargaz@freemail.hu>
13209 * driver.c (main_thread_handler): Revert the previous patch.
13211 * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
13214 * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
13215 memory from the memory pool.
13217 * driver.c (main_thread_handler): Turn on all optimizations when
13220 * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
13221 an array for better performance.
13223 * regalloc.c (mono_regstate_assign): Fix memory leak.
13225 * debug-mini.c (mono_debug_serialize_debug_info): New function to
13226 serialize the debug info.
13228 * debug-mini.c (mono_debug_add_aot_method): New function to load the
13229 debug info from the serialized representation.
13231 * aot.c: Save debug info into the generated file and load it when
13234 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
13236 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13238 * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
13239 More FP-related fixes.
13241 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
13243 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
13244 and register allocation buglet. Hello world now runs.
13246 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
13248 * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
13249 * tramp-ppc.c: fixed class init trampoline.
13250 * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
13252 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
13254 * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
13255 mini.c: more ppc changes/fixes.
13257 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
13259 * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
13260 Also optimize the case when the arguments are the same in the caller
13263 * iltests.il: Add tests for tail calls with valuetype arguments.
13265 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
13267 * mini-ppc.c: fixes for struct return type.
13269 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
13271 * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move
13272 mono_spillvar_offset() to arch-specific code.
13274 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
13276 * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
13278 2003-11-27 Zoltan Varga <vargaz@freemail.hu>
13280 * exceptions-x86.c: Fix stack space leaks.
13282 * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
13283 registers from the lmf if the method has save_lmf set.
13285 2003-11-26 Zoltan Varga <vargaz@freemail.hu>
13287 * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
13288 of icall wrappers into InvokeInDomain, since these are now per-domain.
13290 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
13292 * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
13293 make some opcode emulation and intrinsic ops enabled/disabled
13294 according to the architecture. More fixes.
13296 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
13298 * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
13300 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
13302 * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
13303 arch-specific handling for 'this' and struct return type to
13304 arch-specific code.
13306 2003-11-26 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13308 * aot.c: prevent divide by zero error when reporting (it happened with
13309 Accessibility.dll).
13311 2003-11-25 Zoltan Varga <vargaz@freemail.hu>
13313 * mini.h (inst_switch): Remove unused macro.
13315 2003-11-25 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13318 (load_aot_module): free 'info->methods' and 'info' properly. No more
13319 "free(): invalid pointer blah" messages when you have an old aot
13322 2003-11-21 Lluis Sanchez Gual <lluis@ximian.com>
13324 * jit-icalls.c, mini.c: Added support for context static fields.
13326 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
13328 * mini.c (mono_method_blittable): Methods which set LastError are not
13329 blittable either. Fixes #51108.
13331 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
13333 * mini.c: flush icache.
13334 * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
13336 2003-11-18 Zoltan Varga <vargaz@freemail.hu>
13338 * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
13340 2003-11-17 Zoltan Varga <vargaz@freemail.hu>
13342 * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
13345 * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with
13348 * inssel.brg (CEE_MKREFANY): Fix AOT case.
13350 2003-11-16 Zoltan Varga <vargaz@freemail.hu>
13352 * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div
13353 instruction when the result is discarded.
13355 * iltests.il (test_0_div_regalloc): New regression test.
13357 * arrays.cs: Fix compilation error.
13359 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
13361 * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
13362 float rules to inssel-x86.brg: sane architectures with FP registers
13363 don't need to implement these rules.
13365 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
13367 * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
13369 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
13371 * mini.h, inssel-long32.brg: fixed endianess issues in int64
13372 implementation of 32 bit systems.
13374 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
13376 * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
13377 (Jeroen Zwartepoorte).
13379 2003-11-12 Zoltan Varga <vargaz@freemail.hu>
13381 * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
13382 the caller and the callee matches.
13384 * mini.c (mono_method_to_ir): Add comment.
13386 * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
13387 signbit is missing on some platforms.
13389 2003-11-06 Zoltan Varga <vargaz@freemail.hu>
13391 * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
13393 * mini.c (setup_jit_tls_data): Call the new function.
13395 * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
13397 * mini-x86.c: Add experimental support for fast access to the lmf
13398 structure under NPTL/Linux 2.6.x.
13400 2003-11-06 Martin Baulig <martin@ximian.com>
13402 * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
13403 `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
13406 2003-11-02 Martin Baulig <martin@ximian.com>
13408 * mini.c (inflate_generic_field): New static method.
13409 (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
13410 generic instance and the field is declared in a generic type, call
13411 inflate_generic_field() to inflate it. Fixes gen-28.cs.
13413 2003-10-31 Zoltan Varga <vargaz@freemail.hu>
13415 * mini.h mini.c (mono_method_same_domain): New function to return
13416 whenever the caller and the callee are in the same domain.
13418 * tramp-x86.c (x86_magic_trampoline): Use the new function.
13420 2003-10-30 Martin Baulig <martin@ximian.com>
13422 * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
13423 similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
13425 (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
13426 MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS().
13428 2003-10-29 Zoltan Varga <vargaz@freemail.hu>
13430 * mini.c mini-ops.h inssel.brg: Implement undeniable exception
13433 * mini.c (sigusr1_signal_handler): Move creation of the thread abort
13434 object here, so it is in the correct appdomain etc.
13436 2003-10-27 Zoltan Varga <vargaz@freemail.hu>
13438 * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
13440 (mono_method_to_ir): Avoid freeing the type created returned from
13441 mono_type_create_from_typespec, since it is put into an internal cache
13442 by the function. Fixes pointer.exe.
13444 * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal
13445 trampolines for icalls and pinvokes as well. Fixes #33569.
13447 2003-10-24 Zoltan Varga <vargaz@freemail.hu>
13449 * mini.c: Update after appdomain changes.
13451 * mini.c (mono_jit_compile_method_inner): Allways compile native
13452 method wrappers in the root domain, since there can only be one
13453 instance of them, whose address is stored in method->info.
13455 2003-10-16 Zoltan Varga <vargaz@freemail.hu>
13457 * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
13458 environment variable. Instead detect automatically whenever running
13459 under valgrind using the magic macro RUNNING_ON_VALGRIND from
13462 2003-10-16 Miguel de Icaza <miguel@ximian.com>
13464 * trace.c, trace.h: New files that implement the new trace option
13467 * driver.c: Document new --trace options.
13469 * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
13472 - if (mono_jit_trace_calls)
13473 + if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
13475 * mini.h: prototypes.
13477 2003-10-15 Zoltan Varga <vargaz@freemail.hu>
13479 * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
13481 * mini.c inssel.brg: Implement typedefbyref opcodes.
13483 * mini.c (mono_jit_compile_method): Remove unused local variable.
13485 * mini.c (mono_jit_compile_method_inner): Ditto.
13487 2003-10-12 Zoltan Varga <vargaz@freemail.hu>
13489 * tramp-x86.c (x86_class_init_trampoline): Fix build.
13491 * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
13493 2003-10-10 Zoltan Varga <vargaz@freemail.hu>
13495 * mini.c (mono_no_aot): Remove unused global variable.
13497 * mini.c: Thread safety fixes.
13499 2003-10-09 Zoltan Varga <vargaz@freemail.hu>
13501 * mini.c (mono_create_class_init_trampoline): Add a lock around
13502 class_init_hash_addr.
13504 * arrays.cs (test_0_newarr_emulation): Add new regression test for
13507 * mini.c: Decompose the NEWARR instruction before decomposing its
13508 arguments. Fixes #30073.
13510 2003-10-08 Zoltan Varga <vargaz@freemail.hu>
13512 * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
13515 2003-10-06 Zoltan Varga <vargaz@freemail.hu>
13517 * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
13519 * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
13521 * driver.c: Add support for compiling icall wrappers to --compile.
13523 2003-10-05 Zoltan Varga <vargaz@freemail.hu>
13525 * inssel.brg: The empty value in class->interface_offsets is -1, not
13528 2003-10-03 Zoltan Varga <vargaz@freemail.hu>
13530 * objects.cs: New test for 'is' operator on an array of interfaces.
13532 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
13534 * tramp-ppc.c: update trampoline code to support jumps
13535 and class initialization.
13537 2003-09-30 Zoltan Varga <vargaz@freemail.hu>
13539 * mini.c (mono_jit_compile_method): Fix reading of freed memory.
13541 * inssel.brg (OP_UNBOXCAST): Fix #46027.
13543 * inssel.brg (OP_UNBOX): Remove unused rule.
13545 * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
13546 region instead of one for each method. Fixes #47813.
13548 2003-09-29 Zoltan Varga <vargaz@freemail.hu>
13550 * exceptions.cs (test_0_nested_finally): New regression test for
13551 nested exception handlers.
13553 * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
13555 * mini.c (mono_method_to_ir): Avoid inlining tail calls.
13557 * mini.c (mono_method_to_ir): Fix tail recursion in the presence of
13560 * mini.c (mono_method_check_inlining): Make the inlining limit
13561 configurable by an environment variable.
13563 * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
13565 * mini.h: Bump AOT file version.
13567 * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a
13568 token, store the image along with the token, since the token might not
13569 refer to the same image as the method containing the relocation,
13570 because of inlining.
13572 2003-09-27 Zoltan Varga <vargaz@freemail.hu>
13574 * mini.c (mono_precompile_assemblies): New function to compile
13575 all methods in all loaded assemblies.
13577 * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
13579 * regalloc.h regalloc.c (MonoRegState): Change the type of
13580 iassign and fassign to int*, since they can contain large negative
13581 values if the register is spilled. Also added some comments. Fixes
13584 * exceptions-x86.c (seh_handler): Fix handling of system exceptions
13585 under Win32. Fixes #42964.
13587 2003-09-26 Zoltan Varga <vargaz@freemail.hu>
13589 * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
13591 * aot.c: Added support for AOT compiling methods which contain calls
13592 to wrappers. Currently, only remoting-invoke-with-check wrappers are
13595 * driver.c (compile_all_methods): Run the compilation in a thread
13596 managed by mono. Fixes #44023.
13598 * mini.c (mono_codegen): Print full method name in verbose output.
13600 * mini-x86.c (mono_arch_patch_code): Fix warning.
13602 * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
13603 jumps, since the method we are jumping to might be domain-specific.
13605 * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
13607 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
13609 * inssel.brg: string chars are unsigned.
13611 2003-09-15 Zoltan Varga <vargaz@freemail.hu>
13613 * TODO: New todo item.
13615 * tramp-x86.c (x86_class_init_trampoline): New trampoline function
13616 which calls mono_runtime_class_init and patches the call site to
13617 avoid further calls.
13618 (mono_arch_create_class_init_trampoline): New arch specific function
13619 to create a class init trampoline.
13620 (create_trampoline_code): Generalized so it can create
13621 class init trampolines as well.
13623 * mini.c (helper_sig_class_init_trampoline): New helper variable.
13624 (mono_create_class_init_trampoline): New function to create and cache
13625 class init trampolines.
13626 (mono_find_class_init_trampoline_by_addr): New function to lookup the
13627 vtable given the address of a class init trampoline. Used by the
13629 (mono_codegen): Generate a call to a trampoline instead of
13630 mono_runtime_class_init in LDSFLD[A].
13631 (mono_codegen): Add relocations for the new trampoline.
13633 * mini.h mini-x86.c aot.c: Added a new relocation type:
13634 MONO_PATCH_INFO_CLASS_INIT.
13636 * mini.h: Bump AOT version number.
13638 * aot.c: Create a copy of the loaded code instead of using the original
13639 so methods which call each other will be close in memory, improving
13642 * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
13643 patch since it breaks the regression tests.
13645 * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
13646 for the register saving instruction sequence since the
13647 frame_state_for function in glibc 2.3.2 don't seem to detect it.
13649 2003-09-14 Zoltan Varga <vargaz@freemail.hu>
13651 * TODO: Fix todo item && remove another.
13653 2003-09-12 Zoltan Varga <vargaz@freemail.hu>
13655 * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
13658 * aot.c: Moved the check for MONO_LASTAOT into the initialization
13659 function of the module.
13661 * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
13662 turning on/off the usage of AOT code. Got rid of mono_no_aot and the
13663 --no-aot command line option.
13665 2003-09-11 Zoltan Varga <vargaz@freemail.hu>
13667 * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
13668 by Bernie Solomon (bernard@ugsolutions.com).
13670 * inssel.brg: Refactor the interface offset table related code into
13671 its separate functions and add support for the AOT case.
13673 2003-09-10 Zoltan Varga <vargaz@freemail.hu>
13675 * aot.c (mono_aot_get_method_inner): Fix memory leak.
13677 * aot.c: Added mono_aot_verbose variable and made all debugging
13678 output depend on the value of this variable.
13680 * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
13681 method_label and info_label.
13683 * mini.h mini-x86.c aot.c: Added a new relocation type
13684 MONO_PATCH_INFO_IID for klass->interface_id.
13686 * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
13687 the MonoJitInfo structure.
13689 * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
13690 a non-root appdomain in shared mode.
13692 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
13694 * aot.c: make aot loader less verbose. Remove free of unused variable.
13696 2003-09-08 Zoltan Varga <vargaz@freemail.hu>
13698 * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
13700 * .cvsignore: Added *.dll.
13702 * mini.c (mono_print_tree_nl): New function callable while debugging.
13704 * mini.c (mono_print_code): Export this.
13706 * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
13709 2003-09-05 Zoltan Varga <vargaz@freemail.hu>
13711 * mini.h (MonoCompile): Added 'jit_info' field.
13713 * mini.c (mini_method_compile): Save the generated MonoJitInfo into
13714 the cfg structure, since it is needed by the AOT compiler.
13716 * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
13718 * aot.c: A major rewrite. Changes include:
13719 - save exception tables for methods which have them.
13720 - cache failed lookups in aot_get_method () to avoid the (slow) calls
13721 to g_module_symbol.
13722 - reworked the file format so it is now much smaller and needs
13723 fewer relocation entries.
13725 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
13727 * aot.c (load_aot_module): Fix build bustage on platforms without
13730 2003-09-04 Martin Baulig <martin@ximian.com>
13732 * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
13734 2003-09-04 Zoltan Varga <vargaz@freemail.hu>
13736 * TODO: Some new optimization ideas.
13738 * aot.c: Move AOT module loading logic here from mono_assembly_open.
13740 * aot.c: Save the optimization flags used to compile the code into
13743 * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
13744 support emitting domain specific code.
13746 * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is
13747 no longer domain neutral. It can be made domain neutral by compiling
13748 with --optimize=shared.
13750 * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
13751 between appdomains.
13753 * driver.c mini.h mini.c: New --no-aot debugging option which disables
13754 loading of AOT code.
13756 * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
13758 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
13759 if there is no domain neutrality information.
13761 2003-09-01 Zoltan Varga <vargaz@freemail.hu>
13763 * aot.c (mono_compile_assembly): Emit a symbol containing the file
13764 format version into the generated library.
13766 * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
13767 callee method into the caller since one of them could be shared.
13769 * mini.h mini-x86.c aot.c: Added two new relocations so throwing
13770 system exceptions from AOT code now works.
13772 * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling
13773 method if it is domain neutral and the callee is not.
13775 * graph.c (cfg_emit_one_loop_level): Fix warning.
13777 2003-08-30 Zoltan Varga <vargaz@freemail.hu>
13779 * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
13782 2003-08-29 Zoltan Varga <vargaz@freemail.hu>
13784 * mini.c (mini_init): Call mono_marshal_init () explicitly since it
13785 is needed by code which is executed before mono_runtime_init ().
13786 Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
13788 * mini.c (mono_thread_abort): Fix warning.
13789 (mono_jit_compile_method): Call static constructor in the AOT case too.
13791 * aot.c (mono_compile_assembly): Fix warning.
13793 2003-08-28 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13795 * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
13797 2003-08-28 Zoltan Varga <vargaz@freemail.hu>
13799 * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
13801 * cpu-pentium.md: Fix the length of call opcodes so they include the
13802 ESP restoring instruction. Fixes #47968.
13804 2003-08-28 Martin Baulig <martin@ximian.com>
13806 * mini-x86.c (mono_arch_call_opcode): Added support for
13807 MONO_TYPE_GENERICINST.
13809 * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.
13811 2003-08-27 Zoltan Varga <vargaz@freemail.hu>
13813 * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
13814 a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
13816 * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
13819 2003-08-26 Martin Baulig <martin@ximian.com>
13821 * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
13822 when reporting an error, set this to the actual error location.
13823 (mono_method_to_ir): Report the correct error location if
13824 get_basic_blocks() returned an error.
13826 2003-08-25 Zoltan Varga <vargaz@freemail.hu>
13828 * mini.c (mono_type_blittable): OBJECT is not blittable.
13829 (mono_method_blittable): Methods which have marshalling descriptors
13830 are not blittable either. Fixes #47842.
13832 2003-08-22 Zoltan Varga <vargaz@freemail.hu>
13834 * driver.c mini.c: Use an environment variable instead of a global
13835 variable. Also fix the build.
13837 * mini.c (mini_init): Call g_thread_init () to make glib thread-safe.
13838 Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for
13841 * driver.c mini.c: Added --with-valgrind option to turn off some
13842 code which prevents mono from running under valgrind.
13844 * mini.c (mono_emit_call_args): Fixed warning.
13846 * mini.c (mono_emulate_opcode): Fixed warning.
13848 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13850 * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
13851 * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
13852 regalloc.c, regalloc.h: specify available registers in arch-specific
13853 code and support floats in the regallocator (patch by Laurent Morichetti
13856 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
13858 * mini.c: mono_thread_current() can be called only after
13859 mono_runtime_init(): rearrange code to not call it early on.
13861 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
13863 * mini.c: allocate jump tables in the code mempools.
13865 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
13867 * mini.c, mini.h: make sure per-thread data allocated by the jit is
13870 2003-08-10 Miguel de Icaza <miguel@ximian.com>
13872 * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
13873 12 to 16. This fixes bug #47453.
13876 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
13878 * mini-ppc.c: fixed indexed load and unsigned compares.
13880 2003-08-06 Lluis Sanchez Gual <lluis@ximian.com>
13882 * mini.c: reenabled installation of handler for
13883 thread abort signal.
13885 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13887 * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
13888 by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
13889 until it's fixed and actually useful.
13891 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
13893 * inssel-long32.brg: couple more opcodes implemented.
13895 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
13897 * mini-sparc.c: Even more opcodes implemeted.
13899 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
13901 * mini-sparc.c: More opcodes implemented.
13903 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
13905 * mini-sparc.c: More opcodes implemented.
13907 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
13909 * inssel-sparc.brg: Add some needed rules. Direct
13911 * Makefile.am: Use inssel-sparc.brg
13912 * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
13913 an assert happy for now.
13915 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
13917 * mini-sparc.c: Fixed compile errors.
13918 * exceptions-sparc.c: Same. We now produce a mono binary
13919 on sparc-linux. Yea.
13921 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
13923 * mini-sparc.c: Renamed registers. Also some macro cleanups.
13924 * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
13925 They compile, but do not work.
13927 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13929 * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
13930 mini-sparc.h, tramp-sparc.c: Beginning of sparc support
13931 from Mark Crichton <crichton@gimp.org> and Christopher Taylor
13934 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
13936 * mini.c: more opcodes implemented and better support for generics.
13938 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
13940 * cpu-g4.md, cpu-pentium.md: updates for new instructions.
13941 * mini.c, mini.h: first cut at generics support: some new instructions
13942 added and changed the behaviour of some of the existing ones.
13944 2003-07-21 Miguel de Icaza <miguel@ximian.com>
13946 * mini.c: Removed definition of metadata_shared mutex here.
13948 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
13950 * mini-x86.c: make vararg calls work for instance methods.
13952 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
13954 * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
13955 returns the arguments in a separte list, now.
13957 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
13959 * aot.c, mini.c: updates for array type representation changes.
13961 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
13963 * mini.c: register function to perform jit shutdown.
13965 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
13967 * mini.c: use a faster allocator if possible.
13969 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
13971 * aot.c: some cleanups and portability changes.
13973 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13975 * mini.c: use faster allocation for CEE_BOX if possible.
13977 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
13979 * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
13980 Moved inlined mempcy code to its own function so that is can be
13981 reused. Added an inline memset function as well (optimized initobj).
13982 * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
13984 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
13986 * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
13988 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
13990 * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
13991 arch code can setup the cpu for CLR execution, if needed.
13992 We use it on x86 to set the precision of FP operations.
13994 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
13996 * mini.c: disable some optimizations if we can guess they'll cost too
13997 much for a given method.
13999 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
14001 * mini.h mini.c: Rework last patch based on suggestions by Paolo.
14003 2003-06-17 Zoltan Varga <vargaz@freemail.hu>
14004 * mini.h mini.c mini-x86.c: Added instruction level coverage
14005 info collection support.
14007 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14009 * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
14010 is now implemented in the profiling API. Get rid of a couple of
14011 unnecessary global variables.
14013 2003-06-15 Nick Drochak <ndrochak@gol.com>
14015 * basic-long.cs: tests for negative values for bigmul, and unsigned.
14016 * cpu-g4.md: add op_bigmul and op_bigmul_un
14017 * cpu_pentium.md: add op_bigmul_un
14018 * inssel-long32.brg: add rule for unsigned bigmul
14019 * mini-ops.h: define OP_BIGMUL_UN
14020 * mini-x86.c: THE BUG: handle (un)signed properly
14021 * mini.c: choose unsigned opcode if needed.
14022 This set of patches fixes bug #44291
14024 2003-06-13 Dietmar Maurer <dietmar@ximian.com>
14026 * mini.c (optimize_branches): improved to handle all kinds of
14027 conditional branches.
14029 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14031 * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
14032 don't raise exceptions.
14034 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14036 * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
14037 to arch-specific files.
14039 2003-06-09 Martin Baulig <martin@ximian.com>
14041 * Makefile.am (libs): Added $(LIBGC_LIBS).
14043 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
14045 * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
14046 and OP_ATAN (fixes bug#44293).
14048 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
14050 * Makefile.am, mini-x86.c: rename cpu description array to
14051 pentium_desc, since some compilers define the 'pentium' preprocessor
14054 2003-05-28 Dietmar Maurer <dietmar@ximian.com>
14056 * mini.c (mini_select_instructions): add explicit branch if the
14057 following block is not the false target of a conditional branch -
14058 we need this with any optimization that reorder or remove bblocks
14060 * mini.c (optimize_branches): bug fixes
14062 2003-06-06 Dietmar Maurer <dietmar@ximian.com>
14064 * mini.c (mono_method_to_ir): inline static readonly fields
14066 * ssa.c (fold_tree): start cfold support for long (very simple
14069 * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
14071 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14073 * inssel.brg: fixed memcpy (bug #44219).
14075 2003-06-05 Dick Porter <dick@ximian.com>
14077 * driver.c: Set the glib log levels to not abort if g_message
14080 g_set_prgname() has to happen before mini_init() so that the
14081 process handle gets the info.
14083 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14085 * driver.c: add intrins to the default optimizations to get wider
14088 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14090 * mini.h: some large basic blocks will overflow a 16-bit
14091 integers for symbolic registers.
14093 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
14095 * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
14096 (mono_arch_output_basic_block): fix bug 43499
14098 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14100 * mini.c: kill duplicated definition of mono_debug_format.
14102 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
14104 * mini-x86.c, arrays.cs: fixed register allocation bug.
14106 2003-06-04 Dietmar Maurer <dietmar@ximian.com>
14108 * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
14110 * mini.c (mini_get_opcode_for_method): inline IEEERemainder
14112 2003-06-04 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14115 (print_method_from_ip): also print source location information if
14118 2003-06-02 Dietmar Maurer <dietmar@ximian.com>
14120 * mini.c (mono_find_block_region): bug fix in region code
14121 (mini_method_compile): enable removing unreachable code again, but
14122 only in methods without exception clauses.
14124 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
14126 * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
14127 Implemented arglist opcode and handling of TypedReference type.
14128 Fixed x86 call convention when a structure is returned.
14129 Minimal support for calling static vararg methods.
14131 2003-05-30 Dietmar Maurer <dietmar@ximian.com>
14133 * mini.c (mini_method_compile): always remove unreachable code,
14134 because the code in them may be inconsistent (access to dead
14135 variables for example).
14137 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14139 * driver.c, debug-mini.c: warning fixes.
14141 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
14143 * Makefile.am, jit.h, mini.h: install header for embedding mono.
14145 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
14147 * mini.c: thread-static fields are registered in mono_class_vtable(),
14148 so ensure the function is called before checking for them.
14150 2003-05-27 Dietmar Maurer <dietmar@ximian.com>
14152 * mini.c (optimize_branches): fix for bug 43586
14154 * jit-icalls.c (mono_llmult_ovf): added an additional check for
14155 overflow (fixes Bug #43639)
14157 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14159 * mini.c, objects.cs: allow the use of stobj for primitive types.
14161 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14163 * mini.c: be less strict about argument checking until we support
14164 running the verifier.
14166 2003-05-27 Nick Drochak <ndrochak@gol.com>
14168 * basic-long.cs: tests for (ulong)int * (ulong)int also
14169 * mini.c: use the same trick for (ulong)int * (ulong)int
14171 2003-05-27 Nick Drochak <ndrochak@gol.com>
14173 * basic-long.cs: add regression test for (long)int * (long)int
14174 * cpu-pentium.md: add op_bigmul specification
14175 * inssel-long32.brg: add OP_BIGMUL rule
14176 * mini-ops.h: add OP_BIGMUL
14177 * mini-x86.c: register allocator: handle case where src1 needs to be
14179 * mini.c: substitute special BIGMUL opcode in the tree for
14180 (long)int * (long)int
14182 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
14184 * jit-icalls.c: call the type ctor on field access if needed.
14186 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14188 * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
14189 to a method (including results of ldelema, bug#43207).
14191 2003-05-26 Dietmar Maurer <dietmar@ximian.com>
14193 * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
14194 colors to show exception handler blocks.
14196 * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
14197 (fix for pinvoke7.cs).
14199 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14201 * mini.h, mini.c: ensure correct initialization order for types that
14202 require it. Prepare for lazy compilation of jit icall wrappers.
14203 Provide a name for opcode emulation to reduce unneeded mallocing.
14205 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
14207 * mini-x86.c: better register restoring code and profiling
14208 support for tail calls.
14210 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
14212 * mini.h, driver.c: prepare for leaf methods optimization.
14214 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14216 * mini.c: get targets of branches before converting a method.
14218 2003-05-23 Dietmar Maurer <dietmar@ximian.com>
14220 * mini.c (optimize_branches): added some experimental code (disbaled)
14222 2003-05-22 Dietmar Maurer <dietmar@ximian.com>
14224 * mini.c (optimize_branches): fix branch to branch optimization
14226 * exceptions-x86.c (mono_arch_handle_exception): bug fix.
14228 * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
14230 * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
14232 * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
14235 2003-05-21 Dietmar Maurer <dietmar@ximian.com>
14237 * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
14238 enable use of interface variables again.
14240 * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
14241 I1 to registers because there is no simply way to sign extend 8bit
14242 quantities in caller saved registers on x86.
14244 * inssel-float.brg: set costs of some rules to 2 so
14245 that monobure always select the arch. specific ones if supplied,
14246 regardless of the order we pass the files to monoburg.
14248 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14250 * mini.c, mini-x86.c: since the magic trampoline for jumps
14251 can't patch the code directly, we do it as soon as the
14252 method gets compiled.
14254 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
14256 * mini-x86.c, mini.h: introduce a new patching method
14257 to support CEE_JMP and tail calls.
14258 * mini.c: obey tail.call. Don't precompile methods target
14260 * tramp-x86.c: new trampoline code to handle methods
14261 reached through a jump.
14263 2003-05-20 Dietmar Maurer <dietmar@ximian.com>
14265 * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
14266 bit values to registers
14268 2003-05-19 Dietmar Maurer <dietmar@ximian.com>
14270 * mini.c (mono_compile_get_interface_var): share interface
14271 variables if possible.
14273 2003-05-16 Martin Baulig <martin@ximian.com>
14275 * debug-mini.c (mono_init_debugger): New function to initialize
14276 the debugger. This is not in the debugger since it needs to
14277 access some of mini's internals.
14279 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
14281 * mini.c (mono_method_to_ir): inlining fixes/cleanups
14283 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
14285 * mini.c, mini-opts.h, inssel.brg: inline small memcpy
14286 for value type handling.
14288 2003-05-16 Dietmar Maurer <dietmar@ximian.com>
14290 * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
14291 (mono_method_check_inlining): enable inlining of all kinds of wrappers
14293 2003-05-15 Lluis Sanchez Gual <lluis@ideary.com>
14295 * mini.c: fixed little bug in CEE_NEWOBJ case when calling
14296 the constructor through a proxy.
14298 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14300 * jit-icalls.c, inssel.brg: fixes to array element address
14303 2003-05-15 Dietmar Maurer <dietmar@ximian.com>
14305 * mini-x86.c (is_regsize_var): allocate pointer to registers
14307 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14309 * driver.c: fixed typo, added intrins to the set of optimizations
14310 tested with regressions.
14312 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
14314 * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
14315 * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
14318 2003-05-14 Dietmar Maurer <dietmar@ximian.com>
14320 * inssel.brg: remove some common pop instructions without side effects
14322 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
14324 * inssel-x86.brg: fixed thinko in int to double conversions.
14326 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
14328 * mini.c, jit-icalls.c: added runtime thread-static variable support.
14330 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
14332 * inssel-long32.brg: two more missing instructions.
14334 2003-05-13 Dietmar Maurer <dietmar@ximian.com>
14336 * mini.c (mono_emit_call_args): set the cil_code for all arguments
14337 if not already set.
14339 2003-05-12 Zoltan Varga <vargaz@freemail.hu>
14341 * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
14344 * basic-float.cs: Added tests for negative zero.
14346 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
14348 * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
14349 a couple of missing operations for long casts, with test cases.
14351 2003-05-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14353 * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
14355 2003-05-09 Dietmar Maurer <dietmar@ximian.com>
14357 * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
14358 code size estimation.
14360 2003-05-08 Dietmar Maurer <dietmar@ximian.com>
14362 * mini.c (mono_jit_create_remoting_trampoline): make it work with
14363 abstract methods (fix bug 42542)
14365 * aot.c: add ability to handle array types
14367 2003-05-08 Zoltan Varga <vargaz@freemail.hu>
14369 * mini.c: Call the _specific versions of the object allocation
14370 functions if possible.
14372 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
14374 * driver.c: call setlocale ().
14376 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
14378 * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
14381 2003-05-05 Dietmar Maurer <dietmar@ximian.com>
14383 * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
14385 * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
14386 wrappers (fix bug 42122)
14388 2003-05-04 Martin Baulig <martin@ximian.com>
14390 * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
14392 * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
14393 s/mini_set_defaults/mono_set_defaults/g.
14395 2003-05-04 Martin Baulig <martin@ximian.com>
14397 * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
14399 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
14401 * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
14402 (reported by Don Roberts).
14404 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
14406 * mini.c: temporarily work around two bugs for this release.
14408 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
14410 * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
14411 that contains -export-dynamic and it makes using the ld script
14413 * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
14415 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
14417 * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
14420 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
14422 * mini.c: make sure leave calls all the needed finally blocks,
14423 even when the target jumps out of multiple exception clauses.
14425 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14427 * ldscript, Makefile.am: add linker script to reduce the number of
14428 exported symbols (should also fix the issues with libwine defining
14429 some of the same symbols in io-layer).
14431 2003-05-01 Zoltan Varga <vargaz@freemail.hu>
14433 * driver.c (mini_main): Avoid assertion when no file name is given on
14436 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
14438 * driver.c: added --version/-V command line option.
14439 Added the inline optimization in the regression tests.
14441 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
14443 * mini.c, basic-calls.cs: when inlining, save arguments to locals according
14444 to the type in the method signature (fixes bug#42134).
14446 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
14448 * mini.c: when inlining, check this is not null only when needed (bug #42135).
14450 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
14452 * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
14454 2003-04-30 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14456 * driver.c: fixed bug #42100.
14458 2003-04-29 Dietmar Maurer <dietmar@ximian.com>
14460 * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
14462 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
14464 * mini.c: moved most of the code required to do inlining to its own
14465 function so it can be reused. Inline also ctors if appropriate.
14467 2003-04-28 Zoltan Varga <vargaz@freemail.hu>
14469 * Makefile.am: Link with -export-dynamic so shared libs loaded by
14470 the runtime can call mono API functions.
14472 2003-04-27 Martin Baulig <martin@ximian.com>
14474 * debug-mini.c (mono_debug_init_method): Added
14475 `guint32 breakpoint_id' argument; if the method has a breakpoint,
14476 send a notification to the debugger.
14478 * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
14479 running in the Mono Debugger, just pass the breakpoint number to
14480 mono_debug_init_method().
14482 * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
14484 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
14486 * mini.c: allow some more unsafe compares.
14488 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14490 * mini-x86.c, Makefile.am: make distcheck works (partially from
14491 a patch by Richard Lee <r.h.lee@attbi.com>).
14492 * regset.c, regset.h: removed, they are unused.
14494 2003-04-25 Dick Porter <dick@ximian.com>
14496 * driver.c: Usage reports the name as 'mono' not 'mini'
14497 * exceptions-x86.c: Build and run on freebsd
14499 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
14501 * Makefile.am: install the program with the 'mono' name and
14502 the library as libmono instead of mini and libmini.
14504 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
14506 * driver.c: provide the APIs for the embedding interface of the old jit.
14508 2003-04-23 Dietmar Maurer <dietmar@ximian.com>
14510 * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
14512 2003-04-23 Martin Baulig <martin@ximian.com>
14514 * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
14516 * driver.c: Added `--debug' command line argument to enable
14519 2003-04-23 Martin Baulig <martin@ximian.com>
14521 * debug.[ch]: Removed. The code is now in
14522 ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
14524 * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
14527 2003-04-22 Dietmar Maurer <dietmar@ximian.com>
14529 * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
14531 2003-04-17 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14534 (mini_cleanup): moved mono_runtime_cleanup call after the call to
14535 mono_domain_finalize.
14536 (mini_method_compile): use mono_method_profile* if the the option is
14539 2003-04-17 Zoltan Varga <vargaz@freemail.hu>
14541 * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14542 methods with their wrapper.
14544 * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
14545 methods with their wrapper.
14547 * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
14550 * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
14553 * mini.c (mono_method_check_inlining): Avoid inlining synchronized
14556 2003-04-17 Dietmar Maurer <dietmar@ximian.com>
14558 * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
14560 2003-04-16 Dietmar Maurer <dietmar@ximian.com>
14562 * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
14563 of the mempool. This is slightly faster and uses less memory
14565 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
14567 * mini.c: avoid O(n) allocation for variables.
14569 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
14571 * mini.c: handle items on the stack after inlining methods.
14573 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
14575 * mini.c: make the method->opcode optimization dependent
14576 on MONO_OPT_INSTRINS and do it lazily.
14578 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
14580 * driver.c: print overall results at the end of regression run.
14582 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
14584 * inssel.brg: don't overwrite symbolic registers.
14586 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14588 * inssel-x86.brg: fix conversion from long to float.
14590 2003-04-11 Dietmar Maurer <dietmar@ximian.com>
14592 * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
14594 2003-04-10 Zoltan Varga <vargaz@freemail.hu>
14596 * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
14598 * driver.c: Added --print-vtable option as in the old JIT.
14600 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
14602 * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
14604 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
14606 * inssel.brg, basic.cs: fixed checked conversions to byte and short.
14608 2003-04-09 Zoltan Varga <vargaz@freemail.hu>
14610 * mini.c regalloc.c regalloc.h: Fix memory leak.
14612 2003-04-09 Dietmar Maurer <dietmar@ximian.com>
14614 * aot.c (mono_aot_get_method): register all used strings
14616 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
14618 * mini.c: always intern strings references with ldstr at compile time.
14620 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
14622 * Makefile.am: add BUILT_SOURCES.
14624 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
14626 * driver.c: give a better error message when the assembly to execute
14627 doesn't have an entry point.
14629 2003-04-07 Dietmar Maurer <dietmar@ximian.com>
14631 * Makefile.am: added hack for automake
14633 * mono/mini/mini.c (mono_save_args): always copy arguments to keep
14636 * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
14638 22003-04-07 Martin Baulig <martin@ximian.com>
14640 * Makefile.am: Added Makefile.am.
14642 * debugger-main.c: Removed, this is now in the debugger where it
14645 * mini.pc.in: Call this package `mini' for the moment.