2010-02-08 Zoltan Varga <vargaz@gmail.com>
[mono/afaerber.git] / mono / mini / ChangeLog
blob05ab419f1d9ed9d26027c636aacb92820c2f185d
1 2010-02-08  Zoltan Varga  <vargaz@gmail.com>
3         * mini-llvm.c (mono_llvm_emit_method): Don't make the debug symbols global.
5         * aot-compiler.c (emit_code): Add the llvm label prefix before 'methods'.
7         * mini-exceptions.c (mini_jit_info_table_find): Search the root domain as well,
8         since mono_jit_info_table_find () doesn't do it anymore.
10         * mini-generic-sharing.c debugger-agent.c: Call mini_jit_info_table_find ()
11         instead of mono_jit_info_table_find ().
13 2010-02-07  Zoltan Varga  <vargaz@gmail.com>
15         * aot-compiler.c aot-runtime.c: Add support for MONO_WRAPPER_WRITE_BARRIER.
17         * aot-compiler.c (encode_method_ref): Update after the removal of
18         mono_gc_get_managed_allocator_type ().
20         * method-to-ir.c (mono_method_to_ir): Place a seq point just before a RET.
21         Fixes #564538.
23 2010-02-06  Zoltan Varga  <vargaz@gmail.com>
25         * method-to-ir.c (handle_castclass): Use the icall for classes with variant
26         generic params as well.
27         (handle_isinst): Ditto.
29         * method-to-ir.c: Make isninst/castclass checks in gshared code more efficient
30         instead of always calling an icall.
32         * aot-compiler.c (emit_llvm_file): Take into account trampolines etc when
33         computing the size of the got.
35         * aot-compiler.c (emit_code): Change the way the 'methods' symbol is emitted
36         when using LLVM. Instead of emitting it as an LLVM method, emit it using
37         the assembly directive '.set' so it points to the first LLVM emitted method.
39 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
41         * mini.c (mini_method_verify): Report the method which failed to verify.
43 2010-02-04  Rodrigo Kumpera  <rkumpera@novell.com>
45         * method-to-ir.c (mono_method_to_ir): Use the new basic block formation pass
46         to avoid JIT'ng dead basic blocks. This is the same behavior as the
47         runtime MS verifier.
49 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
51         * debugger-agent.c (decode_value): Fix decoding of vtype instances. Fixes
52         #561962.
54 2010-02-04  Zoltan Varga  <vargaz@gmail.com>
56         * mini-llvm.c: Init the jit module only when first JITting.
58         * aot-compiler.c (emit_plt): Fix the naming of plt entries of llvm+darwin.
60         * mini-llvm.c (get_plt_entry): Make the plt entries have hidden visibility.
62         * mini-llvm.c (mono_llvm_emit_aot_module): Remove the dummy got after it is
63         replaced with the real got.
65         * debugger-agent.c (type_commands): Return the enumness if the type as well.
67         * image-writer.c: Reduce the amount of #ifdefs a bit.
69         * aot-compiler.c: Reduce the amount of #ifdefs. Add beginnings of support for
70         llvm on darwin/arm.
72         * aot-compiler.c (mono_compile_assembly): Handle asmonly+llvm mode.
74         * mini-llvm.c (mono_llvm_emit_method): Don't make the 'type_info' symbols
75         global.
77 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
79         * mini-llvm.c (mono_llvm_emit_method): Add support for unaligned loads.
80         (mono_llvm_emit_method): Fix unaligned stores too.
82         * mini-amd64.c (mono_arch_emit_prolog): Initialize lmf->rsp in the prolog too
83         so async stack walks don't crash.
85 2010-02-02  Zoltan Varga  <vargaz@gmail.com>
87         * mini-trampolines.c (common_call_trampoline): Fix a problem where the callsite
88         was not patched if the callee needed an rgctx trampoline.
90 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
92         * mini-ppc.c (mono_arch_get_global_int_regs): Reserve r29 for holding the
93         vtable address in AOT code.
95 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
97         * mini-codegen.c: Remove support for CEE_ opcodes which cannot occur in
98         MonoInst's.
100 Mon Feb 1 16:29:10 CET 2010 Paolo Molaro <lupus@ximian.com>
102         * genmdesc.pl: remove dependency on external cpp.
104 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
106         * method-to-ir.c (mini_emit_ldelema_1_ins): Avoid emitting an OP_SEXT_I4 when
107         using LLVM, its not needed, and abcrem can't handle it.
109 Mon Feb 1 14:29:43 CET 2010 Paolo Molaro <lupus@ximian.com>
111         * genmdesc.c, genmdesc.pl, cpu-x86.md: introduced templates to make
112         it easier to group instructions and reduce duplication.
114 2010-02-01  Zoltan Varga  <vargaz@gmail.com>
116         * decompose.c: Move the array/soft float decompose routines here from
117         method-to-ir.c.
119         * method-to-ir.c: Export a few functions so they can be used from decompose.c.
121 2010-01-31  Zoltan Varga  <vargaz@gmail.com>
123         * mini-llvm.c (mono_llvm_emit_method): Add a call to llvm.invariant.start
124         to tell LLVM that the got is constant, not used yet.
126         * aot-compiler.c: Pass more optimization flags to llvm's 'opt'.
128 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
130         * mini-ppc.c (mono_arch_emit_prolog): Fix full aot support for native to
131         managed wrappers.
133 2010-01-30  Zoltan Varga  <vargaz@gmail.com>
135         * aot-compiler.c (add_wrappers): Commit the hack which generates
136         native-to-managed wrappers for methods decorated with the MonoPInvokeCallback
137         custom attribute.
139 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
141         * mini.h (MONO_INST_FAULT): New instruction flag for loads which can cause
142         a fault, only used by the LLVM backend.
144         * ir-emit.h: Add _FAULT variants of the LOAD_MEMBASE macros. Mark
145         OP_CHECK_THIS with OP_IMPLICIT_EXCEPTION.
147         * method-to-ir.c: Use the new LOAD_MEMBASE_FAULT opcodes, get rid of the
148         calls to MONO_EMIT_NULL_CHECK which is automatically done by the new macros.
150         * mini-llvm.c: Only generate volatile loads from load instructions which have
151         the MONO_INST_FAULT flag set.
153 2010-01-29  Zoltan Varga  <vargaz@gmail.com>
155         * unwind.c (mono_unwind_decode_fde): Fix the decoding of the LSDA offset on
156         64 bit platforms.
158 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
160         * mini.c (mono_save_seq_point_info): Fix the handling of bblocks without
161         sequence points. Fixes #571236.
163 2010-01-28  Zoltan Varga  <vargaz@gmail.com>
165         * debugger-agent.c (mono_debugger_agent_init): Call appdomain_unload at the
166         end of the appdomain unload process, after assemblies have been unloaded.
167         Fixes #574842.
169 2010-01-27  Zoltan Varga  <vargaz@gmail.com>
171         * abcremoval.c (process_block): Fix the if (region) check so abcrem actually
172         works.
174         * mini-amd64.c: Make the soft debugger work on platforms without MAP_32BIT.
175         Fixes #573988.
177 2010-01-26  Zoltan Varga  <vargaz@gmail.com>
179         * dwarfwriter.c (emit_type): Treat MONO_TYPE_PTR as 'I' not 'I4'.
181 2010-01-26  Geoff Norton  <gnorton@novell.com>
183         * aot-compiler.c: Fix a logic error introduced when guarding against enums
184         with struct marshalability.
186 2010-01-24  Zoltan Varga  <vargaz@gmail.com>
188         * mini.c (mini_method_compile): Improve the processing MONO_VERBOSE_METHOD so
189         it supports class names as well.
191         * mini.h (MonoCompile): Add a few flags to control JIT behavior which are
192         needed by the GC map code.
194         * mini.c (mini_method_compile): Call a function in mini-gc.c to set the new
195         flags if needed.
197         * method-to-ir.c (mono_method_to_ir): Emit initialization code for ref variables
198         if cfg->init_ref_vars is set.
200         * liveness.c (optimize_initlocals): Disable the initlocals opt for ref vars if
201         cfg->disable_initlocals_op_refs is set.
203         * method-to-ir.c (mono_spill_global_vars): Compute more precise live ranges
204         using liveness info if cfg->compute_precise_live_ranges is set.
206         * mini-gc.c: Ongoing work. Improve logging and debugging support. Handle
207         volatile variables correctly. Add comments about the live ranges. Not enabled
208         yet.
210 2010-01-24  Zoltan Varga  <vargaz@gmail.com>
212         * mini.h (MonoDebugOptions): Add an option to init stack frames by writing
213         0x2a into them in method prologs.
215         * mini-amd64.c (mono_arch_emit_prolog): Implement it.
217 2010-01-22  Zoltan Varga  <vargaz@gmail.com>
219         * mini-llvm-cpp.cpp: Remove uses of dynamic_cast, it no longer works with llvm
220         classes, since llvm is compiled with -fno-rtti.
222         * mini.h (COMPILE_SOFT_FLOAT): New macro, similar to COMPILE_LLVM.
224         * method-to-ir.c ir-emit.h: Use if (COMPILE_SOFT_FLOAT) in a few places since
225         llvm does not require it.
227         * aot-runtime.c (load_method): Print the full name of the last aot method.
229 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
231         * exceptions-amd64.c (mono_arch_notify_pending_exc): Avoid a crash if the
232         thread has not fully started yet.
234 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
236         * aot-compiler.c (can_marshal_struct): Allow marshalling enums.
238 2010-01-21  Miguel de Icaza  <miguel@novell.com>
240         * driver.c: Do not abort if LLVM is not supported, print a
241         warning and add the information to the Mono JIT information.
243 2010-01-21  Zoltan Varga  <vargaz@gmail.com>
245         * ir-emit.h (MONO_EMIT_NULL_CHECK): Don't emit an OP_IMPLICIT_EXCEPTION when
246         using explicit null checks.
248 2010-01-20  Zoltan Varga  <vargaz@gmail.com>
250         * xdebug.c: New file extracted from aot-compiler.c, containing the XDEBUG
251         related code.
253         * aot-compiler.c (encode_method_ref): Use mono_marshal_wrapper_info_from_wrapper
254         () in one place.
255         (mono_aot_wrapper_name): Remove the special handling of delegate invoke wrappers,
256         its no longer needed.
258         * method-to-ir.c (mono_method_to_ir): Fix a warning.
260         * exceptions-<ARCH>.c: Introduce a MONO_ARCH_HAVE_THROW_EXCEPTION_BY_NAME
261         define for platforms still using it (s390). Get rid of the
262         mono_arch_get_throw_exception_by_name () routines on all other platforms.
264         * exceptions-x86.c: Rework the throw trampolines so there is only one function
265         which can generate throw/rethrow/corlib trampolines for llvm/not llvm code.
267         * exceptions-x86.c: Add LLVM specific throw trampolines which doesn't assume
268         the caller pushed the arguments.
270         * mini-llvm.c: Enable throwing exceptions on x86.
272         * mini-posix.c (SIG_HANDLER_SIGNATURE): Avoid
273         "Thread (nil) may have been prematurely finalized" messages if this is called
274         on a thread not registered with the runtime.
276         * mini-exceptions.c (mono_handle_native_sigsegv): Ditto.
278 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
280         * jit-icalls.c (mono_array_new_3): New jit icall.
282         * aot-compiler.c aot-runtime.c: Add support for ElementAddr wrappers.
284         * arrays.cs: Add a test for 3 dimensional arrays.
286 2010-01-19  Zoltan Varga  <vargaz@gmail.com>
288         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Emit xdebug info.
289         (mono_arch_find_jit_info_ext): Disable the popping of arguments when LLVM is
290         used.
292         * mini-llvm.c (emit_cond_system_exception): Abort when an implicit exception is
293         thrown on x86.
295         * unwind.c (mono_unwind_decode_fde): Fix an assert on x86.
297         * mini-x86.h (MONO_CONTEXT_SET_LLVM_EXC_REG): Define this for x86.
299         * mini-llvm.c: Disable OP_THROW on x86, it doesn't work yet.
301 2010-01-18  Bill Holmes  <billholmes54@gmail.com>
303         * debugger-agent.c : Changing the PLATFORM_WIN32 preprocessor check to
304           HOST_WIN32.  Also including winsock2. to define struct in_addr.
306         * mini-amd64.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
308         * mini-x86.h : Changing the PLATFORM_WIN32 preprocessor check to HOST_WIN32.
310         Code is contributed under MIT/X11 license.
312 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
314         * mini.h (MonoCompile): Add 'disable_out_of_line_bblocks' flag.
316         * branch-opts.c (mono_optimize_branches): Honor the new flag.
318         * mini.c (mini_method_compile): Set the new flag when running under the
319         debugger.
321 2010-01-18  Zoltan Varga  <vargaz@gmail.com>
323         * mini-gc.c: Change the GC map to use a ref/noref/pin value instead of just
324         a ref/noref value + a global pin flag, so parts of stack frames can still be
325         precisely marked even if they include stuff which needs pinning. Improve logging.
326         Fix many bugs. Not enabled yet.
328         * gc-test.cs: Add a few tests.
330         * liveness.c (mono_analyze_liveness): Make the debug output controllable by
331         the normal -v options. Avoid propagating liveness information through bblocks
332         which end with a NOT_REACHED opcode.
334         * mini.c (mono_jit_compile_method_inner): Avoid reading cfg->prof_options
335         after cfg has been freed.
337 2010-01-17  Zoltan Varga  <vargaz@gmail.com>
339         * branch-opts.c (mono_branch_optimize_exception_target): Stop the optimization
340         if a clause is skipped because it uses the exception object, since it could
341         have caught the exception.
343         * exceptions.cs: Add a test.
345 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
347        * mini-trampolines.c (mono_create_static_rgctx_trampoline): Add an assert.
349         * aot-runtime.c (mono_aot_get_method): Handle ftnptr's correctly for the
350         ICollection<T> wrappers.
352 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
354         * debugger-agent.c (decode_value): Fix the decoding of I/U/PTR.
356 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
358         * mini-amd64.c (emit_call_body): Always use near calls when AOTing even if
359         NOMAP32BIT or optimize_for_xen is set.
361 2010-01-16  Zoltan Varga  <vargaz@gmail.com>
363         * aot-compiler.c aot-runtime.c: Get rid of mono_aot_str_hash (), use
364         mono_metadata_str_hash () instead.
366 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
368         * ir-emit.h (MONO_EMIT_NEW_ICOMPARE_IMM): Use sizeof (mgreg_t) instead of
369         sizeof (void*).
371         * unwind.c (mono_unwind_frame): Use mgreg_t instead of gssize.
373 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
375         * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): Emit an explicit null check if the
376         flag is set.
378         * mini-ppc.c (mono_arch_emit_exceptions): Compute the size of the exception
379         throwing code correctly.
381         * mini.h (MONO_AOT_FILE_VERSION): Bump this because of the IMT hashing changes.
383 2010-01-15  Zoltan Varga  <vargaz@gmail.com>
385         * aot-runtime.c (mono_aot_plt_resolve): Reenable the previous assert for
386         ftnptrs created by us, handle RGCTX_FETCH correctly.
387         (mono_aot_get_lazy_fetch_trampoline): Add an ftnptr.
389         * mini-trampolines.c (mono_create_generic_class_init_trampoline): Remove the
390         ftnptr added by mono_aot_get_named_code ().
392 2010-01-14  Zoltan Varga  <vargaz@gmail.com>
394         * mini-arm.c: Fix a few LLVM problems.
396         * mini-llvm.c (simd_class_to_llvm_type): Fix compilation on !x86/amd64.
398 2010-01-13  Mark Probst  <mark.probst@gmail.com>
400         * method-to-ir.c (mini_emit_stobj): Use EMIT_NEW_CLASSCONST when
401         AOT compiling.
403 Wed Jan 13 15:54:53 CET 2010 Paolo Molaro <lupus@ximian.com>
405         * jit.h, method-to-ir.c: added ability to set the policy for
406         inserting breakpoints from the break IL instruction or the
407         Debugger.Break () API call.
409 2010-01-13  Zoltan Varga  <vargaz@gmail.com>
411         * aot-runtime.c (load_aot_module): Add more comments to explain why referenced
412         assemblies need to be eagerly loaded.
414 2010-01-12  Zoltan Varga  <vargaz@gmail.com>
416         * dwarfwriter.c (emit_line_number_info): Fix the eglib case so it doesn't crash.
418 2010-01-11  Zoltan Varga  <vargaz@gmail.com>
420         * debugger-agent.c (mono_debugger_agent_parse_options): Allow onthrow without
421         an argument which matches any exception.
423 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
425         * method-to-ir.c (mono_emit_method_call_full): Avoid the virt->nonvirt
426         optimization if the called method is gshared and marshalbyref, since gshared
427         methods can' have wrappers. Fixes #569390.
429         * generics.cs: Add a test.
431 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
433         * mini-exceptions.c (mono_print_thread_dump_from_ctx): New helper function
434         callable from gdb.
436 2010-01-10  Zoltan Varga  <vargaz@gmail.com>
438         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
440 2010-01-09  Zoltan Varga  <vargaz@gmail.com>
442         * debugger-agent.c (transport_connect): comment out freeaddrinfo calls under win32,
443         since it is not supported in win2000.
445 2010-01-08  Zoltan Varga  <vargaz@gmail.com>
447         * aot-runtime.c (load_image): Add a SET_ERROR argument to set the loader
448         error if loading an assembly fails.
449         (mono_aot_plt_resolve): Return NULL instead of asserting if loading fails.
451         * mini-trampolines.c (mono_aot_plt_trampoline): Throw a pending loader error
452         if exists.
454         * aot-runtime.c (decode_exception_debug_info): Set jinfo->from_llvm for LLVM
455         compiled methods.
457         * mini-llvm-cpp.cpp: Remove the unused ctx variable.
459         * mini-llvm.c (mono_llvm_emit_method): Add some comments about why aot+clauses
460         is not supported yet.
462         * unwind.c (DW_EH_PE_absptr): Add more DW_EH_PE_ constants.
464 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
466         * method-to-ir.c: All types with variant arguments must fallback to the
467         slow path. This makes cast of variant delegates work.
469         * mini-trampolines.c (mono_get_vcall_slot_addr): Add new variance_used out
470         argument that is set to TRUE is the returned vtable slot is for a variant
471         interface. Changed a g_print + g_assert_not_reached to a g_error.
473         * mini-trampilines.c (common_call_trampoline): Handle variant interfaces in
474         a similar fashion of generic virtual methods.
476 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
478         * helpers.c (mono_disassemble_code): Fix a g_hash_table warning
479         when cfg is null.
481         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Convert a given
482         method using a variance aware function.
484         * mini-x86.c: Add support for dumping IMT thunks if DEBUG_IMT is defined.
486 2010-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
488         * method-to-ir.c (mono_method_to_ir): Casts to variant interfaces
489         do an icall for now.
491 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
493         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add an ugly hack to fix #564695.
494         If LLVM decides to set the code model to Large, reset it to Default.
496 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
498         * aot-compiler.c (mono_xdebug_flush): Export it so it is present in
499         stripped binaries as well.
501 2010-01-07  Zoltan Varga  <vargaz@gmail.com>
503         * mini-trampolines.c (common_call_trampoline): Add an rgctx trampoline if a shared
504         method is called from LLVM compiled code, as that code can't pass an rgctx arg.
506         * mini-llvm.c (mono_llvm_emit_method): Enable calls to methods needing an rgctx
507         reg.
509 2010-01-06  Zoltan Varga  <vargaz@gmail.com>
511         * mini.c (mini_method_compile): Extract the JIT info creation code into a
512         separate function.
514         * mini-llvm.c (mono_llvm_emit_method): Pass the info in MonoExceptionClause
515         as the type info to llvm.eh.selector.
516         (exception_cb): Use the type info for filling out some fields of
517         MonoJitExceptionInfo like the flags and the exception class. This is needed
518         because the LLVM produced exception handling clauses might not match the original
519         IL clauses, i.e. there might be more than one LLVM clause for one IL clause.
521         * unwind.c (mono_unwind_decode_fde): Extract the LSDA decoding code into a
522         separate function. Add an extra argument which returns the type infos
523         corresponding to the exception clauses.
525         * mini.c (mini_method_compile): Enable LLVM compilation of methods having
526         exception handling clauses.
528 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
530         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call
531         mono_method_get_vtable_slot () instead of accessing imt_method->slot directly,
532         to fix an AOT case.
534 2010-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
536         * mini.c (mono_compile_is_broken): Skip methods from serialization's
537         internal assembly.
539 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
541         * mini.c (mini_method_compile): Fix a few memory leaks introduced by the
542         llvm code.
544 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
546         * mini.c (mini_method_compile): Verify the method before calling
547         mono_compile_create_vars as this might crash since it uses method
548         information.
550         Fixes #560196.
552 2010-01-04  Zoltan Varga  <vargaz@gmail.com>
554         * method-to-ir.c (mono_method_to_ir): Avoid calling mono_class_vtable () in
555         one case if AOTing, since the class might not be a concrete class.
557 2010-01-03  Zoltan Varga  <vargaz@gmail.com>
559         * mini-codegen.c abcremoval.c: Remove the duplicate g_slist_append_mempool
560         functions which are now defined in mempool-internals.h.
562         * mini.c (mini_free_jit_domain_info): Free the seq point hash tables.
564         * mini-llvm.c (mono_llvm_emit_method): Handle OP_ABS.
566 2009-12-30  Rodrigo Kumpera  <rkumpera@novell.com>
568         * mini.c:
569         * method-to.ir.c:
570         * mini-*.c: Properly handle generic enums.
572         Fixes #566294
574 2009-12-28  Zoltan Varga  <vargaz@gmail.com>
576         * method-to-ir.c (mono_method_to_ir): Handle the failure of mono_class_vtable ()
577         in a few more places.
579 2009-12-27  Zoltan Varga  <vargaz@gmail.com>
581         * aot-compiler.c (add_wrappers): Don't use dyn runtime invoke for methods with
582         nullable parameters. Fixes #567351.
584 2009-12-26  Rodrigo Kumpera  <rkumpera@novell.com>
586         * mini-trampolines.c (common_call_trampoline): Add assert for NULL resolved generic method.
588 2009-12-26  Zoltan Varga  <vargaz@gmail.com>
590         * mini-trampolines.c: Use mono_arch_get_this_arg_from_call () to avoid the slow
591         mono_get_generic_context_from_code () call.
593         * mini-<ARCH>.c: Get rid of mono_arch_find_this_arg (), it is no longer used.
595 2009-12-25  Zoltan Varga  <vargaz@gmail.com>
597         * aot-runtime.c (decode_klass_ref): Don't call mono_class_init (), its not
598         needed.
600 2009-12-24  Sebastien Pouliot  <sebastien@ximian.com>
602         * method-to-ir.c (mono_method_to_ir): Avoid SIGSEGV when
603         mono_method_get_signature returns NULL. Fix #567084
605 2009-12-25  Zoltan Varga  <vargaz@gmail.com>
607         * aot-runtime.c (find_extra_method): Call mono_aot_wrapper_name only once,
608         instead of once for each module.
610 2009-12-22  Zoltan Varga  <vargaz@gmail.com>
612         * debugger-agent.c (ss_start): Implement step over for the last sequence
613         point in methods.
615         * mini.c (mono_save_seq_point_info): Don't link sequence points which don't
616         have the STEP_LOC flag set.
618         * aot-runtime.c (decode_klass_ref): Avoid a crash if a decode_klass_ref () call
619         fails. Fixes #566689.
621 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
623         * mini.c (mono_add_seq_point): New helper function.
624         (mono_save_seq_point_info): New function to save sequence point info, extracted
625         from mini_method_compile ().
627         * mini-<ARCH>.c: Call mono_add_seq_point to remember sequence points.
629         * mini.h (MonoSeqPointInfo): New structure containing information about
630         the sequence points of a JITted method.
631         (MonoBasicBlock): Add 'seq_points' and 'last_seq_point' fields. Remove unused
632         'bucket' field.
634         * mini.c debugger-agent.c aot-compiler.c aot-runtime.c: Change the way sequence
635         point information is stored, use a MonoSeqPointInfo structure instead of a
636         GPtrArray. For each seq point, compute a list of successor seq points.
638         * debugger-agent.c: Use the successor list to implement step-over more
639         efficiently: instead of single stepping until a different line/IL offset is
640         reached, place breakpoints into all successor seq points.
642         * mini.h: Bump AOT file format version.
644 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
646         * Makefile.am (AM_CFLAGS): Include LLVM_CFLAGS.
648         * mini-llvm.c: Avoid defining the __STDC_... macros if already defined.
650 2009-12-21  Zoltan Varga  <vargaz@gmail.com>
652         * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): Fix the cross-compiler
653         build.
655 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
657         * mini-x86.c (mono_arch_get_argument_info): Allocate memory for CallInfo using
658         alloca as g_malloc is not signal safe.
660 2009-12-18  Zoltan Varga  <vargaz@gmail.com>
662         * tramp-x86.c (mono_arch_patch_callsite): Fix the call to
663         VALGRIND_DISCARD_TRANSLATIONS.
665         * *.c: Include mono/utils/memcheck.h, and remove #ifdef HAVE_VALGRIND_MEMCHECK_H
666         checks, they are no longer needed.
668         * exceptions-ppc.c (mono_ppc_set_func_into_sigctx): New helper function to set
669         a function into a sigctx which can handle function pointers.
671         * mini-ppc.c: Implement soft debugger support on ppc64.
673         * mini-ppc.c: Implement soft debugger support.
675 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
677         * mini-llvm.c: Handle OP_LADD_OVF_UN. Place all alloca's into the entry bb.
679 2009-12-17  Marek Habersack  <mhabersack@novell.com>
681         * mini.c (mono_get_runtime_build_info): include Mono version in
682         the returned value.
684         * driver.c (mono_main): VERSION is now included in the string
685         returned from mono_get_runtime_build_info()
687 2009-12-17  Zoltan Varga  <vargaz@gmail.com>
689         * method-to-ir.c (mono_method_to_ir): Add support for CALLI with unmanaged
690         signatures. Fixes #565143.
692         * jit-icalls.c (mono_get_native_calli_wrapper): New JIT icall.
694 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
696         * aot-compiler.c (arch_emit_autoreg): Align code to 4 in the ppc case.
698 2009-12-16 Rodrigo Kumpera  <rkumpera@novell.com>
700         * mini-x86.h: Forgot to add a 0x to MONO_ARCH_MAX_FRAME_SIZE define
701         making max stack 10x smaller.
703 2009-12-16  Zoltan Varga  <vargaz@gmail.com>
705         * mini.c (mono_resolve_patch_target): Comment out an assert which could be hit.
707 2009-12-15 Rodrigo Kumpera  <rkumpera@novell.com>
709         * method-to-ir.c (mini_emit_memcpy): Assert if size is too big.
711 2009-12-15 Rodrigo Kumpera  <rkumpera@novell.com>
713         * mini-x86.c (mono_arch_allocate_vars): Fail compilation if the frame size is
714         bigger than MONO_ARCH_MAX_FRAME_SIZE.
716         * mini-x86.c (mono_arch_emit_prolog): Handle huge frames.
718         * mini-x86.h: Define MONO_ARCH_MAX_FRAME_SIZE to be 1Mb.
720         * mini-amd64.c / mini-amd64.h: Same fixes as of above.
722         * mini.c (mini_method_compile): Check if mono_arch_allocate_vars failed
723         the compilation.
725 2009-12-14  Miguel de Icaza  <miguel@novell.com>
727         * method-to-ir.c (mono_method_to_ir): CEE_UNUSUED opcodes now
728         raise an invalid program exception.   
730         For other opcodes that we might not handle use a g_warning and
731         raise the exception.   Beats termination.
733         Fixes #561724
735 2009-12-14  Zoltan Varga  <vargaz@gmail.com>
737         * method-to-ir.c (mono_emit_rgctx_method_call_full): Fix a warning.
739         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix the LLVM support
740         by merging the LLVM and !MAP_32BIT cases.
742 2009-12-13 Jonathan Chambers <joncham@gmail.com>
744         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Handle a NULL
745         sigctx being passed in, as we have no CONTEXT available in the APC.
747         (mono_debugger_agent_cleanup): Use explicit cond wait implementation
748         for now.
750         Code contributed under MIT/X11 license.
752 2009-12-13  Zoltan Varga  <vargaz@gmail.com>
754         * method-to-ir.c mini-llvm.c: Fix support for monitor enter/exit trampolines
755         in the LLVM backend on AMD64.
757         * aot-runtime.c (decode_eh_frame): Initialize the clauses from the info in the
758         FDE.
760         * unwind.c (mono_unwind_decode_fde): Implement decoding of a couple more formats.
762         * mini-llvm.c: Export mono_personality for AOT.
764         * mini.c (mini_method_compile): Fix some problems with llvm+aot+clauses.
766         * mini-ops.h (OP_IMPLICIT_EXCEPTION): New opcode marking the place where an
767         implicit exception can occur.
769         * ir-emit.h (MONO_EMIT_NEW_IMPLICIT_EXCEPTION): New macro to emit an
770         OP_IMPLICIT_EXCEPTION instruction.
772         * ir-emit.h (MONO_EMIT_NEW_CHECK_THIS): New macro.
774         * method-to-ir.c: Use MONO_EMIT_NEW_CHECK_THIS in a few places.
776         * mini-llvm.c: Handle OP_IMPLICIT_EXCEPTION by disabling llvm if it occurs
777         inside a protected block.
779         * mini-llvm.c: Revert the last change, the signature of monitor entry/exit
780         trampolines doesn't include the argument.
782         * mini-llvm.c (mono_llvm_emit_method): Enable calls to monitor entry/exit
783         trampolines on amd64.
785         * mini-amd64.h (MONO_ARCH_MONITOR_OBJECT_REG): Use MONO_AMD64_ARG_REG1 instead
786         of RDI.
788         * mini.c (mini_method_compile): Add some comments as to why LLVM is currently
789         disabled for methods with clauses.
791         * mini-llvm.c: Enable support for catch clauses.
793         * mini-exceptions.c (mono_resume_unwind): New function to resume unwinding at the
794         end of an LLVM compiled finally clause.
795         (mono_handle_exception_internal): Save the exception handling state in TLS
796         before calling an LLVM compiled finally clause, so mono_resume_unwind () can
797         resume unwinding from that point.
799         * unwind.c (mono_unwind_get_ops_from_fde): Rename this to
800         mono_unwind_decode_fde, decode the Language Specific Data Area (LSDA) too,
801         to obtain the addresses of the exception handling regions.
803         * mini-llvm.c: Add beginnings of support for exception handling, currently only
804         finally clauses are supported.
806         * mini.c (mini_method_compile): Add support for LLVM code with exception
807         handlers.
809 2009-12-12  Zoltan Varga  <vargaz@gmail.com>
811         * mini-llvm.c (mono_llvm_emit_method): Allocate the 'pindexes' array with the
812         proper size.
814 2009-12-12  Zoltan Varga  <vargaz@gmail.com>
816         * debugger-agent.c: Encode the this argument of vtype methods as a struct, not
817         as a primitive type.
819 2009-12-11  Zoltan Varga  <vargaz@gmail.com>
821         * driver.c: Applied patch from Matt McClellan (matt@mc-c.net). Add a check
822         for 2 parameter sched_setaffinity in older glibc versions. Fixes
823         #564000.
825 2009-12-11  Marek Habersack  <mhabersack@novell.com>
827         * method-to-ir.c (mini_redirect_call): do not redirect the
828         InternalAllocateStr internal call if string profiling is enabled.
830 2009-12-10  Zoltan Varga  <vargaz@gmail.com>
832         * aot-compiler.c (add_wrappers): Avoid generating synchronized wrappers for
833         generic methods.
835         * unwind.h: Rename this to mini-unwind.h to avoid conflicts with the gcc
836         unwind.h header file.
838         * tramp-x86.c (mono_arch_patch_callsite): Patch the code when using valgrind,
839         newer valgrind versions seems to handle this fine.
841 2009-12-09  Zoltan Varga  <vargaz@gmail.com>
843         * debugger-agent.c (start_runtime_invoke): Fix a crash if this is called
844         on the debugger thread.
846 2009-12-08  Zoltan Varga  <vargaz@gmail.com>
848         * mini-llvm.c (mono_llvm_emit_method): Add more SIMD opcodes.
850         * mini.c (mono_print_method_from_ip): Fix the lookup of trampolines.
852         * mini-codegen.c (mono_local_regalloc): Allow non-call opcodes with cloc:c.
854         * cpu-<ARCH>.md: Make call_handler clob:c.
856         * mini.c: Reenable SSA for methods with clauses.
858         * mini.c (mini_method_compile): Disable SSA for now for methods with clauses,
859         as it causes failures on x86.
861 2009-12-08  Sebastien Pouliot  <sebastien@ximian.com>
863         * driver.c: Fail gracefully with --compile-all if mono_method_signature
864         returns NULL (e.g. a bad assembly).
866 2009-12-08  Geoff Norton  <gnorton@novell.com>
868         * debugger-agent.c:  Refactor the mono_runtime_invoke guarding against
869         stepping out into native code.  There were issues with nested invokes
870         like .cctors.
872 2009-12-07  Zoltan Varga  <vargaz@gmail.com>
874         * mini.c (mini_method_compile): Do the disable_llvm checks early
875         and avoid the LLVM compile pass if the checks fail.
877         * mini.c ssa.c abcremoval.c: Enable SSA for methods with exception clauses.
879         * mini-llvm.c: Put our methods/globals into the 'llvm.used' array, so the
880         LLVM optimizations don't try to remove them.
882         * aot-compiler.c (emit_llvm_file): Save the result of opt into a
883         different file so the original remains.
885 2009-12-06  Zoltan Varga  <vargaz@gmail.com>
887         * mini-llvm.c mini.c: Fix alignment issues with SIMD vars.
889         * aot-runtime.c (decode_arm_exidx): Handle most descriptors created by gas.
891         * aot-runtime.c (decode_arm_exidx): Refactor this into two functions, add
892         support for non-inline unwind descriptors.
894 2009-12-07  Geoff Norton  <gnorton@novell.com>
896         * debugger-agent.c:  Darwin can colesce signals, so we need to handle
897         the interrupt_count slightly differently.  Native threads were never
898         marked as resumed.
900 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
902         * aot-runtime.c (decode_arm_exidx): New function to initialize a MonoJitInfo
903         based on the contents of the ARM .exidx section. Not yet used since llvm doesn't
904         yet generate this info.
906         * mini-llvm.c: Fix the conversion of call results if they are unsigned.
908         * debugger-agent.c (buffer_add_value): Treat I/U as a valuetype, so the
909         client can distinguish between intptrs and longs.
911 2009-12-05  Zoltan Varga  <vargaz@gmail.com>
913         * aot-compiler.c (emit_trampoline): Emit the trampoline info into the global
914         blob.
916         * aot-runtime.c (load_function): Update after the change above.
918         * mini.h: Bump AOT file format version.
920         * method-to-ir.c (mono_method_to_ir): Disallow the delegate optimization
921         if the delegate class is dynamic.
923         * method-to-ir.c (handle_delegate_ctor): Allow the method_code optimization
924         in gshared code too using the new rgctx info type
925         MONO_RGCTX_INFO_METHOD_DELEGATE_CODE.
927 2009-12-04  Geoff Norton  <gnorton@novell.com>
929         * debugger-agent.c: When doing a func-eval invoke on a suspended runtime,
930         we need to track the original suspend count so the thread properly
931         wakes up in resume_thread.
933 2009-12-04  Zoltan Varga  <vargaz@gmail.com>
935         * method-to-ir.c (handle_delegate_ctor): Add support for using this from gshared
936         code.
938         * generics.cs: Add a test.
940         * method-to-ir.c (emit_get_rgctx_method): Make this work even if context_used
941         is 0. Simplify a lot of code using this.
943         * mini-trampolines.c (mono_delegate_trampoline): Call
944         mono_create_static_rgctx_trampoline () before saving the final address in
945         delegate->method_code, to avoid calling it each time a delegate is first called.
947         * method-to-ir.c (mono_method_to_ir): Allow fast delegate creation for methods
948         which need static rgctx trampolines.
950         * mini-trampolines.c (mono_create_static_rgctx_trampoline): Use a cache
951         keyed on the method+addr pair, since addr could be either the method addr or
952         an unbox trampoline in the AOT case. Fixes #560246.
954 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
956         * mini.c (mini_method_compile): Call handle_exception_clauses () in the same
957         place it was called before too.
959 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
961         * mini.c (mono_jit_runtime_invoke): Avoid the call to mono_class_setup_vtable ()
962         if no security manager is present, to speed up the AOT case. Call
963         mono_class_vtable () full with raise_on_error == TRUE instead.
965 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
967         * mini.c (mini_method_compile): Call handle_exception_clauses earlier so
968         the local optimization passes can take its result into account. Fixes
969         #559876.
971         * exceptions.cs: Add a test.
973 2009-01-24  Steven Munroe  <munroesj@us.ibm.com>
975         This patch is contributed under the terms of the MIT/X11 license
977         * cpu-ppc64.md (load_memindex): Add loadi8_memindex.
979 2009-12-03  Zoltan Varga  <vargaz@gmail.com>
981         * mini.h (MonoInst): Remove unused 'ssa_op' field.
983         * debugger-agent.c: Rework the handling of stack traces of running threads to
984         avoid crashes if compute_frames () tries to walk the stack of running thread.
986         * mini.c (mono_print_method_from_ip): Use mini_jit_info_table_find.
988         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): Set frame->lmf.
990         * mini.h (StackFrameInfo): Add an 'lmf' field.
992 2009-12-02  Zoltan Varga  <vargaz@gmail.com>
994         * debugger-agent.c (suspend_current): Always set really_suspended.
996         * debugger-agent.c (clear_event_request): Clear method entry/exit requests too.
998         * exceptions-x86.c (mono_arch_get_restore_context): Restore EAX too.
1000 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
1002         * debugger-agent.c (vm_commands): Don't allow invokes on threads which are not
1003         really suspended.
1005 2009-12-01  Zoltan Varga  <vargaz@gmail.com>
1007         * cpu-ppc64.md (store_memindex): Add storei8_memindex.
1009 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
1011         * mini-trampolines.c: Fix MSVC build.
1013 2009-12-01 Rodrigo Kumpera  <rkumpera@novell.com>
1015         * mini-trampolines.c: Check for mono_method_get_vtable_slot failures.
1017 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
1019         * mini-arm.c (mono_arch_lowering_pass): Fix an assert which is hit when
1020         the instruction following an OP_FCOMPARE is optimized away.
1022 2009-11-30  Zoltan Varga  <vargaz@gmail.com>
1024         * aot-compiler.c (arch_emit_autoreg): Extract the auto-registration code from
1025         emit_autoreg () into this arch-specific function.
1027         * aot-compiler.c (emit_exception_debug_info): Don't emit the length of the
1028         code, it is no longer needed.
1030         * aot-runtime.c (decode_exception_debug_info): Don't read the code length.
1032         * mini.h: Bump AOT file format version.
1034         * aot-runtime.c (mono_aot_find_jit_info): Compute the length of the method
1035         using the sorted_code_offsets array, instead of reading it from the
1036         exception debug info.
1037         (load_method): Call mono_aot_find_jit_info instead of
1038         decode_exception_debug_info ().
1040         * aot-compiler.c (emit_exception_debug_info): Emit whenever the method was
1041         LLVM compiled as a flag.
1043 2009-11-29  Zoltan Varga  <vargaz@gmail.com>
1045         * debugger-agent.c (resume_thread): Fix a warning.
1047         * aot-compiler.c: Add an option to set the number of static rgctx trampolines
1048         generated.
1050 2009-11-28  Zoltan Varga  <vargaz@gmail.com>
1052         * aot-compiler.c aot-runtime.c: Get rid of a few global symbols, move their
1053         contents to MonoAotFileInfo.
1055 2009-11-27  Zoltan Varga  <vargaz@gmail.com>
1057         * aot-compiler.c aot-runtime.c: Reorganize the AOT file format once again.
1058         Put all binary data into a giant blob, similarly to the way .net assemblies
1059         store binary data. Emit offset tables in a compact form to reduce their size.
1061         * mini.h: Bump AOT file format version.
1063         * aot-compiler.c (emit_globals_table): Use temp_prefix instead of .L in a few
1064         places.
1066         * aot-compiler.c (emit_globals_table): Emit a hash table for the globals, to
1067         avoid linear searches at runtime.
1069         * aot-runtime.c (find_symbol): Update this to use the hash.
1071         * mini.h: Bump AOT file format version.
1073 2009-11-26  Zoltan Varga  <vargaz@gmail.com>
1075         * aot-compiler.c (emit_klass_info): Save whenever the class has a generic
1076         container.
1078         * aot-runtime.c (decode_cached_class_info): Set the is_generic_container field
1079         too.
1081         * aot-compiler.c (mono_compile_assembly): Add a 'stats' option to print out
1082         the distribution of got slot types.
1084         * mini.h (MonoDebugOptions): Add 'explicit_null_checks' option.
1086         * method-to-ir.c: Add support for generating explicit null checks.
1088 2009-11-25  Zoltan Varga  <vargaz@gmail.com>
1090         * debugger-agent.c (vm_commands): Implement EXIT by invoking Environment.Exit ()
1091         on a random thread if possible.
1093         * aot-runtime.c (mono_aot_plt_resolve): Clean up the handling of function
1094         descriptors a bit, add comments, handle RGCTX_FETCH/GENERIC_CLASS_INIT_TRAMPOLINE
1095         correctly.
1097         * exceptions-ppc.c (mono_arch_find_jit_info_ext): Use mgreg_t as the type of
1098         regs. Pass the real size of the regs array to mono_unwind_frame ().
1100         * unwind.c (mono_unwind_frame): Remove an incorrect assert, add more correct
1101         ones instead.
1103 2009-11-24  Geoff Norton  <gnorton@novell.com>
1105         * mini-darwin.c: Work around apple bug rdar://7209349  See
1106         http://openradar.appspot.com/7209349 for details.  Synopsis,
1107         CoreFoundation SIGTRAP's if you dlopen it off the main thread if its
1108         never been initialized before.
1110 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
1112         * tramp-arm.c: Use blx instead of mov pc, reg to improve support for thumb.
1114         * mini-arm.c (mono_arm_thumb_supported): New helper function.
1116 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
1118         * cfold.c (mono_constant_fold_ins): Fix a problem in the previous change,
1119         OP_SHL_IMM is not 32 bit.
1121 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
1123         * aot-compiler.c (encode_patch): Fix the encoding of R8 on big-endian systems.
1125 2009-11-24  Zoltan Varga  <vargaz@gmail.com>
1127         * aot-compiler.c: Avoid infinite recursion when generic virtual recursion is
1128         encountered.
1130         * debugger-agent.c (resume_vm): Signal the suspend_cond even if suspend_count
1131         > 0 since some threads can resume if their resume_count is > 0.
1132         (invoke_method): Avoid reading freed memory.
1134         * debugger-agent.c (process_suspend): Extract the suspend code from
1135         process_single_step_inner () to a separate function. Rework the code to prevent
1136         races between this function and thread interrupts.
1138         * debugger-agent.c (suspend_current): Check the resume_count field instead
1139         of resume_one so suspends+resumes during single threaded invokes work
1140         correctly.
1142 2009-11-23  Zoltan Varga  <vargaz@gmail.com>
1144         * aot-compiler.c (emit_llvm_file): Enable some llvm optimizations which seem
1145         to make the generated code smaller.
1147         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Add a code
1148         sequence generated by recent LLVM versions.
1150         * mini-llvm.c: Add support for a few simple cases which weren't supported
1151         before.
1153         * mini-trampolines.c (mono_magic_trampoline): Don't call
1154         mono_arch_get_vcall_slot () when llvm is enabled.
1156         * aot-compiler.c (emit_llvm_file): Add code to run the 'opt' llvm tool.
1158         * mini-trampolines.c (mono_magic_trampoline): Extract the bulk of this function
1159         into a new function called common_call_trampoline () which is used by the
1160         llvm vcall trampoline as well.
1162         * debugger-agent.c: Implement single threaded invokes.
1164         * debugger-agent.c: Revert change which broke the agent on linux.
1166         * method-to-ir.c (inline_method): Prevent infinite recursion. Fixes
1167         #557606.
1169         * generics.cs: Add a test.
1171 2009-11-22  Zoltan Varga  <vargaz@gmail.com>
1173         * debugger-agent.c: Fix the cygwin build.
1175 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
1177         * cprop.c: Remove this unused file.
1179 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
1181         * cfold.c (mono_constant_fold_ins): Fix constant folding of shr_imm. Fixes
1182         #557262.
1184         * basic.cs: Add a test.
1186 2009-11-21  Zoltan Varga  <vargaz@gmail.com>
1188         * method-to-ir.c (mono_method_to_ir): Use mono_use_llvm instead of ENABLE_LLVM
1189         in one more place.
1191 2009-11-20  Zoltan Varga  <vargaz@gmail.com>
1193         * mini.c mini-trampolines.c driver.c: Add a 'mono_use_llvm' flag to control
1194         whenever the runtime uses LLVM code. Add a '--llvm' command line option to set
1195         it. Use this flag to control llvm related code paths instead of #ifdef
1196         ENABLE_LLVM, so a runtime configured without --enable-llvm can use LLVM compiled
1197         AOT code.
1199         * aot-runtime.c aot-compiler.c: Add a 'flag' field to MonoAotFileInfo.
1201         * mini.h: Bump AOT file format version.
1203         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline_full): These
1204         receive their argument in MONO_ARCH_VTABLE_REG, not in the first argument reg.
1206         * debugger-agent.c (create_event_list): Fix a crash if an empty assembly list
1207         was used as an assembly filter.
1209 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
1211         * unwind.c: Fix support for ppc.
1213         * exceptions-ppc.c (mono_arch_find_jit_info): Change this to use dwarf frame
1214         unwind info. Change to the mono_arch_find_jit_info_ext () interface.
1216 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
1218         * mini-ppc.c (mono_arch_emit_prolog): Fix a copy-paste error to fix the ppc64
1219         port.
1220         (mono_arch_cpu_init): Don't set cpu_hw_flags to 0 at the end, this was somehow
1221         added by the ps3 changes.
1223 2009-11-19  Zoltan Varga  <vargaz@gmail.com>
1225         * mini-gc.c: Resurrect this, so at least it compiles.
1227         * debugger-agent.c (assembly_commands): Implement GET_NAME command.
1229 2009-11-18  Zoltan Varga  <vargaz@gmail.com>
1231         * debugger-agent.c (mono_debugger_agent_handle_exception): Pass a MonoJitInfo to
1232         create_event_list () so assembly filters can be used.
1234         * exceptions-ppc.c (mono_arch_find_jit_info): Fix the restoration of registers
1235         from the LMF.
1237 2009-11-17  Zoltan Varga  <vargaz@gmail.com>
1239         * debugger-agent.c (mono_debugger_agent_breakpoint_hit): Fix a warning.
1240         (mono_debugger_agent_thread_interrupt): Make this return FALSE if the agent
1241         is disabled.
1243         * aot-compiler.c (add_generic_instances): Emit instances of common generic
1244         classes for char/bool too.
1246         * debugger-agent.c (DebuggerTlsData): Honor the DISABLE_SOFT_DEBUG option.
1248         * debugger-agent.c (DebuggerTlsData): Add a 'really_suspended' flag, not yet
1249         used.
1251         * debugger-agent.c: Add some definitions to make backporting to 2.6 easier.
1252         Fix warnings.
1254 2009-11-15  Andreas Faerber  <andreas.faerber@web.de>
1256         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Signature fix.
1257         
1258         Code contributed under MIT/X11 license.
1260 2009-11-14  Zoltan Varga  <vargaz@gmail.com>
1262         (mono_debugger_agent_thread_interrupt): Save the context so stacktraces for
1263         threads in native code work.
1265         * debugger-agent.c: Pass the 'flags' argument to VM_INVOKE_METHOD earlier in
1266         the parameter list, so it can be acted upon by vm_commands (). Bump protocol
1267         version.
1269 2009-11-13 Jonathan Chambers <joncham@gmail.com>
1271         * debugger-agent.c: Implementation for Windows platform.
1273         * mini-x86.c: Add support for Windows. Use mono-* synchronization
1274         primitives. Use SEH to implement breakpoints and single stepping.
1276         * mini-x86.h: Enable soft debugger on Windows.
1278         Code contributed under MIT/X11 license.
1280 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
1282         * mini-amd64.c (emit_call_body): Disable usage of near calls when running
1283         under XEN. Fixes #522894.
1285         * patch-info.h: Add LLVM_IMT_TRAMPOLINE.
1287         * mini-llvm.c aot-compiler.c aot-runtime.c mini.c: Add support for making
1288         interface calls in LLVM AOT code.
1290         * aot-compiler.c mini-llvm.c: Abort llvm compilation if a non-encodable patch
1291         is found.
1293         * mini-llvm.c: Add support for OP_VPHI.
1295         * objects.cs: Add a test.
1297 2009-11-13  Zoltan Varga  <vargaz@gmail.com>
1299         * debugger-agent.c (mono_debugger_agent_single_step_event): Avoid a crash if
1300         this is called on the debugger thread.
1302 2009-11-12  Zoltan Varga  <vargaz@gmail.com>
1304         * mini-llvm.c: Add soft-float support.
1306         * method-to-ir.c (mono_decompose_soft_float): Restart after decomposing an
1307         FCALL which returns an R4.
1309         * driver.c (mono_main): Add a missing '\n'.
1311         * mini-trampolines.c (mono_create_llvm_imt_trampoline): Fix the build on
1312         platforms which doesn't support the LLVM IMT trampoline.
1314 2009-11-11  Zoltan Varga  <vargaz@gmail.com>
1316         * mini-llvm.c (mono_llvm_emit_method): Fix LOCALLOC.
1318         * mini-llvm-cpp.cpp: Update to latest LLVM SVN.
1320         * mini-llvm.c (mono_llvm_emit_method): Avoid creating plt entries for
1321         virtual calls.
1323         * aot-runtime.c: Don't define HAVE_DL_ITERATE_PHDR, configure now does that.
1325 2009-11-10  Zoltan Varga  <vargaz@gmail.com>
1327         * aot-compiler.c aot-runtime.c: Change how mono_arch_find_jit_info () works.
1328         Instead of emitting a method_order table, sort the contents of the code_offsets
1329         table and do a binary search in the sorted table. The previous approach doesn't
1330         work with LLVM which emits methods in a arbitrary order.
1332         * aot-runtime.c: Add support for creating MonoJitInfo structures by searching
1333         in the .eh_frame section in ELF files.
1335         * mini.h: Bump corlib file format version.
1337         * mini-llvm.c aot-compiler.c: Add support for AOT to the LLVM back end.
1339         * exceptions-arm.c (mono_arch_get_call_filter_full): Update after the
1340         LDMIA->LDM macro name change.
1342 2009-11-09  Zoltan Varga  <vargaz@gmail.com>
1344         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Fix and enable this for
1345         x86.
1347         * mini-llvm-cpp.cpp (JITMemoryManager): Fix compilation with LLVM 2.7
1348         SVN.
1350         * aot-compiler.c: Ditto.
1352         * mini-arm.c (mono_arch_allocate_vars): Fix the previous change by passing
1353         &align to mini_type_stack_size_full ().
1355         * mini-arm.c (mono_arch_emit_prolog): Implement support for varargs.
1357         * mini-ops.h: Add documentation for the OP_ARGLIST opcode.
1359 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
1361         * mini-arm.c: Compute the stack space used by arguments using
1362         mini_type_stack_size_full ().
1364 2009-11-08  Zoltan Varga  <vargaz@gmail.com>
1366         * optflags-def.h: Remove dead TREEPROP optimization.
1368 2009-11-08  Rodrigo Kumpera  <rkumpera@novell.com>
1370         * mini-ppc.h: Make mono compiler under FreeBSD/ppc64. 
1372         Patch by Justin Hibbits <chmeeedalf@gmail.com>.
1374 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
1376         * driver.c (mono_jit_parse_options): New public API function to parse options
1377         as done by the runtime executable.
1379         * debugger-agent.c (buffer_add_cattrs): Fix reading an uninitialized variable
1380         when handling named arguments.
1382 2009-11-07  Zoltan Varga  <vargaz@gmail.com>
1384         * mini-arm.c: Implement support for returning vtypes in registers, fix support
1385         for passing small vtypes in registers, make the CallInfo structures more
1386         similar to the code on the other platforms.
1388         * mini-arm.c (mono_arch_allocate_vars): Align small vtypes to 4 bytes too since
1389         the code in the prolog requires it.
1391 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
1393         * mini-arm.c debugger-agent.c: Android changes from Koushik K. Dutta
1394         (koush@koushikdutta.com).
1396         * mini-arm.c (handle_thunk): Add a domain argument to control the domain
1397         where the thunk memory should be allocated from. Fixes appdomain unloading
1398         on arm.
1400 2009-11-06  Zoltan Varga  <vargaz@gmail.com>
1402         * mini-arm.c exceptions-arm.c: Make ctx->regs map directly to the 16 hardware
1403         registers, instead of r4..r11,ip,lr. Make restore_context () restore r0..r3 too.
1405 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
1407         * mini-amd64.c (mono_arch_output_basic_block): Don't allow OP_SEQ_POINT in
1408         AOT, as it is not implemented yet.
1410         * mini-x86.c (mono_arch_output_basic_block): Ditto.
1412 2009-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
1414         * debugger-agent.c: Fix windows build.
1416 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
1418         * debugger-agent.c (debugger_thread): Call mono_set_is_debugger_attached ()
1419         after the client connects/disconnects.
1421         * debugger-agent.c: Add an 'onthrow' option to start the debugger agent
1422         when an exception of a given type is thrown.
1424         * debugger-agent.c: Add a 'onuncaught' option to start the debugger agent
1425         only on an uncaught exception.
1427         * mini-exceptions.c: Notify the debugger agent on an uncaught exception.
1429         * debugger-agent.c: Add a 'launch' option.
1431 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
1433         * debugger-agent.c: Add a 'timeout' option.
1435 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
1437         * debugger-agent.c: Implement the 'server' and 'suspend' options supported by
1438         the JDWP agent.
1440 2009-11-05  Zoltan Varga  <vargaz@gmail.com>
1442         * debugger-agent.c (set_breakpoint): Emit a log message.
1444 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
1446         * mini-arm.c: Fix the arm build.
1448 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
1450         * aot-compiler.c: don't leak the value returned from
1451         mono_type_full_name().
1453 2009-11-04 Gonzalo Paniagua Javier <gonzalo@novell.com>
1455         * debugger-agent.c: defer including mono-mutex.h until we know the
1456         agent is supported.
1458 2009-11-04 Jonathan Chambers <joncham@gmail.com>
1460         * debugger-agent.c: Changes to build on windows. Use mono-mutex instead
1461         of pthreads directly.
1463         * mini.c (mono_sigfpe_signal_handler): Changed signature of Windows
1464         exception handlers. Pass info argument.
1466         * mini.h: Adjust signatures of soft debugger functions to pass void*
1467         instead of siginfo_t. Adjust SIG_HANDLER_SIGNATURE on Windows.
1469         * mini-amd64.c (mono_arch_is_single_step_event): Adjust signature to pass void*
1470         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
1471         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
1472         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
1474         * mini-amd64.h: Adjust MonoW32ExceptionHandler signature.
1476         * mini-x86.c (mono_arch_is_single_step_event): Adjust signature to pass void*
1477         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
1478         (mono_arch_is_breakpoint_event): Adjust signature to pass void*
1479         instead of siginfo_t. Value is EXCEPTION_RECORD on Windows.
1481         * mini-x86.h: Adjust MonoW32ExceptionHandler signature.
1483         * exceptions-x86.c: Adjust W32_SEH_HANDLE_EX for new signature.
1485         * exceptions-amd64.c: Adjust W32_SEH_HANDLE_EX for new signature.
1487         * mono-semaphore.h: Skeleton implementation for Windows.
1489         Code contributed under MIT/X11 license.
1491 2009-11-04 Jonathan Chambers <joncham@gmail.com>
1493         * simd-intrinsics.c (simd_intrinsic_emit_setter): Unfix my fix.
1495         Code contributed under MIT/X11 license.
1497 2009-11-04 Jonathan Chambers <joncham@gmail.com>
1499         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix windows build.
1501         Code contributed under MIT/X11 license.
1503 2009-11-04  Zoltan Varga  <vargaz@gmail.com>
1505         * aot-compiler.c (mono_save_xdebug_info): Bump the threshold for flushing
1506         debug info to 100 because 10 still slows down gdb too much.
1508         * method-to-ir.c (mono_method_to_ir): Avoid rethrowing thread abort exceptions
1509         inside runtime invoke wrappers. This avoids the need to call ResetAbort () on
1510         them in the wrappers.
1512 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
1514         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
1516         * simd-intrinsics.c (simd_intrinsic_emit_setter): Fix a warning.
1518         * aot-runtime.c (mono_aot_get_method): Refactor some code into a new helper
1519         function mono_aot_get_array_helper_from_wrapper ().
1521         * aot-compiler.c (add_generic_class): Refactor the code a bit, really emit
1522         array helper methods.
1524 2009-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
1526         * simd-intrinsics.c (load_simd_vreg): Add extra argument to signal if
1527         the value was loaded from memory.
1529         * simd-intrinsics.c (simd_intrinsic_emit_setter): Store back to memory if
1530         the value was loader from there.
1532         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Fail correctly for Shuffle
1533         without constant swizzle.
1535 2009-11-02 Jonathan Chambers <joncham@gmail.com>
1537         * mini-amd64.c: Put soft debugger functions behind a
1538         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
1540         * mini-amd64.h: disable the soft debugger in windows.
1542         Code contributed under MIT/X11 license.
1544 2009-11-02 Jonathan Chambers <joncham@gmail.com>
1546         * mini-x86.c: Put soft debugger functions behind a
1547         #ifdef MONO_ARCH_SOFT_DEBUG_SUPPORTED.
1549         Code contributed under MIT/X11 license.
1551 2009-11-02 Jonathan Chambers <joncham@gmail.com>
1553         * exceptions-x86.c (win32_handle_stack_overflow): Fix parameters
1554         to mono_arch_find_jit_info_ext.
1556         Code contributed under MIT/X11 license.
1558 2009-11-03  Zoltan Varga  <vargaz@gmail.com>
1560         * debugger-agent.c: Include netinet/in.h to fix the bsd build.
1562         * debugger-agent.c: Add support for filtering events by assemblies.
1564         * debugger-agent.c (mono_debugger_agent_thread_interrupt): Return false if
1565         the agent is not enabled.
1567 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
1569         * exceptions-x86.c: hopefully last change to fix the windows build.
1570         This one courtesy of Jonathan Chambers.
1572 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
1574         * debugger-agent.c: remove unused function.
1576 2009-11-02 Gonzalo Paniagua Javier <gonzalo@novell.com>
1578         * debugger-agent.c: add #ifdefs for a few header files.
1579         * mini-x86.h: disable the soft debugger in windows.
1580         Step 1 of 2 to make this compile on windows with gcc.
1582 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
1584         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Comment this out for now
1585         as it breaks the build.
1587 2009-07-01  Zoltan Varga  <vargaz@gmail.com>
1589         Merge the soft debugger branch.
1591         * debugger-agent.h debugger-agent.c: New files containing the soft
1592         mode debugger module.
1594         * method-to-ir.c (mono_method_to_ir): Generate OP_SEQ_POINT opcodes
1595         at the appropriate locations.
1597         * mini-<ARCH>.c (mono_arch_output_basic_block): Handle OP_SEQ_POINT
1598         opcode.
1600         * mini-<ARCH>.c: Add new arch-specific functions to set/clear breakpoints,
1601         enable/disable single stepping.
1603         * exceptions-<ARCH>.c (mono_arch_find_jit_info_ext): New stack unwinding api
1604         which returns all information in a StackFrameInfo structure, and can handle the
1605         LMF frames added by the debugger.
1607         * mini-<ARCH>.h (MonoLMFExt): New structure containing additional information
1608         about an LMF frame.
1610         * mini-exceptions.c (mono_jit_walk_stack_from_ctx_in_thread): New stack
1611         walker function which works on a specific thread and passes a StackFrameInfo
1612         structure to its callback.
1614         * mini.c (mini_init): Initialize the debugger agent.
1616         * aot-compiler.c aot-runtime.c: Add soft-debug support.
1618         * mini-ops.h: Add OP_SEQ_POINT opcode.
1620         * driver.c (mono_main): Add new '--debugger-agent' option for passing
1621         arguments to the debugger agent.
1623 2009-11-02  Zoltan Varga  <vargaz@gmail.com>
1625         * mini.c (mini_method_compile): Disable llvm for methods with an lmf here to
1626         speed things up.
1628         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOCALLOC.
1630         * tramp-x86.c (mono_arch_get_llvm_imt_trampoline): Implement this for x86.
1632         * mini.c (mini_init): Avoid using the IMT trampoline in the LLVM case.
1634         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add a static rgctx trampoline
1635         if needed.
1636         (mono_create_llvm_imt_trampoline): New function to create a trampoline which
1637         sets the IMT argument and makes a virtual call.
1639         * mini-llvm.c: Enable interface calls using the llvm imt trampoline.
1641 2009-11-01  Zoltan Varga  <vargaz@gmail.com>
1643         * Makefile.am (llvm_sources): Enable the llvm option since it no longer breaks
1644         the windows build.
1646 2009-10-30  Zoltan Varga  <vargaz@gmail.com>
1648         * mini.c (mini_cleanup): Call profiler shutdown before shutting down the
1649         runtime. Fixes #551228.
1651 2009-10-29  Zoltan Varga  <vargaz@gmail.com>
1653         * mini-x86.c (mono_arch_output_basic_block): Fix % 1. Fixes #550970.
1655         * basic.cs: Add a test.
1657         * method-to-ir.c (mono_method_to_ir): Use EMIT_NEW_LOAD_MEMBASE_TYPE to
1658         load vtypes instead if OP_LOADV_MEMBASE in the implementation of
1659         CONSTRAINED. Fixes #550964.
1661         * generics.cs: Add a test.
1663 2009-10-28  Mark Probst  <mark.probst@gmail.com>
1665         * mini-posix.c (add_signal_handler): Use
1666         mono_gc_get_suspend_signal() instead of GC_get_suspend_signal().
1668 2009-10-28 Jerry Maine <crashfourit@gmail.com>
1670         Contributed under the terms of the MIT/X11 license by
1671         Jerry Maine <crashfourit@gail.com>.
1673         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
1674         sse4a for simd intrinsics.
1676         * mini-amd64.c (mono_arch_cpu_enumerate_simd_versions): Added code to detect
1677         sse4a for simd intrinsics.
1679 2009-10-27  Zoltan Varga  <vargaz@gmail.com>
1681         * ir-emit.h method-to-ir.c: Change a few _IMM macros to assign to inst_imm
1682         instead of inst_p1 which is not the same on ILP32 platforms.
1684 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
1686         * mini-ppc.c (mono_arch_emit_prolog): Load the current got address,
1687         not the mscorlib one before calling mono_get_lmf_addr.
1689         * tramp-ppc.c (mono_arch_create_trampoline_code_full): Fix the storing
1690         of the ip to the LMF.
1692         * method-to-ir.c (mono_method_to_ir): Fix the handling of the
1693         immediate in the op->op_imm optimization.
1695         * mini-ppc.c: Add a 'vtregs' field to ArgInfo to make the code easier to
1696         understand. VTypes now work, but are not abi compliant, as they are
1697         split into 4 byte parts instead of 8.
1698         (emit_memcpy): Fix the unrolled case to work on the PS3.
1700         * mini-ppc.c (get_delegate_invoke_impl): Fix this for the PS3.
1702         * aot-compiler.c (mono_compile_assembly): Make the autoreg option
1703         the default when static linking.
1705         * mini-ppc.c (mono_arch_emit_prolog): Fix handling of I8 arguments.
1707         * aot-compiler.c: Add an autoreg option to automatically register
1708         statically linked aot modules using ELF .ctors.
1710         * genmdesc.pl: Add __ppc64__ to allowed defines.
1712 2009-10-25  Zoltan Varga  <vargaz@gmail.com>
1714         * mini-posix.c (add_signal_handler): Delay the GC suspend signal while
1715         executing a SIGSEGV handler on an altstack, since libgc can't handle that.
1717 2009-10-24  Mark Probst  <mark.probst@gmail.com>
1719         * exceptions-x86.c (mono_arch_find_jit_info): Fix build.
1721 2009-10-24  Zoltan Varga  <vargaz@gmail.com>
1723         * mini-exceptions.c (mini_jit_info_table_find): Add an 'out_domain' argument
1724         which will contain the domain where the method was found.
1726         * exceptions-<ARCH>.c mini-exceptions.c: Update callers of
1727         mini_jit_info_table_find ().
1729         * aot-compiler.c (xdebug_end_emit): Remove so stray debug code.
1731         * branch-opts.c (mono_if_conversion): Avoid running deadce if it is disabled.
1733 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
1735         * mini-x86.c (mono_arch_emit_prolog): Disable aot for methods with save_lmf
1736         set, its not supported yet.
1738 2009-10-22  Zoltan Varga  <vargaz@gmail.com>
1740         * aot-runtime.c (mono_aot_get_method): Avoid asserting if a array generic
1741         iface wrapper is not found.
1742         (mono_aot_get_method): Ditto for GetGenericValueImpl.
1744 2009-10-21  Zoltan Varga  <vargaz@gmail.com>
1746         * aot-runtime.c (mono_aot_get_method): Fix support for the IList<T> wrappers,
1747         which have a different name.
1749         * aot-runtime.c (mono_aot_get_method): Special case the array generic iface
1750         wrappers and Array.GetGenericValueImpl ().
1752         * aot-compiler.c: Avoid emitting some wrappers which are not needed anymore
1753         because of the change above.
1755         * generics.cs: Add a test for full aot + generic array ifaces.
1757 2009-10-19  Sebastien Pouliot  <sebastien@ximian.com>
1759         * aot-compiler.c (emit_plt): Remove duplicate 'debug_sym' variable 
1760         that hides the previous one.
1762 2009-10-18  Zoltan Varga  <vargaz@gmail.com>
1764         * aot-compiler.c (can_marshal_struct): Allow some System.dll structs to be
1765         marshalled. Fixes #541623.
1767 2009-10-16  Zoltan Varga  <vargaz@gmail.com>
1769         * aot-compiler.c (emit_extra_methods): Remove some asserts which are not needed.
1771 2009-10-15  Zoltan Varga  <vargaz@gmail.com>
1773         * mini.c (mono_op_imm_to_op): Handle OP_AND/OR/XOR_IMM.
1775 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
1777         * mini-posix.c (sigprof_signal_handler):
1778         Implemented support for building stat call chans in different ways.
1780 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
1782         * mini-exceptions.c (mono_find_jit_info):
1783         Also check that a jit info has been found (fixes a profiler crash).
1785 2009-10-14  Massimiliano Mantione  <massi@ximian.com>
1787         * mini.c (mono_codegen):
1788         Call mono_profiler_code_buffer_new with correct code address.
1790 2009-10-14  Zoltan Varga  <vargaz@gmail.com>
1792         * driver.c (mono_main): Change the date in the copyright.
1794 2009-10-14  Mark Probst  <mark.probst@gmail.com>
1796         * method-to-ir.c (mono_method_to_ir): Don't use a managed array
1797         allocator in shared generic code for open classes, because we
1798         can't get those classes' vtables.  We need to make managed
1799         allocators not depend on the vtable at compile-time to solve this.
1801 2009-10-13  Martin Baulig  <martin@ximian.com>
1803         * debug-mini.c (mono_debugger_trampoline_compiled): Add
1804         `const guint8 *trampoline' argument; send both the old and the new
1805         notification.
1807 2009-09-30  Zoltan Varga  <vargaz@gmail.com>
1809         * aot-compiler.c (add_wrappers): Add a runtime invoke wrapper which is used by
1810         mono_runtime_capture_context () without calling mono_runtime_invoke ().
1811         (can_marshal_struct): Skip structures with auto layout.
1813         * tramp-arm.c (GEN_TRAMP_SIZE): Increase this by 4.
1815 2009-10-02  Zoltan Varga  <vargaz@gmail.com>
1817         * mini-sparc.c (mono_arch_emit_setret): Emit long return values using OP_LMOVE.
1818         (mono_arch_create_vars): Instead of allocating a stack slot by hand, allocate
1819         a variable to hold the stack slot used by the int<->float conversion opcodes.
1821         * mini-sparc.c (mono_arch_build_imt_thunk): Implement support for fail_tramp.
1823 2009-10-04  Zoltan Varga  <vargaz@gmail.com>
1825         * aot-compiler.c (add_generic_class): Only add GetGenericValueImpl wrappers
1826         when using full-aot.
1828 2009-10-06  Zoltan Varga  <vargaz@gmail.com>
1830         * aot-compiler.c (add_generic_class): Add an instance of GenericComparer<T> for
1831         each instance of Comparer<T>.
1833         * generics.cs: Add a new test.
1835 2009-10-09  Zoltan Varga  <vargaz@gmail.com>
1837         * driver.c (parse_debug_options): Add a 'gdb' option.
1839         * mini.c (mini_parse_debug_options): Add a 'gdb' option.
1841         * image-writer.c: Add support for emitting the image into a memory buffer.
1843         * dwarfwriter.c: Add support for sharing one IL file between multiple images.
1845         * aot-compiler.c: Add support for registering debug info with GDB using the
1846         new JIT debugging interface in GDB 7.0. It can be turned on by setting
1847         MONO_XDEBUG to 'gdb'.
1849 2009-10-10  Zoltan Varga  <vargaz@gmail.com>
1851         * aot-compiler.c (mono_save_trampoline_xdebug_info): Implement this for the
1852         gdb mode.
1854 2009-10-11  Zoltan Varga  <vargaz@gmail.com>
1856         * aot-compiler.c (mono_save_xdebug_info): Emit a symbol for the method which
1857         can be used to set breakpoints in gdb.
1859         * image-writer.c (bin_writer_emit_writeout): Add support for setting the text
1860         segment to an absolute address.
1862 2009-10-13  Mark Probst  <mark.probst@gmail.com>
1864         * method-to-ir.c: Use the managed array allocator method if
1865         available.
1867 2009-10-13  Bill Holmes  <billholmes54@gmail.com>
1869         * aot-compiler.c : Fix the MSVC builds
1871         Code is contributed under MIT/X11 license.
1873 2009-10-13  Zoltan Varga  <vargaz@gmail.com>
1875         * aot-compiler.c (mono_save_xdebug_info): Group methods into groups of 10 to
1876         avoid registering 1 symbol file per method with gdb.
1878 2009-09-29  Zoltan Varga  <vargaz@gmail.com>
1880         * mini-sparc.c: Fix the handling of enums with base type long.
1882         * mini-sparc.c (mono_arch_output_basic_block): Fix IREM_UN_IMM.
1884         * mini-sparc.c (mono_arch_allocate_vars): Use mono_class_from_mono_type ()
1885         instead of using type->data.klass as the later doesn't work with generics.
1887 2009-09-25  Mark Probst  <mark.probst@gmail.com>
1889         * method-to-ir.c, mini.h, mini-alpha.c, mini-amd64.c, mini-arm.c,
1890         mini-hppa.c, mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c,
1891         mini-s390x.c, mini-sparc.c, mini-x86.c: Thread.get_CurrentThread
1892         works differently now and we don't handle it in the JIT anymore.
1894         * mini.c, mini-exceptions.c, mini-posix.c, debug-debugger.c,
1895         debug-mini.c, tramp-amd64.c, tramp-x86.c: Changes resulting from
1896         the Thread class split.
1898 2009-09-25  Zoltan Varga  <vargaz@gmail.com>
1900         * driver.c: Don't run tests with the obsolete treeprop optimization.
1902         * mini-sparc.c (mono_arch_create_vars): Make the component vars of a long ret
1903         variable volatile. Fixes #541577.
1905         * basic-calls.cs: Add a new test.
1907         * basic-long.cs: Remove tests which are now in basic-calls.cs.
1909 2009-09-24  Zoltan Varga  <vargaz@gmail.com>
1911         * dwarfwriter.c (emit_debug_info_end): Disable this as it doesn't seem to
1912         work/required with recent iphone sdk versions.
1914         * aot-compiler.c (add_wrappers): Generate PtrToStructure wrappers for more
1915         structures.
1917         * decompose.c (mono_decompose_vtype_opts): Avoid reading uninitialized memory
1918         in the VCALL decomposition code.
1920 2009-09-22  Zoltan Varga  <vargaz@gmail.com>
1922         * mini-ia64.c (mono_arch_output_basic_block): Fix ISHR/ISHR_IMM.
1924         * basic.cs: Add a test.
1926         * mini-ia64.c (mono_arch_build_imt_thunk): Implement support the virtual
1927         generic invokes.
1929         * mini-exceptions.c (mini_jit_info_table_find): New helper function which
1930         searches all the domains of the current thread.
1932         * exceptions-<ARCH>.c: Use it. Fixes #539394.
1934 2009-09-21  Zoltan Varga  <vargaz@gmail.com>
1936         * exceptions-arm.c (mono_arm_throw_exception): Set ctx->ebp to fp instead of sp
1937         so catching exceptions thrown in the same method works. Fixes exception17.exe.
1939         * tramp-arm.c (mono_arch_create_trampoline_code_full): Store NULL into lmf->method
1940         for non-jit trampolines.
1942         * mini.c (mono_jit_runtime_invoke): Allow string ctors with dyn runtime invoke.
1944         * aot-compiler.c (add_wrappers): Ditto.
1946         * mini-arm.c: Implement support for passing vtypes and floats, and increase
1947         the size of the param area used by dyn_call to 6 which covers the majority of
1948         methods.
1950         * mini.c aot-compiler.c: Allow dyn_call for string methods except ctors.
1952         * mini-arm.c: Implement support for passing/receiving
1953         longs and receiving floats in the dyn_call code.
1955         * mini-amd64.c: Implement support for receiving vtypes in registers in
1956         the dyn_call code.
1958         * mini.c mini-amd64.c: Implement partial support for passing vtypes in
1959         the dyn_call code.
1961 2009-09-20  Zoltan Varga  <vargaz@gmail.com>
1963         * mini-arm.c (get_call_info): Return more precise information in
1964         ArgInfo->regtype.
1965         (dyn_call_supported): Use the information in CallInfo.
1967         * mini-arm.c: Enable support for returning vtypes in the dyn_call code.
1969         * mini.c mini-amd64.c: Enable support for returning vtypes in the dyn_call
1970         code.
1972         * mini-arm.c: Update after the dyn_call api changes.
1974         * mini.c (mini_create_jit_domain_info): Register a destructor function
1975         for the runtime_invoke_hash.
1977         * mini-amd64.c (mono_arch_get_dyn_call_args): Rename this to
1978         'mono_arch_dyn_call_start'. Pass the pointer to the return value buffer to
1979         this function.
1980         (mono_arch_get_dyn_call_ret): Rename this to 'mono_arch_dyn_call_finish'.
1981         (dyn_call_supported): Simplify this by using get_call_info ().
1982         (mono_arch_dyn_call_free): New destructor function.
1984         * generics.cs: Remove a printf.
1986         * method-to-ir.c (mono_method_to_ir): Allocate some param area for DYN_CALL.
1988         * mini-arm.c: Add support for enum return values and passing a few arguments
1989         on the stack.
1990         
1991         * mini.c (mono_jit_runtime_invoke): Add support for enum return values to
1992         dyn invoke.
1994         * mini-amd64.c (mono_arch_get_dyn_call_ret): Ditto.
1996         * aot-compiler.c (add_wrappers): Add a few restrictions for the use of
1997         the dynamic invoke wrappers.
1999         * mini-arm.c: Implement OP_DYN_CALL for arm.
2001         * aot-compiler.c (add_wrappers): Avoid aot-ing runtime invoke wrappers
2002         supported by the dynamic runtime invoke wrapper.
2004         * aot-compiler.c aot-runtime.c: Add support for encoding the dynamic
2005         runtime invoke wrapper.
2007         * mini.c (mono_jit_runtime_invoke): Use the dynamic runtime invoke wrappers
2008         if possible when running with full-aot.
2010         * mini-ops.h: Add OP_DYN_CALL opcode.
2012         * mini-amd64.c method-to-ir.c: Add infrastructure for making method calls
2013         with dynamic arguments lists similar to libffi.
2015 2009-09-19  Zoltan Varga  <vargaz@gmail.com>
2017         * method-to-ir.c: Fix the previous change on 64 bit platforms.
2018         
2019         * method-to-ir.c: Applied patch from Rodrigo Kumpera. Allow an i8 argument
2020         to NEWARR.
2022         * iltests.il.in: Add a new test.
2023         
2024 2009-09-18  Zoltan Varga  <vargaz@gmail.com>
2026         * aot-compiler.c (add_generic_instances): Add more instances of
2027         GenericEqualityComparer.
2029 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
2031         * mini.c: Add asserts for mono_class_vtable calls that are not meant to fail.
2033 2009-09-18  Rodrigo Kumpera  <rkumpera@novell.com>
2035         * method-to-ir.c: Handle failures from mono_class_vtable. Added some
2036         comments on some functions that now can fail.
2038 2009-09-17  Andrew Jorgensen  <ajorgensen@novell.com>
2040         * Makefile.am: Add Info.plist to EXTRA_DIST
2042 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
2044         * method-to-ir.c (mono_method_to_ir): Allow AOT for CEE_LDTOKEN in
2045         static synchronized wrappers. Fixes #539500.
2047 2009-09-14  Rodrigo Kumpera  <rkumpera@novell.com>
2049         * jit-icalls.c (mono_class_static_field_address): handle vtable failure
2050         properly.
2052 2009-09-16  Zoltan Varga  <vargaz@gmail.com>
2054         * mini-exceptions.c (mono_handle_exception_internal): Store the computed
2055         lmf before calling filter clauses as well. Fixes #539550.
2057         * exceptions.cs: Add a test.
2058         
2059 2009-09-14  Zoltan Varga  <vargaz@gmail.com>
2061         * aot-compiler.c (add_generic_class): Add instances of
2062         Array.GetGenericValueImpl as well.
2064         * Makefile.am (fullaotcheck): Copy and aot more assemblies so linq
2065         can be tested too.
2067         * generics.cs: Add a fullaot linq test.
2069 2009-09-10  Zoltan Varga  <vargaz@gmail.com>
2071         * aot-compiler.c (arch_emit_static_rgctx_trampoline): Don't clobber argument
2072         reg r1 on arm.
2074 2009-09-10  Bill Holmes  <billholmes54@gmail.com>
2076         * mini-trampolines.c (mono_delegate_trampoline) : Call
2077           mono_cominterop_get_invoke if the delegate target object
2078           is a COM object.
2080         Code is contributed under MIT/X11 license.
2082 2009-09-09  Sebastien Pouliot  <sebastien@ximian.com>
2084         * method-to-ir.c: For CoreCLR throw a SecurityException if an 
2085         internal call is defined outside platform code. Reduce code 
2086         duplication with existing [Method|Field]AccessException
2088 2009-09-08  Rodrigo Kumpera  <rkumpera@novell.com>
2090         * mini-x86.c (mono_arch_emit_call): Don't reduce stack usage by 4
2091         if the return value is a small struct passed on regs.
2093 2009-09-09  Zoltan Varga  <vargaz@gmail.com>
2095         * cpu-arm.md mini-arm.c: Remove unused opcodes.
2097         * mini-codegen.c: Enable the cpu description validation for arm.
2099 2009-09-08  Zoltan Varga  <vargaz@gmail.com>
2101         * basic-calls.cs: Move the test_0_float_load_and_store_with_big_offset ()
2102         test which depends on structs to objects.cs.
2103         
2104         * basic-calls.cs: Remove calls to Console.WriteLine and throws, since those
2105         require object model related stuff working.
2107         * cpu-x86.md mini-x86.c: Remove more unused opcodes.
2109         * mini-ops.h: Fix OP_BIGMUL instruction descriptions.
2111         * mini-codegen.c (mono_local_regalloc): Validate the cpu description 
2112         against the instruction metadata in mini-ops.h. amd64 only for now.
2114         * mini-ops.h: Fix some instruction descriptions.
2116         * mini-ops.h mini-x86.c mini-amd64.c cpu-<ARCH>.md: Remove some
2117         unused instructions.
2119 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
2121         * exceptions.cs: Add a new test.
2123 2009-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
2125         * mini-x86.c (needs_stack_frame): OSX requires full frames to keep proper alignment.
2127 2009-09-06  Zoltan Varga  <vargaz@gmail.com>
2129         * mini-llvm.c (mono_llvm_emit_method): Add a few more missing casts,
2130         skip empty phi opcodes.
2131         
2132         * mini-llvm.c (mono_llvm_emit_method): Handle unsigned volatile variables
2133         correctly by zero extending after loads. Skip methods containing calls
2134         to the monitor enter/exit trampolines.
2136         * tramp-x86.c (mono_arch_create_trampoline_code): Align the stack
2137         when calling mono_thread_force_interruption_checkpoint ().
2139         * mini.c (mini_method_compile): Disable llvm when AOT compiling.
2141         * tramp-amd64.c (mono_arch_patch_callsite): Add support for 32 bit ->
2142         64 bit thunks.
2143         (mono_arch_nullify_class_init_trampoline): Read 'buf' instead of 'code'.
2145         * mini-llvm.c (mono_llvm_emit_method): Add a few missing conversions so a 
2146         bootstrap could run.
2148 2009-09-04  Zoltan Varga  <vargaz@gmail.com>
2150         * mini.c (mini_init): Set callbacks.get_runtime_build_info ().
2152 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
2154         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass the start
2155         of the method to
2156         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
2157         LLVM might be very short.
2159         * mini-x86.c (mono_arch_output_basic_block): Maintain stack alignment
2160         in OP_THROW/RETHROW.
2162         * exceptions-x86.c: Rewrite the throw trampolines so they maintain stack
2163         alignment on osx.
2165 2009-09-03  Zoltan Varga  <vargaz@gmail.com>
2167         * mini-amd64.c (mono_arch_get_vcall_slot): Pass the start of the method to
2168         mono_breakpoint_clean_code () when using LLVM as the prologues generated by
2169         LLVM might be very short.
2171 2009-09-01  Zoltan Varga  <vargaz@gmail.com>
2173         * exceptions-x86.c (throw_exception): Fix the previous change by substracting
2174         the alignment for the value of sp.
2176 2009-09-01  Geoff Norton  <gnorton@novell.com>
2178         * mini.c (mono_get_lmf_addr): Fix jit_thread_attach for native to 
2179         managed wrappers in full aot.
2181 2009-08-31  Zoltan Varga  <vargaz@gmail.com>
2183         * exceptions-x86.c (get_throw_exception): Align the stack on osx.
2185 2009-08-28  Zoltan Varga  <vargaz@gmail.com>
2187         * mini-llvm-cpp.cpp mini-llvm.c: Update to latest llvm api.
2189 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
2191         * aot-compiler.c (emit_exception_debug_info): Emit ei->flags too.
2193         * aot-runtime.c (decode_exception_debug_info): Decode ei->flags from the
2194         saved info.
2196         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
2198         * aot-runtime.c aot-compiler.c: Emit exception causes fully so we don't
2199         depend on the info MonoMethodHeader which could be missing in IL stripped
2200         assemblies.
2202 2009-08-25  Zoltan Varga  <vargaz@gmail.com>
2204         * mini-arm.c (add_general): Fix the passing of 64 bit values on darwin, where
2205         they are only 4 byte aligned.
2207 2009-08-21  Zoltan Varga  <vargaz@gmail.com>
2209         * mini-arm.c (mono_arch_allocate_vars): Use FP as the frame pointer as
2210         was done previously, since using SP causes too many problems.
2212         * exceptions-arm.c: Fix the handling of sp/fp so unwinding through
2213         frames without a frame pointer works.
2215         * mini-arm.c (mono_arch_get_global_int_regs): Avoid using V5 as a
2216         global register in methods with calls, since the calls can go through
2217         a static rgctx trampoline which doesn't save it.
2219 2009-08-19  Zoltan Varga  <vargaz@gmail.com>
2221         * mini-arm.c (mono_arch_context_get_int_reg): Handle SP as well.
2223 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
2225         * aot-compiler.c (add_generic_instances): Fix the net 1.1 build.
2227 2009-08-18  Christian Hergert  <chris@dronelabs.com>
2229         * method-to-ir.c: Fix warnings for uninitialized variables.
2231 2009-08-18  Christian Hergert  <chris@dronelabs.com>
2233         * mini-exceptions.c:
2234         * aot-compiler.c: Fix printf warnings.
2236 2009-08-18  Zoltan Varga  <vargaz@gmail.com>
2238         * aot-compiler.c (add_generic_instances): Add string[] wrapper methods.
2239         Add GetGenericValueImpl<string>.
2240         
2241         * aot-compiler.c (add_generic_instances): Add instances of
2242         GenericEqualityComparer<T> for primitive types. Only emit the array
2243         wrappers into the mscorlib image.
2245 2009-08-15  Zoltan Varga  <vargaz@gmail.com>
2247         * aot-runtime.c (load_method): Rename 'aot_module' -> 'amodule'. Allocate
2248         the methods_loaded array using amodule->info->nmethods.
2250         * mini.h (MonoAotFileInfo): Add an 'nmethods' field.
2251         (MONO_AOT_FILE_VERSION): Bump this.
2253         * aot-compiler.c: Emit more generic instances allowing some parts of linq
2254         to work.
2256         * aot-runtime.c (mono_aot_get_unwind_info): Handle the case when the
2257         MonoJitInfo doesn't belong to its methods aot image.
2259 2009-08-14  Zoltan Varga  <vargaz@gmail.com>
2261         * mini-arm.c (mono_arch_allocate_vars): Use SP as the default frame reg.
2263         * mini-arm.c: Fix warnings.
2264         
2265         * mini-arm.c (mono_arm_emit_load_imm): Only emit a movt if needed.
2267         * mini-arm.c (mono_arm_emit_load_imm): Use movt/movw if the cpu
2268         supports it.
2270 2009-08-12  Zoltan Varga  <vargaz@gmail.com>
2272         * aot-compiler.c (arch_emit_imt_thunk): Rework the arm code to
2273         avoid clobbering IP.
2275         * mini-trampolines.c (mono_magic_trampoline): Allocate a local to
2276         hold the trampoline argument, so its initial value is available during
2277         debugging.
2279 2009-08-11 Gonzalo Paniagua Javier <gonzalo@novell.com>
2281         * exceptions-arm.c:
2282         * exceptions-hppa.c:
2283         * mini.c:
2284         * exceptions-s390x.c:
2285         * exceptions-mips.c:
2286         * exceptions-ppc.c:
2287         * exceptions-sparc.c:
2288         * exceptions-alpha.c:
2289         * aot-runtime.c:
2290         * mini-trampolines.c:
2291         * exceptions-x86.c:
2292         * exceptions-s390.c: add and use #define's instead of sizeof()
2293         for MonoJitInfo and MonoJitInfoTable.
2295 2009-08-10 Gonzalo Paniagua Javier <gonzalo@novell.com>
2297         * tramp-arm.c:
2298         * tramp-amd64.c:
2299         * tramp-ppc.c:
2300         * tramp-x86.c: use a #define instead of sizeof() for a few
2301         structures that use a zero-length array.
2303 2009-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
2305         * method-to-ir.c (mono_method_to_ir/CEE_CONSTRAINED_): Handle the
2306         case when the method is dynamic. Fixes #529238.
2308 2009-08-06  Zoltan Varga  <vargaz@gmail.com>
2310         * mini.c (mono_jit_compile_method_inner): Throw an exception instead
2311         of asserting when a method is JIT compiled in full-aot mode.
2313 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
2314         
2315         Contributed under the terms of the MIT/X11 license by
2316         Jerry Maine <crashfourit@gail.com>.
2317         
2318         * fixed wrong dates in changelog.
2320 2009-08-03  Jerry Maine  <crashfourit@gmail.com>
2321         
2322         Contributed under the terms of the MIT/X11 license by
2323         Jerry Maine <crashfourit@gail.com>.
2325         * basic-simd.cs: added test for packed double square root.
2326         * cpu-amd64.md: added opcode info for packed double square root.
2327         * cpu-x86.md: added opcode info for packed double square root.
2328         * mini-ops.h: added IR opcode for packed double square root.
2329         * mini-x86.c: added IR to native translation code for packed double square root.
2330         * mini-amd64.c: removed todo for packed double square root.
2331         * simd-intrinsics.c: added method to IR opcode converstion for
2332         packed double square root.
2334 2009-08-03 Jerry Maine <crashfourit@gmail.com>
2336         Contributed under the terms of the MIT/X11 license by
2337         Jerry Maine <crashfourit@gail.com>.
2339         * mini-amd64.c: Added a change to help tell the difference as 
2340         to what perpose the xmm register is being used--mainly to help
2341         with debuging.
2342         * mini-amd64.h: Changed callee regs to use 15 out of 16 
2343         (one used for special cases) xmm registers for both fp
2344         and simd ops. Added define to turn on new feature in the regalloc
2345         that allows fp and simd ops to share the xmm regs happily.
2346         * codegen.c: Added code to detect for which perpose an xmm reg is
2347         being used (fp or simd) and to translate back and forth to the
2348         correct logical reg bank (fp or simd) for 'spill load's.
2350 2009-08-03 Jerry Maine <crashfourit@gmail.com>
2352         Contributed under the terms of the MIT/X11 license by
2353         Jerry Maine <crashfourit@gail.com>.
2355         * basic-simd.cs: Added tests for stressing the regalloc when running with
2356         16 simd regs and when simd and fp ops share the same reg bank.
2358 2009-08-01  Mark Probst  <mark.probst@gmail.com>
2360         * method-to-ir.c (mini_emit_stobj): If we call mono_value_copy()
2361         in shared generic code, we might have to look up the class in the
2362         RGCTX.  If we use the class directly, compute its GC descriptor.
2364 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
2366         * mini.c (mono_jit_runtime_invoke): Fix a warning.
2368 2009-07-31  Rodrigo Kumpera  <rkumpera@novell.com>
2370         * mini.c (mono_jit_runtime_invoke): Initialize the class and
2371         check for errors. Fixed the case when the class with the Main
2372         method is broken.
2374 2009-07-31 Jerry Maine <crashfourit@gmail.com>
2376         Contributed under the terms of the MIT/X11 license by
2377         Jerry Maine <crashfourit@gail.com>.
2379         * cpu-amd64.md: Fixed simple bug in machine discrition file.
2381 2009-07-31  Zoltan Varga  <vargaz@gmail.com>
2383         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_IREM_UN_IMM.
2385 2009-08-30  Rodrigo Kumpera  <rkumpera@novell.com>
2387         * method-to-ir.c: Fix naming of stelem and ldelem.
2389 2009-07-30  Zoltan Varga  <vargaz@gmail.com>
2391         * driver.c (main_thread_handler): Check that the assembly loaded
2392         matches the filename when doing AOT.
2394 2009-07-30  Mark Probst  <mark.probst@gmail.com>
2396         * mini.c: get_ip_from_sigctx installer has been removed, so don't
2397         call it anymore.
2399         * mini-x86.h, mini-amd64.h, mini-ppc.h: UCONTEXT macros moved (to
2400         utils/mono-sigcontext.h).
2402         * exceptions-amd64.c: Use the UCONTEXT_GREGS macro instead of an
2403         #ifdef.
2405 2009-07-29  Massimiliano Mantione  <massi@ximian.com>
2407         * mini.c (mono_codegen):
2408         Call profiler hook to keep track of method code buffers.
2410 2009-07-27  Mark Probst  <mark.probst@gmail.com>
2412         * method-to-ir.c: Invoke write barriers for the
2413         Interlocked.(Compare)Exchange JIT intrinsics.
2415 2009-07-26  Raja R Harinath  <harinath@hurrynot.org>
2417         * Makefile.am (version.h): Fix issues when built out of tree.
2418         Remove some redundant 'grep's piped through 'sed's.
2420 Fri Jul 24 17:28:37 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
2422         This patch is contributed under the terms of the MIT/X11 license
2424         * mini-ppc.c (mono_arch_output_basic_block):
2425         (OP_STOREI1_MEMBASE_REG): Handle 32-bit offsets combining addis
2426         for bits 32-47 with signed load/store diplacements for bits
2427         48-63.  Use prefered base/offset order for indexed form.
2428         (OP_STOREI2_MEMBASE_REG, OP_STORE_MEMBASE_REG): Same.
2429         (OP_LOAD_MEMBASE, OP_LOADI4_MEMBASE, OP_LOADU4_MEMBASE,
2430         OP_LOADI1_MEMBASE, OP_LOADU1_MEMBASE, OP_LOADU2_MEMBASE,
2431         OP_LOADI2_MEMBASE): Same.
2432         (OP_STORER8_MEMBASE_REG, OP_LOADR8_MEMBASE,
2433         OP_STORER4_MEMBASE_REG, OP_LOADR4_MEMBASE): Same.
2434         (OP_STOREI1_MEMINDEX): Use prefered base/offset order for
2435         indexed form.
2436         (OP_STOREI2_MEMINDEX, OP_STORE_MEMINDEX): Same.
2437         (OP_LOAD_MEMINDEX, OP_LOADI4_MEMINDEX, OP_LOADU4_MEMINDEX,
2438         OP_LOADU2_MEMINDEX, OP_LOADI2_MEMINDEX, OP_LOADU1_MEMINDEX,
2439         OP_LOADI1_MEMINDEX): Same
2440         (OP_LOADR4_MEMINDEX, OP_LOADR8_MEMINDEX, OP_STORER4_MEMINDEX,
2441         OP_STORER8_MEMINDEX): Same
2442         (OP_JMP): Use addis/addi sequence for int cfg->stack_usage
2443         computations.
2444         (mono_arch_emit_prolog): Handle 32-bit offsets combining addis
2445         for bits 32-47 with signed load/store diplacements for bits
2446         48-63.  Use prefered base/offset order for indexed form.
2448 Fri Jul 24 16:57:12 CEST 2009 Steven Munroe  <munroesj@us.ibm.com>
2450 This patch is contributed under the terms of the MIT/X11 license
2452         * mini-ppc.c: Define PPC_MOVE_FPR_GPR and PPC_ISA_64.
2453         (mono_arch_get_vcall_slot): Fx pointer to int cast warning.
2454         (mono_arch_decompose_opts): Make OP_ICONV_TO_R4 and
2455         OP_ICONV_TO_R8 decompose conditional on !PPC_ISA_64.
2456         (mono_arch_output_basic_block) [OP_JMP]: Use ppc_load32 for
2457         cfg->stack_usage to avoid size warnings.
2458         (mono_arch_output_basic_block) [__mono_ppc64__]: Replace
2459         store/load sequence with mffgpr if PPC_MOVE_FPR_GPR is true.
2460         (mono_arch_output_basic_block) [!__mono_ppc64__]: For
2461         OP_ICONV_TO_R4 or OP_ICONV_TO_R8 and PPC_ISA_64 use fcfid
2462         to convert.
2463         (mono_arch_emit_prolog): Move mono_emit_unwind_op_def_cfa 
2464         after code varible is initialized.
2465         Add g_assert ppc_is_imm16 for ainfo->offset. Handle
2466         ainfo->size == 8 when ainfo->offset !ppc_is_imm16.
2467         (mono_arch_emit_epilog): 
2468         Move Use ppc_load32 for cfg->stack_usage to avoid size
2469         warnings.
2471 2009-07-24  Mark Probst  <mark.probst@gmail.com>
2473         * method-to-ir.c: The write barrier doesn't do the store anymore,
2474         so we have always to emit it.  Also, emit the wbarrier after the
2475         store.
2477 2009-07-24  Zoltan Varga  <vargaz@gmail.com>
2479         * mini-arm.c (mono_arch_get_delegate_invoke_impls): Add a trampoline
2480         for argument count 3 too.
2482 2009-07-23  Zoltan Varga  <vargaz@gmail.com>
2484         * mini.c (mono_jit_compile_method_with_opt): Add an 'ex' argument to let
2485         the caller handle the exceptions.
2486         (mono_jit_runtime_invoke): Handle exceptions thrown while compiling the
2487         method. Fixes #524498.
2489 2009-07-22  Geoff Norton  <gnorton@novell.com>
2491         * mini-exceptions.c: Fix build on ia64.
2493 2009-07-22  Mark Probst  <mark.probst@gmail.com>
2495         * mini-exceptions.c (ves_icall_get_frame_info): Use write
2496         barriers.
2498 2009-07-21  Zoltan Varga  <vargaz@gmail.com>
2500         * mini-arm.c (mono_arch_emit_prolog): Fix thread attaching in aot
2501         code.
2503 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
2505         * basic-simd.cs (Main): Pass args to the test driver.
2507 2009-07-20  Geoff Norton  <gnorton@novell.com>
2509         * mini-x86.h: Fix the x86 version guards to use Apple's
2510         properly defined macros.
2512 2009-07-20  Geoff Norton  <gnorton@novell.com>
2514         * mini-x86.c: Fix --trace on darwin-x86 and other systems which require
2515         aligned access.
2517 2009-07-20  Zoltan Varga  <vargaz@gmail.com>
2519         * mini.c (mono_jit_runtime_invoke): Speed this up by adding a hash to
2520         MonoJitDomainInfo which maps MonoMethod's to a structure containing all
2521         the information which is needed for invokes, so only one locking+hash table
2522         lookup is needed.
2524         * aot-compiler.c: Add a 'tool-prefix' option to be used when cross-compiling.
2525         
2526         * aot-compiler.c (add_generic_instances): Emit instances of 
2527         GenericComparer<T> for primitive types.
2529 2009-07-19 Rodrigo Kumpera  <rkumpera@novell.com>
2531         * mini-posix.c: Fix linux build.
2533 2009-07-19  Geoff Norton  <gnorton@novell.com>
2535         * mini.h: Add prototypes for mono_runtime_syscall_fork and
2536         mono_gdb_render_native_backtraces
2537         * mini-darwin.c: Apple's syscall(SYS_fork) is very weird on x86,
2538         so we implement the sane semantics to the runtime here
2539         (mono_gdb_render_native_backtraces).  Apple also uses an ancient gdb
2540         so we need to call it differently (mono_gdb_render_native_backtraces)
2541         * mini-posix.c: Move the old semantics from mini.c to the prototypes
2542         here for default implementations.
2543         * mini.c: Refactor mono_handle_native_sigsegv so that we can properly
2544         support Apple's weird syscall (SYS_fork) implementation and not busy
2545         loop in abort() on native crashes on OSX anymore.
2547 2009-07-18  Zoltan Varga  <vargaz@gmail.com>
2549         * aot-runtime.c (load_method): Change the handling of the
2550         MONO_LASTAOT env variable so MONO_LASTAOT=0 means that no aot methods
2551         are used.
2553         * mini.c (mono_patch_info_equal): Really fix the handling of RGCTX_FETCH.
2555 2009-07-17  Zoltan Varga  <vargaz@gmail.com>
2557         * mini.c (mono_patch_info_equal): Revert the last change for now as it
2558         seems to break the aot tests.
2559         
2560         * mini.c (mono_patch_info_equal): Fix the handling of 
2561         MONO_PATCH_INFO_RGCTX_FETCH.
2563 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
2565         * unwind.c: Use TARGET_AMD64 instead of __x86_64__.
2567         * mini.c (mono_patch_info_hash): Fix the handling of 
2568         MONO_PATCH_INFO_INTERNAL_METHOD.
2569         (mono_patch_info_equal): Ditto.
2571 2009-07-16  Zoltan Varga  <vargaz@gmail.com>
2573         * mini-llvm.c (mono_llvm_emit_method): Use module instead of ctx->module
2574         in a few places.
2575         
2576         * mini-llvm.c: Add some infrastructure for AOT support.
2578 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
2580         * mini-llvm-cpp.c: Update to the latest llvm api.
2581         
2582         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Set the EnablePrettyStackTrace
2583         option to false to prevent llvm from installing signal handlers which
2584         trip up the gc.
2585         
2586 2009-07-15 Rodrigo Kumpera  <rkumpera@novell.com>
2588         * cpu-x86.md:
2589         * cpu-amd64.md: Revert previous change as those instructions
2590         take 2 separate arguments. Remember to read the arch docs more
2591         carefully next time.
2593 2009-07-15  Zoltan Varga  <vargaz@gmail.com>
2595         * mini-llvm-cpp.cpp (mono_llvm_build_alloca): Update to latest llvm api.
2597 Wed Jul 15 17:20:27 CEST 2009 Paolo Molaro <lupus@ximian.com>
2599         * mini-ppc.c: exploit multiple load/store units if available (rest of
2600         the change from Steven Munroe (<munroesj@us.ibm.com>) first patch at 
2601         http://bugzilla.novell.com/show_bug.cgi?id=487846).
2603 Wed Jul 15 16:24:57 CEST 2009 Paolo Molaro <lupus@ximian.com>
2605         * mini-ppc.c: integrate most of Steven Munroe (<munroesj@us.ibm.com>)
2606         first patch at http://bugzilla.novell.com/show_bug.cgi?id=487846.
2608 2009-07-14 Rodrigo Kumpera  <rkumpera@novell.com>
2610         * cpu-x86.md: Fix missing clobbering from trancendental simd
2611         ops.
2613         * cpu-amd64.md: Same.
2615 2009-07-14 Jerry Maine <crashfourit@gmail.com>
2617         Contributed under the terms of the MIT/X11 license by
2618         Jerry Maine <crashfourit@gail.com>.
2620         * basic-simd.cs: Added tests for single and doulble indexers.
2622         * cpu-amd64.md: Added simd opcode information.
2624         * mini-amd64.c: Added IR to native simd generation code.
2625         Added simd register names and function that returns them.
2627         * mini-amd64.h: Added marcos to turn on simd code compilation in
2628         amd64. Added max simd register count marco. Added caller/callee
2629         register mask marcos. Added marcos to use simd register bank.
2631         * mini.h: Added helper marco for shufling dwords and simple
2632         floats.
2634 2009-07-14  Zoltan Varga  <vargaz@gmail.com>
2636         * mini-llvm-cpp.cpp: Update to latest llvm SVN api.
2638         * Makefile.am (mono_LDADD): Pass LLVM_LDFLAGS to the linked.
2640         * unwind.c (mono_unwind_get_ops_from_fde): Make this return
2641         the length of the native code as well.
2643         * basic-simd.cs: Add a test for #521662.
2645 Mon Jul 13 17:58:50 CEST 2009 Paolo Molaro <lupus@ximian.com>
2647         * mini-ppc.c: fixed bug introduced by Steven's TLS changes.
2649 2009-07-13  Mark Probst  <mark.probst@gmail.com>
2651         * mini.c: Register function for getting the IP from a signal
2652         context with metadata.
2654 2009-07-13  Zoltan Varga  <vargaz@gmail.com>
2656         * method-to-ir.c (mono_method_to_ir): When calling a gshared method,
2657         call a generic class init trampoline if needed. Fixes #519336.
2659         * generics.cs: Add a test.
2660         
2661 2009-07-09  Mark Probst  <mark.probst@gmail.com>
2663         * method-to-ir.c: When doing a call which might be remote from
2664         shared generic code to other shared code with open type arguments,
2665         get the remoting invoke wrapper from the RGCTX and do an indirect
2666         call to it.
2668 2009-07-03  Zoltan Varga  <vargaz@gmail.com>
2670         * mini-trampolines.c (get_unbox_trampoline): Add an rgctx trampoline
2671         after the unbox trampoline in the full-aot case.
2673 2009-07-02  jonas echterhoff <jonas@unity3d.com>
2674         
2675         * mini.c: Move initialization of jit_mutex before debugger initialization
2676         
2677         to avoid crashes.
2678         
2679         
2680         * Info.plist: added Info.plist and link flag to enable the mono executable
2681         to access other processes. Requires codesigning of the executable to work.
2682         
2683         * mdb-debug-info32-darwin.s: The same as mdb-debug-info32.s, changed to 
2684         
2685         compile on OS X.
2686         
2688 2009-06-30  Zoltan Varga  <vargaz@gmail.com>
2690         * driver.c (mini_regression): Handle loading errors. Fixes #508869.
2692 2009-06-29  Zoltan Varga  <vargaz@gmail.com>
2694         * mini-exceptions.c (get_generic_context_from_stack_frame): Fix the case
2695         when the generic instance is an instantiation of a subclass of the
2696         methods class. Fixes #517166.
2698 2009-06-26  Zoltan Varga  <vargaz@gmail.com>
2700         * mini-amd64.c (mono_arch_emit_prolog): Fix thread attaching in AOTed
2701         code.
2703         * mini.c (mono_jit_thread_attach): Allow domain to be NULL for calls from
2704         AOTed code.
2706         * CMakeLists.txt: Add minimal support for installation.
2708 2009-06-25  Zoltan Varga  <vargaz@gmail.com>
2710         * aot-compiler.c (emit_and_reloc_code): Factor out the code to
2711         determine whenever a method is directly callable to a separate function.
2713         * mini-<ARCH>.c tramp-<ARCH>.c: Remove needless casts and add new
2714         needed ones as a result of the previous change.
2716         * mini-<ARCH>.c tramp-<ARCH>.c: Use mgreg_t* as the
2717         type of register arrays.
2719         * mini-trampolines.c tramp-<ARCH>.c aot-runtime.c: Use mgreg_t* as the
2720         type of register arrays.
2722 2009-06-24  Jerry Maine  <crashfourit@gmail.com>
2723         
2724         Contributed under the terms of the MIT/X11 license by
2725         Jerry Maine <crashfourit@gail.com>.
2727         * mini-amd64.c: Added code to convert simd IR to native amd64 sse.
2729 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
2731         * aot-compiler.c (emit_plt): Define debug labels for most plt entries.
2733 2009-06-24  Neale Ferguson <neale@sinenomine.net>
2735         * mini-s390x.c: Correct LCONV_TO_Ix and ICONV_TO_Ix routines. Fix leave_method
2736         dump of structure return value. Fix some formatting.
2737         * cpu-s390x.md: Fix lengths of instruction sequences.
2738         * mini-s390.c: Minor formatting changes.
2740 2009-06-24  Zoltan Varga  <vargaz@gmail.com>
2742         * mini-x86.h: Applied patch from Romain Tartiere (romain@blogreen.org).
2743         Use sigaction on freebsd as well.
2745 2009-06-23  Zoltan Varga  <vargaz@gmail.com>
2747         * mini.h: Don't define MONO_ARCH_HAVE_TLS_GET to 0, as some code
2748         uses #ifdef on it.
2749         
2750         * mini.c (mini_init): Revert a change which breaks cross-compilation.
2752 2009-06-22  Mark Probst  <mark.probst@gmail.com>
2754         * mini-ppc.c, cpu-ppc.md: Enable TLS on Darwin/G4.
2756 2009-06-22  Mark Probst  <mark.probst@gmail.com>
2758         * mini.c, mini.h: Tell the runtime whether we support MONO_TLS.
2760 2009-06-20  Martin Baulig  <martin@ximian.com>
2762         * debug-mini.c
2763         (MonoDebuggerThreadFlags): New enum typedef.
2764         (MonoDebuggerThreadInfo): Added `guint32 thread_flags'.
2765         (mono_debugger_thread_created): Added `gpointer func' argument;
2766         initialize the new `thread_flags' field.
2768 2009-06-18  Martin Baulig  <martin@ximian.com>
2770         * debug-debugger.h (MonoDebuggerRuntimeFlags): New enum typedef.
2771         (MonoDebuggerInfo): Renamed the `dummy' field info `runtime_info'.
2773         * debug-debugger.c
2774         (mini_debugger_set_attach_ok): New function; sets the attach-ok
2775         flag in `MONO_DEBUGGER__info.runtime_info'.
2777         * driver.c
2778         (mono_main): Call mini_debugger_set_attach_ok() if generics
2779         sharing is disabled.
2781 2009-06-22  Zoltan Varga  <vargaz@gmail.com>
2783         * aot-compiler.c (add_wrappers): Fix a warning.
2785         * mini-ppc.c tramp-ppc.c exceptions-ppc.c aot-compiler.c: Update after
2786         the ppc load/store macro changes.
2788 2009-06-21  Zoltan Varga  <vargaz@gmail.com>
2790         * tramp-ppc.c (mono_arch_patch_plt_entry): Implement this.
2792         * aot-compiler.c (mono_compile_assembly): Sanitize the plt symbol too,
2793         not just the got symbol.
2795         * mini-ppc.c aot-compiler.c unwind.c: Implement generation of unwind info
2796         on ppc.
2798         * aot-compiler.c unwind.c: Add infrastructure for unwind support on
2799         ppc.
2800         
2801         * aot-compiler.c: Remove some fixmes.
2803         * driver.c (mono_main): Print a helpful message when cross-compiling.
2805         * mini.c (mini_init): Disable signal handlers when cross-compiling.
2807         * method-to-ir.c (initialize_array_data): Do the optimization if the
2808         target byte order is little endian, instead of the host byte order.
2810         * aot-compiler.c: Emit sizes for most symbols, only emit runtime-invoke
2811         wrappers into the mscorlib image, Emit a unique plt symbol for each
2812         image, emit symbols for plt entries.
2814         * image-writer.c (img_writer_emit_symbol_size): New function to emit
2815         a .size directive.
2816         
2817 2009-06-20  Zoltan Varga  <vargaz@gmail.com>
2819         * aot-compiler.c (add_wrappers): Avoid calling 
2820         mono_marshal_get_type_info () since it can assert for some types.
2822         * method-to-ir.c (mono_method_to_ir): Disable aot when some forms of 
2823         ldtoken are used inside wrappers.
2825         * helpers.c: Add support for prefixing tools with the arch name.
2827         * mini.h (OP_LOADR_MEMBASE): New opcodes to load/store pointer sized
2828         quantities when using ilp32.
2830         * mini-codegen.c: Use OP_LOADR_MEMBASE/OP_STORER_MEMBASE for loading/storing
2831         spill slots. Use sizeof(mgreg_t) for the spill slot size.
2833         * image-writer.c: Use .long on ilp32.
2835         * aot-compiler.c: Use 32 bit loads on ilp32.
2836         
2837 2009-06-19  Zoltan Varga  <vargaz@gmail.com>
2839         * tramp-ppc.c (mono_arch_create_trampoline_code): Fix the ppc build.
2841         * mini-ops.h: Use TARGET_POWERPC define for consistency.
2843         * patch-info.h: Add 'MSCORLIB_GOT_ADDR' patch type.
2845         * aot-compiler.c aot-runtime.c: Put the mscorlib got address into the 
2846         second got slot of every aot image.
2847         
2848         * aot-compiler.c aot-runtime.c mini-trampolines.c: Add support for
2849         aot on platforms with function pointers.
2851         * mini-ppc.h mini-ppp.c cpu-ppc.md exceptions-ppc.c tramp-ppc.c: Add
2852         support for aot/full aot on ppc/ppc64.
2853         
2854         * tramp-<ARCH>.c (mono_arch_patch_plt_entry): Add 'got' and 'regs'
2855         arguments which are needed on ppc.
2857         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Add 'regs'
2858         argument.
2860         * mini-trampolines.c aot-runtime.c: Update after the above changes.
2861         
2862         * liveness.c (BITS_PER_CHUNK): Use MONO_BITSET_BITS_PER_CHUNK.
2864         * regalloc2.c (BITS_PER_CHUNK): Ditto.  
2866         * aot-compiler.c (emit_got_info): Fix reading unused memory.
2868         * ir-emit.h (alloc_dreg): Add a 'return -1' to quiet some compilers.
2870 2009-06-17  Geoff Norton  <gnorton@novell.com>
2872         * aot-compiler.c: Ensure we dont try to close a null dwarf writer.
2874 2009-06-17  Zoltan Varga  <vargaz@gmail.com>
2876         * dwarfwriter.c (mono_dwarf_writer_create): Add an 'appending' parameter
2877         to control whenever the dwarf writer is in xdebug or aot mode.
2878         (emit_class_dwarf_info): Use a separate abbrev for structures without
2879         children.
2881         * aot-compiler.c: Pass the appending parameter to 
2882         mono_dwarf_writer_create ().
2884         * branch-opts.c (mono_merge_basic_blocks): Fix the case when bbn
2885         falls through to its next bblock. Fixes #513931.
2887         * iltests.il: Add a test.
2889         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Emit some line number
2890         infor even if emit_line is FALSE, as the apple linker seems to require it.
2892         * image-writer.c (asm_writer_emit_symbol_diff): Call get_label ().
2894         * dwarfwriter.c (emit_cie): Emit a separate symbol for the cie start, as
2895         gcc does.
2896         (emit_fde): Ditto.
2898 2009-06-15  Zoltan Varga  <vargaz@gmail.com>
2900         * exceptions-mips.c (mono_arch_get_throw_exception_by_name): Fix the
2901         mips build.
2903 2009-06-13  Zoltan Varga  <vargaz@gmail.com>
2905         * mini.h (struct MonoBasicBlock): Add 'has_jump_table' and 
2906         'has_call_handler' fields.
2908         * method-to-ir.c (mono_method_to_ir): Set them if needed.
2910         * branch-opts.c (mono_merge_basic_blocks): Avoid iterating through the
2911         first bblock if not needed. Fixes #512790.
2912         
2913 2009-06-11  Zoltan Varga  <vargaz@gmail.com>
2915         * aot-compiler.c (mono_compile_assembly): Fix a warning.
2916         
2917         * aot-compiler.c (add_wrappers): Don't emit remoting-invoke-with-check
2918         wrappers.
2920         * aot-runtime.c (mono_aot_get_method): Use the original method's code for
2921         remoting-invoke-with-check wrappers, which are not needed when running with
2922         full-aot, since it doesn't support remoting.
2923         
2924 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
2926         * aot-compiler.c (emit_got_info): Don't emit offsets for the plt got entries.
2928         * aot-compiler.c aot-runtime.c: Don't emit the first got offset in the
2929         method info, it is not used anymore.
2931         * mini.h: Bump AOT file format version.
2932         
2933         * aot-compiler.c (arch_emit_plt_entry): Make the arm plt entries one
2934         word smaller.
2936         * aot-runtime.c (mono_aot_get_plt_info_offset): Update after the
2937         change above.
2938         
2939         * tramp-arm.c (mono_arch_patch_plt_entry): Ditto.
2941         * mini.h: Bump AOT file format version.
2942         
2943 2009-06-10  Zoltan Varga  <vargaz@gmail.com>
2945         * image-writer.c (asm_writer_emit_symbol_diff): Disable the 
2946         TARGET_ASM_APPLE stuff for now, as it doesn't seem to work on the
2947         iphone.
2949         * mini-arm.c (mono_arch_output_basic_block): Fix the implementation
2950         of CKFINITE and FBGE for VFP.
2952 2009-06-09  Zoltan Varga  <vargaz@gmail.com>
2954         * aot-compiler.c: Don't align code to 16 bytes on arm.
2955         
2956         * aot-compiler.c (emit_method_code): Emit the unbox trampolines right
2957         before the methods they belong to.
2959         * aot-runtime.c (mono_aot_plt_resolve): Avoid creating trampolines in
2960         the full-aot case if possible, since the trampoline will be called right 
2961         away.
2963         * aot-compiler.c (mono_compile_assembly): Decrease the number of full aot
2964         trampolines to 1024 after the change above.
2966         * aot-compiler.c (arch_emit_specific_trampoline): Rework the arm
2967         trampoline to save 8 bytes per trampoline.
2969         * tramp-arm.c (mono_arch_create_trampoline_code_full): Update after the
2970         change above.
2972 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
2974         * aot-compiler.c: Use acfg->temp_prefix instead of .L to prefix labels.
2976 2009-06-08  Martin Baulig  <martin@ximian.com>
2978         * debug-mini.c
2979         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
2980         (_mono_debugger_throw_exception): Don't make this static.
2981         (_mono_debugger_unhandled_exception): Likewise.
2982         (mono_debugger_handle_exception): Moved to mini-exceptions.c
2984         * debug-mini.c
2985         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
2986         (_mono_debugger_throw_exception): Add function prototype.
2987         (_mono_debugger_unhandled_exception): Likewise.
2989         * mini-exceptions.c
2990         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
2991         arg; return the first exception handler if the exception is caught
2992         and we're running inside the debugger.
2993         (mono_debugger_handle_exception): Moved here from debug-mini.c;
2994         improve exception handle inside runtime-invoke, check whether the
2995         exception is actually caught in the method being invoked and not
2996         by the runtime-invoke-wrapper.
2998 2009-06-08  Zoltan Varga  <vargaz@gmail.com>
3000         * image-writer.c: Improve support for the osx assembler.
3002         * dwarfwriter.c: Avoid the usage of subsections if the assembler doesn't
3003         support them.
3005 2009-06-08  Martin Baulig  <martin@ximian.com>
3007         * debug-mini.c
3008         (MonoDebuggerExceptionAction): Moved into debug-mini.h.
3009         (_mono_debugger_throw_exception): Don't make this static.
3010         (_mono_debugger_unhandled_exception): Likewise.
3011         (mono_debugger_handle_exception): Moved to mini-exceptions.c
3013         * debug-mini.c
3014         (MonoDebuggerExceptionAction): Moved here from debug-mini.c.
3015         (_mono_debugger_throw_exception): Add function prototype.
3016         (_mono_debugger_unhandled_exception): Likewise.
3018         * mini-exceptions.c
3019         (mono_handle_exception_internal): Added `MonoJitInfo **out_ji'
3020         arg; return the first exception handler if the exception is caught
3021         and we're running inside the debugger.
3022         (mono_debugger_handle_exception): Moved here from debug-mini.c;
3023         improve exception handle inside runtime-invoke, check whether the
3024         exception is actually caught in the method being invoked and not
3025         by the runtime-invoke-wrapper.
3027 2009-06-07  Zoltan Varga  <vargaz@gmail.com>
3029         * image-writer.c (append_subsection): Don't align subsections of the
3030         debug_line section as a workaround.
3032         * dwarfwriter.c: Emit line number info in the AOT case as well.
3034 2009-06-06  Steven Munroe  <munroesj@us.ibm.com>
3036         This patch is contributed under the terms of the MIT/X11 license
3038        * mini-ppc.c (mono_arch_emit_exceptions): Change assert to
3039        code_len <= code_size
3041 2009-06-06  Zoltan Varga  <vargaz@gmail.com>
3043         * mini-mips.c (mips_emit_exc_by_name): Fix the mips build.
3045 2009-06-04  Zoltan Varga  <vargaz@gmail.com>
3047         * aot-compiler.c aot-runtime.c: Delete references to static rgctx
3048         invoke wrappers, we now use trampolines instead.
3050 2009-06-04  Mark Probst  <mark.probst@gmail.com>
3052         * mini-darwin.c: The exception thread must not be registered with
3053         the GC.
3055 2009-06-04  Mark Probst  <mark.probst@gmail.com>
3057         * mini-gc.c: Disable the code because it makes SGen crash.
3059 2009-06-03  Zoltan Varga  <vargaz@gmail.com>
3061         * aot-compiler.c (mono_compile_assembly): Handle file open errors gracefully
3062         instead of asserting.
3064 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
3066         * aot-compiler.c (mono_compile_assembly): Move the creation of the
3067         output file after the code has been compiled.
3069 2009-05-30  Zoltan Varga  <vargaz@gmail.com>
3071         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Fix 64 bit support.
3073 2009-05-31  Zoltan Varga  <vargaz@gmail.com>
3075         * aot-compiler.c aot-runtime.c: Get rid of the shared/non-shared got
3076         entries distinction to simplify the code.
3078         * mini.h: Bump AOT file format version.
3079         
3080 2009-05-28  Zoltan Varga  <vargaz@gmail.com>
3082         * objects.cs: Fix the signature of one of the tests.
3084         * mini.c (mini_create_ftnptr): New helper function, moved here from
3085         object.c.
3086         (mini_get_addr_from_ftnptr): Ditto.
3087         (mini_init): Install the new helpers.
3089 2009-05-28  Martin Baulig  <martin@ximian.com>
3091         Correctly initialize the debugger when embedding Mono.
3093         * mdb-debug-info32.s, mdb-debug-info64.s: Add a global variable
3094         `MONO_DEBUGGER__using_debugger' to the `.mdb_debug_info' section;
3095         see documentation in mini_debug_running_inside_mdb().
3097         * debug-debugger.c
3098         (mini_debug_running_inside_mdb): New function to check whether
3099         we're running inside mdb.
3101         * mini.c (mini_init): Call mini_debugger_init() if we're running
3102         inside the debugger.
3104         * driver.c (mono_main): Moved the call to mini_debugger_init()
3105         into mini_init() to make this work when embedding Mono.
3107         * debug-debugger.c (mini_debugger_init): Warn about duplicate
3108         calls to mini_debugger_init().
3110         * mini.h: Rename mono_debugger_init() -> mini_debugger_init(),
3111         mono_debugger_main() -> mini_debugger_main() and put them inside a
3112         `MONO_DEBUGGER_SUPPORTED' conditional.
3114 2009-05-26 Rodrigo Kumpera  <rkumpera@novell.com>
3116         * mini-trampolines.c: Kill mono_find_delegate_trampoline_by_addr as
3117         this is no longer in use.
3118         * mini.h: Same.
3120 2009-05-26  Zoltan Varga  <vargaz@gmail.com>
3122         * mini-sparc.c (add_outarg_load): Fix the sparc build.
3124         * aot-compiler.c (emit_method_code): Always write out C style symbols for
3125         methods.
3127 2009-05-27  Martin Baulig  <martin@ximian.com>
3129 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
3131         * mini-x86.c (mono_arch_output_basic_block): Fix the precision of
3132         long_conv_to_r_un to 64 bits.
3134         * cpu-x86.md: Increase the instruction size due to the changes.
3136         * iltests.il.in: Add regression test.
3138         Fixes #467201.
3140 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
3142         * objects.cs: Move the previous test from basic.cs to here.
3144 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
3146         * basic.cs: Add regression test for #506915.
3148 2009-05-25 Rodrigo Kumpera  <rkumpera@novell.com>
3150         * method-to-ir.c (mono_method_to_ir): When doing the ldobj+stobj
3151         optimization we must check the bb of the first byte of stobj as
3152         it's the only one set in cil_offset_to_bb.
3154         Fixes #506915.  
3156 2009-05-25  Zoltan Varga  <vargaz@gmail.com>
3158         * image-writer.c: Fix pointer directive on ppc64.
3160 2009-05-24  Zoltan Varga  <vargaz@gmail.com>
3162         * image-writer.c (asm_writer_emit_section_change): Avoid using
3163         .bss subsections on ppc too.
3165 2009-05-23  Zoltan Varga  <vargaz@gmail.com>
3167         * image-writer.c: Fix the definition of TARGET_ASM_....
3168         
3169         * image-writer.c: Fix the emission of assembler directives in the last
3170         change.
3172         * mini-ppc.c (mono_arch_emit_exceptions): Increase the size of the
3173         exception throwing code to accomodate ppc64.
3175         * tramp-ppc.c (mono_arch_get_nullified_class_init_trampoline): Increase the
3176         size to work on ppc64 too.
3178         * mini-ppc.h (MonoCompileArch): Enable static rgctx trampolines on ppc64
3179         too.
3181         * image-writer.c: Clean up the #ifdef hell a bit by adding defines for
3182         the assembler dialect instead of using platform specific defines.
3184 2009-05-22  Geoff Norton  <gnorton@novell.com>
3186         * mini-arm.c (get_call_info): If a structure is split between the stack
3187         and argument registers, we should not advance the stack pointer by the entire
3188         native size, but just by the amount that spilled.
3190 2009-05-22  Zoltan Varga  <vargaz@gmail.com>
3192         * mini-arm.c (get_call_info): Handle structures with alignment requirements
3193         correctly.
3195 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
3197         * aot-compiler.c (emit_extra_methods): Encode direct runtime invoke
3198         wrappers normally.
3199         
3200         * aot-compiler.c (add_extra_method): Fix up the collection of extra
3201         methods so wrapper don't get added twice.
3202         (add_generic_instances): Don't add methods of arrays.
3204         * generics.cs: Mark one test as !FULLAOT.
3206 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
3208         * mini-x86.c (emit_move_return_value): Remove unused vars.
3210 2009-05-21 Rodrigo Kumpera  <rkumpera@novell.com>
3212         * mini-x86.c (mono_arch_emit_call): The decompose code now supports
3213         decomposing 8 bytes structs into a LCALL.
3215         * mini-x86.c (emit_move_return_value): We no longer push the vtype
3216         pointer for where to store the returned regs.
3218         * decompose.c (mono_decompose_vtype_opts): Fix the comment to properly
3219         state the concern.
3221         Fixes #471747, #471751 and #4734530 (in fact, it's a bunch of dups).
3223 2009-05-20  Miguel de Icaza  <miguel@novell.com>
3225         * aot-runtime.c (mono_aot_init): Use g_getenv to work on systems
3226         without getenv.
3228 2009-05-21  Zoltan Varga  <vargaz@gmail.com>
3230         * aot-compiler.c (add_wrappers): Add StructureToPtr/PtrToStructure wrappers.
3232         * basic.cs: Move the test_2_cprop_bug () test to generics.cs as it involves
3233         generics.
3235 2009-05-20 Rodrigo Kumpera  <rkumpera@novell.com>
3237         * local-propagation.c (mono_local_cprop): Avoid local propagation
3238         across paired add/sub if the first instruction dest reg is it's
3239         source reg. For example:
3241         int_add_imm R12 <- R12 [1] clobbers: 1
3242         int_sub_imm R42 <- R12 [1] clobbers: 1
3244         The cprop pass would wrongly const prop + 1 to int_sub_imm which doesn't
3245         maintain the math identify.
3247         Fixes #505375.
3249 2009-05-20  Andreia Gaita  <avidigal@novell.com>
3251         * Makefile.am: avoid going on the network just to get the revision,
3252         use git log instead
3254 2009-05-19  Massimiliano Mantione  <massi@ximian.com>
3256         Fixed estimate for short branches on amd64 (they were off mark, and
3257         enabling call prolog-epilog instrumentations caused assertions).
3258         * mini.h (struct MonoBasicBlock): added max_length field to hold the
3259         estimate for the maximum length of this basic block.
3260         * mini-amd64.c:
3261         - mono_arch_emit_prolog: compute max_length for each basic block
3262           (instead of max_offset), and inflate size estimate also for entry bb
3263           in case of code instrumentation.
3264         - mono_arch_output_basic_block: get rid of "cpos" (the current
3265           estimated "position" in the code), and always use "offset" instead,
3266           which is accurate; at the beginning of the function quickly recompute
3267           max_offset for all the remaining blocks, starting from the current
3268           cfg->code_len (which is correct, and not estimated) and using the
3269           estimated block lengths computed previously.
3271 2009-05-17  Zoltan Varga  <vargaz@gmail.com>
3273         * exceptions-ppc.c: Remove the caching from the trampoline creation 
3274         functions, it is already done in the caller.
3276         * mini-trampolines.c (mono_llvm_vcall_trampoline): Fix the llvm build.
3278         * mini-ppc.h mini-arm.h mini-x86.h mini-amd64.h: Add 
3279         MONO_ARCH_GSHARED_SUPPORTED define.
3281         * mini.c (mini_init): Use the MONO_ARCH_GSHARED_SUPPORTED define.
3283         * mini-arm.c mini.c: Get rid of the unused mono_arch_fixup_jinfo ()
3284         function.
3286 2009-05-16  Zoltan Varga  <vargaz@gmail.com>
3288         * jit-icalls.c (mono_helper_compile_generic_method): Get rid of the 
3289         call to mono_marshal_get_rgctx_invoke ().
3291         * mini.c method-to-ir.c mini-trampolines.c: Get rid of the usage of
3292         mono_marshal_get_static_rgctx_invoke (), all platforms which support
3293         gshared use the static rgctx trampolines now.
3294         
3295         * mini.c (mini_init): Call mono_set_generic_sharing_supported () if the
3296         platform supports it.
3298 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
3300         * mini-arm.c (mono_arch_allocate_vars): Correctly save R5 when using AOT.
3302         * aot-compiler.c (emit_method_code): Avoid duplicate labels for methods.
3304 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
3306         * mini-ppc.c (mono_arch_emit_exceptions): Nullify the processed patches.
3308         * tramp-ppc.c (mono_arch_nullify_class_init_trampoline): Implement this
3309         for ppc.
3311 2009-05-15  Massimiliano Mantione  <massi@ximian.com>
3313         Made it possible for mono_arch_instrument_epilog to preserve
3314         argument registers, otherwise instrumenting the "epilogue" before
3315         a tail call would clobber them.
3316         * mini.h: Added "mono_arch_instrument_epilog_full" prototype, which
3317         if like mono_arch_instrument_epilog but with an additional parameter
3318         that states if argument registers must be preserved.
3319         * mini.c: implemented mono_arch_instrument_epilog as a call to
3320         mono_arch_instrument_epilog_full without asking to preserve argument
3321         registers (this makes the existing code work as usual).
3322         * mini-amd64.c:
3323         - mono_arch_instrument_epilog: add parameter to transform it into
3324         mono_arch_instrument_epilog_full, and preserve argument registers
3325         when required.
3326         - mono_arch_output_basic_block, OP_TAILCALL case: call
3327         mono_arch_instrument_epilog_full.
3328         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
3329         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-x86.c:
3330         only transformed mono_arch_instrument_epilog into
3331         mono_arch_instrument_epilog_full.
3333 2009-05-15  Geoff Norton  <gnorton@novell.com>
3335         * mini-darwin.c: This works on arm now.
3337 2009-05-14  Geoff Norton  <gnorton@novell.com>
3339         * jit.h, driver.c: Allow full-aot to be decided programatically by the
3340         embedding api.
3342 2009-05-15  Zoltan Varga  <vargaz@gmail.com>
3344         * aot-compiler.c (emit_method_code): Skip a few more characters in the debug
3345         label names.
3347         * mini-trampolines.c (mono_magic_trampoline): Handle static rgctx invoke
3348         wrappers during full aot mode correctly.
3350         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle shared generic
3351         methods correctly.
3353         * aot-compiler.c (mono_aot_method_hash): Use our internal version of
3354         mono_metadata_type_hash ().
3356 2009-05-14  Massimiliano Mantione  <massi@ximian.com>
3358         * mini.h, mini-codegen.c, mini-alpha.c, mini-amd64.c, mini-arm.c,
3359         mini-hppa.h, mini-hppa.c, mini-ia64.c, mini-mips.h, mini-mips.c,
3360         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c, mini-886.c:
3361         Removed MONO_INST_BRLABEL from the instruction flags, and the
3362         remaining code that used it, because we do not support branches inside
3363         basic blocks (and branch target labels) anymore.
3364         * Makefile.am: As part of the above cleanup, remove reference to
3365         BURG files which don't exist anymore.
3367 2009-05-14  Zoltan Varga  <vargaz@gmail.com>
3369         * image-writer.c (asm_writer_emit_local_symbol): Make this a nop on
3370         osx.
3372         * mini-mips.c mini-mips.h exceptions-mips.c: Transition the mips backend
3373         to use mono_arch_throw_corlib_exception.
3375         * mini-ppc.c mini-ppc.h exceptions-ppc.c: Use 
3376         mono_arch_throw_corlib_exception for throwing corlib exceptions.
3378         * aot-runtime.c (decode_patch): Allocate the data for R4/R8 from the
3379         domain mempool.
3381         * mini.c (mono_patch_info_dup_mp): Copy the table of switch targets too.
3383         * aot-compiler.c: Emit a local symbol prefixed with the assembly name 
3384         for the got to make debugging easier and to avoid confusing it with the
3385         system got.
3386         
3387         * aot-compiler.c (emit_method_code): Emit a C style symbol for each
3388         method so a breakpoint can be set when using gdb.
3390 2009-05-13  Zoltan Varga  <vargaz@gmail.com>
3392         * aot-compiler.c (mono_aot_method_hash): Implement this properly based
3393         on mono_method_get_imt_slot ().
3395         * aot-runtime.c (find_extra_method_in_amodule): Get rid of the
3396         num_decodes variables.
3398         * aot-compiler.c (mono_aot_method_hash): Revert part of the last
3399         change as it doesn't seem to work.
3400         
3401         * aot-compiler.c (mono_aot_method_hash): Improve the hashing of
3402         wrappers.
3404 2009-05-12  Zoltan Varga  <vargaz@gmail.com>
3406         * aot-compiler.c mini.c mini-amd64.h mini-arm.h: Kill 
3407         MONO_ARCH_FULL_AOT_IMT_SUPPORTED define, both platforms now support imt.
3409         * mini.c (mini_init): Install mono_aot_get_imt_thunk as the IMT thunk
3410         builder when using full aot.
3412         * mini-amd64.c (mono_arch_build_imt_thunk): Don't handle the full-aot case
3413         here, it is already handled.
3414         
3415         * mini-arm.c (mono_arch_emit_imt_argument): Pass the dynamic imt arg
3416         correctly for IMT.
3418         * aot-compiler.c (arch_emit_imt_thunk): Implement this for ARM.
3420         * mini-arm.h: Enable IMT for full aot.
3421         
3422         * aot-compiler.c (mono_compile_assembly): Don't emit imt thunk if the
3423         arch doesn't support it.
3425         * mini.c (mini_init): Don't disable IMT for full aot if the
3426         architecture supports it.
3428         * mini.h (MonoAotTrampoline): New enum containing the different types
3429         of 'numerous' trampolines.
3430         (MONO_AOT_FILE_VERSION): Bump this.
3432         * aot-compiler.c aot-runtime.c: Unify the handling of specific and
3433         static rgctx trampolines. Add support for full-aot IMT thunks.
3435         * mini-amd64.h: Enable IMT for full aot.
3437         * TestDriver.cs: Add a CategoryAttribute class and an --exclude option
3438         to exclude tests belonging to a category.
3440         * generics.cs: Mark some tests with a !FULLAOT category.
3442         * Makefile.am (fullaotcheck): Run tests with --exclude !FULLAOT. Include
3443         generics tests.
3445 2009-05-11  Zoltan Varga  <vargaz@gmail.com>
3447         * aot-compiler.c (emit_and_reloc_code): Move the implementation of
3448         MONO_PATCH_INFO_GOT_OFFSET to a separate arch-specific function.
3449         (emit_plt): Fix a warning.
3451 2009-05-10  Zoltan Varga  <vargaz@gmail.com>
3453         * aot-compiler.c aot-runtime.c: Fix the build by moving is_shared_got_patch
3454         back into aot-compiler.c to a place where the other functions shared by
3455         the runtime and aot compiler are.
3456         
3457         * aot-compiler.c aot-runtime.c: Emit the got addr using a separate symbol,
3458         as done previously, instead of in MonoAotFileInfo, since pointers might have
3459         alignment requirements.
3461         * mini.h: Bump AOT file format version.
3463 2009-05-10  Miguel de Icaza  <miguel@novell.com>
3465         * aot-runtime.c (mono_aot_is_shared_got_patch): Move this routine
3466         that is used at runtime from the aot-compiler.c, this makes it
3467         work on setups that remove the AOT compiler from the output
3468         image. 
3470 2009-05-09  Zoltan Varga  <vargaz@gmail.com>
3472         * tramp-ppc.c (mono_arch_get_static_rgctx_trampoline): Implement this for
3473         PPC.
3475         * mini-ppc.h: Enable static rgctx trampolines for ppc.
3477         * mini-<ARCH>.h: Kill the MONO_ARCH_ENABLE_EMIT_STATE_OPT define.
3479         * decompose.c (mono_decompose_long_opts): Move the ppc/sparc specific 
3480         stuff to mono_arch_decompose_long_opts ().
3481         (mono_decompose_opcode): Remove some dead code.
3483 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
3485         * method-to-ir.c (mono_method_to_ir): Fix boostrap of non amd64 builds
3486         cmethod can be null for quite a some reasons.
3488 2009-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
3490         * method-to-ir.c (mono_method_to_ir): Fix non amd64 builds.
3492 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
3494         * aot-compiler.c (arch_emit_got_access): Fix the aot-not-supported build.
3496 2009-05-08  Zoltan Varga  <vargaz@gmail.com>
3498         * method-to-ir.c (mono_emit_call_args): Add a 'tail' flag argument.
3499         (mono_method_to_ir): Use MONO_ARCH_USE_OP_TAIL_CALL macro to determine
3500         whenever to make tail calls using OP_TAIL_CALL. Enable support for tail
3501         calls returning structures by addr on amd64.
3503         * mini-amd64.h (MONO_ARCH_USE_OP_TAIL_CALL): New arch-specific macro.
3505         * iltests.il.in: Restructure the tail call tests a bit.
3506         
3507 2009-05-07  Zoltan Varga  <vargaz@gmail.com>
3509         * aot-compiler.c (add_wrappers): Add remoting-invoke-with-check wrappers
3510         for virtual methods too.
3512 2009-05-06  Raja R Harinath  <harinath@hurrynot.org>
3514         * method-to-ir.c (mono_method_to_ir): Revert change of 2009-05-02
3515         due to regression in verifying System.dll.
3517 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
3519         * debug-mini.c (mono_debugger_method_has_breakpoint): Allow breakpoints
3520         in dynamic methods.
3522         * dwarfwriter.c (emit_class_dwarf_info): Add support for generic
3523         instances.
3525         * aot-compiler.c aot-runtime.c: Use our own hash function instead of
3526         g_str_hash () which can change.
3528         * driver.c (mini_regression): Disable optimizations not supported by
3529         the cpu. Fixes #500019.
3531         * aot-runtime.c (mono_aot_get_unwind_info): Fix the --enable-minimal=aot
3532         build.
3534 2009-05-06  Zoltan Varga  <vargaz@gmail.com>
3536         * mini-llvm.c (mono_llvm_emit_method): Update the OP_TLS_GET implementation
3537         to the latest LLVM code.
3539 2009-05-05  Zoltan Varga  <vargaz@gmail.com>
3541         * genmdesc.pl (load_opcodes): Fix this after the TARGET_... changes.
3543 2009-05-04  Zoltan Varga  <vargaz@gmail.com>
3545         * mini-llvm.c (mono_llvm_emit_method): Implement TLS support on 
3546         x86/amd64.
3548         * aot-compiler.c (encode_patch_list): Simplify this considerably as we are
3549         no longer saving offsets, so just save the patch types along with the other
3550         info.
3551         * aot-runtime.c (load_patch_info): Update after the changes to 
3552         encode_patch_list ().
3553         (decode_got_entry): Removed, merged into load_patch_info ().
3554         (is_shared_got_patch): Removed, call the same function from
3555         aot-compiler.c.
3557         * mini.h: Bump aot file format version.
3558         
3559         * aot-compiler.c aot-runtime.c: Resurrect static linking support. Kill the
3560         half-finished no-dlsym code.
3562         * aot-runtime.c (load_method): Kill the old and bit-rotten use_loaded_code
3563         option.
3565         * mini-<ARCH>.h mini-trampolines.c aot-runtime.c: Kill the 
3566         MONO_ARCH_HAVE_CREATE_TRAMPOLINE_FROM_TOKEN define.
3568 2009-05-02  Zoltan Varga  <vargaz@gmail.com>
3570         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Increase the
3571         buffer length to work with AOT code.
3573         * method-to-ir.c (mono_method_to_ir): Handle loading errors in the
3574         ldfld/stfld opcodes.
3576         * exceptions-x86.c (mono_arch_get_throw_exception_by_name): Simplify this
3577         as it is not used.
3579         * mini-llvm.c mini-x86.c: Implement 32 bit and x86 support.
3581         * ssa.c (mono_ssa_compute): Don't skip I8 values when using LLVM.
3583         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Update to the latest
3584         LLVM API.
3586         * mini.c (mini_method_compile): Set the from_llvm flag in MonoJitInfo
3587         if needed. Don't decompose long operations when using llvm.
3589 2009-05-01  Zoltan Varga  <vargaz@gmail.com>
3591         * aot-compiler.c aot-runtime.c: Use mono_pagesize () instead of the
3592         PAGESIZE constant.
3594         * aot-runtime.c (load_aot_module): Get rid of another mprotect call.
3596 2009-05-03  Martin Baulig  <martin@ximian.com>
3598         * debug-debugger.c (debugger_insert_source_breakpoint): Don't call
3599         mono_debugger_insert_method_breakpoint() since the class init
3600         handler we're inserting at the top of the method already gives us
3601         a notification.
3603 2009-04-30  Zoltan Varga  <vargaz@gmail.com>
3605         * decompose.c (mono_decompose_long_opts): Move the implementation of LNEG
3606         to mono_arch_decompose_long_opts () for x86 and arm.
3608 2009-04-29  Zoltan Varga  <vargaz@gmail.com>
3610         * mini-codegen.c (mono_regstate_alloc_int): Use __x86_64__ instead of
3611         TARGET_AMD64 here.
3613 2009-04-28  Zoltan Varga  <vargaz@gmail.com>
3615         * *.h *.c: Use TARGET_<ARCH> defines instead of __<arch>__ defines in the
3616         JIT code.
3618 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
3620         * aot-runtime.c (mono_aot_create_specific_trampoline): Add a stat for the
3621         number of trampolines used in full-aot mode.
3623         * aot-compiler.c: Add an ntrampolines option to set the number of 
3624         trampolines emitted in full-aot mode.
3626 2009-04-27  Zoltan Varga  <vargaz@gmail.com>
3628         * mini-llvm.c (mono_llvm_emit_method): Implement OP_CHECK_THIS using
3629         a volatile load. Get rid of get_tempname (), llvm assigns names
3630         automatically.
3632         * mini-llvm-cpp.cpp (mono_llvm_build_volatile_load): New instruction
3633         builder function.
3635         * mini-llvm.c (mono_llvm_emit_method): Don't call LLVMGetParam on
3636         a value.
3638         * abcremoval.c (REPORT_ABC_REMOVAL): Don't output messages at verbose
3639         level 1.
3641         * mini-codegen.c (mono_local_regalloc): Prevent sreg1/dreg to be allocated
3642         to the same register as a fixed sreg2. Fixes #497271.
3644         * iltests.il.in: Add a new test.
3646 2009-04-26  Zoltan Varga  <vargaz@gmail.com>
3648         * mini-amd64.c: Use moves instead of pushes for passing arguments on the
3649         stack, since pushes complicate exception handling.
3651         * exceptions-amd64.c (mono_arch_find_jit_info): Don't pop the arguments of
3652         the stack if they are passed using moves.
3654         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add an assert.
3656         * method-to-ir.c (mono_method_to_ir): Disable fast virtual generic methods
3657         when using llvm.
3659         * mini-llvm.c (mono_llvm_emit_method): Call jit icall wrappers, not the 
3660         icalls themselves. Convert arguments of FCOMPARE. Convert the destination
3661         of FMOVE if it is an R4.
3663 2009-04-25  Zoltan Varga  <vargaz@gmail.com>
3665         * mini-ops.h: Add OP_LLVM_OUTARG_VT opcode.
3667         * mini.h (LLVMCallInfo): New structure to store calling convention 
3668         information for the LLVM back end similar to the CallInfo structures in 
3669         the back-ends.
3671         * mini-amd64.c (mono_arch_get_llvm_call_info): New arch function to return
3672         call information in a format usable by LLVM.
3673         (mono_arch_emit_call): Move the LLVM handling code to mono_llvm_emit_call ().
3675         * method-to-ir.c (mono_emit_call_args): Emit calls using 
3676         mono_llvm_emit_call () when compiling using LLVM.
3678         * mini-llvm.c: Implement support for passing/receiving valuetypes. Add
3679         comments to all functions. Fix memory leaks. Add a public init/cleanup
3680         function.
3682         * mini.c: Call the llvm init/cleanup functions in mini_init()/cleanup().
3684         * method-to-ir.c (handle_array_new): Disable llvm when calling the vararg
3685         mono_array_new_va () jit icall.
3686         
3687 Fri Apr 24 16:44:08 CEST 2009 Paolo Molaro <lupus@ximian.com>
3689         * Makefile.am, genmdesc.c, genmdesc.pl: tiny refactor to allow
3690         multiple machine description files to be specified.
3691         * mini-ops.h: fixes for cross-compilation.
3693 2009-04-22  Miguel de Icaza  <miguel@novell.com>
3695         * aot-runtime.c (make_writable): Use mono_mprotect to simplify
3696         some porting work.
3698 2009-04-22  Zoltan Varga  <vargaz@gmail.com>
3700         * method-to-ir.c (mono_method_to_ir): Force init_locals to be TRUE
3701         to prevent asserts in various passes. Fixes #497220.
3703 2009-04-21  Zoltan Varga  <vargaz@gmail.com>
3705         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove
3706         a racy assert.
3708         * aot-compiler.c aot-runtime.c: Emit the unwind info into a separate
3709         table to avoid duplicates.
3711         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3712         
3713         * aot-compiler.c (emit_method_code): Avoid writing symbols if the nodebug
3714         option is used.
3716 2009-04-20 Rodrigo Kumpera  <rkumpera@novell.com>
3718         * mini.c (mini_method_verify): Fail fulltrust code if the exception
3719         is for method or field access.
3721 2009-04-20  Zoltan Varga  <vargaz@gmail.com>
3723         * mini-llvm-cpp.cpp (mono_llvm_dump_value): New helper function to print
3724         a Value to stdout.
3726         * mini-llvm.c (mono_llvm_emit_method): Use it.
3727         
3728         * mini-llvm.c (type_to_llvm_type): Fix the mapping of enums.
3729         (mono_llvm_emit_method): Add support for CAS. Fix handling of CSET opcodes
3730         on volatile values.
3732         * mini-trampolines.c (mono_llvm_vcall_trampoline): Add support for 
3733         synchronized methods.
3735         * mini.c (mini_method_compile): Disable LLVM for dynamic methods.
3737         * mini.c (mini_method_compile): Enable ABCREM when running with LLVM.
3739         * mini-llvm.c (mono_llvm_emit_method): Add support for OP_LOADI4_MEM/
3740         OP_LOADI8_MEM.
3742         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Add a MONO_LLVM env variable
3743         allowing some options to be set dynamically.
3745 2009-04-19  Zoltan Varga  <vargaz@gmail.com>
3747         * mini-llvm.c (mono_llvm_emit_method): Handle compares followed by an
3748         unconditional branch.
3750         * mini.h (MonoTrampolineType): Add new trampoline type 
3751         'MONO_TRAMPOLINE_LLVM_VCALL' which handles virtual calls made from LLVM
3752         compiled code.
3754         * mini-trampolines.c (mono_llvm_vcall_trampoline): New C trampoline 
3755         function.
3757         * mini-trampolines.c (mono_create_llvm_vcall_trampoline): New trampoline
3758         creation function.
3760         * mini.c (mini_init): Avoid using the common vtable trampoline when LLVM
3761         is enabled. Instead, use the llvm vcall trampoline.
3762         
3763         * mini-trampolines.c (mono_get_vcall_slot_addr): New helper function.
3765         * mini-trampolines.c tramp-amd64.c tramp-x86.c: Use it.
3766         
3767         * mini-<ARCH>.c: Get rid of the identical mono_arch_get_vcall_slot_addr ()
3768         functions.
3770         * mini-<ARCH>.h mini-trampolines.c mini.c: Get rid of 
3771         MONO_ARCH_COMMON_VTABLE_TRAMPOLINE, it is supported by all archs.
3773         * mini-ia64.c (mono_arch_lowering_pass): Null out the sregs of the
3774         OP_IA64_CSET opcode.
3776         * mini.c: Fix a warning.
3778         * mini-llvm.c (mono_llvm_emit_method): Convert arguments of SWITCH and
3779         THROW to the appropriate llvm type.
3781 2009-04-18  Zoltan Varga  <vargaz@gmail.com>
3783         * mini.c (mini_method_compile): Add statistics for methods JITted
3784         with/without LLVM.
3786 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
3788         * method-to-ir.c: Fix the computation of ins_sreg_counts for ia64
3789         OP_IA64_CMP_<cond>_IMM opcodes.
3791 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
3793         * mini-llvm.c (emit_cond_system_exception): Implement throwing of
3794         corlib exceptions.
3796         * dwarfwriter.c (mono_dwarf_writer_emit_method): Handle --regression
3797         correctly.
3799         * mini-llvm.c (type_to_llvm_type): Avoid accessing t->data.klass for
3800         GENERICINST.
3802 2009-04-17  Atsushi Enomoto  <atsushi@ximian.com>
3804         * mini-exceptions.c : add thread id to EXCEPTION trace message.
3806 2009-04-17  Zoltan Varga  <vargaz@gmail.com>
3808         * tramp-amd64.c (mono_arch_get_static_rgctx_trampoline): Fix AOT
3809         support.
3811         * tramp-x86.c (mono_arch_get_unbox_trampoline): Implement static
3812         rgctx invoke trampolines for x86.
3814         * mini-x86.c (mono_arch_output_basic_block): Add a few nops before
3815         indirect calls to simplify get_vcall_slot_addr (). Fixes #494567.
3816         (mono_arch_get_vcall_slot): Simplify this.
3818 2009-04-16  Zoltan Varga  <vargaz@gmail.com>
3820         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Move the calls to
3821         mono_debug_add_delegate_trampoline () to get_delegate_invoke_impl ().
3823 2009-04-14  Zoltan Varga  <vargaz@gmail.com>
3825         * aot-compiler.c tramp-arm.c mini-arm.c: Implement static rgctx 
3826         trampolines for ARM. Add full-aot support for delegate invokes for ARM.
3828         * mini-trampolines.c (mono_magic_trampoline): Fix the build.
3830         * liveness.c (visit_bb): Remove a needless assert.
3832 2009-04-13  Zoltan Varga  <vargaz@gmail.com>
3834         * mini-trampolines.c (mono_create_delegate_trampoline): Delegate the
3835         full aot support to the arch specific code.
3837         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Add full-aot support.
3839         * aot-compiler.c (emit_trampolines): Emit delegate invoke impl trampolines.
3841         * aot-compiler.c (emit_named_code): Rename this to 'emit_trampoline'.
3842         
3843         * mini-amd64.c (mono_arch_get_delegate_invoke_impls): New function to
3844         collect information about the delegate invoke impl trampolines.
3846         * mini.h (MonoAotTrampInfo): New structure collecting the information needed
3847         to save trampolines during full-aot mode.
3849         * mini-trampolines.c (mono_create_static_rgctx_trampoline): New trampoline
3850         creation function which returns a trampoline which sets the rgctx
3851         argument.
3852         (mono_magic_trampoline): Use the rgctx trampoline instead of an rgctx
3853         wrapper if possible.
3854         (mono_delegate_trampoline): Ditto.
3856         * mini.c (mono_jit_runtime_invoke): Ditto.
3858         * tramp-amd64.c: Add an implemention of static rgctx trampolines for AMD64.
3859         
3860         * aot-compiler.c aot-runtime.c: Add support for static rgctx trampolines.
3862         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3863         
3864 2009-04-12  Zoltan Varga  <vargaz@gmail.com>
3866         * mini-ia64.c (mono_arch_lowering_pass): Use NULLIFY_INS instead of
3867         just setting the opcode to OP_NOP.
3869 2009-04-11  Zoltan Varga  <vargaz@gmail.com>
3871         * mini.c (mini_method_compile): Put the last change inside an 
3872         #ifdef MONO_ARCH_HAVE_LIVERANGE_OPS.
3873         
3874         * mini.c (mini_method_compile): Disable sharing of stack slots/registers
3875         and extend live ranges to cover the whole method when using xdb.
3877         * jit-icalls.c (ldvirtfn_internal): Avoid creating rgctx wrappers here,
3878         do it in the trampolines.
3880         * mini-trampolines.c (mono_magic_trampoline): Add an rgctx wrapper if
3881         needed.
3883         * mini-trampolines.c (mono_delegate_trampoline): Ditto.
3884         
3885         * method-to-ir.c (mono_method_to_ir): Avoid using the fast virtual method
3886         call code in full-aot mode since IMT is disabled there.
3887         (mono_method_to_ir): Inline ldfld wrappers which return structures too, the
3888         new JIT no longer has that restriction.
3890         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
3892         * aot-compiler.c (emit_extra_methods): Emit the wrapper method names in
3893         a more compact format.
3894         (mono_aot_wrapper_name): New function to return a unique name for a
3895         wrapper method, also used by the AOT runtime.
3897         * aot-runtime.c (find_extra_method_in_amodule): Update after the changes to
3898         aot-compiler.c.
3900         * aot-compiler.c (add_generic_class): Add the helper methods from T[]
3901         when a ICollection<T> etc is encountered.
3902         (add_generic_instances): Process method arguments/locals too.
3903         (emit_trampolines): Emit unbox trampolines for extra methods too. Shorten
3904         trampoline names.
3906         * aot-runtime.c (mono_aot_get_unbox_trampoline): Handle extra methods too.
3907         
3908 2009-04-10  Zoltan Varga  <vargaz@gmail.com>
3910         * aot-compiler.c: Disable the AOT compiler if the JIT is disabled.
3912         * dwarfwriter.c (emit_type): Emit byref to reference types as 'int' for now.
3914         * decompose.c (mono_decompose_opcode): Make this return a MonoInst*
3915         representing the result of the decomposition. Nullify instructions
3916         instead of setting them to OP_NOP since nops can't have registers
3917         set.
3919 2009-04-09  Zoltan Varga  <vargaz@gmail.com>
3921         * aot-compiler.c (mono_compile_assembly): Split this huge function into
3922         smaller parts. Add 'nodebug' option to prevent generation of DWARF debug
3923         info. Strip 'mapping symbols' on ARM.
3925         * iltests.il.in (test_0_fconv_to_i): Disable this on ARM too.
3926         
3927         * genmdesc.pl: Applied patch by Martin Fuzzey (mfuzzey@parkeon.com). Sync
3928         this with the native genmdesc.
3930 2009-04-08  Bill Holmes  <billholmes54@gmail.com>
3932         * aot-runtime.c:  Fixing the MSVC build.
3934         Code is contributed under MIT/X11 license.
3936 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
3938         * mini-llvm.c (mono_llvm_emit_method): Pass i1/i2 arguments as i4 since 
3939         JITted code depends on it.
3941 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
3943         * aot-compiler.c: Use new MonoGenericParam accessors.
3945 2009-04-08  Raja R Harinath  <harinath@hurrynot.org>
3947         Reduce memory usage and improve correctness wrt MonoGenericParam
3948         * aot-runtime.c (decode_klass_ref): Simplify generic parameter
3949         handing.  Avoid allocating MonoGenericParams, but use the ones in
3950         the container itself.
3952 2009-04-07  Miguel de Icaza  <miguel@novell.com>
3954         * tasklets.c: Return exceptions in the out argument.
3956 2009-04-08  Zoltan Varga  <vargaz@gmail.com>
3958         * mini-llvm.c (mono_llvm_emit_method): Fix alignment in the LOCALLOC_IMM
3959         opcode. Use pointer types in more places instead of casting them to 
3960         integers.
3962         * mini-llvm-cpp.cpp (mono_llvm_create_ee): Create a pass manager to run
3963         optimizations.
3964         (mono_llvm_optimize_method): New helper function to optimize a method.
3966         * method-to-ir.c (mono_emit_widen_call_res): Extract the call result 
3967         widening code so it could be called from more places.
3968         (mono_method_to_ir): Call mono_emit_widne_call_res () in several more
3969         code paths in the call opcodes.
3971 Mon Apr 6 14:19:54 CEST 2009 Paolo Molaro <lupus@ximian.com>
3973         * exceptions-amd64.c, mini-amd64.h: amd64 support code for continuations.
3975 2009-04-06  Zoltan Varga  <vargaz@gmail.com>
3977         * dwarfwriter.c: Use _ to separate class name 
3978         components as gdb can't handle '.'. Represent reference variables
3979         as 'class <NAME>&'.
3980         
3981         * mini.h (MonoCompile): Add locals_min_stack_offset/locals_max_stack_offset.
3983         * mini-amd64.c (mono_arch_allocate_vars): Save min/max stack offset.
3984         
3985         * mini-gc.c: New file, contains the SGEN GC related parts of the JIT.
3987         * gc-test.cs: New file with GC stack marking tests.
3988         
3989         * mini-arm.c (mono_arch_output_basic_block): Fix int->float conversion of
3990         negative numbers for vfp.
3992         * basic-float.cs: Add a test.
3993         
3994 Mon Apr 6 14:12:10 CEST 2009 Paolo Molaro <lupus@ximian.com>
3996         * exceptions-x86.c, mini-x86.h: x86 support code for continuations.
3998 Mon Apr 6 14:09:53 CEST 2009 Paolo Molaro <lupus@ximian.com>
4000         * tasklets.h, tasklets.c, mini.h, mini.c, Makefile.am: arch-indep
4001         part of tasklet/continuation support.
4003 2009-04-05  Zoltan Varga  <vargaz@gmail.com>
4005         * mini-llvm.c (mono_llvm_emit_method): Move the handling of
4006         amd64 opcodes inside an ifdef.
4008         * dwarfwriter.c: Emit inheritance information for classes, emit fields
4009         of complex types.
4010         
4011         * dwarfwriter.c (emit_type): Emit the class info for classes.
4013 2009-04-04  Zoltan Varga  <vargaz@gmail.com>
4015         * Makefile.am (AM_CXXFLAGS): Add GLIB_CFLAGS to this.
4017         * mini-llvm-cpp.h: New header file for mini-llvm-cpp.cpp.
4019         * mini-llvm.c: Remove unused fields from EmitContext, fix memory leaks.
4021         * ssa.c (mono_ssa_compute): Fix some memory leaks.
4023 2009-04-03  Zoltan Varga  <vargaz@gmail.com>
4025         * mini.c mini-amd64.c method-to-ir.c: Use COMPILE_LLVM in a few more places.
4027         * mini-llvm.c: Update comments.
4029         * mini.h (COMPILE_LLVM): New macro.
4031         * decompose.c (mono_decompose_opcode): Use the COMPILE_LLVM macro.
4033         * ssa.c (mono_ssa_compute): Ditto.
4034         
4035         * unwind.c (mono_unwind_get_ops_from_fde): New helper function to extract
4036         the unwind ops from a DWARF FDE.
4038         * mini-llvm.c: Implement generation of unwind info for LLVM compiled
4039         methods by extracting the dwarf unwind ops from the unwind info generated
4040         by LLVM.
4041         
4042         * mini-llvm.c (mono_llvm_emit_method): Enable support for non-IMT virtual
4043         calls.
4045         * mini-amd64.c (mono_arch_get_vcall_slot): Handle more kinds of the SIB
4046         addressing modes.
4048 2009-04-02  Zoltan Varga  <vargaz@gmail.com>
4050         * Makefile.am (llvm_sources): Enable this.
4052         * mini.c (mini_method_compile): Add support for compiling with LLVM, 
4053         failing back to the JIT if something cannot be handled.
4055         * mini-amd64.c (mono_arch_emit_call): Emit the arguments more simple when
4056         compiling with LLVM.
4058         * decompose.c (mono_decompose_opcode): Avoid decomposing some opcodes when
4059         compiling with LLVM.
4061         * method-to-ir.c (mono_method_to_ir): Avoid decomposing SWITCH when 
4062         compiling with LLVM.
4064         * mini-ops.h: Add a few opcodes needed by LLVM.
4066         * dwarfwriter.c (mono_dwarf_writer_emit_method): Avoid crashes if the method
4067         has no unwind info.
4069         * mini-llvm.c mini-llvm-cpp.cpp: New files containing the experimental llvm
4070         backend.
4072         * mini-arm.c (mono_arch_output_basic_block): Fix the ARM_FPU_NONE build.
4074         * mini-arm.h mini-arm.c cpu-arm.md: Finish VFP support.
4076 2009-04-01  Mark Probst  <mark.probst@gmail.com>
4078         * regalloc.h, mini-codegen.c: Make vassign members gint32 to fix
4079         ridiculously large methods.
4081 2009-03-31  Martin Baulig  <martin@ximian.com>
4083         * debug-debugger.c (debugger_remove_breakpoint): Call
4084         mono_debugger_remove_class_init_callback ().
4086 2009-03-31  Zoltan Varga  <vargaz@gmail.com>
4088         * aot-compiler.c (mono_compile_assembly): Call img_writer_emit_start ()
4089         right before emitting code, not at the start.
4091         * mini.c (mono_postprocess_patches): Extract this into a separate function
4092         from mono_codegen ().
4094         * ssa.c (mono_ssa_compute): Set ins->klass for every PHI node, handle
4095         byref types correctly.
4097 2009-03-30  Zoltan Varga  <vargaz@gmail.com>
4099         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix a crash introduced
4100         by the last change.
4102 2009-03-29  Zoltan Varga  <vargaz@gmail.com>
4104         * mini-amd64.c (mono_arch_output_basic_block): Emit a few nops before 
4105         indirect calls, this avoids problems where get_vcall_slot () would get
4106         confused by the native code for the instruction preceeding the call.
4107         (mono_arch_get_vcall_slot): Simplify this.
4108         (mono_arch_emit_imt_argument): Remove this, it is no longer needed.
4110         * mini-ops.h: Fix the definitions of the OP_IA64 opcodes, since the local
4111         register allocator now seems to depend on them instead of the data in
4112         cpu-<ARCH>.md.
4114         * mini.c (mini_method_compile): Throw the correct type of exception if
4115         mono_method_get_header () fails because of a loading error.
4117 2009-03-28  Zoltan Varga  <vargaz@gmail.com>
4119         * mini.c (mini_method_compile): Clear the loader error if the method
4120         header cannot be decoded.
4122         * mini-trampolines.c (mono_magic_trampoline): Handle generic virtual 
4123         interface methods on proxies correctly.
4125         * dwarfwriter.c (mono_dwarf_writer_emit_method): Fix handling of the
4126         this argument for vtype methods. Add precise liveness info for arguments.
4128         * mini-codegen.c (mono_print_ins_index): Print the vreg of the
4129         LIVERANGE_START/END opcodes.
4131         * method-to-ir.c (mono_spill_global_vars): Fix liverange calculation
4132         for arguments and values in registers.
4134 2009-03-27  Zoltan Varga  <vargaz@gmail.com>
4136         * method-to-ir.c (mono_method_to_ir): Disable tail calls for calls which
4137         return a valuetype. Fixes #487518.
4139         * iltests.il: Add a test.
4140         
4141         * aot-compiler.c: Use mono_thread_create () to create helper threads.
4143         * mini-trampolines.c (mono_delegate_trampoline): Handle static delegates
4144         closed over a null reference correctly.
4146 2009-03-26  Zoltan Varga  <vargaz@gmail.com>
4148         * method-to-ir.c (mono_handle_global_vregs): Fix support for ternary ops.
4150 2009-03-25  Mark Probst  <mark.probst@gmail.com>
4152         * mini-codegen.c (mono_local_regalloc): Don't let sregs get
4153         allocated to the same registers as fixed sregs.
4155 2009-03-24  Mark Probst  <mark.probst@gmail.com>
4157         * mini-ops.h: New ternary ATOMIC_CAS ops replace the old
4158         ATOMIC_CAS_IMM ops.
4160         * method-to-ir.c: Handle more cases for
4161         Interlocked.CompareExchange.
4163         * cpu-x86.md, mini-x86.c, mini-x86.h, cpu-amd64.md, mini-amd64.c,
4164         mini-amd64.h, cpu-ppc.md, cpu-ppc64.md, mini-ppc.c, mini-ppc.h:
4165         ATOMIC_CAS implementations for x86, AMD64, PPC and PPC64.
4167 2009-03-23  Zoltan Varga  <vargaz@gmail.com>
4169         * aot-runtime.c (decode_method_ref): Fix a warning.
4171         * unwind.c (mono_unwind_frame): Ditto.  
4173 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
4175         * aot-compiler.c (arch_emit_unbox_trampoline): Fix the binary writer support.
4176         (mono_compile_assembly): Enable the binary writer for full-aot as well.
4178         * image-writer.c (do_reloc): Add support for the JUMP24 relocation,
4179         fix the handling of large values in the ALU_PC_G0_NC relocation.
4181 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
4183         * local-propagation.c method-to-ir.c local-propagation.c: Fix warnings.
4185 2009-03-22  Mark Probst  <mark.probst@gmail.com>
4187         * method-to-ir.c (mono_spill_global_vars): Support for ternary
4188         ops.
4190 2009-03-22  Mark Probst  <mark.probst@gmail.com>
4192         * method-to-ir.c: MINI_OP3 needs a comma.
4194         * method-to-ir.c, mini.h, mini.c: Remove
4195         mono_init_op_sreg_counts ().
4197 2009-03-22  Zoltan Varga  <vargaz@gmail.com>
4199         * mini-arm.c (mono_arch_output_basic_block): Fix aot support in
4200         OP_JMP.
4201         
4202         * mini-arm.c (mono_arch_build_imt_thunk): Disable the !fail_tramp
4203         assertion.
4205         * mini-ops.h: Fix arguments of the MEMINDEX opcodes.
4207         * mini-amd64.c (mono_arch_build_imt_thunk): Simplify the fail handling
4208         code somewhat.
4210 2009-03-21  Mark Probst  <mark.probst@gmail.com>
4212         * cfold.c, cprop.c, decompose.c, genmdesc.c, helpers.c, ir-emit.h,
4213         liveness.c, local-propagation.c, method-to-ir.c, mini-codegen.c,
4214         mini.c, mini.h, simd-intrinsics.c, ssa.c: Support for ternary IR
4215         operations.
4217 2009-03-20  Zoltan Varga  <vargaz@gmail.com>
4219         * driver.c: Change location of gc_wrapper.h.
4221         * method-to-ir.c (mono_find_block_region): Handle try clauses nested
4222         inside finally clauses correctly. Fixes #485721.
4224         * mini.c (mono_find_spvar_for_region): This needs to handle try regions
4225         after the change above.
4227         * exceptions.cs: Add a test.
4228         
4229 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
4231         * unwind.c (mono_unwind_ops_encode): Increase the size of the encode buffer.
4233         * mini-amd64.c (mono_arch_emit_epilog): Remove the encoding of stack size
4234         into cfg->used_int_regs, it is not needed with the dwarf unwinder.
4235         (mono_arch_compute_omit_fp): Remove the emit_epilog () workaround.
4237         * mini-amd64.c (mono_arch_compute_omit_fp): Add another check to avoid hitting
4238         the stack_alloc_size < (1 << 16) assertion in emit_prolog ().
4240 2009-03-19  Sebastien Pouliot  <sebastien@ximian.com>
4242         * method-to-ir.c: Allow CoreCLR to throw FieldAccessException. 
4243         Simplify logic for ensure_method_is_allowed_to_call_method. 
4244         Handle wrappers on callers.
4246 2009-03-19  Zoltan Varga  <vargaz@gmail.com>
4248         * Makefile.am (fullaotcheck): Don't run the generics tests, some of
4249         them don't run yet.
4251         * basic-simd.cs: Fix the names of some test methods.
4253 2009-03-18  Geoff Norton  <gnorton@novell.com>
4255         * mini.c: Only chain sigfpe if it wasn't generated in mangaed code.
4257 2009-03-18  Zoltan Varga  <vargaz@gmail.com>
4259         * dwarfwriter.c (token_handler): Fix a crash caused by the last change.
4261 2009-03-17  Jb Evain  <jbevain@novell.com>
4263         * driver.c: remove now uneeded call to mono_gc_base_init before
4264         mono_profiler_load.
4266 2009-03-17  Jb Evain  <jbevain@novell.com>
4268         * dwarfwriter.c (token_handler): handle more cases.
4270 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com> 
4272         * method-to-ir.c: Remove more dead code (that was required only
4273         because of method_is_safe). Fix compiler warnings.
4275 2009-03-17  Sebastien Pouliot  <sebastien@ximian.com>
4277         * method-to-ir.c: Remove unneeded/useless method_is_safe
4278         http://lists.ximian.com/archives/public/mono-devel-list/2009-March/031404.html
4280 2009-03-16 Rodrigo Kumpera  <rkumpera@novell.com>
4282         * mini.c (mini_method_compile): Print the method been compiled with
4283         verbose level 1 instead of 3 as this helps a lot debugging JIT crashes
4284         for people not familiar with the runtime.
4286 2009-03-17  Zoltan Varga  <vargaz@gmail.com>
4288         * mini-exceptions.c (get_generic_info_from_stack_frame): Avoid returning
4289         a managed object which is later put into a GList. Return its class instead.
4291         * mini.c (mono_allocate_stack_slots_full): Avoid sharing ref and non-ref
4292         stack slots when using sgen.
4294 2009-03-16  Zoltan Varga  <vargaz@gmail.com>
4296         * dwarfwriter.c (emit_line_number_info): Really fix the eglib build.
4298 2009-03-14  Zoltan Varga  <vargaz@gmail.com>
4300         * local-propagation.c (reg_is_softreg_no_fpstack): Use >= instead of
4301         > so it works on the first vreg as well.
4303 2009-03-13  Zoltan Varga  <vargaz@gmail.com>
4305         * dwarfwriter.c (emit_line_number_info): Disable an assert which seems to
4306         trigger randomly.
4308         * aot-compiler.c: Get rid of xdebug_lock (), use the loader lock instead.
4309         
4310         * dwarfwriter.c (emit_line_number_info): Fix eglib build as eglib doesn't
4311         implement GArray.
4313 2009-03-12  Zoltan Varga  <vargaz@gmail.com>
4315         * dwarfwriter.c (emit_line_number_info): Optimize the computation of the
4316         native->IL offset mapping.
4318 2009-03-11  Zoltan Varga  <vargaz@gmail.com>
4320         * mini-amd64.c (mono_arch_output_basic_block): Fix % 1. Fixes #484323.
4322         * basic.cs: Add a test.
4324 2009-03-11  Mark Probst  <mark.probst@gmail.com>
4326         * mini-x86.c (mono_arch_output_basic_block): Use different
4327         registers in case the ones we want to overwrite are used by the
4328         other operand.  Fixes regression in #480807.
4330 2009-03-10  Zoltan Varga  <vargaz@gmail.com>
4332         * aot-compiler.c (mono_compile_assembly): Make the output less verbose.
4334         * dwarfwriter.c (emit_line_number_info): The line number info for
4335         IL code was off by one. Fix that.
4337         * mini-s390x.c: Fix support for vtypes whose addresses are passed on the
4338         stack.
4340 2009-03-09  Mark Probst  <mark.probst@gmail.com>
4342         Contributed under the terms of the MIT/X11 license by Steven
4343         Munroe <munroesj@us.ibm.com>.
4345         * mini-ppc.c: Correct handling of OP_LOADI4_MEMINDEX for ppc64.
4346         Fixes #483462.
4348 2009-03-08  Zoltan Varga  <vargaz@gmail.com>
4350         * dwarfwriter.c (token_handler): Decode method references in non-wrappers
4351         as well.
4353 2009-03-06  Zoltan Varga  <vargaz@gmail.com>
4355         * method-to-ir.c (mono_method_to_ir): Check for type load exceptions in
4356         the delegate ctor handling code. Fixes #482638.
4357         
4358         * method-to-ir.c (mini_emit_memset): Fix the handling of size '3'. Fixes
4359         #481458.
4361         * iltests.il.in: Add a test.
4362         
4363         * mini-darwin.c (mono_chain_signal): Remove this, it is already in
4364         mini-posix.c.
4366 2009-03-05  Mark Probst  <mark.probst@gmail.com>
4368         * mini-trampolines.c (mono_create_jump_trampoline): If the method
4369         is shared generic code, return the trampoline, even if the method
4370         has already been compiled.  Fixes #479763.
4372         * mini.c, mini.h: New function
4373         mono_jit_find_compiled_method_with_jit_info() which is the same as
4374         mono_jit_find_compiled_method() but also returns the jit info.
4376 2009-03-05  Mark Probst  <mark.probst@gmail.com>
4378         * method-to-ir.c (mono_method_to_ir): Only force the vtable var
4379         for methods which actually have one.  For all other methods, make
4380         sure the this argument var is live the whole method.
4382         * mini.c (mini_method_compile): Every shared method has a
4383         this/vtable/mrgctx info.  Fixes #480807.
4385 2009-03-05  Mark Probst  <mark.probst@gmail.com>
4387         * mini-ppc.c (mono_arch_build_imt_thunk): Add support for mixed
4388         generic/imt thunks where some entries branch through the vtable,
4389         while other entries branch directly.
4391 2009-03-05  Zoltan Varga  <vargaz@gmail.com>
4393         * mini-darwin.c (mono_chain_signal): Define this to fix the build.
4395         * mini-windows.c: Ditto.
4396         
4397         * mini.c (mono_jit_runtime_invoke): Speed up the invoking of parameterless
4398         ctors.
4400 2009-03-04  Zoltan Varga  <vargaz@gmail.com>
4402         * dwarfwriter.c (emit_line_number_info): Add some debug code to help track
4403         down an assert.
4405 2009-03-04  Mark Probst  <mark.probst@gmail.com>
4407         * method-to-ir.c: Don't inline methods that use JMP.  Fixes
4408         #481403.
4410 2009-03-04  Mark Probst  <mark.probst@gmail.com>
4412         * exceptions-x86.c: Include debug-mini.h - fixes build.
4414 2009-03-04  Martin Baulig  <martin@ximian.com>
4416         * debug-mini.c: Clean up the exception API and add documentation.
4417         (mono_debugger_handle_exception): New public method; this is
4418         called when throwing an exception or encountering an unhandled one.
4419         (mono_debugger_call_exception_handler): Formerly known as
4420         mono_debugger_handle_exception(); this is used to tell the
4421         debugger that we're about to invoke an exception handler.
4423 2009-03-04  Martin Baulig  <martin@ximian.com>
4425         * debug-mini.c (mono_debugger_runtime_invoke): Moved here from
4426         ../metadata/mono-debug-debugger.c; save and reset exception state.
4428 2009-03-02  Martin Baulig  <martin@ximian.com>
4430         * debug-mini.c: Moved the debugger exception handling here from
4431         ../metadata/mono-debug-debugger.c.
4433         * debug-mini.h
4434         (MonoDebuggerExceptionAction): New exception typedef.
4436         * debug-mini.c
4437         (MonoDebuggerThreadInfo): Added `MonoObject *last_exception'.
4439         * exceptions-amd64.c
4440         (mono_amd64_throw_exception): Use the new debugger exception
4441         handling code.
4443         * mini-exceptions.c
4444         (mono_handle_exception_internal): Don't call
4445         mono_debugger_unhandled_exception() here.
4447 2009-03-03  Zoltan Varga  <vargaz@gmail.com>
4449         * mini.c aot-compiler.c: Update after the changes to 
4450         mono_marshal_get_runtime_invoke ().
4452         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): 
4453         Virtual generic methods might not have method->slot set, work around
4454         that.
4456         * generics.cs: Add a test.
4458 2009-03-02  Geoff Norton  <gnorton@novell.com>
4460         * mini.c:
4461         * driver.c: Allow signal chaining of SIGFPE as well.
4463 2009-03-02  Zoltan Varga  <vargaz@gmail.com>
4465         * mini-trampolines.c (mono_generic_virtual_remoting_trampoline): Update
4466         this since it now receives the method not its generic context in the
4467         IMT reg.
4469         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for mixed
4470         generic/imt thunks where some entries branch through the vtable, while
4471         other entries branch directly.
4473         * mini-x86.c (mono_arch_build_imt_thunk): Ditto.
4475         * method-to-ir.c (mono_method_to_ir): Enable fast virtual generic call 
4476         support for interface methods as well.
4478         * mini-trampolines.c: Add support for virtual generic methods in interfaces
4479         using the normal IMT thunks.
4481         generics.cs: Add new tests.
4482         
4483         * method-to-ir.c (mono_method_to_ir): Pass the method instead of
4484         the generic inst to the generic imt thunks. This fixes AOT support, 
4485         improves consistency with the normal IMT thunks, and makes it easier to
4486         add support for interface generic virtual methods later.
4488         * mini-trampolines.c (mono_magic_trampoline): Ditto.    
4489         
4490 2009-02-28  Zoltan Varga  <vargaz@gmail.com>
4492         * driver.c (mono_set_signal_chaining): New public API function to enable
4493         signal chaining on POSIX platforms.
4495         * mini-posix.c mini.c: Applied a variant of a patch by Simon Rowland 
4496         (si@lindenlab.com) to implement signal chaining. The original patch was
4497         contributed under the MIT X/11 license:
4498         https://bugzilla.novell.com/show_bug.cgi?id=318894
4500 2009-02-27  Zoltan Varga  <vargaz@gmail.com>
4502         * iltests.il.in (test_0_implicit_float_to_double_conversion): Disable this
4503         too until it can be made to run on amd64.
4505 2009-02-26  Zoltan Varga  <vargaz@gmail.com>
4507         * mini-x86.c (mono_arch_get_this_arg_from_call): Avoid expensive calls
4508         to  get_generic_context_from_code () + get_call_info () if possible.
4510 2009-02-25  Zoltan Varga  <vargaz@gmail.com>
4512         * mini-exceptions.c (mono_handle_native_sigsegv): Implement the
4513         suspend-on-sigsegv functionality.
4515         * mini.c (mini_parse_debug_options): Add a new 'suspend-on-sigsegv' option
4516         to suspend when a native SIGSEGV is received. This is useful for debugging
4517         crashes which don't happen under gdb, since a live process contains more
4518         information than a core file.
4520         * mini-exceptions.c (mono_print_thread_dump): Use 
4521         MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX instead of platform defines.
4523         * mini-x86.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): New define.
4525         * mini-amd64.h (MONO_ARCH_HAVE_SIGCTX_TO_MONOCTX): Ditto.
4526         
4527         * basic-float.cs: Disable the tests which currently fail on amd64.
4529         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Pass a non-null 
4530         value to mono_arch_patch_callsite () to fix crashes.
4531         
4532         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix a warning.
4534 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
4536         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Replace the
4537         nop code by patching the call address to point to the nullified class init
4538         trampoline, as the former does not seem to be safe on SMP machines.
4540 2009-02-23  Mark Probst  <mark.probst@gmail.com>
4542         * mini-ops.h: Fix the argument types for a few x86 opcodes where
4543         they were wrong.
4545 2009-02-23  Zoltan Varga  <vargaz@gmail.com>
4547         * basic-float.cs basic-calls.cs: Fix warnings.
4549 2009-02-22  Mark Probst  <mark.probst@gmail.com>
4551         * tramp-ppc.c (mono_arch_create_trampoline_code): Store the
4552         correct frame pointer in the LMF.  Should fix #478394.
4554 2009-02-22  Zoltan Varga  <vargaz@gmail.com>
4556         * Makefile.am (fullaotcheck): Copy Mono.Simd.dll as well.
4558         * image-writer.c: Make the binary writer less verbose.
4560 2009-02-21  Zoltan Varga  <vargaz@gmail.com>
4562         * method-to-ir.c (mono_method_to_ir): Don't assert if string ctors
4563         are called from runtime invoke wrappers.
4565 2009-02-20  Zoltan Varga  <vargaz@gmail.com>
4567         * cpu-ppc.md (store_memindex): Increase the size of this.
4569 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
4571         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
4573         * cpu-x86.md: Fix the sizes for long_conv_to_r_un and long_conv_to_r_un_2.
4575         * mini-x86.c (mono_arch_output_basic_block): Use only 64bits of precision for
4576         OP_LCONV_TO_R_UN.
4578         Last fix for of #467201.
4581 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
4583         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
4585         * cpu-x86.md: Fix the sizes for fcall(_reg,_membase), long_conv_to_r4_2
4586         and long_conv_to_r8_2:
4588         Fixed part of #467201.
4590 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
4592         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
4594         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of int to float
4595         conversion to 32 bits.
4597         * cpu-x86.md: Increase the size of int_conv_to_r4.
4599         * basic-float.cs: Add a test for this.
4601         Fixed part of #467201.
4603 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
4605         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
4607         * mini-x86.c (mono_arch_output_basic_block): Adjust precision of long to double
4608         conversion to 64 bits.
4610         * basic-float.cs: Add a test for this.
4612         Fixed part of #467201.
4614 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
4616         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
4618         * mini-x86.c (emit_move_return_value): Don't reduce precision of functions returning float.
4619         This behavior is compatible with MS.
4621         * iltest.il.in: Add a test for this.
4623         Fixed part of #467201.
4625 2009-02-20 Rodrigo Kumpera  <rkumpera@novell.com>
4627         Extracted from a patch by Kornel Pal <kornelpal@gmail.com>.
4629         * mini-x86.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_R4, it must
4630         change the precision of the value.
4632         * cpu-x86.md: Define len for float_conv_to_r4.
4634         * basic-float.cs: Add a test for this.
4636         Fixed part of #467201.
4638 2009-02-19 Rodrigo Kumpera  <rkumpera@novell.com>
4640         * mini.c: Adjust locking order to the new semantics where the loader lock
4641         comes first.
4643 2009-02-18  Rodrigo Kumpera  <rkumpera@novell.com>
4645         * aot-runtime.c:
4646         * mini-amd64.c:
4647         * mini-arm.c:
4648         * mini-ia64.c:
4649         * mini-mips.c:
4650         * mini-ppc.c:
4651         * mini-sparc.c:
4652         * mini-trampolines.c:
4653         * mini-x86.c:
4654         * mini.c:
4655         * tramp-alpha.c:
4656         * tramp-amd64.c:
4657         * tramp-arm.c:
4658         * tramp-hppa.c:
4659         * tramp-ia64.c:
4660         * tramp-mips.c:
4661         * tramp-ppc.c:
4662         * tramp-s390.c:
4663         * tramp-s390x.c:
4664         * tramp-sparc.c:
4665         * tramp-x86.c: Use mono_domain_code_* functions instead of using MonoDomain::code_mp directly.
4667 2009-02-18  Zoltan Varga  <vargaz@gmail.com>
4669         * mini-codegen.c (mono_local_regalloc): Remove a ! from if (!dest_sreg1)
4670         as it is incorrect.
4672 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
4674         * aot-compiler.c (add_generic_class): Only add rgctx invoke wrappers
4675         for cctors if needed.
4677 2009-02-17  Mark Probst  <mark.probst@gmail.com>
4679         * mini-ppc.c: Fix build on Darwin.
4681 2009-02-17  Zoltan Varga  <vargaz@gmail.com>
4683         * dwarfwriter.c (mono_dwarf_writer_emit_base_info): Use 2 as the DWARF
4684         version instead of 3 as valgrind doesn't like version 3.
4686         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
4688         * aot-compiler.c (mono_aot_method_hash): New function to return a hash
4689         usable for hashing methods.
4690         (emit_extra_methods): Use the new hash to avoid putting every method in the
4691         same hash bucket.
4693         * aot-runtime.c (find_extra_method_in_amodule): Use the new hash.
4695         * aot-runtime.c (can_method_ref_match_method): New function to quickly check
4696         whenever a method ref could match a method.
4697         
4698         * aot-runtime.c (load_image): Revert the previous change, it causes an AOT
4699         test to fail.
4700         
4701         * aot-runtime.c (find_extra_method_in_amodule): Add a cache for decoded 
4702         methods refs.
4704         * aot-runtime.c (load_image): Pass our basedir to mono_assembly_load.
4706         * aot-compiler.c (emit_exception_debug_info): Bump the maximum size of
4707         the encoding buffer.
4709         * method-to-ir.c (mono_method_check_inlining): Avoid calling 
4710         mono_method_get_header () on inflated methods as an optimization.
4712 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
4714         * ssa.c (fold_ins): Fix another crash if the instruction following the
4715         switch was optimized away.
4717 2009-02-16  Mark Probst  <mark.probst@gmail.com>
4719         Contributed under the terms of the MIT/X11 license by Steven
4720         Munroe <munroesj@us.ibm.com>.
4722         * mini-ppc.c, mini-ppc.h: Implement TLS for PPC64.
4724 2009-02-16  Zoltan Varga  <vargaz@gmail.com>
4726         * mini.c method-to-ir.c mini-trampolines.c aot-runtime.c: Remove locking
4727         around the mono_domain_alloc calls, it is now done by the functions
4728         themselves.
4730         * aot-compiler.c (compile_method): Only add wrappers referenced by
4731         the method if compiling with full AOT.
4732         (mono_compile_assembly): Error out if --aot=full is specified on
4733         a platform where it is not supported.
4735         * aot-compiler.c (emit_trampolines): Emit generic class init trampolines
4736         on ARM too.
4738         * tramp-arm.c (mono_arch_create_generic_class_init_trampoline_full): Add
4739         AOT support.
4741         * aot-runtime.c (load_named_code): Handle 
4742         mono_arm_throw_exception_by_token.
4744         * mini-arm.h: Add declaration of mono_arm_throw_exception_by_token.
4746         * image-writer.c (asm_writer_emit_pointer_unaligned): Make this really
4747         unaligned.
4749         * Makefile.am (fullaotcheck): Exit if a test fails.
4751         * aot-compiler.c (mono_compile_assembly): Use the ASM writer for full aot
4752         on ARM.
4753         (mono_compile_assembly): Handle the assembler failing.
4755         * image-writer.c (asm_writer_emit_section_change): Handle ARM gas not
4756         accepting subsections of .bss.
4758         * ssa.c (visit_inst): Fix a crash if the instruction following a switch
4759         was optimized away.
4761         * aot-compiler.c: Remove some unused includes.
4762         
4763         * aot-compiler.c (MonoAotCompile): Remove some unused fields which are
4764         now in MonoImageWriter.
4766         * mini-x86.c (mono_arch_get_vcall_slot): Handle yet another
4767         code sequence which matches a non-virtual call. Fixes #472654.
4769 2009-02-15  Zoltan Varga  <vargaz@gmail.com>
4771         * aot-compiler.c: Use xdebug_lock ()/unlock () macros for locking in the
4772         xdebug code.
4773         
4774         * aot-compiler.c: Make the xdebug code not depend on the AOT compiler,
4775         use the image/dwarf writers directly.
4777         * image-writer.c (struct _MonoImageWriter): Remove the unused 'image'
4778         field.
4780         * aot-compiler.c (MonoAotCompile): Remove fields which are now in
4781         MonoDwarfWriter.
4783         * image-writer.h: Fix some typos.
4785         * dwarfwriter.h dwarfwriter.c: New files.
4786         
4787         * aot-compiler.c: Extract the DWARF info writing functionality into a 
4788         separate module.
4790         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add a 'out_unwind_ops'
4791         argument to return unwind info.
4793         * tramp-arm.c (mono_arch_create_trampoline_code_full): Ditto.
4795         * aot-compiler.c: Emit unwind info for trampolines in full-aot mode.
4796         
4797         * aot-runtime.c (decode_method_ref): Add a case for 
4798         MONO_AOT_METHODREF_WRAPPER_NAME.
4800         * mini.h: Add constants for the magic numbers used in encode_method_ref ()
4801         for AOT.
4803         * aot-compiler.c (encode_method_ref): Use the new constants.
4805         * aot-runtime.c (decode_method_ref): Ditto.
4807         * aot-compiler.c (compile_method): For generic icalls, queue the wrapper to
4808         be compiled, not the icall itself.
4810 2009-02-14  Zoltan Varga  <vargaz@gmail.com>
4812         * aot-runtime.c (find_extra_method_in_amodule): Avoid decoding wrapper names
4813         using decode_method_ref ().
4815         * method-to-ir.c (mini_emit_ldelema_1_ins): If the array index is a long,
4816         convert it to an in32. Fixes #475859.
4818         * arrays.cs: Add a test.
4820 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
4822         * mini-s390x.c (mono_arch_output_basic_block): Fix the shift amounts in 
4823         OP_LCONV_TO_U2.
4825         * basic-long.cs: Add a test.
4827 2009-02-12  Mark Probst  <mark.probst@gmail.com>
4829         * mini-x86.c, mini-x86.h: Very simple frame pointer removal.  We
4830         remove the frame pointer in leaf methods which don't receive any
4831         arguments, don't throw exceptions and don't do dynamic stack
4832         allocations.
4834 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
4836         * mini-amd64.c (mono_arch_build_imt_thunk): Fix size calculation after
4837         the fail_tramp changes. Hopefully fixes #475132.
4839 2009-02-12  Rodrigo Kumpera  <rkumpera@novell.com>
4841         * method-to-ir.c (mono_emit_method_call_full): Use mono_metadata_signature_dup_mempool
4842         instead of mono_metadata_signature_dup_full.
4844 2009-02-12  Zoltan Varga  <vargaz@gmail.com>
4846         * ssa.c (fold_ins): Use MONO_IS_JUMP_TABLE () and MONO_JUMP_TABLE_FROM_INS ()
4847         for processing jump tables. Fixes #473787.
4849 2009-02-11  Mark Probst  <mark.probst@gmail.com>
4851         * mini-generic-sharing.c: mini_method_get_context() just calls
4852         mono_method_get_context_general() now.
4854         * mini.c, mini.h: Moved get_object_generic_inst(),
4855         construct_object_context_for_method() and
4856         mono_domain_lookup_shared_generic() to metadata/generic-sharing.c.
4858 2009-02-11  Zoltan Varga  <vargaz@gmail.com>
4860         * branch-opts.c (mono_if_conversion): Handle the case where the merged 
4861         basic block fell through to its successor bblock without a branch. Fixes
4862         #474718.
4864         * iltests.il.in: Add a test.
4865         
4866         * aot-compiler.c (encode_method_ref): Encode methods of array types.
4867         (can_encode_patch): We can now handle arrays of generic parameters and
4868         array methods.
4870         * aot-runtime.c (decode_method_ref_2): Handle methods of array types.
4872         * aot-compiler.c aot-runtime.c: Emit the size of specific trampolines into
4873         the AOT file to avoid some #ifdefs in aot-runtime.c
4875         * mini.h: Bump AOT file format version.
4877 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
4879         * Makefile.am (fullaotcheck): Make this run the tests.
4881         * aot-compiler.c: Make the printing of skipped methods runtime configurable.
4883 2009-02-10  Mark Probst  <mark.probst@gmail.com>
4885         * mini-x86.c (mono_arch_context_get_int_reg): Handle all registers
4886         individually.  Fixes #473482.
4888 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
4890         * mini-arm.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
4892 2009-02-09  Jeffrey Stedfast  <fejj@novell.com>
4894         * aot-compiler.c (arch_emit_plt_entry): Fixed to compile.
4895         (mono_compile_assembly): Hush compile warnings about
4896         uninitialized [tmp_]outfile_name variables in the !use_bin_writer
4897         code path.
4899 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
4901         * exceptions-arm.c (mono_arch_find_jit_info): Fix aot support.
4903         * mini-arm.c: Checkin unwind related changes missing from an earlier commit.
4905         * aot-compiler.c: Fix arm support.
4907         * image-writer.c: Move the R_ARM constants to image-writer.h. Export a
4908         img_writer_emit_unset_mode () function.
4910         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
4911         (mono_unwind_get_dwarf_pc_reg): Ditto.
4913         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
4914         Move almost all platform specific code to a set of arch_ functions, 
4915         and document them to ease porting.
4916         
4917         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
4919         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
4921         * aot-compiler.c: Extract the image writing functionality into a separate
4922         module to reduce the size of this file.
4924 2009-02-09  Geoff Norton  <gnorton@novell.com>
4926         * mini-s390.c: Fix the signature of emit_sig_cookie.
4928 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
4930         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
4932         * aot-runtime.c (is_shared_got_patch): Ditto.
4934         * aot-runtime.c (load_named_code): Cope with the fact that 
4935         decode_got_entry () won't decode the patch fully if its corresponding got
4936         entry is already filled.
4937         
4938         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
4939         Initialize *ji.
4940         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
4942         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
4943         as the moving pointer instead of 'buf' for consistency with the rest of the
4944         codebase.
4945         (mono_arch_create_monitor_exit_trampoline): Ditto.
4947         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
4948         generic_class_init trampolines.
4949         (add_generic_class): Extract some code from add_generic_instances () into a
4950         separate function so it can be called from other places too.
4951         (compile_method): Call add_generic_class () for the classes of inflated methods
4952         referenced by the method.
4953         (can_encode_patch): Allow references to generic parameters.
4955         * aot-runtime.c: Add support the patches required by the new trampolines.
4956         
4957         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
4958         support.
4960         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
4961         full-aot support.
4963         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
4964         this from get_throw_pending_exception, make the signature full aot compatible.
4966         * Makefile.am (fullaotcheck): New target to run full-aot tests.
4968         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
4970         * exceptions.cs: Add a test.
4972 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
4974         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
4975         use the DWARF_DATA_ALIGN constant instead.
4977         * exception-<ARCH>.c: Update after the above change.
4979         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
4980         dwarf unwinder.
4982         * mini-arm.c: Enable the dwarf unwinder.
4984         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
4985         instead of mono_class_setup_vtable ().
4987 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
4989         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
4990         dwarf unwinder.
4992         * mini-x86.h: Enable the dwarf unwinder.
4994 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
4996         Fix mcs/tests/test-7.cs
4997         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
4998         2009-02-03.
5000 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
5002         * mini.c (print_jit_stats): Remove some unused statistics.
5004 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
5006         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
5008 2009-02-05  Mark Probst  <mark.probst@gmail.com>
5010         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
5011         the method we get from mono_object_get_virtual_method() because
5012         that function does it properly, now.
5014 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
5016         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
5017         opcodes. Fixes #472775.
5019 2009-02-05  Mark Probst  <mark.probst@gmail.com>
5021         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
5022         fact that mono_find_jit_info() sometimes returns the context
5023         corresponding to the jit info in new_ctx.  Fixes #472600.
5025 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
5027         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
5028         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
5029         klass->enum_basetype directly.
5031         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
5032         enum subtypes.
5034         * unwind.c: Avoid 0 sized arrays.
5036 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
5038         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
5039         size on systems with 64k pages. Fixes #471389.
5041 2009-02-04  Mark Probst  <mark.probst@gmail.com>
5043         Contributed under the terms of the MIT/X11 license by Steven
5044         Munroe <munroesj@us.ibm.com>.
5046         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
5047         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
5048         necessary.
5050 2009-02-04  Mark Probst  <mark.probst@gmail.com>
5052         Contributed under the terms of the MIT/X11 license by Steven
5053         Munroe <munroesj@us.ibm.com>.
5055         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
5056         comparison fix.
5058         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
5059         The trampoline can be longer on PPC64.
5061 2009-02-04  Mark Probst  <mark.probst@gmail.com>
5063         Contributed under the terms of the MIT/X11 license by Steven
5064         Munroe <munroesj@us.ibm.com>.
5066         * mini-ppc.c: Compiler warning fixes and trivial code
5067         simplifications.
5069 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
5071         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
5072         ins->dreg which could be a hardware register, not a vreg.
5074         * aot-compiler.c (emit_method_dwarf_info): Ditto.
5075         
5076         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
5077         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
5079         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
5080         
5081         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
5082         ->dreg, that is not the vreg we are looking for.
5084         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
5086         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
5087         LIVERANGE_END.
5089         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
5090         strange crashes.
5092 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
5094         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
5096         * aot-compiler.c (emit_line_number_info): Fix line number emission when
5097         the line diff is 0.
5099         * aot-compiler.c: Add xdebug support on x86.
5101         * unwind.c: Add x86 support.
5102         
5103         * aot-compiler.c (emit_exception_debug_info): Control the emission of
5104         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
5106         * mini.c (mini_method_compile): Ditto.
5107         
5108         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
5109         the variable index.
5111         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
5112         which mimic .push_section/.pop_section in GAS.
5113         
5114         * aot-compiler.c: Emit precise live range information for variables.
5116         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
5118         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
5119         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
5120         them.
5122         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
5123         the live ranges of variables.
5125         * mini.h (struct MonoMethodVar): Add two fields containing the live range
5126         of the variable in terms of native offsets.
5128 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
5130         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
5131         
5132 2009-02-02  Mark Probst  <mark.probst@gmail.com>
5134         Contributed under the terms of the MIT/X11 license by Steven
5135         Munroe <munroesj@us.ibm.com>.
5137         * exceptions-ppc.c (restore_regs_from_context): Correct operand
5138         order (offset then base reg) for ppc_load_multiple_regs.
5139         (emit_save_saved_regs) Correct operand order for
5140         ppc_store_multiple_regs.
5141         (mono_arch_get_call_filter): Correct operand order for
5142         ppc_load_multiple_regs.
5144         * mini-ppc.c (emit_memcpy): Fix operand order for
5145         ppc_load_reg_update and ppc_store_reg_update.
5146         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
5147         (mono_arch_emit_epilog): Correct operand order for
5148         ppc_load_multiple_regs.
5150         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
5151         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
5153 2009-02-02  Mark Probst  <mark.probst@gmail.com>
5155         * cpu-ppc64.md: Fixed storer4_memindex length.
5157 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
5159         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
5160         line number info.
5161         
5162         * aot-compiler.c (emit_line_number_info): Optimize this.
5164 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
5166         * aot-compiler.c: Disassemble tokens in the IL disassembly.
5167         
5168         * aot-compiler.c: Add debug info for methods without debug info by
5169         emitting an IL file and having the line number info referencing that file.
5171         * aot-compiler.c: Optimize the size of the generated line number info.
5173         * aot-compiler.c: Emit line number info in xdebug mode.
5175         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
5176         million arguments.
5178 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
5180         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
5182         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
5183         is used.
5185 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
5187         * basic-calls.cs: Test for the weird crash found on arm.
5188         
5189 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
5191         * cpu-arm.md: Increase the size of storer8_membase_reg and
5192         loadr8_membase_reg to 24 bytes to accomodate the extra add.
5194         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
5195         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
5196         reg to LR otherwise we'll be loading/storing from just the offset.
5198 2009-01-30  Miguel de Icaza  <miguel@novell.com>
5200         Question: if we are storing gint32's inside the "*native_offset",
5201         should we change the signature to "gint32 *native_offset" to
5202         ensure that we do not have type definition problems?
5203         
5204         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
5205         an int * as this is what the other function expects, causes
5206         problems with Freescale's compiler that defined int32_t to be a
5207         long and makes int incompatible 
5209 2009-01-30  Miguel de Icaza  <miguel@novell.com>
5211         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
5212         filename conflict with bjam.
5214 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
5216         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
5217         as it might use decomposed ops.
5219 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
5221         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
5223         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
5224         is defined.
5226         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
5228         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
5229         offsets.
5231         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
5232         way registers are stored in MonoContext on arm.
5234         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
5235         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
5237         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
5239         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
5241         * mini.c (mini_init): Register mono_isfinite.
5243         * jit-icalls.c (mono_isfinite): New jit icall.
5245         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
5246         
5247         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
5248         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
5249         the parent frame.
5251 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
5253         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
5254         separate frame and stack pointers, so we must use FP to find the register
5255         spill area.
5256         The FP reg is retrieved from the MonoContext::regs array.
5258 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
5260         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
5261         as FPA requires it.
5263 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
5265         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
5266         return R4 and R8 when not running under softfloat.
5268         Fixes basic-calls.exe
5270 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
5272         * mini-arm.c: Implement some overflow opcodes.
5274 2009-01-29  Miguel de Icaza  <miguel@novell.com>
5276         * ssa.c: handle another alloca.h
5278         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
5279         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
5280         MONO_ARCH_USE_SIGACTION. 
5282         * aot-runtime.c, mini-exceptions.c: Replace platform define with
5283         capability defines.
5285         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
5287         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
5288         PPC targets as sigaction does not exist on all platforms, define
5289         this on a per-platform basis.
5291         Instead of erroring out if the platform is not defined, include
5292         mini-ppc-os.h, and expect that the OS specific setting provides
5293         the required information.   
5295 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
5297         * aot-compiler.c: Fix --enable-minimal=aot.
5299 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
5301         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
5302         previous change.
5304 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
5306         * exceptions-arm.c: Fix warnings.
5308         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
5309         ARM.
5311         * mini-x86.c: Fix --enable-minimal=jit build.
5313         * mini.c: Really fix --enable-minimal=jit build.
5314         
5315         * mini.c (construct_object_context_for_method): Move this outside
5316         the DISABLE_JIT block to fix the --enable-minimal=jit build.
5318         "Backported" of r124984 from 2.0 branch.
5319         
5320         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
5322         "Backport" of r124977 + r124978 from 2.0 branch.
5323         
5324         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
5325         to avoid calling mono_exception_from_token () from the throw trampoline.
5326         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
5327         for throwing corlib exceptions, this fixes full-aot support for corlib
5328         exceptions.
5330         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
5332 2009-01-29  Miguel de Icaza  <miguel@novell.com>
5334         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
5335         part of the changes to split the code in mini into operating
5336         system specific files.
5338         This patch was done by copying mini.c to the respective files to
5339         preserve SVN history.
5341 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
5343         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
5345 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
5347         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
5348         remoting-invoke-with-check wrappers of shared methods.
5350         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
5352 2009-01-27  Mark Probst  <mark.probst@gmail.com>
5354         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
5355         optimization if the top of stack is the last instruction in the
5356         bblock.  Otherwise it might have been used after its definition.
5357         Fixes #469742.
5359 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
5361         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
5362         method as well when get_vcall_slot () fails to match a code sequence.
5364         * mini-arm.c: Fix the android build, which doesn't have
5365         __aeabi_read_tp.
5367 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
5369         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
5370         the s390x build.
5372 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
5374         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
5376 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
5378         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
5379         and put its id into jinfo->used_regs. This is only used on amd64,
5380         which is currently the only platform generating unwind info.
5382         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
5383         the dwarf unwinder. This is required to correctly handle async exceptions
5384         like thread abort and stack overflows, which can happen while a method
5385         is in the middle of its prolog or epilog.
5386         
5387         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
5388         the unwind info belonging to an AOTed method.
5390         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
5391         into cfg->unwind_ops.
5392         
5393         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
5395         * mini.c (mini_init): Call mono_unwind_init ().
5396         (mini_cleanup): Call mono_unwind_cleanup ().
5398         * unwind.c: Add functions for managing a set of unwind info entries, allowing
5399         unwind info to be shared between methods.
5401         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
5402         saved in the LMF.
5404         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
5405         get_throw_pending_exception () to avoid initialization races.
5407         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
5408         mono_arch_exceptions_init () function.
5410         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
5412 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
5414         * mini.c (mono_get_domain_intrinsic): New helper function.
5415         (mono_get_thread_intrinsic): Ditto.
5417         * mini-arm.c mini-ia64.c: Use the new helper functions.
5418         
5419         * method-to-ir.c (mono_method_to_ir): Fix the comment for
5420         the last constrained_call change, since it is needed in the non-AOT
5421         case as well.
5423         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
5424         
5425         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
5426         mono_get_lmf_addr () on arm eabi linux.
5428 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
5430         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
5431         code sequence which matches a non-virtual call.
5433 2009-01-23  Mark Probst  <mark.probst@gmail.com>
5435         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
5436         stack pointer (r1).
5438 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
5440         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
5441         runtime-invoke wrappers, since they are also shared based on signature.
5443 2009-01-22  Mark Probst  <mark.probst@gmail.com>
5445         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
5446         info from the (correct) context.
5448 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
5450         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
5451         
5452         * unwind.c (mono_unwind_frame): New function to unwind through a frame
5453         using dwarf unwinding info. Not yet used.
5455         * mini.c (mini_init): When using xdebug, disable freeing of domains.
5457 2009-01-21  Mark Probst  <mark.probst@gmail.com>
5459         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
5460         descriptors.
5462         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
5463         special case and handle mono_arch_delegate_invoke_impl() returning
5464         function descriptors.
5466         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
5467         trampolines return function descriptors, too.
5469 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
5471         * method-to-ir.c (handle_alloc): Avoid generic instances in the
5472         out_of_line optimization.
5474 2009-01-21  Martin Baulig  <martin@ximian.com>
5476         * mini.h
5477         (MonoCompile): Added `disable_deadce_vars' to disable removing
5478         unused variables.
5480         * mini.c
5481         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
5482         inside the debugger.
5484         * liveness.c (mono_analyze_liveness): Don't remove any unused
5485         variables if `cfg->disable_deadce_vars' is set.
5487 2009-01-21  Mark Probst  <mark.probst@gmail.com>
5489         * method-to-ir.c: Only apply exception constructor optimization if
5490         the the method actually belongs to an exception class.  Fixes
5491         #467456.
5493 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
5495         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
5496         change inside a #ifdef __mono_ppc64__.
5498         * aot-compiler.c (compile_method): Remove the previous limitation.
5500         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
5501         on type variables in AOTed code.
5502         
5503         * aot-compiler.c (compile_method): Skip generic methods having type 
5504         constraints on their generic parameters.
5506         * aot-compiler.c (compile_method): Check for methods which cannot be
5507         encoded inside RGCTX_FETCH patches as well.
5509         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
5510         build.
5512 2009-01-20  Mark Probst  <mark.probst@gmail.com>
5514         * method-to-ir.c: Force the vtable variable in shared generic code
5515         for the case that they might show up on a stack trace where they
5516         are needed.
5518         * mini-exceptions.c: Save and use generic sharing info as well as
5519         IP in stack traces to resolve shared generic instantiations.
5521 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
5523         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
5524         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
5526 2009-01-20  Mark Probst  <mark.probst@gmail.com>
5528         * method-to-ir.c: Do generic sharing for array constructors.
5530 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
5532         * mini-exceptions.c (mono_print_thread_dump): Add information
5533         about the thread state using wapi_current_thread_desc.
5535 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
5537         * basic-simd.cs: Tests for the new constructors. 
5539 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
5541         * mini-ops.h: Added OP_EXPAND_*
5543         * cpu-x86.md: Same.
5545         * mini-x86.c (mono_arch_output_basic_block): Same.
5546         
5547         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
5549 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
5551         * iltests.il.in: Add a test for #467385.
5553 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
5555         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
5556         thread been cleaned up is not the same currently in execution.
5558         Fixes appdomain-unload crashes on windows, osx and linux variants
5559         without the __thread keyword.
5561 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
5563         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
5564         (koush@koushikdutta.com). Implement this for android.
5566         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
5567         begins with a digit.
5569         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
5570         mono_marshal_get_write_barrier ().
5572 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
5574         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
5575         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
5576         that pass them on a register pair.
5578         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
5579         test was crashing due to that.
5581 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
5583         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
5584         trampoline code. Include ucontext.h only if available.
5586 2009-01-15  Mark Probst  <mark.probst@gmail.com>
5588         * mini.c: mono_domain_lookup_shared_generic() takes an open method
5589         and doesn't check whether it's sharable, like it was before
5590         removing the shared generics hash.  This brings IronPython
5591         performance back to what it was before that change.
5593 2009-01-14  Mark Probst  <mark.probst@gmail.com>
5595         * method-to-ir.c: Handle delegate invocation optimization earlier,
5596         otherwise it would be handled (much more slowly) by the
5597         final/sealed optimization.
5599 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
5601         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
5602         domain is not set. Fixes #465864.
5604 2009-01-12  Mark Probst  <mark.probst@gmail.com>
5606         * method-to-ir.c: Don't stop sharing of generic methods with catch
5607         clauses - we already handle those.
5609 2009-01-12  Mark Probst  <mark.probst@gmail.com>
5611         * mini.c, mini.h: lookup_generic_method() is now
5612         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
5613         making the shared_generics_hash obsolete.
5615 2009-01-12  Mark Probst  <mark.probst@gmail.com>
5617         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
5618         use the red zone.  Make room on the stack first and then use it,
5619         not the other way around.
5621 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
5623         * mini.c (mini_init): Call mono_xdebug_init ().
5625         * aot-compiler.c (mono_xdebug_init): Make this non-static.
5627 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
5629         * TestDriver.cs: Add an --iter argument to run tests multiple times.
5631         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
5632         trampolines.
5634         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
5635         debug+unwind info for trampolines.
5637         * mini.c (mono_create_unwind_op): New helper function.
5639         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
5641 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
5643         * aot-compiler.c: Fix the build.
5645 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
5647         * Makefile.am: Update dtrace-prelink.sh location.
5649 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
5651         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
5652         optimization. Fixes #464520.
5654 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
5656         * mini-amd64.c : Adding code to save/restore non-volatile registers
5657            on Winx64.
5659         * exceptions-amd64.c : Adding code to save/restore non-volatile 
5660           registers on Winx64.
5662         Contributed under MIT/X11 license.
5664 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
5666         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
5667         __GNUC_MINOR__ which can break when the major version changes.
5669 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
5671         * basic-simd.cs: Add tests for usage of the sizeof opcode.
5673 2009-01-07  Geoff Norton  <gnorton@novell.com>
5675         * helpers.c:  Allow mono -v -v -v to work on darwin.
5677 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
5679         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
5680           pattern. 
5682         Contributed under MIT/X11 license.
5684 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
5686         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
5687         instead of directly accessing type->data.klass. Fixes #462016.
5688         (mono_allocate_stack_slots_full): Ditto.
5690         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
5691         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
5693         * aot-compiler.c (emit_plt): Fix ARM build.
5695 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
5697         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
5698         
5699         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
5700         change.
5702         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
5703         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
5704         #463357.
5706         * iltests.il.in: Add a regression test.
5708 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
5710         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
5712 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
5714         * basic-simd.cs: Add a regression test for #462457.
5716 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
5718         * mini-ops.h: Add a definition of XPHI.
5720         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
5722         * ssa.c (op_phi_to_move): Handle XPHI.
5724         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
5726         Fixes #462457
5728 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
5730         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
5732 2008-12-31  Geoff Norton  <gnorton@novell.com>
5734         * mini-ppc.c: The prolog size allocated can be too small for darwin
5735         ppc32 under certain circumstances.  Also fix a small logic bug.
5737 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
5739         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
5740         while loading AOT methods.
5742         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
5743         since only the former is nulled out after a successful cast. This prevents
5744         crashes with rethrown exceptions when using --debug=casts.
5746 2008-12-24  Mark Probst  <mark.probst@gmail.com>
5748         * mini.h: New macro for checking whether a method is final,
5749         i.e. whether the method or its class is marked final.
5751         * method-to-ir.c: Use the new macro for all final-checks
5752         consistently.  Fixes the crash in the System.ServiceModel tests.
5754 2008-12-23  Mark Probst  <mark.probst@gmail.com>
5756         * mini-exceptions.c (get_exception_catch_class): Corrected another
5757         overly strict assertion.
5759 2008-12-23  Mark Probst  <mark.probst@gmail.com>
5761         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
5762         Clobbering it is not allowed because the caller might use it as
5763         the vtable register in the interface call.
5765 2008-12-19  Mark Probst  <mark.probst@gmail.com>
5767         * mini-exceptions.c (get_exception_catch_class): Corrected an
5768         overly strict assertion.
5770 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
5771         
5772         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
5774         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
5776         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
5778         * cpu-mips.md: correct lengths for certain long_ opcodes.
5780         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
5782         * mini-mips.c: Add support for more long operations. Fix issues with stack frame layout for n32 (still not perfect yet). Add mips_emit_load_const().
5783         
5784 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
5786         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
5787         
5788 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
5789         
5790         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
5791         
5792 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
5794         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
5795         next basic block.
5796         
5797 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
5799         * mini.h: Allow MonoInst 'p' field to alias with the low-order bits of the 'const_val' fields correctly on big-endian systems when SIZEOF_VOID_P < SIZEOF_REGISTER
5801         * ir-emit.h: Change SIZEOF_VOID_P to SIZEOF_REGISTER, init instruction through inst_c* fields instead of inst_p* fields in case sizeof(inst_p) < sizeof(inst_c)
5802         
5803 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
5804         
5805         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
5806         
5807 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
5809         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
5810         gshared code. Fixes #458947.
5812         * generics.cs: Add a test.
5814 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
5815         
5816         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5817         
5818         * mini-mips.c: first pass n32 code generation.
5820         * mini-mips.h: datatypes and defines for n32 support.
5822         * exceptions-mips.c: first pass n32 code generation.
5823         
5824         * tramp-mips.c: first pass n32 code generation.
5825         
5826         * cpu-mips.md: add long_ opcodes.
5827         
5828 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
5830         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5832         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5833         
5834         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5835         
5836         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5838         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5840         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5842         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5844         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
5846         * helpers.c: for mips/n32, don't pass -mips32 to objdump
5848 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
5850         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
5852 2008-12-12  Andres G. Aragoneses  <aaragoneses@novell.com>
5854         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
5856 2008-12-12  Mark Probst  <mark.probst@gmail.com>
5858         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
5859         descriptors for helper functions directly in front of the code.
5861 2008-12-11  Mark Probst  <mark.probst@gmail.com>
5863         * method-to-ir.c: Removed an unnecessary assertion.
5865 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
5867         * method-to-ir.c: Merge SGEN changes from the old JIT.
5869 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
5871         * driver.c (compile_all_methods_thread_main): Handle failure of
5872         mono_get_method ().
5874 2008-12-10  Mark Probst  <mark.probst@gmail.com>
5876         * mini-ppc.c: Merged with mini-ppc64.c.
5878         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
5880         * Makefile.am: Use the same sources for PPC and PPC64.
5882         * mini-ppc64.c: Removed.
5884 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
5886         * branch-opts.c (remove_block_if_useless): Extract fall through detection
5887         code to mono_bb_is_fall_through.
5888         
5889         * branch-opts.c (mono_remove_critical_edges): Same.
5891 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
5893         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
5894         expect that an OP_BR_REG will be there.
5896 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
5898         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
5899         for the many branch ops. The original check miss OP_BR_REG.
5901         Fixes #457574.
5902         
5903 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
5905         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
5907 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
5909         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
5910         while holding the aot lock.
5912 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
5914         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
5915         
5916 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
5918         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
5919           to release all runtime callable wrappers held by the runtime.
5921         Contributed under MIT/X11 license.
5923 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
5925         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
5926           for Winx64.
5928         Contributed under MIT/X11 license.
5930 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
5932         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
5933         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
5935 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
5937         * cpu-mips.md: fix ckfinite length
5939         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
5940         (mono_arch_lowering_pass): cleanup, rearrange for clarity
5941         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
5942         
5943 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
5945         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
5946         
5947 2008-12-08  Geoff Norton  <gnorton@novell.com>
5949         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
5950         size by 8 bytes as well.
5952 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5954         * basic-simd.cs: Fix method names for Vector16b.
5955         
5956 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5958         * basic-simd.cs: Fix method names for Vector16sb.
5960 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5962         * basic-simd.cs: Fix method names for Vector8us.
5963         
5964 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5966         * basic-simd.cs: Fix method names for Vector8s.
5967         
5968 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5970         * basic-simd.cs: Fix method names for Vector4ui.
5972 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5974         * basic-simd.cs: Fix method names for Vector2l.
5976 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5978         * basic-simd.cs: Fix method names for Vector2d.
5980 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5982         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
5983         that are extension methods.
5985 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
5987         * basic-simd.cs: Fix method names for Vector4f.
5989 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
5991         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
5992         as such. Fixes #456669.
5994 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
5996         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
5997         
5998 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
6000         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
6001         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
6002         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
6003         (mips_adjust_stackframe): handle FP spills
6004                 
6005         * mini-ops.h: add mips_mtc1_s2
6006         
6007         * cpu-mips.md: add mips_mtc1_s2
6008         
6009 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
6011         * unwind.c: New file, move the unwind info encoding functions here from
6012         aot-compiler.c, so they could be used at runtime too.
6014 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
6016         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
6017         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
6018         
6019 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
6021         * mini-mips.c: cleanup warnings
6022         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
6023         (mips_adjust_stackframe): handle case of taking the address of stack locals
6024         
6025 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
6027         * aot-compiler.c: Implement a few functions missing from the asm writer.
6028         (emit_method_code): Only write symbols for methods when using the bin
6029         writer, since the assembler can't deal with the characters in our method
6030         names.
6032         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
6034         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
6035         call.
6037         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
6038         a bit to also restore %rax.
6040 2008-12-05  Mark Probst  <mark.probst@gmail.com>
6042         * mini-ppc.c: Some simple merges from mini-ppc64.c.
6044 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
6046         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
6047         arguments.
6049 2008-12-05  Mark Probst  <mark.probst@gmail.com>
6051         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
6053         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
6054         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
6056         * exceptions-ppc64.c: Removed.
6058         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
6060 2008-12-05  Mark Probst  <mark.probst@gmail.com>
6062         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
6063         tramp-ppc64.c.
6065         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
6067         * tramp-ppc64.c: Removed.
6069 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
6071         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
6072         the TYPESPEC table.
6074 2008-12-05  Mark Probst  <mark.probst@gmail.com>
6076         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
6078         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
6079         mini-ppc.h instead of mini-ppc64.h.
6081         * mini-ppc64.h: Removed.
6083 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6085         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
6086         
6087         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
6088         
6089 2008-12-05  Mark Probst  <mark.probst@gmail.com>
6091         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
6092         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
6093         code easier.
6095 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
6097         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
6099 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
6101         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
6103 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
6105         * basic-simd.cs: Tests for operator == and != on Vector4f.
6107 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
6109         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
6111         * simd-intrinsics.c: Kill useless enum.
6113 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6115         * cpu-mips.md: add long_conv_to_ovf_i4_2
6116         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
6118 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6120         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
6121         
6122         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
6124 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6126         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
6127         
6128 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
6130         * basic-simd.cs: Add tests for new methods.
6132 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
6134         * simd-intrinsics.c: Add support for operator == and !=
6135         on Vector4(u)i.
6137         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
6139 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
6141         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
6143 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
6145         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
6147         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
6148         MONO_PATCH_INFO_ICALL_ADDR.
6150         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
6152         * aot-compiler.c: Resurrect full-aot support.
6154 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6156         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
6157         
6158 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
6160         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
6161         
6162 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
6164         * basic-simd.cs: Fix tests to work under ppc.
6165         Remove tests for methods that will be removed.
6167 2008-12-03  Mark Probst  <mark.probst@gmail.com>
6169         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
6170         generic type (via a typedef or typeref) correctly.
6172 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
6174         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
6175         diagnose an assertion failure.
6177 2008-12-02  Mark Probst  <mark.probst@gmail.com>
6179         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
6180         Fix trampoline size.
6182         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
6183         conversion opcodes are implemented natively instead via emulation.
6185 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
6187         * cpu-mips.md: remove mips_xori
6189         * mini-ops.h:  remove mips_xori
6191         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
6193         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
6194         
6195         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
6196         
6197 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
6199         * cpu-mips.md: fix instruction lengths.
6201         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
6203         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
6205         * mini-ops.h: fix slti / sltiu op profiles.
6206         
6207 2008-12-02  Martin Baulig  <martin@ximian.com>
6209         * method-to-ir.c (mono_method_to_ir): Disable debugging
6210         information for the init locals block to make the debugger stop
6211         after all locals have been initalized.
6213 2008-12-02  Martin Baulig  <martin@ximian.com>
6215         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
6216         running inside the debugger.
6218 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
6220         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
6221         is enabled.
6223         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
6224         alu->alu imm optimization which only shows if deadce is disabled.
6226         * aot-compiler.c: Rename the function names for the binary and asm writers
6227         so they can coexist in the same process. Rework the xdebug code to use the
6228         asm writer. This avoids the need to call into the runtime to dump the
6229         debugging info. Add more debugging info for types.
6231         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
6233         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
6234         cpu description tables, they can't occur in cpu-<ARCH>.md.
6236         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
6237         the stack in CEE_LDFLDA. Fixes #450542.
6239         * generics.cs: Add a new test.
6241 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
6243         * mini-ops.h: updated MIPS opcodes
6244         * mini-mips.c: decompose long opts
6245         * mini-mips.h: decompose long opts
6246         
6247 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
6249         * cpu-mips.md: fix length on int_rem_un
6250         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
6251         
6252 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
6254         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
6256         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
6258 2008-11-29  Martin Baulig  <martin@ximian.com>
6260         * mini-exceptions.c (mono_handle_native_sigsegv): Check
6261         mono_debug_using_mono_debugger() in addition to the
6262         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
6264 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
6266         * mini-ops.h: updated more MIPS opcodes
6267         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
6268         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
6269         
6270 2008-11-28  Mark Probst  <mark.probst@gmail.com>
6272         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
6274 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
6276         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
6277         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
6278         * mini-ops.h: correct selected mips opcode entries
6279         
6280 2008-11-28  Mark Probst  <mark.probst@gmail.com>
6282         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
6283         make them work.
6285 2008-11-28  Mark Probst  <mark.probst@gmail.com>
6287         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
6289 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
6291         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
6292         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
6293         * mini-mips.h: disable IMT
6294         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
6295         
6296 2008-11-28  Mark Probst  <mark.probst@gmail.com>
6298         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
6300 2008-11-28  Mark Probst  <mark.probst@gmail.com>
6302         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
6304 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
6306         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
6307         consistency.
6309 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
6311         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
6312         for Set/GetVector aligned versions.
6314 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
6316         * basic-simd.cs: Add tests for Get/SetVector.
6318 2008-11-27  Mark Probst  <mark.probst@gmail.com>
6320         * mini.c: Removed g_slist_append_mempool().  Now in
6321         metadata/mempool.c.
6323 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
6325         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
6326         size properly and make the bounds check optional.
6328         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
6329         for SetVector and IsAligned.
6331 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
6333         * mini.c: Remove unused mono_normalize_opcodes () function.
6335 2008-11-26  Mark Probst  <mark.probst@gmail.com>
6337         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
6338         using the new atomic add ops now.
6340         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
6341         add.
6343 2008-11-26  Mark Probst  <mark.probst@gmail.com>
6345         * mini-ppc64.c: Several fixes.
6347 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
6349         * cpu-mips.md: added jump_table
6350         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
6352 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
6354         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
6356 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
6358         * mini-ops.h: corrected a handful of MIPS opcodes.
6360 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
6362         * aot-compiler.c: MIPS to use ELF writer
6364 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
6366         * mini-codegen.c: remove MIPS specific assert.
6368 2008-11-25  Mark Probst  <mark.probst@gmail.com>
6370         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
6371         fixes.  PPC64 now passes most of the runtime regressions.
6373 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
6375         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
6376         volatile intervals a bit.
6378 2008-11-24  Mark Probst  <mark.probst@gmail.com>
6380         * basic-long.cs: New test case.
6382 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
6384         * mini.c (mini_method_compile): Disable globalra for large methods for 
6385         now.
6387         * regalloc2.c (order_moves): Add fp support.
6389         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
6390         source bblock ends with an OP_BR_REG.
6392         * ratests.cs: Add a new test.
6394 2008-11-23  Mark Probst  <mark.probst@gmail.com>
6396         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
6397         sharing.  PPC64 now passes generics.exe.
6399 2008-11-23  Mark Probst  <mark.probst@gmail.com>
6401         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
6403 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
6405         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
6406         memory when mono_jit_info_table_find () can't find the method in the
6407         LMF case.
6409         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
6410         AOTed code too.
6411         
6412         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
6413         writer too.
6415 2008-11-23  Mark Probst  <mark.probst@gmail.com>
6417         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
6418         Several fixes.  PPC64 now runs exceptions.exe and
6419         devirtualization.exe.
6421 2008-11-22  Mark Probst  <mark.probst@gmail.com>
6423         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
6424         arrays.exe and basic-math.exe.
6426 2008-11-22  Mark Probst  <mark.probst@gmail.com>
6428         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
6429         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
6431 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
6433         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
6435 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
6437         * method-to-ir.c: Move bounds checking macros to ir-emit.h
6439         * ir-emit.h: Move macros from method-to-ir.c to here.
6441 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
6443         * mini-ops.h: Correct the long simd ops to use LREG.
6445 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
6447         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
6448         
6449         * mini-ops.h: Correct the dreg type of a few long opcodes.
6451         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
6452         Add netbsd support.
6454 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
6456         * mini-ppc.c: remove negative stack references in epilog
6457         for platforms that don't support the red zone.
6459 2008-11-21  Mark Probst  <mark.probst@gmail.com>
6461         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
6462         point regs.  Now PPC64 passes basic-calls.exe.
6464 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6466         * basic-simd.cs: Add tests for accessors of Vector2l.
6468 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6470         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
6472         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
6473         
6474         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
6476 2008-11-21  Mark Probst  <mark.probst@gmail.com>
6478         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
6479         PPC64 passes basic-long.exe.
6481 2008-11-20  Mark Probst  <mark.probst@gmail.com>
6483         * decompose.c: Decompose carry and overflow add on PPC64 like on
6484         other 64 bit archs.  Don't decompose sub at all on PPC64.
6486         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
6487         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
6488         basic-long.exe.
6490 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6492         * basic-simd.cs: Add tests for accessors of Vector2d.
6494 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6496         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
6498         * cpu-x86.md: Same.
6500         * mini-x86.c (mono_arch_output_basic_block): Same.
6501         
6502         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
6504 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6506         * basic-simd.cs: Add tests for accessors of Vector4f.
6508 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6510         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
6512         * cpu-x86.md: Same.
6514         * mini-x86.c (mono_arch_output_basic_block): Same.
6515         
6516         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
6518 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6520         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
6522 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6524         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
6526         * cpu-x86.md: Same.
6528         * mini-x86.c (mono_arch_output_basic_block): Same.
6529         
6530         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
6532 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6534         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
6536 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6538         * simd-intrinsics.c: Enable setters for Vector16sb.
6540 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6542         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
6544         * cpu-x86.md: Same.
6546         * mini-x86.c (mono_arch_output_basic_block): Same.
6547         
6548         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
6550 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
6552         * simd-intrinsics.c: Implement setter for Vector8us.
6554 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
6556         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
6557         for dead variables.
6559 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
6561         * mini-ppc.c: remove references to the red zone in the prolog
6562         (for systems that don't support it).
6564 2008-11-19  Mark Probst  <mark.probst@gmail.com>
6566         * cpu-ppc64.md: Fixed a few instruction lengths.
6568         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
6569         now.
6571 2008-11-19  Mark Probst  <mark.probst@gmail.com>
6573         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
6574         basic.exe now.
6576 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
6578         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
6580 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
6582         * mini-ops.h: Added OP_INSERT_I2.
6584         * cpu-x86.md: Same.
6586         * mini-x86.c (mono_arch_output_basic_block): Same.
6587         
6588         * simd-intrinsics.c: Implement setter for Vector8s.
6590         * simd-methods.h: Add the names of get setters of Vector8s.
6592 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
6594         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
6595         
6596         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
6597         parameters.
6599         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
6601 2008-11-18  Mark Probst  <mark.probst@gmail.com>
6603         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
6604         for PPC64.  An empty program runs now.
6606 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
6608         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
6610         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
6611         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
6612         info for JITted code is emitted into a shared library, loadable into gdb.
6614 2008-11-18  Mark Probst  <mark.probst@gmail.com>
6616         * Makefile.am: Changes to build PPC64.
6618         * mini-arch.h: Include mini-ppc64.h on PPC64.
6620 2008-11-18  Mark Probst  <mark.probst@gmail.com>
6622         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
6623         in PPC code up to r119147.
6625 2008-11-18  Mark Probst  <mark.probst@gmail.com>
6627         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
6628         cpu-ppc64.md: Changes for PPC64.
6630         Based on code submitted by andreas.faerber@web.de at
6631         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
6632         X11/MIT license.
6634 2008-11-18  Mark Probst  <mark.probst@gmail.com>
6636         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
6637         cpu-ppc64.md: Copied from the corresponding PPC files from
6638         r118846.
6640 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
6642         * mini-ops.h: Added OP_ROUND.
6644         * cpu-x86.md: Added round.
6646         * mini-x86.c: Added support for intrinsicing Math.Round (double).
6648         * basic-math.cs: Added test_0_round to test rounding.
6650         Contributed under MIT/X11 license.
6652 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
6654         * aot-compiler.c : Fix the Winx64 build.
6656         Contributed under MIT/X11 license.
6658 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
6660         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
6661         in OP_EXTRACT_R8 to avoid possible stack corruption.
6663 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
6665         * mini-ops.h: Added OP_EXTRACT_R8/I8.
6667         * cpu-x86.md: Added extract_r8.
6669         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
6670         
6671         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
6672         a couple of OP_EXTRACT_I4.
6674         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
6676         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
6678 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
6680         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
6681         and not 4.1. 
6683 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
6685         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
6686         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
6688         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
6689         are not needed any more.
6691         * mini.h: Remove the unused INS_LIST macros.
6693         * mini.c (mini_method_compile): Remove a disable globalra case which is no
6694         longer needed.
6696         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
6697         ir-emit.h.
6699         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
6700         mono_alloc_ireg () instead.
6702         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
6703         macros.
6705         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
6706         on amd64.
6708         * aot-runtime.c (load_aot_module): Disable AOT when running under
6709         CAS.
6711         * mini-amd64.h: Change the monitor fastpath defines to check for
6712         !PLATFORM_WIN32 so they work on *bsd too.
6714         * mini.h mini.c mini-hhpa.c: Remove more unused code.
6716         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
6718         * mini.h (MonoCompile): Remove new_ir flag.
6720         * regalloc.h regalloc.c: Remove unused code.
6722         * cpu-*.md: Remove more unused opcodes.
6724         * simple-cee-ops.h simple-mini-ops.h: Removed.
6726         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
6727         
6728 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
6730         * aliasing.h: Removed.
6732         * *.c: Remove references to aliasing.h and inssel.h.
6734         * mini.c: Remove additional unused functions.
6736         * mini-ops.h cpu-*.md: Remove unused opcodes.
6738 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
6740         Remove the old JIT code.
6742         * inssel*.brg: Removed.
6744         * ssa.c abcremoval.c aliasing.c: Removed.
6746         * ssa2.c: Renamed to ssa.c.
6748         * abcremoval2.c: Renamed to abcremoval.c.
6750         * *.c: Removed all !cfg->new_ir code.
6752         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
6753         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
6755         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
6756         
6757 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
6759         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
6760         to simplify the code and cut back on the number of global symbols in the AOT
6761         file.
6762         
6763         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
6765 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
6767         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
6768         with the got/got_info tables.
6770         * mini.h: Bump AOT file format version.
6771         
6772         * unwind.h: New file, contains definitions for stack unwinding.
6774         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
6775         to cfg->unwind_ops.
6776         
6777         * aot-compiler.c: Generalize the emitting of unwind information to use the
6778         information in cfg->unwind_ops.
6780         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
6782         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
6783         AOT method frames. Enable writing symbols for methods by default.
6785 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
6787         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
6788         and make it work with vectors of element sizes 1, 2 and 4.
6790         * simd-intrinsics.c: Enable getter for all vectors with element size
6791         1, 2 or 4.
6793         * simd-methods.h: Add the names of other getters.
6795         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
6797         * cpu-x86.md: Same.
6799         * mini-x86.c: Same.
6801 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
6803         * mini-ppc.h: portability fix.
6805 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
6807         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
6808         buggy and will overwrite it.
6810 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
6812         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
6813         Use it to emit local symbols for all methods so AOTed methods show up with
6814         their full name in gdb/valgrind output.
6816 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6818         * mini-ppc.c: portability fixes.
6820 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
6822         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
6823         entries out of the if (!generic_shared...) code so it is always done.
6824         (mono_class_init_trampoline): Do the patching when running under valgrind
6825         too, newer versions of valgrind have no problems with it.
6827 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
6829         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
6830         further sections.
6832 2008-11-13  Mark Probst  <mark.probst@gmail.com>
6834         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
6835         filters.
6837 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
6839         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
6841 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
6843         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
6845         * cpu-x86.md: Same.
6847         * mini-x86.c: Same.
6849         * simd-intrinsics.c: Same.
6851 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
6853         * simd-intrinsics.c: Enable constructor intrinsics for all types.
6855 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
6857         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
6858         to work with more Vector types.
6860 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
6862         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
6863         store the elemens directly instead of using and intermediate.
6865 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
6867         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
6869         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
6870         to preserve %eax for aot plt trampolines.
6872         * aot-compiler.c (compile_method): Don't skip synchronized methods.
6873         (encode_method_ref): Flag synchronized methods so they won't go through
6874         the AOT trampoline.
6876         * aot-compiler.c: Additional work to support AOTing synchronized methods/
6877         wrappers.
6879         * cpu-ia64.md (jmp): Increase max length.
6881 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
6883         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
6884         open generic classes.
6886         * aot-compiler.c: Enable the ELF writer on ELF platforms.
6888         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
6889         box+brtrue optimization since it causes test failures on x86.
6891 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
6893         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
6895         * cpu-x86.md: Same.
6897         * mini-x86.c: Same.
6899         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
6900         for simd ctor values. 
6902         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
6903         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
6905 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
6907         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
6908         LogicalRightShift.
6910         * simd-instrincs.c: Same.
6912         * basic-simd.cs: Same.
6914 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
6916         * ratests.cs: Add more tests.
6918         * regalloc2.c (add_spill_code): Handle more corner cases.
6920 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
6922         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
6923         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
6924         both the source an destination of an instruction.
6926 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
6928         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
6929         wapihandles.c: more portability changes.
6931 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
6933         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
6934         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
6935         safe to execute in a signal handler and the kernel provides better
6936         the info in /proc/self/smaps. Avoid the assert on sigaction during
6937         cleanup.
6939 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
6941         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
6942         do the bblock linking hack if it is actually needed.
6944         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
6945         up linking.
6947         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
6948         crash problem is fixed.
6950         * branch-opts.c (mono_remove_critical_edges): Link up newly added
6951         bblocks.
6953         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
6954         for catch clauses.
6955         (mini_method_compile): Set the starting value of next_vreg to 
6956         MAX_IREGS + MAX_FREGS when using globalra.
6958         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
6959         filter clauses with BB_EXCEPTION_HANDLER.
6961         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
6963 2008-11-10  Mark Probst  <mark.probst@gmail.com>
6965         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
6966         space for stdcall.  Fixes regressions on Win32.
6968 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
6970         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
6971         bblocks.
6972         (linear_scan): Remove an assert which doesn't seem to be needed.
6974         * local-propagation.c (mono_local_deadce): Avoid a call to
6975         MONO_DELETE_INS which would screw up the instruction linking.
6977         * mini.c (mono_decompose_op_imm): Make this work with globalra.
6979         * regalloc2.c: Upgrade to work the current JIT code.
6981 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
6983         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
6984         case.
6986         * aot-runtime.c: Remove some dead code.
6988         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
6989         consistency.
6990         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
6992         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
6993         trampolines using sscanf since atoi doesn't work on large unsigned values.
6995         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
6996         Initialize code_size.
6998 2008-11-08  Mark Probst  <mark.probst@gmail.com>
7000         * method-to-ir.c (mini_emit_inst_for_method): Make
7001         Interlocked.CompareExchange work for Int arguments on 32 bit
7002         archs, as well.
7004 2008-11-07  Mark Probst  <mark.probst@gmail.com>
7006         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
7008 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
7010         * main.c Fix MSVC build.
7012         Contributed under MIT/X11 license.
7014 2008-11-06  Mark Probst  <mark.probst@gmail.com>
7016         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
7017         alignment larger than 8 bytes are aligned correctly, too.
7019         * mini.c: Honor the min_align field of MonoClass when laying out
7020         the stack.
7022 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
7024         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
7026         * aot-compiler.c (emit_plt): Fix a warning.
7027         
7028         * aot-compiler.c: Implement ARM support in the binary writer.
7030 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7032         * basic-simd.cs: Add test for getter with byref arg.
7033         Fix the naming of a few tests.
7034         Add missing checks to a test.
7036 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
7038         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
7040         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
7041         most of the full-aot support for monitor enter/exit trampolines.
7043         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
7044         enter/exit trampoline creation functions.
7046         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
7047         make dist.
7049 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
7051         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
7052         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
7053         implement the needed functionality without adding crap to the runtime.
7055 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
7057         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
7058         non-x86 builds.
7060         * mini.c (mono_build_date): New global version holding the build date in
7061         string format.
7062         
7063         * Makefile.am (buildver.c): Generate a file containing the build date.
7065         * main.c: Set the build date from the generated file.
7067         * mini.c (mono_get_runtime_build_info): New helper function returning build
7068         information in a string format.
7069         
7070         * driver.c (mono_main): Print the build date in --version.
7072         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
7073         file when the bind-to-runtime-version option is used.
7075 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7077         * simd-intrinsics.c: Fix bug when using getters and byref args. 
7079 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7081         * simd-methods.h: Rename prefetch methods.
7083         * simd-intrinsics.c: Same.      
7085 2008-11-05  Mark Probst  <mark.probst@gmail.com>
7087         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
7088         sizes.
7090 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
7092         * aot-compiler.c: Use the bundled elf header files instead of depending on
7093         the system one.
7094         
7095         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
7096         mempool.
7098         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
7099         on every call.
7101 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
7103         * cpu-x86.md: Add store nta ops.
7105         * mini-ops.h: Same.
7107         * mini-x86.c: Same.
7109         * mini.h: Add an enum for simd prefetch modes.
7111         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
7112         of store. Use the changed code to support store nta.
7114         * simd-intrinsics.c: Add prefetch ops for all vector types.
7116 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
7118         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
7119         threads.
7120         
7121         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
7122         names.
7124         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
7125         trampolines.
7127 2008-11-04  Mark Probst  <mark.probst@gmail.com>
7129         * mini-x86.c: Fixed commit.
7131 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
7133         * aot-compiler.c (emit_plt): Align the plt section only on x86.
7135 2008-11-04  Mark Probst  <mark.probst@gmail.com>
7137         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
7138         and MONITOR_EXIT, for the ASM fastpaths.
7140         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
7141         available.
7143         * mini.c, patch-info.h: Signature and patch infos for
7144         Monitor.Enter/Exit trampolines.
7146         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
7148         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
7149         Monitor.Enter/Exit ASM fastpath for Linux.
7151 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
7153         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
7155         * objects.cs: Add a new test.
7156         
7157         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
7159         * aot-runtime.c (load_method): Run class initialization in the PLT case even
7160         if MONO_LOG_LEVEL is set.
7162         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
7164         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
7166         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
7167         
7168         * aot-compiler.c: Change the relocation code to use virtual addresses instead
7169         of file offsets. Align the sections belonging to the data segment to 
7170         PAGESIZE.
7172 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
7174         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
7175         elf.h. Port it to amd64.
7177 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
7179         * driver.c: Enable SIMD by default.
7181 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
7183         * cpu-x86.md: Add prefetch op.
7185         * mini-ops.h: Same.
7187         * mini-x86.c: Same.
7189         * mini.h: Add an enum for simd prefetch modes.
7191         * simd-methods.h: Add prefetch function names.
7193         * simd-intrinsics.c: Add prefetch ops for all vector types.
7195 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
7197         * aot-compiler.c (emit_bytes): Speed this up a little.
7199 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
7201         * aot-compiler.c: Add JIT time etc. statistics.
7202         
7203         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
7205         * mini.h (MonoCompile): Add 'got_offset' field.
7207         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
7208         method_got_offsets array.
7210         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
7211         wrappers.
7213         * aot-compiler.c (compile_method): Add generic method instances referenced
7214         by the method to the list of methods to be compiled, this is required so if
7215         A<T> references B<T>, and another assembly references A<int>, then it will
7216         also get a copy of B<int>.
7218         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
7219         when checking for monitor enter/exit.
7221 2008-10-30  Mark Probst  <mark.probst@gmail.com>
7223         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
7224         for Monitor.Enter and Monitor.Exit if enabled.
7226         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
7227         Solaris.
7229 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
7231         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
7232         of an OP_MOVE. Fixes #440046.
7234         * basic-long.cs: Add a new test.
7236 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
7238         * mini.h: Add synchronization note for the managed counter-part.
7240         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
7241         returns the simd caps of the current cpu.
7243 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
7245         * basic-simd.cs: Remove Console.WriteLine.
7247 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
7249         * basic-simd.cs: New tests for Vector2ul.
7251 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
7253         * simd-intrinsics.c: Add new vector type Vector2ul.
7255 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
7257         * basic-simd.cs: New tests for Vector2l.
7259 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
7261         * cpu-x86.md: Add long version of most packed int ops.
7263         * mini-ops.h: Same.
7265         * mini-x86.h: Same.
7267         * simd-intrinsics.c: Add new vector type Vector2l.
7269 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
7271         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
7273         * simd-methods.h: Remove SN_op_BitwiseXor.
7275 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
7277         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
7278         alignment.
7280 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
7282         * basic-simd.cs: Test for Vector2d.
7284         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
7285         value.
7287 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
7289         * cpu-x86.md: Add double version of all packed float ops.
7291         * mini-ops.h: Same.
7293         * mini-x86.h: Same.
7295         * simd-intrinsics.c: Add new vector type Vector2d.
7297         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
7299         * simd-methods.h: Add Duplicate.
7301 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
7303         * basic-simd.cs: Test for packing with signed saturation.
7305 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
7307         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
7308         found in the TYPESPEC table.
7310 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
7312         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
7313         too.
7315         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
7317         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
7318         instead of the RVA, since the RVA can be changed by tools like the cil 
7319         stripper.
7321         * method-to-ir.c (mono_method_to_ir2): Ditto.
7323         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
7324         (deserialize_variable): Ditto.
7326 2008-10-25  Martin Baulig  <martin@ximian.com>
7328         * debug-mini.c (write_variable): Use
7329         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
7331 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7333         * cpu-x86.md: Add unsigned variants of packd and packw.
7335         * mini-ops.h: Same.
7337         * mini-x86.h: Emit the right instruction for packd and packw.
7338         Add unsigned variants of packd and packw.
7340         * simd-intrinsics.c: Packd and packw were used in place of their
7341         unsigned variants. Change that.
7342         Add intrinsics for (Signed)PackWithSignedSaturation.
7344         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
7346 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7348         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
7350 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7352         * mini-ops.h: Remove dword packed add/sub with saturation ops.
7354         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
7356         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
7357         sse instructions.
7359         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
7361 2008-10-24  Mark Probst  <mark.probst@gmail.com>
7363         * method-to-ir.c, mini.c: Special casing for the synchronized
7364         wrapper for the ldtoken+GetTypeFromHandle case.
7366 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
7368         * mini.c (mono_replace_ins): Move this to branch-opts.c.
7370         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
7371         created/split bblocks.
7373 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7375         * mini-ops.h: Add packed signed mul high.
7376         
7377         * cpu-x86.md: Same.
7379         * mini-x86.c (mono_arch_output_basic_block): Same.
7381         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
7383         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
7385 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7387         * basic-simd.cs: Tests for Vector16sb.
7389 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
7391         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
7393 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
7395         * mini-ops.h: Add packed signed min, max and compare greater.
7396         
7397         * cpu-x86.md: Same.
7399         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
7400         saturation.
7402         * simd-methods.h: Add CompareGreaterThan.
7404         * simd-methods.h: Remove CompareEquals.
7406         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
7408         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
7410         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
7411         CompareEqual.
7413 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
7415         * basic-simd.cs: Fix tests due to change in the API.
7417 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
7419         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
7421 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
7423         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
7425         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
7426         inst_offset as this has invalid values for LDADDR.
7428 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
7430         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
7432         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
7434 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
7436         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
7437         for accessing field->data.
7439 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
7441         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
7443 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
7445         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
7447         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
7449 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
7451         * dominators.c (mono_compute_natural_loops): Allocate GList enties
7452         from the cfg mempool.
7454 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
7456         * basic-simd.cs: Tests for new methods in Vector8us.
7458 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
7460         * mini-ops.h: Add multiply and store high.
7461         
7462         * cpu-x86.md: Same.
7464         * mini-x86.c (mono_arch_output_basic_block): Same.
7466         * simd-methods.h: Same.
7468         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
7469         and CompareEqual.
7471 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
7473         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
7474         mono_class_setup_vtable ().
7476         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
7477         mono_class_get_vtable_entry () for accessing klass->vtable.
7479         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
7481         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
7482         found.
7484         * method-to-ir.c (mono_save_token_info): Don't save references made from
7485         wrappers.
7487         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
7488         of generic instances.
7490         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
7492 2008-10-19  Mark Probst  <mark.probst@gmail.com>
7494         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
7495         OP_JMP depends on the method signature.  Calculate it properly.
7497 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
7498         
7499         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
7500         called directly.
7502         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
7503         instances.
7504         (emit_extra_methods): Add another table mapping method indexes to 
7505         offsets in the extra_method_info table.
7507         * mini.h: Bump AOT file format version.
7508         
7509         * aot-runtime.c: Merge most of the code from mono_aot_get_method
7510         and mono_aot_get_method_from_token () into one function.
7512 2008-10-19  Mark Probst  <mark.probst@gmail.com>
7514         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
7515         separate counter.
7517 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
7519         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
7520         methods.
7522         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
7523         disable_aot.
7525         * mini.c (mono_patch_info_equal): Compare the generic context as well.
7527         * mini.h: Bump aot file format version.
7529         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
7530         AOT file can contain native code for methods which are not in the METHOD
7531         table. Generate code for non-sharable generic instances of generic methods
7532         found in the METHODSPEC table.
7533         
7534         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
7535         encoding generic type handles.
7537         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
7538         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
7540         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
7541         macros + MONO_ADD_INS.
7543         * mini.c (mono_jump_info_token_new2): New function which takes a generic
7544         context as well.
7546         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
7548         * mini.h: Bump aot file format version.
7550         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
7552 2008-10-17  Mark Probst  <mark.probst@gmail.com>
7554         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
7555         platforms, with definable stack alignment value.  Set to 16 now
7556         for all platforms.
7558         * mini.c, mini.h, driver.c: Command line option for disabling
7559         stack alignment.
7561 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
7563         * basic-simd.cs: Tests for new methods in Vector4ui.
7565 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
7567         * mini-ops.h: Add packed int shuffle.
7568         
7569         * cpu-x86.md: Same.
7571         * mini-x86.c (mono_arch_output_basic_block): Same.
7573         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
7574         extract mask, max, min, shuffle.
7576         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
7578 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
7580         * basic-simd.cs: Tests for new methods in Vector8us.
7582 2008-10-17  Mark Probst  <mark.probst@gmail.com>
7584         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
7585         RuntimeTypeHandle, not a TypedReference.
7587 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
7589         * simd-intrinsics.c: remove relocations.
7591 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
7593         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
7594         optimizations from the x86 backend.
7596 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
7598         * simd-methods.h, simd-intrinsics.c: debloat method names and
7599         prepare for no relocations.
7601 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
7603         * mini-ops.h: Add packed min/equal and sum of absolute differences.
7604         
7605         * cpu-x86.md: Same.
7607         * mini-x86.c (mono_arch_output_basic_block): Same.
7609         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
7610         extract mask, max, min and sum of absolute differences.
7612         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
7613         method name.
7615 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
7617         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
7618         Renamed one test for consistency.
7620 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
7622         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
7623         fix to the code that deal with other blocks.
7625 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
7627         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
7629 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
7631         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
7632         that deals with vreg interference. Explicitly check for OP_LDADDR to be
7633         able to process the source reg.
7635 2008-10-16  Martin Baulig  <martin@ximian.com>
7637         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
7639         * inssel.brg: Add `OP_HARD_NOP'.
7641         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
7643         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
7644         `OP_HARD_NOP' instruction when running inside the debugger.
7646         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
7647         `OP_HARD_NOP' instruction when running inside the debugger.
7649 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
7651         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
7652         now works. The issue with the regalloc tripping up no longer
7653         happens.
7655         * simd-intrinsics.c (load_simd_vreg): Same.
7657 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
7658         
7659         * basic-simd.cs: Tests for new Vector8ui methods.
7661 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
7663         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
7664         only for type. This fixes crashes where MonoInst::klass is checked
7665         for ops of type != VTYPE or OBJ.
7667         * simd-intrinsics.c (load_simd_vreg): Same.
7669 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
7671         * mini-ops.h: Add ops for packed shuffle/max/avg and
7672         extract mask.
7673         
7674         * cpu-x86.md: Same.
7676         * mini-x86.c (mono_arch_output_basic_block): Same.
7678         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
7679         extract mask.
7681         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
7682         to emit extract mask op.
7684         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
7685         to emit word shuffles.
7687 2008-10-15  Mark Probst  <mark.probst@gmail.com>
7689         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
7690         the largest alignment needed by a variable, but at least
7691         sizeof(gpointer).
7693 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
7695         * basic-simd.cs: Tests for the fixes in the last commit.
7697 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
7699         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
7700         no longer handles STACK_PTR input.
7702         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
7704         * simd-intrinsics.c (load_simd_vreg): New function that works like 
7705         get_simd_vreg   but handles STACK_PTR input.
7707         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
7708         as the input can be an arbitrary pointer.
7710         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
7711         LDADDR local optimization directly otherwise use a store op.
7713 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
7715         * basic-simd.cs: Tests for dup low and dup high.
7717 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
7719         * mini-ops.h: Add dup low and dup high ops.
7720         
7721         * cpu-x86.md: Same.
7723         * mini-x86.c (mono_arch_output_basic_block): Same.
7725         * simd-intrinsics.c (vector4f_intrinsics): Same.
7727 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
7729         * basic-simd.cs: Tests for recently added functionality.
7731 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
7733         * mini-ops.h: Add remaining sse1 fp ops.
7734         
7735         * cpu-x86.md: Add remaining sse1 fp ops.
7737         * mini-x86.c (mono_arch_output_basic_block): Same.
7739         * mini.h: Add enum for simd FP compare conditions.
7741         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
7743         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
7744         so the backed can generate the appropriate op.
7746 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
7747         This patch squeese one more byte from the SimdIntrinsc struct.
7749         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
7750         a a shift amount intead of simply or'ing it.
7752         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
7754         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
7755         byte so we can have an aditional flags field without increasing struct size.
7757         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
7758         against the simd_supported_versions bitmask.
7760         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
7762 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
7764         * mini.c: remove rawbuffer code (the only use here is unsafe because
7765         it takes locks during signal handling and the kernel now provides much
7766         better info in proc/pid/smaps these days).
7768 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
7770         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
7771         OP_X86_PUSH_OBJ. Fixes #434620.
7773         * objects.cs: Add a test.
7774         
7775 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
7777         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
7778         that the packuswb/packusdw don't work with unsigned numbers for what
7779         would be negative numbers in signed format.
7781         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
7782         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
7784         * mini-ops.h: Add doubleword forms of many ops and packing ones.
7786         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
7788         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
7790         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
7792         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
7793         add more ops.
7795         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
7796         version as the enum in mini.h.
7798         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
7799         for sse3 ops, check the simd_version field if present. This way the code
7800         works with all versions of sse.
7802 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7804         * simd-intrinsics.c: Fixed intrinsic name typo.
7806         * mini.h: Added missing simd exported function.
7808         * basic-simd.cs: Added tests for Vector4ui.
7809         Fixed broken test for Vector16b.
7811 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
7813         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
7814         the max length to 64.
7816 2008-10-10  Mark Probst  <mark.probst@gmail.com>
7818         * method-to-ir.c: Only do the fast virtual generic method call for
7819         non-wrapper methods.
7821         * mini.h, mini-trampolines.c: The new generic virtual remoting
7822         trampoline handles virtual method calls via the vtable (as done by
7823         the fast virtual generic method calls) to remoting proxies.
7825         * mini.c (mono_jit_create_remoting_trampoline): For generic
7826         methods reate a generic virtual remoting trampoline.
7828         * mini-amd64.h: Enable fast virtual generic method calls again.
7830 2008-10-10  Mark Probst  <mark.probst@gmail.com>
7832         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
7833         restore registers when doing tail calls.
7835 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7837         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
7838         Vector4ui.
7840 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7842         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
7844 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7846         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
7848 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7850         * basic-simd.cs: Retrofit for API changes.
7852 2008-10-10  Mark Probst  <mark.probst@gmail.com>
7854         * mini-ppc.c: Handle integer stack arguments for tail calls.
7856 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
7858         * optflags-def.h: Removed sse3 optimization.
7860         * driver.c: Same.
7862         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
7863         sse3.
7865         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
7867         * mini.h: Added enumeration with simd versions.
7869         * simd-intrinsics.c (emit_intrinsics): Use the new static var
7870         for detecting SSE3.
7872         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
7874         * mini.c (mini_init): Call mono_simd_intrinsics_init.
7876 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
7878         * basic-simd.cs: Added tests for Vector8u and Vector16u.
7880         * basic-simd.cs: Fixed test naming.
7882 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
7884         * mini-ops.h: Added ops for packed and saturated math, shifts
7885         and packing/unpacking.
7887         * cpu-x86.md: Added descriptors for the above ops.
7889         * mini-x86.c: Added code to emmit the above ops.
7891         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
7893 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
7895         * aot-compiler.c (compile_method): Enable AOT for generic code.
7897         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
7899 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
7901         * mini.c: add a workaround for a common screwup that ends up blamed
7902         to mono (other processes blocking signal delivery).
7904 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
7906         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
7907         in the LDFLD/STFLD opcodes. Fixes #432673.
7909         * iltests.il.in: Add a new test.
7911 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
7913         * mini-arm.c: attach the thread in unmanaged->managed transitions
7914         using delegates (bug #433148).
7916 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
7918        * basic-simd.cs: Use new ShuffleSel constants.
7920 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
7922         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
7924         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
7925         only disable simd intrinsics if no sse2 is detected.
7927         * optflags-def.h: Added sse3.
7929         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
7930         is disabled.
7932 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
7934         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
7935         when adding delegate-invoke wrappers.
7937 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
7939         * Makefile.am: Reenable the simd tests.
7941 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
7943         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
7944           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
7945           other vreg is allocated to that hreg.
7947         Contributed under MIT/X11 license.
7949 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
7951         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
7952         yet checked in.
7954 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
7956         * basic-simd.cs: New test suite for SIMD intrinsics.
7958         * Makefile.am: Added new tests.
7960 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
7962         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
7964         * mini-ops.h: Same.
7966         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
7968         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
7969         using SSE2 aware opcodes.
7971         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
7972         is enabled, this code path is only reachable if conversion ops are emmited after
7973         mono_method_to_ir.
7975         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
7977         This optimization saves 6 bytes per conversion against the old version.
7979 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
7981         * aot-compiler.c (compile_method): Don't skip methods referencing 
7982         generic methods without a corresponding entry in token_info_hash, since
7983         encode_method_ref () can handle all generic methods now.
7985         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
7986         generic context is set.
7987         
7988         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
7989         generic sharing of LDTOKEN.
7991 2008-10-06  Mark Probst  <mark.probst@gmail.com>
7993         * mini-amd64.h: Temporarily disabled fast virtual generic method
7994         calls because it breaks the System.Runtime.Remoting tests.
7996 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
7998         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
8000         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
8001         so inlining actually works.
8002         (check_inline_caller_method_name_limit): Ditto.
8004 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
8006         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
8007         64 bit safety (from Olaf Hering and Andreas Farber).
8009 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
8010         
8011         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
8012         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
8013         unused virtual call support code.
8015         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
8016         
8017         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
8018         which can't use aot trampolines.
8019         (decode_patch): Don't create aot trampolines for methods which can't use
8020         them.
8022         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
8023         use aot trampolines.
8025         * mini.h: Bump AOT image format version.
8026         
8027 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
8029         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
8030         to save_token_info () since cmethod is inflated for constrained calls.
8032         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
8034 2008-10-04  Andreas Farber  <andreas.faerber@web.de>
8036         * Makefile.am: Add build rules for ppc64.
8037         This avoids the build failing at pedump with unresolved symbols
8038         due to lack of arch_sources. Instead it will now fail earlier
8039         due to lack of cpu-ppc64.md.
8041         Contributed under MIT/X11 license.
8043 2008-10-04  Mark Probst  <mark.probst@gmail.com>
8045         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
8046         tail calls.
8048         * iltests.il.in: Add test case for tail call with many arguments.
8050 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
8052         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
8053         to the fast virtual generic method code until the aot case is fixed.
8055 2008-10-03  Mark Probst  <mark.probst@gmail.com>
8057         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
8059 2008-10-03  Mark Probst  <mark.probst@gmail.com>
8061         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
8062         thunks.
8064 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
8065         
8066         * simd-intrinsics.c: Forgot to add this one.
8068         * mini-codegen.c: Fix macro in case SIMD is not supported.
8070 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
8071         
8072         This patch land initial JIT support for simd intrinsics.
8074         * mini-x86.h: Added new define to make --enable_minimal work on x86.
8076         * Makefile.am: Added simd-intrinsics.c
8078         * simd-intrinsics.c: New file with simd instrinsic related
8079         code.
8081         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
8083         * cpu-x86.md: Add simd related instructions.
8085         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
8087         * driver.c: Added two new --regression variants.
8089         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
8091         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
8093         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
8094         extract some complicated logic to helper functions.
8096         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
8098         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
8100         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
8101         the specialized simplification pass.
8103         * method-to-ir.c (mono_spill_global_vars): Use new macro.
8105         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
8107         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
8108         table.
8110         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
8111         if MONO_ARCH_NEED_SIMD_BANK is defined.
8113         * mini-ops.h: Added the new simd ops.
8115         * mini-x86.c: Added mono_arch_xregname.
8117         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
8119         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
8121         * mini-x86.h: Define simd related MONO_ARCH macros.
8123         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
8125         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
8127         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
8128         MONO_CLASS_IS_SIMD to deal with simd related IR.
8130         * mini.h (MonoInst): Added spill_var to the backend union.
8132         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
8134         * mini.h: Added forward declarations of the new simd fuctions.
8136         * optflags-def.h: Added new optimization names SIMD.
8138         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
8140         * regalloc.h: Added support for working with 3 register banks.
8142         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
8144         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
8146 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
8148         * mini-exceptions.c: remove 64 bit related ifdef clutter.
8150 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
8152         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
8153         instead of one on 64 bit systems.
8155         * method-to-ir.c: Remove unused includes.
8157 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
8159         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
8160         cfg->used_int_regs, since the two are different on arm.
8162 2008-10-02  Mark Probst  <mark.probst@gmail.com>
8164         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
8165         mono_method_get_vtable_index() to get the vtable index.
8167 2008-10-02  Mark Probst  <mark.probst@gmail.com>
8169         * method-to-ir.c (mono_method_to_ir2): Don't create native
8170         wrappers for array methods, because they're never called (and if
8171         they were called they wouldn't work).
8173 2008-10-02  Mark Probst  <mark.probst@gmail.com>
8175         * method-to-ir.c (mono_method_to_ir2): Array methods are
8176         special-cased and must not be invoked indirectly via the (M)RGCTX
8177         when generic sharing is turned on.  Fixes #431413.
8179 2008-10-01  Mark Probst  <mark.probst@gmail.com>
8181         * method-to-ir.c: When generic sharing is active, call
8182         non-interface virtual generic methods via the standard trampoline.
8184         * mini-trampolines.c: Handle virtual generic shared methods.
8186         * mini.h, mini-x86.c, mini-x86.h: New argument for
8187         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
8188         method thunks and which is the trampoline to call if the lookup
8189         fails.  Enable the virtual generic method thunk for x86.
8191         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
8192         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
8193         argument but assert that it's NULL, because these archs don't yet
8194         implement the virtual generic method thunk.  Changes in the IMT
8195         thunk data structures.
8197 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
8199         * aot-compiler.c (emit_globals): Avoid invalid characters in
8200         the static linking symbol.
8202         * objects.cs: Add a test for the range check optimization. Fix warnings.
8204         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
8205         optimization from the current JIT.
8207         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
8208         later in decompose_array_access_opts () to allow more optimizations.
8210         * method-to-ir.c (mono_handle_soft_float): Rename this to 
8211         mono_decompose_soft_float () for consistency.
8213         * mini-ops.h: Fix arguments of OP_STRLEN.
8215         * method-to-ir.c (save_cast_details): Extract the cast details saving code
8216         into a separate function.
8217         (reset_cast_details): Ditto.
8218         (handle_unbox): Save cast details. Fixes #431254.
8220         * method-to-ir.c: Remove some obsolete FIXMEs.
8222 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
8224         * ir-emit.h (alloc_dreg): Write a warning before crashing.
8226 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
8228         * mini-codegen.c: More work on macros to make them
8229         ready for multiple regbanks.
8231 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
8233         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
8235         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
8237 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
8239         * mini-codegen.c (mono_spillvar_offset): Proper support for
8240         multiple regbanks.
8242 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
8244         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
8245         the stack overflow changes.
8247 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
8249         * mini-codegen.c: Make all bank macros depend on reg_bank.
8251         * mini-codegen.c (mono_local_regalloc): Make free mask
8252         initialization regbank aware.
8254 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
8256         * mini-codegen.c (mono_local_regalloc): Extract callee
8257         mask selection to a function and make it regbank aware.
8259 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
8261         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
8262         code to deal with many regbanks.
8264 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
8266         * mini-codegen.c: More fp->regbank changes.
8268 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
8270         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
8271         of a hardcoded constant.
8273 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
8275         * method-to-ir.c (type_from_stack_type): Fix typo.
8277 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
8279         * mini-ia64.c (emit_move_return_value): Convert float return values to
8280         double.
8282         * objects.cs: Add a new test.
8283         
8284         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
8285         VARARG methods to fix an assert later.
8287         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
8288         end so it at least compiles.
8290 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
8292         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
8294 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
8296         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
8297         optimization to a new function (emit_optimized_ldloca_ir) and enable
8298         it for both ldloca and ldloca_s.
8300 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
8302         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
8303         gshared CASTCLASS code.
8305         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
8306         amd64, where the libc stack unwinder encounters stack frames referring to
8307         native code in unmapped memory.
8309         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
8310         sharing.
8312         * generics.cs: Add new test.
8314 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
8316         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
8317         add a check that one of the ARM_FPU_ constants is defined.
8319         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
8320         
8321         * mini-exceptions.c: Fix build on non-altstack platforms.
8323         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
8324         sharing of vtypes.
8326         * ir-emit.h: Add a comment to NEW_PCONST.
8328         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
8330         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
8332         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
8333         after the changes to MonoJitDomainInfo.
8335 2008-09-27  Mark Probst  <mark.probst@gmail.com>
8337         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
8339 2008-09-27  Mark Probst  <mark.probst@gmail.com>
8341         * mini-ppc.c: Compiler warning fixes.
8343 2008-09-27  Mark Probst  <mark.probst@gmail.com>
8345         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
8346         for pinvokes.
8348 2008-09-27  Mark Probst  <mark.probst@gmail.com>
8350         * exceptions-ppc.c, mini-ppc.h: Compile
8351         mono_arch_handle_altstack_exception() on Darwin, too.
8353 2008-09-27  Mark Probst  <mark.probst@gmail.com>
8355         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
8356         work on archs which don't have generic sharing implemented, only
8357         without the vtable_arg.
8359 2008-09-26  Mark Probst  <mark.probst@gmail.com>
8361         * mini.c: Added comment explaining why delegate ctor icall
8362         wrappers are compiled.
8364 2008-09-26  Mark Probst  <mark.probst@gmail.com>
8366         * mini.c: Don't produce trampolines to delegate ctor icall
8367         wrappers but compile them upfront.
8369 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
8371         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
8372         runtime-set function when going back to managed code. Currently this
8373         is used to set back the protection on the soft ovf pages and/or to
8374         throw the stack overflow exception that happened in unmanaged code.
8376 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
8378         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
8379         runtime-set function when going back to managed code. Currently this
8380         is used to set back the protection on the soft ovf pages and/or to
8381         throw the stack overflow exception that happened in unmanaged code.
8383 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
8385         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
8386         the support code for restoring stack protection after stack overflows
8387         that happen in unmanaged code. Don't set the exec permission on the
8388         soft overflow area.
8390 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
8392         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
8393         delegate->method_ptr is set. Fixes #428054.
8395 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
8397         * tests.cs: Rename to ratests.cs.
8399         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
8400         emit_get_rgctx_... functions.
8402 2008-09-25  Mark Probst  <mark.probst@gmail.com>
8404         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
8406 2008-09-25  Mark Probst  <mark.probst@gmail.com>
8408         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
8409         before asserting that method is sharable.
8411 2008-09-25  Mark Probst  <mark.probst@gmail.com>
8413         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
8414         whether method needs a static RGCTX wrapper used instead of
8415         complex conditions.
8417         * generic-sharing.c, mini.h: A few functions moved to
8418         metadata/generic-sharing.c.
8420 2008-09-25  Mark Probst  <mark.probst@gmail.com>
8422         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
8423         Generic code sharing for value types, which essentially means
8424         treating value type methods like static methods.  The RGCTX is
8425         passed in the same way.
8427 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
8429         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
8430         opcode when creating multi-dimensional arrays of open types.
8432         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
8433         open generic types.
8435         * generics.cs: Add a test.
8437         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
8439 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
8441         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
8443         * mini.c (mini_method_compile): Set it when running under the debugger. 
8445         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
8446         vreg optimization if the flag is set.
8448         * driver.c (mono_main): Add --attach= option to pass options to
8449         the attach agent.
8451         * mini.c (sigquit_signal_handler): Start the attach agent.
8453         * ssapre.c: Disable this to save space since it is not yet ported to
8454         linear IR.
8456         * regalloc2.c: Disable this to save space.
8458         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
8460 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
8462         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
8463         the -v option useful again.
8465 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
8467         * mini-amd64.c (mono_arch_output_basic_block): Add support for
8468         --break-at-bb.
8470         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
8471         arrays of arrays. Fixes #428406.
8473         * method-to-ir.c (mini_emit_castclass): Ditto.
8475         * objects.cs: Add new test.
8476         
8477 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
8479         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
8480         was wrong at it choked against target_type_is_incompatible for byref types.
8482 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
8484         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
8485         places.
8487 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
8489         * mini-exceptions.c: update a few more exceptions-related counters.
8491 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
8493         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
8494         new functions to allocate from persistent mempools.
8496 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
8498         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
8499         multiple register banks in the future.
8501         * mini-codegen.c (mono_local_regalloc): Fix a warning.
8503 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
8505         * mini.c (type_to_eval_stack_type): Remove duplicated function.
8507         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
8509         * mini.h: Export type_to_eval_stack_type.
8511         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
8512         is only ins->klass of byref types.
8514 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
8516         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
8517         (mini_emit_memcpy2): Ditto.
8519         * mini-amd64.c: Fix a warning.
8521 2008-09-21  Mark Probst  <mark.probst@gmail.com>
8523         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
8524         linking.
8526 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
8528         * method-to-ir.c: Extract stloc micro-optimization to a
8529         function and apply it to all cases.
8531 2008-09-19  Mark Probst  <mark.probst@gmail.com>
8533         * method-to-ir.c: Don't fail generic code sharing in cases we
8534         already support.
8536 2008-09-18  Mark Probst  <mark.probst@gmail.com>
8538         * mini-ppc.c: Handle structs in tailcalls on Darwin.
8540 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
8542         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
8543         implementation.
8545 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
8547         * trace.c: make tracing more useful and correct, with per-thread
8548         id and indent info.
8550 2008-09-15  Mark Probst  <mark.probst@gmail.com>
8552         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
8553         doing a method call and the argument is an R4.
8555 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
8557         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
8558         generic methods.
8560 2008-09-13  Mark Probst  <mark.probst@gmail.com>
8562         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
8564 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
8566         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
8567         (MONO_JUMP_TABLE_FROM_INS): Ditto.
8569 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
8571         * driver.c: Add a --agent argument (not supported yet) to load managed
8572         agent assemblies before loading the main assembly, similarly to how the
8573         Java VM handles agents.
8575 2008-09-11  Mark Probst  <mark.probst@gmail.com>
8577         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
8578         function to do stack layout of local variables.
8580 2008-09-11  Mark Probst  <mark.probst@gmail.com>
8582         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
8583         calculation.
8585 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
8587         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
8588         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
8589         JIT if DISABLE_JIT is defined.
8591         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
8592         defined.
8594 2008-09-10  Mark Probst  <mark.probst@gmail.com>
8596         * iltests.il.in: Disable the fconv test on PPC (the result is
8597         undefined according to ECMA).
8599 2008-09-10  Mark Probst  <mark.probst@gmail.com>
8601         * iltests.il.in: Enable tail call tests for PPC.
8603         * mini.h: Add variable for storing incoming valuetype argument
8604         addresses for tail calls.
8606         * mini-ppc.c: Implement valuetype arguments and return values for
8607         tailcalls on Linux.
8609 2008-09-09  Mark Probst  <mark.probst@gmail.com>
8611         * mini-ppc.c: Partially implement tail calls (struct arguments and
8612         return values not supported).
8614         * method-to-ir.c: Enable tail calls on PPC.
8616 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
8618         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
8619         runtime-invoke wrappers to work around the problem of them getting
8620         assigned to a random class.
8622         * aot-runtime.c (mono_aot_get_method): Ditto.
8623         
8624 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
8626         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
8627         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
8629 2008-09-07  Mark Probst  <mark.probst@gmail.com>
8631         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
8632         until they're implemented properly.
8634         * exceptions-ppc.c: Use arch-independent exception-handling code
8635         instead of custom one.
8637         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
8638         for Linear IR.
8640         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
8642         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
8643         applies when __powerpc__ is defined.
8645 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
8647         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
8648         methods to their code to avoid computing the full name of wrappers and
8649         doing a lookup in a string hash table.
8651 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
8653         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
8654         we identify bblocks before method_to_ir () is ran.
8656         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
8657         Also avoid optimizing branches pointing to themselves.
8659         * mini.c (mini_method_compile): Ditto. Fixes #422947.
8661 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
8663         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
8665 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
8667         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
8668         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
8669         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
8670         'buf'.
8672         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
8673         jumped to the same entry in plt_jump_table.
8675 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
8677         * method-to-ir.c (initialize_array_data): Handle field with RVA from
8678         dynamic images.
8680 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
8682         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
8683         other assignment can be if converted. Saves 1.5% on corlib size and fixes
8684         #421807.
8686 2008-08-29  Geoff Norton  <gnorton@novell.com>
8688         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
8689         segment, and doesn't properly handle .space as .text.  Fixes
8690         AOT Mach/ARM
8692 2008-08-29  Geoff Norton  <gnorton@novell.com>
8694         * mini.c: Disable the mach exception handler when running on 
8695         ARM
8697 2008-08-29  Geoff Norton  <gnorton@novell.com>
8699         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
8700         globals on Darwin/ARM
8702 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
8704         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
8705         since too many things depend on it. Instead, call 
8706         mono_runtime_set_no_exec ().
8707         
8708         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
8709         the new JIT.
8711         * aot-compiler.c: Add an 'asm-only' AOT option.
8713         * mini.c: Avoid initializing the runtime when doing AOT compilation.
8714                 
8715         * aot-compiler.c (compile_method): Disable gshared support for now as it
8716         doesn't yet work.
8718 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
8720         * mini-amd64.h : Fix a compiler warning.
8722         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
8723           Changed to use a callback function to retrieve the unwind info.
8724           This avoids problems observed when code blocks were removed by
8725           unloading an app domain.
8727         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
8728           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
8729           to work properly.
8731         Contributed under MIT/X11 license.
8733 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
8735         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
8736           case to keep the stack aligned to 8.
8738         Contributed under MIT/X11 license.
8740 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
8742         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
8743         avoid repeated linear searches.
8745 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
8747         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
8748         methods it can't handle.
8749         
8750         * aot-compiler.c (add_method): Avoid adding a method twice.
8751         (add_wrappers): Add runtime invoke wrappers for all methods.
8753         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
8754         function to create an aot-compatible version of this trampoline.
8756         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
8758 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
8760         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
8762         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
8763         with a generic sharing failure.
8765         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
8767         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
8768         CEE_RETHROW. Fixes #419634.
8770         * mini.c (mono_method_to_ir): Ditto.
8772         * exceptions.cs: Add a new test.
8773         
8774         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
8775         to mono_type_stack_size_internal () since some callers might not pass in
8776         an rgctx.
8778         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
8779         instrument_prolog. Fixes #419878.
8781         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
8782         doubles in soft float mode volatile.
8784 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
8786         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
8788         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
8789         to handle soft float correctly.
8791         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
8792         the fast path.
8794         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
8796         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
8797         to sp, since the generics catch code requires it.
8799         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
8800         copying.
8802         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
8803         mono_arch_emit_imt_argument ().
8805         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
8807         * mini-arm.c tramp-arm.c: Generic sharing updates.
8809 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
8811         * mini-arm.c: Fix the arm build.
8813         * generic-sharing.c (mini_type_get_underlying_type): New helper function
8814         handling enums, generic instances and generic sharing.
8815         (mini_type_stack_size_full): Ditto.
8817         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
8818         
8819         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
8821         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
8823         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
8824         trampolines.
8826         * mini-arm.c: Various small generic sharing changes.
8828         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
8829         this for x86.
8830         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
8831         custom code.
8833         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
8834         helper function to return a generic class init trampoline.
8836         * method-to-ir.c mini.c: Use it.
8837         
8838         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
8839         arch-specfic function to return a generic class init trampoline.
8841         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
8842         the GENERIC_CLASS_INIT custom code.
8844         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
8845         a fatal error, not a sharing failure.
8847         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
8848         needed.
8850         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
8851         trampoline argument from MONO_ARCH_VTABLE_REG.
8853         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
8854         order of the arguments to the C trampoline: pass 'slot' as the trampoline
8855         argument, and pass the vtable in VTABLE_REG.
8857         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
8858         order of the arguments to the C trampoline: pass 'slot' as the trampoline
8859         argument, and pass the vtable in VTABLE_REG.
8860         (mono_arch_create_trampoline_code_full): Remove some special casing for
8861         the rgctx fetch trampoline.
8863         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
8864         Fixes #419273.
8866         * iltests.il: Add a test for it.
8868 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
8870         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
8872         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
8873         no longer needed.
8875         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
8876         use mono_jit_info_table_find () to avoid recursion.
8877         (mono_delegate_trampoline): Add a sync wrapper here.
8879         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
8880         here.
8882         * mini.c (mono_method_to_ir): Ditto.
8883         
8884         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
8885         add_sync_wrapper argument. Don't add a sync wrapper here.
8886         (mono_create_jump_trampoline): Don't add a sync wrapper here.
8888         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
8889         
8890 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
8892         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
8893           of nonvolatile registers back from MonoContext to CONTEXT.
8895         Contributed under MIT/X11 license.
8897 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
8899         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
8900           arguments on Winx64 there are only 4 argument registers.  For this
8901           logic to work the last argument must be pulled from the stack.  
8903         Contributed under MIT/X11 license.
8905 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
8907         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8909         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
8910         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
8911         encode/decode_method_ref ().
8913         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
8915         * aot-runtime.c (decode_patch): Ditto.  
8917         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
8918         MONO_PATCH_INFO_METHOD.
8920         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
8921         MonoGenericJitInfo.
8923         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
8924         MonoGenericJitInfo.
8926         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
8928         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
8929         one from the caller.
8931         * aot-runtime.c (decode_generic_inst): New function to decode and
8932         return a interned generic inst.
8933         (decode_klass_ref): Use it.
8934         (decode_method_ref): Ditto.
8936         * aot-compiler.c (emit_exception_debug_info): Save 
8937         jinfo->has_generic_jit_info too.
8939 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
8941         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
8943         * iltests.il.in: Add a test for fconv_to_i.
8945         * liveness.c: Disable the liveness2 pass for now to save space.
8947         * regalloc2.c: Include mempool-internals.h to fix warnings.
8949         * aot-compiler.c (encode_method_ref): Encode the context of generic
8950         instance methods.
8952         * aot-runtime.c (decode_method_ref): Inflate generic methods using
8953         the context saved in the aot file.
8955         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8957         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
8959         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
8960         volatile so they won't be optimized away.
8962 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
8964         * ssa.c:
8965         * ssa2.c:
8966         * mini.c:
8967         * regalloc2.c:
8968         * dominators.c: Remove duplicated functions that now are in
8969         mempool-internals.h.
8971 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
8973         * aot-compiler.c: Fix warnings.
8975         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
8977         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
8979         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
8980         as the patch type.
8982         * mini.c (mono_resolve_patch_target): Ditto.
8983         
8984         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
8985         (encode_klass_ref): Add support for encoding VARs/MVARs.
8987         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
8989         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
8990         the handling of the got entries into a separate 'decode_got_entry' function.
8991         Add support for RGCTX_FETCH.
8993         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
8994         clobbered by the trampoline code.
8996         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
8997         not clobbered by the indirect calling code.
8999 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
9001         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
9002         to fix the build.
9004 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
9006         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
9007         signature using the compilation mempool otherwise we would leak it.
9009 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
9011         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
9012         mono_emit_abs_call ().
9014         * patch-info.h: Add GENERIC_CLASS_INIT.
9016         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
9018         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
9019         as their target as a near call.
9021         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
9022         ABS handling code.
9023         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
9025         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
9026         call to a runtime function described by a patch.
9028         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
9029         mono_emit_abs_call, this has the advantage that the ABS handling code in
9030         mono_codegen () can handle them both, and can handle other stuff in the
9031         future without additional code.
9033         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
9034         entry.
9035         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
9036         abs addresses.
9038         * mini.h: Add missing bblock related prototypes.
9040         * mini.h (MonoCompile): Remove unused reverse_inst_list and
9041         reverse_inst_list_len fields.
9043         * mini.c: Refactor this file a bit by moving branch optimizations to 
9044         branch-opts.c.
9046         * method-to-ir.c: Merge generic sharing changes missed earlier.
9048         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
9050         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
9051         shared patches. Process METHODCONST as a shared patch.
9053         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
9054         as it crashes on the 2.0 mscorlib.
9056         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
9057         to cause crashes.
9058         
9059         * aot-compiler.c: Use is_plt_patch () in a few additional places.
9060         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
9061         by IMT.
9063         * aot-compiler.c: Reorganize the got handling code to be a bit more
9064         understandable.
9066 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
9068         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
9069         mono_patch_info_equals/hash, and use it to massively simplify
9070         get_plt_index ().
9072         * mini.c (mono_patch_info_hash): Simplify this and add support for
9073         more patch types.
9075         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
9077         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
9078         handling code, since an offset is not enough to identify a trampoline.
9080         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
9082 2008-08-17  Mark Probst  <mark.probst@gmail.com>
9084         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
9086         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
9088         * mini-ops.h: Argument and result types for OVF_CARRY ops.
9090         * decompose.c: PPC decompositions for various ops.
9092         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
9094 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
9096         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
9097         call the generic trampoline code using a call, instead of a jump, to
9098         remove some special casing from the generic trampoline code.
9100         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
9101         (mono_codegen): Ditto.
9103         * aot-compiler.c aot-runtime.c: Ditto.
9105         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
9107         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
9108         helper function to find the offset corresponding to a lazy fetch trampoline.
9110         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
9111         when doing generic sharing.
9113         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
9114         places.
9115         
9116         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
9117         mini-trampolines.c to be with the other trampoline creation functions.
9119         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
9120         as it is equal to method->signature in most cases, add a 
9121         mono_emit_method_call_full variant which takes a signature and an imt
9122         argument as well.
9124 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
9126         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
9127         to this function, since it could be computed easily from the method 
9128         argument.
9129         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
9130         more.
9132         * method-to-ir.c mini.c: Remove references to 
9133         compile_generic_method_wo_context.
9135         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
9136         generic method calls.
9137         
9138         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
9139         dimensional non-szarrays.
9141         * mini.c (mini_init): Register mono_array_new_1.
9143         * jit-icalls.c (mono_array_new_1): New jit icall.
9145         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
9146         pointing to the method.
9148         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
9149         method addresses belonging to METHOD_JUMP patches in the 
9150         jump_target_got_slot_hash.
9151         (mono_aot_load_method): Ditto.
9153         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
9154         METHOD_JUMP patches.
9156         * mini.c (mini_create_jit_domain_info): New helper function which 
9157         initializes/frees domain->runtime_info.
9158         (mini_free_jit_domain_info): Ditto.
9159         (mini_init): Install the domain hook functions with the runtime.
9161         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
9162         information maintained by the JIT.
9164         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
9165         insertion into jump_table_hash into mono_codegen (), also implement proper
9166         locking.
9168         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
9169         tail calls, it is already done by the aot code.
9170         
9171         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
9172         mechanism on amd64.
9174         * iltests.il.in: Make the jmp test a bit more complex.
9176         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
9177         generic instances which doesn't have a token.
9179         * aot-runtime.c (decode_method_ref): Ditto.
9180         
9181         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
9182         can handle this case now.
9183         (handle_box): Ditto.
9185 2008-08-15  Geoff Norton  <gnorton@novell.com>
9187         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
9188         debugging check.
9190 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
9192         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
9193         calling generic methods.
9195         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
9197         * aot-runtime.c (decode_patch_info): Ditto.
9199         * mini.c (mono_resolve_patch_target): Ditto.
9200         
9201         * patch-info.h: Add METHOD_RGCTX.
9203         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
9205 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
9207         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
9208         arguments in registers.
9210         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
9211         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
9213         * mini.c (mini_method_compile): Abort aot compilation for generic
9214         methods if generic sharing is disabled.
9215         
9216         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
9217         an mrgctx.
9219         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
9220         requiring an mrgctx.
9222         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
9223         store instructions when converting a vcall to a normal call.
9225         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
9226         mono_arch_find_jit_info.
9228 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
9230         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
9231         avoid calling mono_method_full_name () for every method even if the
9232         env var is not set.
9233         (check_inline_caller_method_name_limit): Ditto.
9235 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
9237         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
9238         assemblies in one run.
9240         * aot-compiler.c (mono_compile_assembly): Only print out a count of
9241         skipped methods if it is not 0.
9243         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
9245 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
9247         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
9248           MONO_ARCH_HAVE_UNWIND_TABLE.
9250         Contributed under MIT/X11 license.
9252 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
9254         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
9255           from default optimizaton list on Winx64.
9257         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
9259         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
9260           the LMF from the MonoJitTlsData structure.
9262         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
9264         Contributed under MIT/X11 license.
9266 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
9268         * mini.c (sigsegv_signal_handler): Fix the build.
9270         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
9271         assembly->aot_module.
9273         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
9274         hash table. This simplifies and speeds up a lot of code, and fixes support
9275         for .netmodules.
9277         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
9278         with the runtime.
9280         * mini-exceptions.c: Ditto.
9281         
9282         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
9283         'native_offset' argument, since these are computed in the 
9284         mono_find_jit_info () function.
9286         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
9287         is used by exceptions-ppc.c.
9289         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
9290         mono_arch_find_jit_info ().
9291         
9292         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
9293         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
9294         generic code in mini-exceptions.c.
9296 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
9298         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
9300         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
9301         
9302         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
9303         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
9304         called while holding the loader lock. Fixes #415608.
9305         (mono_aot_get_method_from_token_inner): Ditto.
9307 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
9309         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
9310         to reduce differences between this and the generic implementation in
9311         mini-exceptions.c.
9312         (ves_icall_get_frame_info): Ditto.
9314         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
9316         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
9317         longer neccesarry.
9319         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
9320         mono_arch_get_call_filter () and make it non-static, for consistency with the
9321         other architectures.
9323 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
9325         * mini.c:
9326         * local-propagation.c:
9327         * mini-x86.c: Correct the name of arch defines.
9329 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
9331         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
9332         NO_EMULATE_LONG_SHIFT_OPS define.
9334 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
9336         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
9337         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
9339         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
9340         MACH fixes. Merged from the 2.0 branch.
9342         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
9344         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
9345         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
9347         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
9349         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
9350         mono_marshal_get_native_wrapper () signature changes.
9352 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
9354         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
9355         conversion bug under arm.
9357 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
9359         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
9361         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
9362         with overflow checking.
9364 2008-08-05  Marek Habersack  <mhabersack@novell.com>
9366         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
9367         to the genmdesc.pl file
9369 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
9371         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
9372         arg_array in the soft-float versions of the LOAD/STORE macros.
9374         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
9375         implementation.
9377         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
9379 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
9381         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
9382         a float HFA. Fixes #413621.
9384 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
9386         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
9387         frame_size to args_size. Fixes build.
9389 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
9391         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
9392         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
9394         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
9395         the stack are not unaligned. Fixes #413247.
9396         
9397 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
9399         * mini.c: update jitted methods performance counters.
9401 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
9403         * mini-exceptions.c: increase the exceptions thrown performance
9404         counter in mono_handle_exception ().
9406 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
9408         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
9409         can work with netmodules.
9411 2008-07-28  Geoff Norton  <gnorton@novell.com>
9413         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
9414         regression tests.
9416 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
9418         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
9419         correct place.
9421 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
9423         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
9424           The float param registers and other param registers must be the 
9425           same index on Windows x64.
9427         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
9428           ArgValuetypeAddrInIReg argument case.  Setting the argument
9429           op to OP_VTARG_ADDR (OP_REGOFFSET)).
9431         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
9432           variable computed above as the copy length for arguments of storage
9433           type ArgValuetypeAddrInIReg.
9435         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
9436           ArgValuetypeAddrInIReg argument case.  This case will rely on
9437           mono_arch_emit_outarg_vt to emit the correct code later in the process.
9439         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
9440           a 32 byte stack allocation for all calls.  We will omit the adjustment for
9441           jump and tail call instructoins as they do not follow the typical call behavior.
9443         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
9444           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
9445           local variable and pass the local variable by reference to the called method.
9447         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
9448           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
9449           of a struct is passed in a register it must be saved with the other
9450           volatile argument on the stack.
9452         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
9453           frame pointer the stack adjustment value must be saved to the unwind 
9454           info structure.
9456         Contributed under MIT/X11 license.
9458 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
9460         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
9461         which got lost in the merge.
9463 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
9465         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
9466         build.
9468         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
9469         
9470         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
9471         icalls, since they won't be patched.
9473         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
9474         different code sequence when running under valgrind to prevent some valgrind
9475         errors.
9477         * iltests.il.in: Add new regression test.
9479         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
9480         end with a throw.
9482         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
9483         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
9485         * iltests.il.in: Add new test.
9487         * aot-compiler.c: Fix some warnings.
9489         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
9490         Fixes #412494.
9492 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
9494         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
9495         (mini_usage_jitdeveloper): Add a missing --wapi option.
9497 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
9499         * mini-codegen.c: Simplify the is_fp macros.
9500         (free_up_ireg): Remove, use free_up_reg instead.
9501         (free_up_reg): Fix the fp case.
9503 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
9505         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
9506         lowered earlier.
9508         * exceptions-x86.c: Merge some changes which seemed to have got lost
9509         in the linear-ir merge.
9511         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
9513         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
9514         long vreg volatile even if the variable was already created.
9516         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
9517         volatile variables.
9519 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
9521         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
9523         * mini.c (mono_jit_compile_method_inner): Add support for 
9524         MONO_EXCEPTION_BAD_IMAGE.
9526         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
9527         mini_method_get_context () returns NULL. Fixes #356531.
9529         * mini.c (mono_method_to_ir): Ditto.
9530         
9531         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
9532         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
9534 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
9536         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
9537         in the LDFTN implementation.
9539 2008-07-25  Mark Probst  <mark.probst@gmail.com>
9541         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
9542         code, patch calls to icalls, too, even if they're not in the
9543         shared generic code hash.  Fixes #411962.
9545 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
9547         * cpu-x86.md: Increase the length of the fcall opcodes.
9549         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
9550         calls returning floats.
9552         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
9553         on NEWARR.
9554         
9555         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
9556         missed earlier.
9558         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
9559         into the domain->method_code_hash.
9561         * aot-compiler.c: Fix win32 build.
9563         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
9564         
9565         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
9566         gshared NEWARR implementation.
9568         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
9570         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
9571         can be used outside of method_to_ir.
9573         * mini.h (MonoCompile): Add arg_types field.
9575         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
9576         
9577         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
9578         the values of the local arg_array and param_types array.
9580 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
9582         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
9583         got accesses might only get generated later when NEWOBJ is decomposed.
9584         
9585         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
9586         looking up the native code of the target method when a delegate is called
9587         for the first time.
9589         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
9590         optimization.
9592         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
9594         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
9595         AOT work on platforms without a working dlsym implementation.
9597         * mini.h: Bump AOT image format version.
9598         
9599 2008-07-24  Mark Probst  <mark.probst@gmail.com>
9601         * mini-exceptions.c: Free a MonoType with
9602         mono_metadata_free_type() instead of g_free().
9604         * aot-runtime.c: Free a MonoType.
9606 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
9608         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
9609         optimization.
9611         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
9612         fp stack on x86.
9614 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
9615         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
9616         profiler hook.
9618 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
9620         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
9621         NEWOBJ calls on valuetypes.
9623         * iltests.il.in: Add new test.
9625         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
9627 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
9629         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
9630         is no longer needed.
9632         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
9633         non register sized integer arguments.
9634         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
9635         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
9636         emit_memcpy2 ().
9638         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
9639         CEE_MONO_RETOBJ.
9640         
9641         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
9642         two a binop with different sized arguments is emitted.
9644         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
9645         instruction in the ins==NULL case.
9647 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
9649         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
9651         * mini-x86.c: Fix osx build.
9653         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
9654         opcodes as well.
9656         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
9657         instruction for non int sized variables.
9659         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
9660         implementation.
9662 2008-07-23  Robert Jordan  <robertj@gmx.net>
9664         * method-to-ir.c: Fix MSVC build.
9666 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
9668         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
9669         a non int sized type, widen it to an int since newer versions of gcc seem to
9670         generate code which needs this.
9672         * ssa2.c abcremoval2.c: Fix warnings.
9674         * *: Merge the Linear IR branch.
9676         The original branch is at trunk/branches/vargaz/mini-linear-il, and
9677         the ChangeLog file there describes all the changes done over the years. 
9678         Further documentation can be found at www.mono-project.com/Linear_IL.
9680 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
9682         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
9683           The float param registers and other param registers must be the 
9684           same index on Windows x64.
9686         Contributed under MIT/X11 license.
9688 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
9690         * mini.c: Make the previous fix GC safe.
9692 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
9694         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
9696 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
9698         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
9699           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
9700           ArgValuetypeAddrInIReg instead.
9702         Contributed under MIT/X11 license.
9704 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
9706         * mini-codegen.c (get_register_spilling): Fix a warning.
9708 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
9710         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
9711         for types which the initialization fails. Raises the provided exception
9712         at the right stop after cleanup.
9714 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
9716         * aot-compiler.c: Free most of the memory allocated during compilation.
9718         * mini.c (mini_parse_debug_options): Fix a leak.
9719         
9720         * mini.c (mini_method_compile): Don't add the method to the jit info tables
9721         during aot compilation.
9723 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
9725         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
9726         it has too much register pressure.
9728 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
9730         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
9732 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
9734         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
9735         on x86.
9737         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
9738         on amd64 similar to the way it is done on arm.
9740         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
9742         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
9743         consistency, normalize error messages, avoid loading aot-only modules in
9744         normal mode.
9746         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
9747         for consistency.
9749         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
9751 2008-07-11  Martin Baulig  <martin@ximian.com>
9753         * debug-debugger.h
9754         (MonoDebuggerInfo): Add `interruption_request'.
9756 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
9758         * aot-compiler.c (emit_plt): Remove some dead code.
9760         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
9762         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
9763         return the plt info offset belonging to a given plt entry.
9765         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
9766         mono_aot_get_plt_info_offset.
9767         
9768         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
9769         similar to the amd64 code by makeing jumps through a separate jump table 
9770         instead of embedding the jump addresses into the code.
9772 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
9774         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
9775         method.
9777 2008-07-10  Martin Baulig  <martin@ximian.com>
9779         * mini.c (mini_method_compile): Disable generics sharing when
9780         running in the debugger.
9782 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
9784         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
9786         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
9787         the local register allocator from running out of registers on x86 when 
9788         using aot.
9790 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
9792         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
9793         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
9794         C4146.
9796         Contributed under MIT/X11 license.
9798 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
9800         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
9801         speed up the assembler.
9803 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
9805         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
9806         support.
9808         * mini.c: Move the soft float handling macros a bit earlier, add 
9809         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
9810         place.
9812         * mini.h: Add prototype for mono_arch_fixup_jinfo.
9814         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
9815         read-only to help catch code allocation requests.
9816         
9817         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
9818         and turn it off when using --aot-only or when compiling with --aot=full.
9820         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
9821         jump table for switches from the normal domain mempool, not the code
9822         manager.
9824         * mini-trampolines.c (get_unbox_trampoline): New function to return an
9825         unbox trampoline which handles aot-only mode too.
9827         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
9828         an AOTed unbox trampoline.
9830         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
9832 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
9834         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
9835         ""
9837         Contributed under MIT/X11 license.
9839 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
9841         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
9842           the unwind information for the method at the end of the allocated block.
9843           
9844         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
9845           MonoCompileArch to hold the unwind info for SEH on Winx64
9846         
9847         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
9848           frame pointer info for the method being compiled.
9849           
9850         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
9851           the call to mono_exception_from_token.
9852           
9853         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
9854           storing the method prolog information in a format that the Winx64 SEH can understand.  This
9855           information is stored a the end of the method block because it is all 32-bit offset based.
9857         Contributed under MIT/X11 license.
9859 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
9861         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
9863         * wapihandles.c: Fix warnings.
9865         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
9866         mode.
9868         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
9869         mono_jit_compile_method in aot-only mode since that calls the type 
9870         initializer.
9871         
9872         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
9873         get_delegate_invoke_impl in aot-only mode.
9875         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
9877 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
9879         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
9881         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
9882         is on by default.
9884         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
9886         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
9887         init trampoline from the AOT file as well.
9889         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
9890         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
9891         code.
9893         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
9894         mono_init.
9896         * exceptions-amd64.c: Add _full variants for the remaining exception code
9897         creation functions as well, allow emission of relocatable code, remove
9898         caching since that is now done by the caller.
9900         * mini-exceptions.c: Add _full variants for the remaining exception code
9901         creation functions as well, add aot-only support.
9903         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
9904         if we can determine a proper token for them.
9905         (add_wrappers): Add a few more wrappers.
9906         (emit_method_code): Remove some dead code.
9907         (emit_trampolines): Emit exception code too.
9909         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
9911         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
9912         mono_array_new_va which avoids varargs.
9914         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
9916         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
9917         mono_arch_create_specific_trampoline () in all places.
9919         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
9920         a bit so it can be used for other things as well.
9921         
9922         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
9923         on demand as well.
9925         * exceptions-amd64.c: Rename the caching from the exception code creation
9926         functions, it is done by the caller instead.
9927         
9928         * exceptions-amd64.c: Change the signature of the exception code creation 
9929         functions to allow the creation of relocatable code later.
9931         * mini-exceptions.c: Add a set of functions to query the various 
9932         runtime-generated exception functions.
9934         * mini.c mini-exceptions.c: Use the newly added functions instead of the
9935         mono_arch_.. () functions.
9936         
9937 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
9939         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
9941         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
9943         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
9944         (mini_get_vtable_trampoline): Ditto.
9946         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
9947         code in the AOT case by returning the code size and a list of relocations to
9948         the caller.
9950         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
9952 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
9954         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
9955           clean the stack.
9957         Contributed under MIT/X11 license.
9959 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
9961         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
9962         so the buffer size can be computed correctly. Fixes #404735.
9964         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
9965         normally as cfg->debug_info is already freed.
9967 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
9969         * mini-amd64.c: For calls returning vtypes in registers, don't store
9970         the return address on the stack, instead allocate a separate local for
9971         it. Fixes #404729.
9973 2008-07-05  Mark Probst  <mark.probst@gmail.com>
9975         * mini-trampolines.c, mini.h: Add an argument to
9976         mono_create_jit_trampoline_in_domain() for turning off the adding
9977         of the sync wrapper.
9979         * mini.c: Use the JIT trampoline without sync instead of
9980         ldftn_nosync in static RGCTX invoke wrappers so that the call can
9981         be patched.
9983 2008-07-04  Mark Probst  <mark.probst@gmail.com>
9985         * driver.c: Turn on GSHARED optimization by default.
9987 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
9989         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
9990         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
9992         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
9993         create a variant of the generic trampoline code callable from AOTed trampolines.
9995         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
9996         trampoline code callable from AOTed trampolines.
9998         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
10000 2008-07-04  Mark Probst  <mark.probst@gmail.com>
10002         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
10003         pass-through manner.
10005         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
10006         and don't fail sharing for them anymore.
10008         * mini-exceptions.c: Handle exceptions in shared generic methods.
10010         * generic-sharing.c: When checking the context of a generic
10011         method, also check its class's context.  Don't treat wrappers as
10012         sharable.
10014         * mini-trampolines.c: Some code factored out to
10015         metadata/generic-sharing.c.  Handle the MRGCTX case.
10017         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
10018         we must deal with the method being of another instantiation of the
10019         class.  Add static rgctx invoke wrappers to generic methods.
10021 2008-07-04  Mark Probst  <mark.probst@gmail.com>
10023         * mini.c: Provide all jit infos of generic shared methods with a
10024         generic jit info.
10026         * mini-exceptions.c: Handle the new situation that a generic info
10027         might be available, but not info about the this/vtable/mrgctx
10028         variable.
10030 2008-07-03  Mark Probst  <mark.probst@gmail.com>
10032         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
10033         generic methods.
10035 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
10037         * dominators.c (check_dominance_frontier): Fix a warning.
10039         * mini.h: Add some missing prototypes.
10041         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
10043         * driver.c (mono_jit_init_version): Correct the comments since the first
10044         argument should be the name of the root domain, not a filename.
10046         * aot-runtime.c (make_writable): Error out if this is called while running
10047         with --aot-only.
10048         (load_aot_module): Ditto.
10050         * aot-compiler.c: Really fix the computation of method indexes.
10052         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
10053         optimizations as this is no longer called frequently.
10055         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
10056         method and the invoke impl code and pass it to the delegate trampoline instead of
10057         just the delegate class.
10059 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
10061         * aot-compiler.c: Fixup the computation of method indexes.
10062         (add_wrappers): Create the base methods of the runtime invoke wrappers using
10063         the method builder infrastructure.
10065         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
10066         has no header.
10068         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
10069         mode, load the method right away instead of creating a trampoline.
10071         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
10073         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
10074         some checks a bit.
10076 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
10078         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
10079         (mono_aot_load_method): Use method_index instead of method->token.
10081         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
10082         can handle icalls etc. properly.
10084         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10086         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
10088         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
10089         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
10090         JIT_ICALL_ADDR patch type.
10092         * patch-info.h: Add JIT_ICALL_ADDR patch type.
10094         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
10095         request flag.
10096         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
10098         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
10100 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
10102         * mini.c: Use domain->jit_code_hash_lock for controlling access to
10103         domain->jit_code_hash.
10105 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
10107         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
10109 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
10111         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
10112         get_this_arg_from_call, let it compute it when needed.
10114         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
10115         gsctx from code only when needed.
10117         * mini-trampolines.c (get_generic_context): Rename this to 
10118         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
10119         it can be called by the arch backends.
10121         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
10123 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
10125         * driver.c (mono_main): Add experimental --aot-only command line option.
10127         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
10128         set.
10130 2008-06-26  Kornel Pal  <kornelpal@gmail.com>
10132         * driver.c (DllMain): Remove mono_module_handle.
10134         Contributed under MIT/X11 license.
10136 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
10138         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
10139         for emitting methods which are not in the source assembly. Detect and report
10140         failure of assembling+linking.
10141         
10142         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
10144         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
10146 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
10148         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
10150 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
10152         * mini.h: Remove some obsolete prototypes.
10154         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
10156 2008-06-24  Mark Probst  <mark.probst@gmail.com>
10158         * mini.c (get_object_generic_inst): Variable-sized arrays are not
10159         supported by Visual Studio, so use alloca().
10161 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
10163         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
10164         Fixes #402585.
10166 2008-06-23  Mark Probst  <mark.probst@gmail.com>
10168         * mini.c: Fail sharing of a generic method if it contains an open
10169         catch clause (because we don't pass MRGCTXs yet).
10171 2008-06-23  Mark Probst  <mark.probst@gmail.com>
10173         * mini.c: When compiling a method with generic sharing, insert the
10174         method instantiated with an all-Object generic context into the
10175         jit info table, instead of the context of the first instantiation
10176         of the method we happen to compile.
10178 2008-06-18  Martin Baulig  <martin@ximian.com>
10180         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
10181         `major_version' and `minor_version'.
10183 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10185         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
10186         mono_method_is_generic_sharable_impl() takes an additional
10187         argument specifying whether to treat type variables as reference
10188         types.
10190 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10192         * mini.h: Removed obsolete prototypes.
10194 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10196         * mini.c: Don't fail generic sharing for initobj and sizeof - we
10197         already handle them.
10199 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10201         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
10202         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
10203         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
10204         tramp-x86.c: Added a MonoGenericContext* argument to
10205         mono_arch_get_unbox_trampoline() so that it can call other
10206         functions which require it.
10208 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10210         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
10211         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
10212         mono_arch_get_this_arg_from_call() takes a
10213         MonoGenericSharingContext* as well.
10215 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10217         * mini.c: Factor out code for emitting unbox into emit_unbox() and
10218         implement generic sharing of unbox.
10220 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10222         * mini.c: Don't compute the vtable to determine whether a field is
10223         special static, because it might not work for open types.
10225 2008-06-17  Mark Probst  <mark.probst@gmail.com>
10227         * mini.c: Removed the unused token_type and token_source arguments
10228         from get_runtime_generic_context_ptr().
10230 2008-06-17  Marek Habersack  <mhabersack@novell.com>
10232         * mini.c (ADD_BINOP): fix the build
10234 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
10236         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
10237         a widening op.
10239 2008-06-16  Mark Probst  <mark.probst@gmail.com>
10241         * mini.h: Removed class relations enum that's not used anymore.
10243 2008-06-16  Mark Probst  <mark.probst@gmail.com>
10245         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
10247         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
10248         the lazy fetch trampoline access code.
10250 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
10252         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
10254 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
10256         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
10258         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
10260         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
10262 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
10264         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
10265         intrinsics.
10267         * mini-ops.h: Add MIN/MAX_UN opcodes.
10269         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
10270         intrinsics.
10272         * basic-math.cs: Add more min/max tests.
10274         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
10276 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10278         * mini.c: Small fix in the prologue of emit_castclass.
10280 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
10282         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
10284         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
10285         do not work even for unsigned types. Fixes #400014.
10287         * basic-math.cs: Add regression tests for unsigned Min/Max.
10289 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10291         * mini.c: Added additional context_used argument to several
10292         functions, which will be needed for sharing generic methods.  Use
10293         GET_RGCTX macro wherever appropriate.  Declare only one
10294         context_used in mono_method_to_ir().
10296 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10298         * mini.c, generic-sharing.c: Removed generic class relations.
10300         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
10301         functions due to MRGCTX changes.
10303 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10305         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
10306         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
10307         with calculated IMT.
10309         * mini.c: Generic sharing of calls via generic interfaces.
10311         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
10312         generic method with non-constant MonoGenericContext*.  Instead,
10313         the context is taken out of the method itself.
10315 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10317         * mini.c: Generic sharing of ldvirtftn.
10319 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10321         * mini.c: Generic sharing of ldftn.
10323 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10325         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
10327 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10329         * mini.c: Generic sharing of the special case of ldtoken followed
10330         by a call to GetTypeFromHandle.
10332 2008-06-13  Mark Probst  <mark.probst@gmail.com>
10334         * mini.c: Generic sharing of box for nullable types.
10336 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
10338         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
10339         are passed on the stack. Fixes #324807.
10341 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
10343         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
10344         for the ArgValuetypeAddrInIReg case.
10346         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
10347         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
10349         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
10350         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
10351         local variable and pass the local variable by reference to the called method.
10352           
10353         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
10354         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
10356         Contributed under MIT/X11 license.
10358 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
10360         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
10362         * debug-mini.c (mono_debug_print_vars): Release memory after printing
10363         everything.
10365 2008-06-10  Martin Baulig  <martin@ximian.com>
10367         * debug-mini.c
10368         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
10370 2008-06-09  Kornel Pal  <kornelpal@gmail.com>
10372         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
10373         possible error when no arguments are passed.
10375         Contributed under MIT/X11 license.
10377 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
10379         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
10380         where the file name is NULL.
10382 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
10384         * mini.c: Fix s390 build.
10386 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
10388         * trace.c (mono_trace_parse_options): Fix warnings.
10390         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
10392 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
10394         * mini.c (remove_block_if_useless): Avoid printing the method name.
10395         
10396         * mini.c: Remove needless setting of ins->cil_code which is now done by 
10397         MONO_INST_NEW.
10399         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
10400         LMF. Not yet used.
10402         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
10403         translated code after it has been patched.
10405 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
10407         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
10408         avoid problems during code patching on SMP systems.
10409         (emit_call): Avoid adding a patch info which is already added by 
10410         emit_call_body.
10411         (mono_arch_emit_exceptions): Ditto.
10413 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
10415         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
10416         MONO_TYPE_ISSTRUCT already checks for it.
10418 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
10420         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
10421           structs with floats on Winx64 the float registers are not used.  
10422           The integer registers are always used..
10423         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
10424           only one register will be used and only if the size of the struct 
10425           is 1,2,4, or 8 bytes.
10427         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
10428           to work for Winx64.
10430         Contributed under MIT/X11 license.
10432 2008-06-05  Martin Baulig  <martin@ximian.com>
10434         * debug-debugger.c (debugger_lookup_class): Also call
10435         mono_class_setup_methods() here; we're only called from RTI.
10437 2008-06-05  Andreas Farber  <andreas.faerber@web.de>
10439         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
10440         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
10441         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
10442         Post-process object files and add dtrace-generated object, if necessary.
10444         Contributed under MIT/X11 license.
10446 2008-06-04  Mark Probst  <mark.probst@gmail.com>
10448         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
10449         element class.
10451         * mini.c: Generic sharing for unbox.any and castclass.
10453 2008-06-04  Mark Probst  <mark.probst@gmail.com>
10455         * mini.c: Ignore tailcall prefix in shared generic code and when
10456         doing calls which require a vtable/rgctx argument.
10458 2008-06-04  Mark Probst  <mark.probst@gmail.com>
10460         * mini.c: Don't free the JIT info.
10462         * driver.c: Changes in the JIT info table testing code.
10464 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
10466         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
10467         interruption. Fix some warnings.
10469         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
10470         interruption_checkpoint.
10472 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
10474         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
10475         from embedding applications.
10477 2008-06-02  William Holmes  <billholmes54@gmail.com>
10479         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
10480           reserving 32 bytes on the stack when making calls. 
10482         Contributed under MIT/X11 license.
10484 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
10486         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
10487         the linear IL branch.
10489         * driver.c: Print out more information for --version on arm.
10491 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
10493         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
10494         bb_exit instead, since out of line bblocks might not actually be emitted
10495         out-of-line.
10496         
10497         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
10498         maximum epilog size for out of line bblocks if tracing is enabled.
10500         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
10502 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
10504         * arrays.cs: Regression tests for allocating arrays with negative sizes.
10506 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
10508         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
10509         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
10510         opcodes.
10512 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
10514         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
10515         the 'value' to store is a constant.
10517         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
10519         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
10520         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
10522 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
10524         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
10525         for accessing method->generic_container.
10527 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
10529         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
10530         
10531         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
10533         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
10535         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
10536         fails.
10538 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
10540         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
10542         * mini.c: Handle the case when mono_class_vtable () fails.
10544 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
10545         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
10546         the stat profiler.
10548 2008-05-22  Mark Probst  <mark.probst@gmail.com>
10550         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
10551         together with domain sharing.
10553 2008-05-22  Mark Probst  <mark.probst@gmail.com>
10555         * mini.c: Treat callvirts to final methods like non-virtual calls
10556         when doing generic sharing, i.e. look them up in the runtime
10557         generic context.
10559 2008-05-22  Mark Probst  <mark.probst@gmail.com>
10561         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
10562         with computed types (for generic sharing).
10564         * mini.c: Generic sharing for mkrefany and refanyval.
10566 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
10568         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
10569         possible.
10571         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
10572         the generic sharing code.
10573         
10574         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
10575         when needed.
10577 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
10579         * mini.h: Remove the declaration of mono_aot_init_vtable ().
10581 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
10583         * driver.c: updated copyright date
10585 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
10587         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
10588         needed.
10590 2008-05-19  Martin Baulig  <martin@ximian.com>
10592         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
10593         pointing to the new `_mono_debug_using_mono_debugger' variable.
10595         * driver.c
10596         (mono_main): Check mono_debug_using_mono_debugger() rather than
10597         the `MONO_INSIDE_MDB' environment variable to check whether we're
10598         inside the debugger.
10600 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
10602         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
10603         argument.
10605 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
10607         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
10609         * mini.c: Added mini_assembly_can_skip_verification. This
10610         function checks if the assembly requested to skip verification. 
10611         Fixes part of #387274.
10613 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
10615         * mini.c (mini_get_method): Disable the check for open generic classes when
10616         using generic sharing.
10618         * generics.cs: Add a test for #387034.
10620         * mini.c (mini_get_method): Check whenever the method class is an open generic
10621         type, and return NULL in that case, causing a verification error. Fixes
10622         #384123.
10624 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
10626         * driver.c (mono_main): Revert r102623. The right
10627         thing to do is to enable the verifier under verifiable
10628         unless a --security flag was passed.
10630         We need this non-trivial behavior for --verify-all otherwise
10631         mcs-compileall won't be able to use it. As it needs everything to
10632         be verified under validil.
10634 2008-05-06  Martin Baulig  <martin@ximian.com>
10636         Fix #383749.
10638         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
10639         (mono_debugger_thread_cleanup): Likewise.
10640         (mono_debugger_extended_notification): Likewise.
10642 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
10644         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
10645         against both inflated and non-inflated methods. We need to check against the
10646         generic definition for cases where the instantiated method is not visible.
10647         We need to check against the inflated types for cases where the instantiation
10648         changes any super type. This fixes #382986.
10650         Note that this doesn't need to be applied to other parts of mono_method_to_ir
10651         that check for visibiliy as generic params only appears as the type subject
10652         of tokens on call opcodes. Field manipulation and ldftn must always
10653         target an exact type.
10655 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
10657         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
10658         if no related --security flag is passed.
10660 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
10662         * mini-arch.h: Prepare support for ppc64.
10664         Contributed under MIT/X11 license.
10666 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
10668         * aot-runtime.c: Prepare support for ppc64.
10670         Contributed under MIT/X11 license.
10672 2008-05-05  Andreas Farber  <andreas.faerber@web.de>
10674         * mini-ops.h: Prepare support for ppc64.
10676         Contributed under MIT/X11 license.
10678 2008-05-04  Andreas Farber  <andreas.faerber@web.de>
10680         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
10682         Contributed under MIT/X11 license.
10684 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
10686         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
10687         assemblies, since aot_name is not a full path, causing us to load MS.NET 
10688         assemblies on windows.
10690 ?2008-04-28  Kornel Pal  <kornelpal@gmail.com>
10692         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
10693         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
10694         * main.c: Use UTF-8 encoded command line instead of Windows default code
10695         page on Windows to support Unicode.
10696         * driver.c (DllMain): New function for mixed-mode assembly support.
10697         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
10698         export __stdcall functions without decoration.
10700         Contributed under MIT/X11 license.
10702 2008-04-28  Mark Probst  <mark.probst@gmail.com>
10704         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
10705         saving it very early.
10707 2008-04-28  Mark Probst  <mark.probst@gmail.com>
10709         * mini.h, mini.c: Lots of code for accessing the old RGCTX
10710         deleted.  The only way to access the new RGCTX is via the
10711         trampline.
10713         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
10714         vtable instead of the RGCTX to static methods.
10716         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
10717         accessing the new RGCTX.
10719         * generic-sharing.c: There is no separation between self, type
10720         arguments and other types in the RGCTX anymore.
10722 2008-04-25  Jonathan Chambers <joncham@gmail.com>
10724         * mini-amd64.c (add_general): Remove previous stack adjustment.
10725         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
10726         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
10727         for 32 bytes of stack space reserved for all calls.
10728         
10729         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
10730         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
10731         adjustment.
10732         
10733         Code contributed under MIT/X11 license.
10735 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
10737         * mini.c (mini_method_verify): Only verify non-inflated methods, check
10738         against the root definition, peeling out method and type instantiations.
10739         Cache verify success results, code that fails verification is still
10740         checked multiple times.
10742 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
10744         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
10746 2008-04-23  Jonathan Chambers <joncham@gmail.com>
10748         * mini-amd64.c (add_general): Always increment stack on Win64.
10749         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
10750         on Win64.
10751         
10752         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
10753         stack based argument handling on Win64.
10754         
10755         Code contributed under MIT/X11 license.
10757 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
10759         * Makefile.am (version.h): Add support for git-svn.
10761 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
10763         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
10764         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
10765         avoiding allocations and libc functions which might deadlock.
10766         
10767         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
10768         'no-gdb-backtrace' option is set.
10770         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
10772         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
10774 2008-04-21  Martin Baulig  <martin@ximian.com>
10776         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
10777         and `get_lmf_addr'; `notification_address' is no longer a pointer.
10779 2008-04-21  Martin Baulig  <martin@ximian.com>
10781         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
10782         `thread_vtable', `event_handler_ptr' and `event_handler'.
10784 2008-04-21  Martin Baulig  <martin@ximian.com>
10786         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
10787         allows delayed initialization of the `executable_code_buffer' when
10788         attaching.
10790 2008-04-21  Martin Baulig  <martin@ximian.com>
10792         * mini.h (mono_debugger_create_notification_function): Removed.
10793         * tramp-*.c (mono_debugger_create_notification_function): Removed.
10795         * mdb-debug-info64.s
10796         (MONO_DEBUGGER__notification_function): Added this in the .text section.
10798         * mdb-debug-info32.s
10799         (MONO_DEBUGGER__notification_function): Added this in the .text section.
10801         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
10802         currently only works on x86 and x86_64, so don't create it on ppc.
10804 2008-04-21  Martin Baulig  <martin@ximian.com>
10806         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
10808         * mini.c
10809         (mini_method_compile): In the fp elimination check, check
10810         `debug_options.mdb_optimizations' in addition to
10811         mono_debug_using_mono_debugger().       
10813         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
10814         disable some JIT optimizations which are only disabled when
10815         running inside the debugger.
10816         Added `--help-debug' option to describe the debugging options.
10817         (parse_debug_options): New static function to parse the `--debug'
10818         options, so we can easily add more stuff in future.
10820 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
10822         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
10823         the method has no body.
10825 2008-04-19  Jonathan Chambers <joncham@gmail.com>
10827         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
10828         assembly is not allowed in MSVC 64-bit compiler. 
10829         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
10830         as we get floating point exceptions everywhere.
10831         
10832         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
10833         correctly align arguments for call to throw_exception.
10834         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
10835         
10836         Code contributed under MIT/X11 license.
10838 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
10840         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
10842 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
10844         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
10846         * mini-amd64.c (NEW_INS): Set cil_code.
10848         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
10849         from mini-amd64.c so all debugger related logic is in one place.
10851         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
10852         later won't have a random ip assigned to them.
10854 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
10856         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
10857         the arch specific function initializes code_size.
10858         (mono_create_delegate_trampoline): Ditto.
10860         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
10861         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
10862         platforms.
10864         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
10865         running under the debugger.
10867         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
10868         debugger.
10870         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
10871         debugger. Also move the disabling of optimizations here from driver.c.
10872         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
10873         debugger.
10875         * mini.h (MonoCompile): Add a few new flags.
10877 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
10879         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
10880         so the cil_code field of created MonoInst's is properly set.
10881         (mini_select_instructions): Ditto.
10883         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
10884         (MONO_INST_NEW_CALL): Ditto.
10886         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
10887         in many places so the ins->cil_code field is properly initialized.
10889         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
10890         place.
10892 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
10894         * mini.c (mini_method_compile): Print a different message when compiling a 
10895         shared method.
10896         
10897         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
10898         > 1.
10900 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
10902         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
10903         SSE2 instructions.
10905         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
10906         
10907 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
10909         * mini.c (handle_stack_args): Make this return void since its return value was
10910         never used. Also set cfg->unverifiable for invalid IL instead of calling
10911         G_BREAKPOINT ().
10913 2008-04-10  Mark Probst  <mark.probst@gmail.com>
10915         * mini.c: Make sure "this" is live in catch clauses with type
10916         variables in shared generic code.
10918 2008-04-08  Mark Probst  <mark.probst@gmail.com>
10920         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
10921         generic_class_is_reference_type() to ensure the proper behaviour
10922         when sharing generic code and the type in question is a type
10923         argument.
10925 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
10927         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
10928         race conditions when printing thread dumps. Fixes #377738.
10930 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
10931         
10932         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
10933         shows up when both MonoInst arguments can cause aliasig.
10934         There is likely no way in the current JIT to trigger this problem, but
10935         it showed up in the development of generics sharing, when in a new
10936         opcode both args of an OP_GROUP can be aliases (addresses of a local).
10937         When the generics sharing code will be committed, its tests will be
10938         valid also for this bug.
10940 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
10942         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
10943         PATCH_INFO_METHOD.
10945         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
10946         NULL.
10948 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
10950         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
10951         use a more detailed exception message for InvalidCastException.
10953         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
10955         * driver.c (mono_main): Add --debug=casts option to turn on better 
10956         InvalidCastException message details.
10958         * mini.c (mini_get_debug_options): New helper function to return the address of
10959         the debug_options variable.
10961         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
10962         the jit_tls TLS variable.
10964         * mini.c (mono_jit_tls): New TLS variable.
10966         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
10967         option is used.
10969 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
10971         * mini.h: Removed verifer related stuff. This code was moved to verify.c
10973         * mini.c: Removed verifer related stuff, code moved to verify.c.
10975         * driver.c: Using code from verify.c instead of mini.c.
10977 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
10979         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
10980         longer valid.
10982 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
10984         * mini.c (check_for_method_verify): Enabling verification of
10985         corlib if mono_verify_all is set. Bugs in the verifier preventing that
10986         have been fixed.
10988 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
10990         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
10991         caller saved registers as well.
10992         
10993         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
10994         saved registers as well.
10996 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
10998         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
11000         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
11001         code.
11003 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
11005         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
11006         to get_call_info.
11007         (get_call_info): Take a gsctx argument instead of 'cfg'.
11009 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
11011         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
11012         mono_verify_all is set.
11014         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
11016         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
11018 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
11020         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
11021         an exception.
11023         * driver.c mini.c mini.h: Add a --verify-all development option to test the
11024         verifier and the code generated by the compiler.
11026 2008-03-25  Mark Probst  <mark.probst@gmail.com>
11028         * mini.c: Generic sharing of the non-nullable case of the box
11029         instruction.
11031 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
11033         * inssel.brg: Fix the build.
11035         * iltests.il.in: Add a test for lconv.ovf.u8.un.
11037 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
11039         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
11040         Array:Address. Fixes #372410.
11042         * iltests.il.in: New tests for readonly prefix.
11044 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
11046         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
11047         mini-trampolines.c.
11049         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
11050         mini-exceptions.c.
11052         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
11053         
11054         * mini.c (mono_decompose_op_imm): New helper function.
11056         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
11057         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
11058         return value.
11060         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
11061         mono_arch_output_basic_block. Fix warnings.
11063         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
11064         for now.
11066 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
11068         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
11069         since the extra frame is now detected automatically inside the loop.
11071         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
11072         opts which are now in mono_peephole_ins ().
11073         
11074         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
11076         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
11077         frames and skip duplicate managed-to-native frames. Fixes #367665.
11079         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
11080         opts which are now in mono_peephole_ins ().
11081         (mono_arch_peephole_pass_2): Ditto.
11083         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
11085         * mini-codegen.c (mono_peephole_ins): New helper function containing the
11086         arch independent peephole optimizations.
11088         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
11089         opts which are now in mono_peephole_ins ().
11091         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
11092         
11093         * mini-s390.c (mono_arch_output_basic_block): Fix build.
11095         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
11096         pattern.
11098         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
11099         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
11100         opcode. 
11102 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
11104         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
11105         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
11106         return value.
11108         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
11109         mono_arch_output_basic_block. Fix warnings.
11111 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
11113         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
11114         conv.ovf.u.un.
11116 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
11118         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
11119         conv.ovf.u.un.
11121         * iltests.il: Add new tests.
11123 2008-03-20  Kornel Pal  <kornelpal@gmail.com>
11125         * mini.c: Removed Windows version macros.
11127 2008-03-20  Mark Probst  <mark.probst@gmail.com>
11129         * generic-sharing.c: Put reflection types in the extensible part
11130         of the runtime generic context.
11132         * mini.c: Generic sharing of the GetTypeHandle special case of the
11133         ldtoken instruction.
11135 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
11137         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
11139         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
11140         
11141         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
11142         consistency with the other version on the linear IR branch.
11144         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
11146         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
11148         * iltests.il.in: Add new tests.
11150 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
11152         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
11154         * iltests.il.in: Add new tests.
11156 2008-03-19  Mark Probst  <mark.probst@gmail.com>
11158         * mini.c: Two variables with the same name were declared in
11159         nesting contexts and one wasn't initialized.  Fixed.
11161 2008-03-19  Mark Probst  <mark.probst@gmail.com>
11163         * mini.c: Generic sharing of the initobj instruction.
11165 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
11167         * mini.c: make the test to optimize ldtoken from typeof() more
11168         precise.
11170 2008-03-18  Mark Probst  <mark.probst@gmail.com>
11172         * mini.c: Generic sharing of the initobj instruction for reference
11173         types.
11175 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
11177         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
11178         the mono_breakpoint_clean_code() code to perform bound checks.
11180 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
11182         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
11183         mono_arch_patch_callsite() to include the start of the managed method
11184         to be able to perform bound checks.
11186 2008-03-17  Mark Probst  <mark.probst@gmail.com>
11188         * mini.c: Generic sharing for the isinst instruction.
11190 2008-03-17  Mark Probst  <mark.probst@gmail.com>
11192         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
11193         inssel-long32-mips.brg: Added opcodes for doing indirect calls
11194         with the runtime generic context argument.
11196         * mini.c: Share calls to several types of unsharable methods by
11197         putting the address of the method code in the runtime generic
11198         context and doing an indirect call.
11200         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
11201         to switches.
11203 2008-03-16  Mark Probst  <mark.probst@gmail.com>
11205         * generic-sharing.c: Change due to a change in the runtime genric
11206         context API.
11208 2008-03-15  Martin Baulig  <martin@ximian.com>
11210         * tramp-x86.c
11211         (mono_arch_nullify_class_init_trampoline): Add call to
11212         mono_breakpoint_clean_code() to make things work when running
11213         inside the debugger.
11215         * tramp-amd64.c
11216         (mono_arch_nullify_class_init_trampoline): Add call to
11217         mono_breakpoint_clean_code() to make things work when running
11218         inside the debugger.
11220 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
11222         * inssel-long.brg (reg): Fix 64 bit build.
11224 2008-03-14  Mark Probst  <mark.probst@gmail.com>
11226         * mini.c, mini.h: Share static generic code by passing it an
11227         implicit argument pointing to the runtime generic context.
11229         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
11230         inssel-long32-mips.brg: New opcodes for calling shared static,
11231         which need to be passed the runtime generic context.
11233         * mini-amd64.c, mini-x86.c: Save the runtime generic context
11234         argument on the stack in the prologue if needed.  New function for
11235         finding the runtime generic context argument from the registers
11236         saved by the trampoline.
11238         * mini-amd64.h, mini-x86.h: Specify which register to use for the
11239         runtime generic context argument.
11241         * tramp-amd64.c: Also restore the register used for the runtime
11242         generic context argument.
11244         * mini-trampoline.c: Resolve shared static calls by consulting the
11245         runtime generic context via the new argument.
11247         * generic-sharing.c: Add an argument to sharability-checking
11248         functions that specifies whether type variables should be treated
11249         as sharable type arguments.
11251         * inssel-x86.brg: Removed a superfluous, buggy rule.
11253         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
11254         to switches.
11256 2008-03-14  Martin Baulig  <martin@ximian.com>
11258         * debug-debugger.c (main_thread_handler): Call
11259         mono_runtime_run_main() without sending any notifications.
11261         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
11263 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
11265         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
11267 2008-03-14  Mark Probst  <mark.probst@gmail.com>
11269         * tramp-x86.c: Fixed register restore offsets in the trampoline
11270         code for ECX and EDX.
11272 2008-03-12  Geoff Norton  <gnorton@novell.com>
11274         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
11275         different ucontext_t implementations.
11276         * exceptions-arm.c: Use the above defines to get exceptions working on 
11277         iPhone (based on a patch by Luke Howard lukeh@padl.com)
11278         * mini-arm.c: Implement iPhone icache support (based on a patch by
11279         Luke Howard lukeh@padl.com)
11281 2008-03-12  Mark Probst  <mark.probst@gmail.com>
11283         * mini.c: Enable generic sharing of calls to non-static
11284         non-interface non-generic non-value-type methods.
11286         * mini-trampolines.c: Resolve calls from shared generic code.
11288 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
11290         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
11292         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
11294 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
11296         * mini.c: some fixes for the AOT compiler.
11298 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
11300         * cpu-amd64.md: Add clob:1 to some float opcodes.
11302 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
11304         * mini.h: Added MiniVerifierMode enumeration.
11306         * mini.c: Added mini_verifier_set_mode to control
11307         the usage of the new verifier.
11309         * mini.c (mono_method): Integrated the new verifier.
11311         * driver.c: Extended --security option with validil and
11312         verifiable options to activate the new verifier.
11314 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
11316         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
11317         optimization to ctors taking 0 or 2 arguments too.
11319         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
11320         a bit.
11322         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
11324         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
11326 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
11328         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
11329         non-aot case as well.
11331         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
11333         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
11334         changes.
11336         * aot-compiler.c (encode_patch): Ditto.
11338         * mini.h (G_MININT32): Fix the definition of this.
11340 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
11342         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
11344         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
11346 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
11348         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
11349         methods returning vtypes in registers.
11350         (mono_arch_allocate_vars): Ditto.
11352         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
11354         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
11356         * generics.cs: Add a test from the linear IR branch.
11358         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
11360         * mini.c (inline_method): Cache failed inline attempts.
11362 2008-03-04  Mark Probst  <mark.probst@gmail.com>
11364         * mini.c: For shared methods of generic classes put the location
11365         of "this" into the MonoGenericJitInfo.
11367         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
11368         register out of a MonoContext by register number.  Add the generic
11369         sharing context as an argument to mono_arch_find_this_argument().
11371         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
11372         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
11373         for new arch function.
11375         * mini-exception.c: Handle open exception clauses in shared
11376         generic code.
11378         * mini-trampolines.c: Supply additional argument to
11379         mono_arch_find_this_argument().
11381 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
11383         * Makefile.am (regtests): Run the bench.exe tests last.
11385 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
11387         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
11388         a bit.
11390 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
11392         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
11393         with MS.
11395         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
11396         
11397         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
11399         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
11400         whose class has no cctor.
11402         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
11404 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
11406         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
11407         unverified.
11409 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
11411         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
11412         to be in sync with the code on the linear IR branch.
11414         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
11416         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
11418 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
11420         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
11422         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
11424         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
11426         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
11428         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
11429         
11430         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
11431         body.
11433 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
11435         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
11436         OP_LOADR4_MEMBASE emission.
11438         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
11439         (mono_spillvar_offset_float): Ditto.
11441         * mini-mips.c (mono_arch_emit_prolog): Ditto.
11443         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
11444         emission.
11446         * basic-long.cs: Add regression tests for them.
11448         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
11449         use.
11450         (mono_arch_allocate_vars): Fix representation of single-precision float
11451         argument.
11452         (mono_arch_output_basic_block): Ditto.
11454         * inssel-mips.brg: Ditto, remove duplicate items.
11456         * mini-mips.c (emit_load_volatile_arguments): New function to handle
11457         arguments of tail calls as on other platforms.
11458         (mono_arch_output_basic_block): Handle tail calls.
11460         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
11461         register.
11463         * objects.cs (test_5_pass_static_struct): Add test for it.
11465         Contributed under MIT/X11 license.
11467 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
11469         * Makefile.am: Use gmcs for compiling the regression tests.
11471         * *.2.cs *.2.il: Rename to *.cs and *.il.
11473 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
11475         * regalloc.h: Make the vassign array smaller.
11477         * mini.c (mini_method_compile): Remove an unused field in cfg.
11479         * mini-codegen.c: Add a bunch of micro optimizations.
11481 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
11483         * regalloc.h: Remove some unused fields.
11485 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
11487         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
11489         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
11491 2008-02-22  Mark Probst  <mark.probst@gmail.com>
11493         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
11495         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
11496         trampoline: Fetch an entry from the runtime generic context.  If
11497         it's NULL, jump to the actual trampoline to fill the runtime
11498         generic context.  Otherwise, return it.
11500         * mini.c: Call the lazy fetch trampoline to get entries out of the
11501         runtime generic context.
11503         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
11504         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
11505         tramp-sparc.c: Stubs for the lazy fetch trampoline.
11507 2008-02-21  Mark Probst  <mark.probst@gmail.com>
11509         * mini.c: Fetch data out of the extensible part of the runtime
11510         generic context instead of calling a helper function.
11512         * generic-sharing.c: Some functions moved into
11513         metadata/generic-sharing.c.  Helper function for fetching other
11514         types now checks and asserts against extensible rgctx (just for
11515         debugging purposes - the helper function isn't called anymore
11516         unless for debugging).
11518 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
11520         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
11521         for tail calls up to the point that the tests in iltests.exe run. Also add a
11522         dummy CKFINITE implementation.
11523         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
11524         needed for trampoline LMF frames.
11526         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
11527         trampoline LMF frames.
11529 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
11531         * mini.c (inline_method): clean any pending loader error when inlining fail.
11532         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
11534 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
11536         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
11538         * aot-runtime.c (decode_patch_info): Ditto.
11540         * mini.c (mono_resolve_patch_target): Ditto.
11541         
11542         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
11543         icall wrappers.
11545         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
11546         
11547         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
11548         if it references an icall address.
11550 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
11552         * cpu-s390x.md: Remove some more unused opcodes.
11553         
11554         * cpu-s390x.md: Remove some unused opcodes.
11556         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
11557         mono_op_imm_to_op ().
11559         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
11560         instead of a switch statement.
11561         
11562         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
11563         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
11565         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
11566         
11567         * mini-codegen.c: Remove unused mono_regstate2_... functions.
11569         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
11570         -1.
11572 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
11574         * driver.c (mono_main): Improve error reporting when an assembly cannot be
11575         opened. Fixes #362607.
11577         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
11579         * iltests.il.in: Add a test for static methods in interfaces.
11581 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
11583         * genmdesc.c (build_table): Fix a crash on older glib versions.
11585         * cpu-sparc.md: Remove some unused opcodes.
11586         
11587         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
11588         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
11590         * cpu-amd64.md: Remove some unused opcodes.
11592         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
11593         like the other opcodes.
11595 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
11597         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
11599         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
11601         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
11602         variables 'cfg' instead of 'm' for consistency.
11604         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
11606         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
11607         argument holding the vtype return address, to avoid the ambigious use of
11608         cfg->ret for this purpose.
11610         * mini.c (NEW_RETLOADA): Use vret_addr if set.
11612         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
11613         
11614         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
11615         new mono_print_ins () function which only takes one argument.
11617 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
11619         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
11620         macro arguments.
11622 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
11624         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
11626         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
11628         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
11629         opcodes and other small changes.
11631         * mini-ops.h: Add some new opcodes from the linear IR branch.
11633         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
11635         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
11636         opcodes, use the REG_MEMBASE opcodes instead.
11637         
11638         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
11639         opcodes, use the REG_MEMBASE opcodes instead.
11640         
11641         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
11642         linear IR branch.
11644         * mini.c (mono_op_imm_to_op): New helper function.
11646         * mini-ops.h: Add some opcodes from linear IR branch.
11648 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
11650         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
11651         <tsv@solvo.ru>.
11653 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
11655         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
11656         OP_ICONV_TO_R4/R8.
11658         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
11660 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
11662         * aot-compiler.c (emit_method_code): Add an assert.
11664         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
11665         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
11666         methods.
11668 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
11670         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
11671         some load/store opcodes so they are consistent. 
11672         (mono_arch_emit_prolog): Simplify some code.
11674         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
11676         * objects.cs: Add tests for large argument offsets on ARM.
11678         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
11679         stack offsets. Fixes #359651.
11681         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
11683         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
11685         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
11687         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
11689         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
11691         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
11692         rid of CEE_CONV_R_UN.
11694         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
11696 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
11698         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
11700         * mini.c (mono_normalize_opcodes): Add some more opcodes.
11702         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
11704         * cpu-amd64.md: Remove some unused opcodes.
11706         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
11708         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
11710         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
11711         arch specific functions for its parts. Call the peephole pass after local
11712         regalloc so the prolog can compute a more accurate max_offset.
11713         
11714         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
11715         the corresponding OP_I/OP_L opcodes.
11717         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
11719         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
11721 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
11723         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
11724         as they are handled in mini.c.
11726         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
11727         
11728         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
11729         case since it is handled in mini.c.
11731         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
11733         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
11735         * *.c: Use the new opcodes in the IR and back end code.
11737         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
11739         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
11741 2008-02-06  Mark Probst  <mark.probst@gmail.com>
11743         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
11744         an assert because it has a race condition.
11746 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
11748         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
11750         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
11752         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
11754         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
11755         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
11757 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
11759         * cpu-amd64.md (move): Correct the maximum size of move.
11761 2008-02-05  Mark Probst  <mark.probst@gmail.com>
11763         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
11764         the generic class init trampoline to return quickly if the class
11765         is already inited.
11767 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
11769         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
11770         issues where an 32 bit callsite cannot be patched by a 64 bit address.
11772 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
11774         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
11775         branch.
11777 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
11779         * objects.cs: Add some soft-float tests.
11781         * mini.c: Fix a couple more soft-float issues.
11783         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
11785         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
11786         avoid a REX prefix.
11788 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
11790         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
11791         exception happens while compiling a virtual method.
11793 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
11795         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
11796         
11797         * mini-sparc.c: Fix build.
11799         * mini-sparc.c (get_call_info): Add support for generic sharing.
11801         * mini-exceptions.c: Add a FIXME.
11803 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
11805         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
11806         altstack handling code.
11808         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
11809         
11810         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
11812         * mini-s390.c: Add support for generic sharing.
11814         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
11815         Fix CAS on s390.
11816         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
11818         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
11820         * mini-s390x.c: Add support for generic sharing.
11821         
11822         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
11823         Fix CAS on ia64.
11824         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
11826         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
11827         can be used since it takes a 16 bit signed immediate.
11829         * inssel-s390x.brg: Fix OP_SETRET.
11831         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
11833         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
11835         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
11837         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
11839         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
11840         in one place.
11842         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
11843         stuff.
11845         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
11846         of the unused mono_arch_patch_delegate_trampoline stuff.
11848 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
11850         * basic-long.cs: Move the fp related tests to basic-float.cs.
11852         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
11854         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
11856         * basic-calls.cs: Add a test for proper float argument passing.
11858         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
11859         if the context corresponds to an exception received through a signal.
11861         * exceptions.cs: Add a test for nullref handling at the start of a try
11862         clause.
11864         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
11866         * jit-icalls.c (mono_break): New JIT icall.
11868         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
11870         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
11872 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
11874         * cpu-*.md: Get rid of unused opcodes.
11876         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
11878         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
11879         by all platforms.
11881         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
11882         define.
11884         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
11885         the arch independent trampoline code in mini-trampolines.c.
11887         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
11889         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
11891         * mini-s390.h: Remove an unused define.
11892         
11893         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
11894         the arch independent trampoline code in mini-trampolines.c.
11896         * mini-arm.c (mono_arch_emit_prolog): Fix build.
11898 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
11900         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
11902         * mini-s390.c (mono_arch_emit_prolog): Fix build.
11904         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
11906         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
11908         * cpu-amd64.md: Use smaller sizes for int opcodes.
11910         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
11912         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
11913         objects.cs.
11915         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
11916         debugging.
11918         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
11919         instead of though a pointer to save an indirection when accessing elements of
11920         the array.
11922         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
11923         some typos.
11924         (NOT_IMPLEMENTED): New helper macro.
11925         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
11926         of a bb.
11928         * *.c: Use the new helper macro.
11930 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
11932         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
11934 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
11936         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
11937         stack slots.
11939 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
11941         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
11942         profiling is enabled.
11943         
11944         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
11945         the end.
11946         (mono_arch_emit_prolog): Add more first bblock optimizations.
11948         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
11949         in order if possible.
11950         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
11951         bblock, since the arguments are still in their original registers.
11953         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
11955 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
11957         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
11958         as well.
11960         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
11961         offset 0.
11963         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
11965         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
11966         process async exceptions received while in unmanaged code.
11968         * mini.c (mini_init): Install a callback with the runtime which will be called
11969         when a thread receives an async exception while in unmanaged code.
11971         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
11973         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
11975 2008-01-16  Wade Berrier  <wberrier@novell.com>
11977         * cpu-g4.md:
11978         * cpu-arm.md:
11979         * cpu-s390x.md:
11980         fix build
11982 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
11984         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
11985         compilation with sun cc.
11987         * cpu-*.md: Fix the build.
11989         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
11991         * mini-amd64.h: Add some comments to the MonoLMF structure.
11993         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
11994         
11995         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
11996         in the LMF structure if possible. This saves two instructions in the
11997         managed->native wrappers.
11999         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
12001 2008-01-16  Mark Probst  <mark.probst@gmail.com>
12003         * generic-sharing.c: New type argument lookup code which uses the
12004         runtime generic context template.
12006 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
12008         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
12010         * mini-arm.c (add_general): Fix arm eabi parameter passing.
12011         (mono_arch_output_basic_block): Fix localloc implementation.
12013         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
12015         * mini-ia64.c (peephole_pass): Fix ia64 build.
12017         * mini-amd64.c (peephole_pass): Fix a warning.
12018         
12019         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
12020         at a constant offset from sp/fp.
12022         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
12023         instead of obtaining it from *lmf in the managed method case.
12025 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
12027         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
12029 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
12031         * mini.h (MonoInstList): New type.
12032         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
12033         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
12034         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
12035         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
12036         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
12037         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
12038         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
12039         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
12040         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
12041         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
12042         MONO_INST_LIST_FOR_EACH_ENTRY,
12043         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
12044         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
12045         mono_inst_list_first, mono_inst_list_last,
12046         mono_inst_list_next, mono_inst_list_prev): New instruction
12047         list handling interfaces.
12048         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
12049         list head 'ins_list'.
12050         (MonoInst): Replace next pointer with list head 'node'.
12051         (MonoCallInst): Make 'out_args' a MonoInstList.
12052         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
12053         (MonoCompile): Delete reverse_inst_list and
12054         reverse_inst_list_len.
12055         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
12056         mono_arch_lowering_pass, mono_arch_local_regalloc,
12057         mono_arch_output_basic_block, mono_arch_emit_prolog):
12058         Convert to new instruction lists.
12059         (insert_after_ins): Delete.
12060         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
12061         instruction lists.
12062         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
12063         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
12064         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
12065         mono_emulate_opcode, mono_emit_load_got_addr,
12066         inline_method, mono_method_to_ir, mono_print_bb_code,
12067         print_dfn, decompose_pass, nullify_basic_block,
12068         replace_out_block_in_code, remove_block_if_useless,
12069         merge_basic_blocks, move_basic_block_to_end,
12070         try_unsigned_compare, optimize_branches, mono_print_code,
12071         mini_select_instructions, remove_critical_edges): Likewise.
12072         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
12073         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
12074         mono_arch_output_basic_block, mono_arch_emit_prolog):
12075         Likewise.
12076         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
12077         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
12078         mono_arch_output_basic_block): Likewise.
12079         (inst_list_prepend, insert_after_ins): Delete.
12080         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
12081         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
12082         instruction lists.
12083         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
12084         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
12085         mono_arch_emit_prolog): Likewise.
12086         * cfold.c (mono_constant_fold): Likewise.
12087         * liveness.c (visit_bb, mono_analyze_liveness,
12088         optimize_initlocals): Likewise.
12089         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
12090         * graph.c (mono_draw_code_cfg): Likewise.
12091         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
12092         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
12093         mono_ssa_cprop): Likewise.
12094         * abcremoval (get_relations_from_previous_bb, process_block):
12095         Likewise.
12096         * local-propagation (mono_cprop_invalidate_values,
12097         mono_local_cprop_bb): Likewise.
12098         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
12099         peephole_pass, mono_arch_output_basic_block,
12100         mono_arch_emit_prolog): Likewise.
12101         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
12102         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
12103         mono_arch_emit_prolog): Likewise.
12104         (insert_after_ins): Delete.
12105         * aliasing.c (print_code_with_aliasing_information,
12106         mono_build_aliasing_information, mono_aliasing_deadce):
12107         Convert to new instruction lists.
12108         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
12109         peephole_pass, NEW_INS, mono_arch_lowering_pass,
12110         mono_arch_local_regalloc, mono_arch_output_basic_block):
12111         Likewise.
12112         (insert_after_ins): Delete.
12113         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
12114         peephole_pass, mono_arch_output_basic_block): Convert to
12115         new instruction lists.
12116         * mini-codegen (InstList, inst_list_prepend,
12117         insert_after_ins): Delete.
12118         (insert_before_ins, get_register_force_spilling,
12119         get_register_spilling, free_up_ireg, free_up_reg,
12120         create_copy_ins, create_spilled_store, alloc_int_reg,
12121         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
12122         to new instruction lists.
12123         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
12124         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
12125         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
12126         (insert_after_ins): Delete.
12127         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
12128         mono_arch_local_regalloc, mono_arch_output_basic_block,
12129         mono_arch_call_opcode): Convert to new instruction lists.
12130         (insert_after_ins): Delete.
12131         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
12132         peephole_pass, mono_arch_output_basic_block,
12133         mono_arch_emit_prolog): Convert to new instruction lists.
12135 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
12137         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
12139         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
12140         Fixes #353182.
12142         * Makefile.am (version.h): Make this work with non-bash shells.
12144 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
12146         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
12148 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
12150         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
12151         the InitializeArray optimization.
12153 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
12155         * mini.c driver.c: Don't include os/gc_wrapper.h.
12157 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
12159         * mini.c (print_jit_stats): Print GC statistics if available.
12161 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
12163         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
12165 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
12167         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
12169 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
12171         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
12172         
12173         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
12175         * driver.c (mono_main): Ditto.
12177 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
12179         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
12181         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
12182         in the vtable can't be encoded.
12183         (compile_method): Ditto.
12185 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
12187         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
12188         defined.
12190         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
12191         lmf->rbp.
12193         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
12194         the top LMF entry belongs to the current method.
12196         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
12198 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
12200         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
12201         
12202         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
12204         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
12206         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
12208         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
12210         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
12211         implementation.
12213         * basic-float.cs: Add an ulong->double cast test.
12215 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
12217         * mini.c (mono_method_to_ir): Fix a warning.
12219 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
12221         * mini-ops.h: Add OP_SWITCH.
12223         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
12224         CEE_SWITCH in back-end code, use OP_SWITCH instead.
12226 2007-12-11  Geoff Norton  <gnorton@novell.com>
12228         * mini-s390x.c: Minor change to the MAX() define to allow
12229         it to compile with other gcc versions.
12231 2007-12-11  Geoff Norton  <gnorton@novell.com>
12233         * cpu-s390x.md:
12234         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
12236 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
12238         exceptions-arm.c (mono_arch_get_restore_context): Restore
12239         the frame pointer.
12241         exceptions-arm.c (throw_exception): Save the frame pointer.
12242         This is a partial fix for #323747. Only the client side is
12243         fixed.
12245 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
12247         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
12248         was using an unrelated variable to log the class which
12249         needed the cctor to be called. This was crashing on arm.
12251 2007-12-09  Robert Jordan  <robertj@gmx.net>
12253         * mini-x86.c (mono_arch_emit_epilog):
12254         Consider all kinds of 64-bit types. Fixes #323114.
12256 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
12258         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
12260 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
12262         * mini-amd64.c (peephole_pass): Add a missing instruction check.
12264 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
12266         * mini.c: run type ctor before allocating an object, not only
12267         when running it's constructor method (fixes at least part of bug #342507).
12269 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
12270         
12271         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
12272         
12273         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
12274         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
12275         function.
12277         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
12278         mono_generic_class_init_trampoline () the same as it is done with the other
12279         trampolines.
12281         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
12282         aot-runtime.c aot-compiler.c: Implement AOT support.    
12284 2007-12-07  Mark Probst  <mark.probst@gmail.com>
12286         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
12287         build for archs which don't have the vtable trampoline defined
12288         yet.
12290 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
12292         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
12294         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
12296         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
12298         * tramp-<ARCH>.c: Use the new helper function.
12300 2007-12-07  Mark Probst  <mark.probst@gmail.com>
12302         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
12303         trampoline call, which takes a vtable argument.
12305         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
12306         OP_TRAMPCALL_VTABLEs like other calls.
12308         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
12309         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
12310         call.  Implemented a support function which fetches the vtable
12311         from a register set.
12313         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
12314         Implemented a generic class init trampoline, using the
12315         OP_TRAMPCALL_VTABLE opcode.
12317         * mini.c: Implemented static field access when sharing generic
12318         code.  This implies initing the class using the new
12319         OP_TRAMPCALL_VTABLE call.
12321 2007-12-07  Mark Probst  <mark.probst@gmail.com>
12323         * mini.c: Don't compile methods with sharing enabled if their
12324         classes are disabled for sharing.
12326 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
12328         * inssel.brg: Add a missing sign extension to the GETCHR and array access
12329         opcodes. Fixes #346563.
12331         * objects.cs: Add a new test.
12333         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
12335         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
12336         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
12338 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
12340         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
12342 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
12344         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
12345         code stream.
12347 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
12349         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
12351         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
12352         optimization in the AOT case.
12353         
12354 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
12356         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
12357         
12358         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
12360         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
12362         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
12364         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
12365         is created by the inlined delegate ctor.
12367         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
12369         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
12371 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
12373         * cpu-x86.md: Fix the length of ckfinite.
12375 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
12377         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
12378         
12379         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
12380         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
12382         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
12384         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
12385         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
12387 2007-11-28  Martin Baulig  <martin@ximian.com>
12389         * mini-x86.c
12390         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
12391         after creating the trampoline.
12393 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
12395         * aot-runtime.c (load_aot_module): Check runtime version if needed.
12397         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
12398         the same version.
12400         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
12401         instead of the calling method to help AOT.
12403         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
12405 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
12407         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
12408         is defined.
12410 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
12412         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
12413         
12414         * aot-compiler.c (compile_method): Correct check for generic method definitions.
12415         (encode_method_ref): No need to handle generic method definitions specially.
12417         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
12419         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
12420         decode_klass_info.
12422         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
12423         encode_klass_info.
12424         (compile_method): Enable generic sharing.
12426 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
12428         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
12429         (mini_method_compile): Add preliminary support for AOTing shared generic code.
12431         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
12432         generic code.
12434         * mini-trampolines.c: Fix a warning.
12436         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
12437         NEW_PCONST.
12438         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
12439         (generic_class_is_reference_type): Remove unused function.
12441         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
12442         in the generic vtable trampoline case.
12444         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
12445         
12446         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
12447         return an AOT method based on a vtable slot.
12449         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
12451         * mini.c (mini_get_vtable_trampoline): Export this.
12453 2007-11-22  Martin Baulig  <martin@ximian.com>
12455         * debug-debugger.h
12456         (MonoDebuggerInfo): Move `debugger_version' up.
12458 2007-11-22  Martin Baulig  <martin@ximian.com>
12460         * mini-amd64.c
12461         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
12463         * mini-trampolines.c
12464         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
12465         after compiling the method.
12467 2007-11-20  Martin Baulig  <martin@ximian.com>
12469         * debug-mini.c
12470         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
12471         (mono_debugger_remove_breakpoint): Likewise.
12472         (mono_debugger_check_breakpoints): Likewise.
12474         * debug-debugger.c: Implement the new breakpoint interface here.
12476 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
12478         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
12479         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
12481         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
12483 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
12485         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
12487         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
12488         mini.c.
12490         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
12491         mini.c.
12493         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
12494         returning a vtype in a register.
12496         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
12497         here from the arch specific code.
12499         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
12500         mini.c.
12502         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
12503         (mono_arch_emit_prolog): Increment maximum prolog size.
12505         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
12506         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
12508         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
12509         MonoGenericSharingContext.
12511         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
12512         MonoGenericSharingContext. Allocate memory from the cfg mempool.
12514 2007-11-15  Mark Probst  <mark.probst@gmail.com>
12516         * mini.c, mini.h, generic-sharing.c: Functions for producing code
12517         which extract fields out of the runtime generic context.  Full
12518         sharing of the NEWARR opcode.
12520 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
12522         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
12523         --enable-minimal=ssa.
12525 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
12527         * mini-trampolines.c (mono_delegate_trampoline): Update after 
12528         mono_marshal_get_delegate_invoke () signature change.
12530 2007-11-13  Mark Probst  <mark.probst@gmail.com>
12532         * mini.c: Removed the shared context in favor of the generic
12533         sharing context.  Allocate the MonoJitInfo structure with room for
12534         the generic sharing context if it's needed.
12536         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
12537         domain-internals.h now.
12539         * mini-x86.c: Pass the generic sharing context to get_call_info ().
12541         * generic-sharing.c: Several changes for working without a shared
12542         context and instead operating on open types instead.
12544 2007-11-12  David S. Miller  <davem@davemloft.net>
12546        * inssel-sparc.brg: Fix double instruction emit.
12548 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
12550         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
12551         Get/Set/Address methods.
12552         
12553         * mini.c debug-debugger.c mini-trampolines.c: Update after 
12554         mono_marshal_get_delegate_invoke signature change.
12556 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
12558         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
12559         This can happens with dynamic methods. Fixes the other bug in #322722.
12561 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
12563         * tramp-arm.c (mono_arch_patch_callsite): Support patching
12564         BX call sequence.
12566         * mini-arm.c (arm_patch): Implement patching of BX call
12567         sequence. Fixes one of the bugs in #322722.
12569 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
12571        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
12572        under Linux.  We only need to flush every 32-byte cache line.    
12574 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
12576         * mini.c:
12577         move_basic_block_to_end: Add branches when needed, eventually creating
12578         a new BB.
12579         optimize_branches: added a parameter that tells if it's ok to create
12580         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
12581         and avoid calling move_basic_block_to_end when it's not ok.
12582         Fixes bug 318677.
12584 2007-11-07  Mark Probst  <mark.probst@gmail.com>
12586         * mini.c: Abort inlining call to InitializeArray if something
12587         looks wrong.  Let the icall handle it, which now has proper safety
12588         checks.
12590 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
12592         * mini.c (mono_spill_call): add support for soft-float.
12594         * mini.c (mono_method_to_ir): add support for soft-float
12595         to inlined functions that return float.
12597         * mini.c (mono_method_to_ir): add support for soft-float
12598         to cee_stsfld opcode on float fields.
12600 2007-11-05  Geoff Norton  <gnorton@novell.com>
12602         * mini-x86.h: Fix the structure access for X86 Leopard.
12605 2007-11-05  Martin Baulig  <martin@ximian.com>
12607         * mini-trampolines.c
12608         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
12609         after compiling the method to notify the debugger.
12611 2007-11-05  Martin Baulig  <martin@ximian.com>
12613         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
12615 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
12617         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
12618         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
12620 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
12622         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
12623         native-to-managed wrappers.
12624         
12625 2007-11-01  Geoff Norton  <gnorton@novell.com>
12627         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
12628         members.
12630 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
12632         * mini.c, mini-x86.c: when getting back from unmanaged code
12633         to managed via a marshaled delegate we also need to set the
12634         right domain.
12636 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
12638         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
12639         for amd64.
12641 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
12643         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
12644         let the debugger or other external agents to tell the JIT when
12645         a sw breakpoint has been inserted in the code that the JIT needs
12646         to be able to inspect.
12648 2007-10-31  Martin Baulig  <martin@ximian.com>
12650         * debug-debugger.h
12651         (MonoDebuggerInfo): Remove `runtime_class_init'.
12653 2007-10-30  Martin Baulig  <martin@ximian.com>
12655         * debug-mini.h
12656         (mono_debugger_thread_created): Added `MonoThread *' argument.
12657         (mono_debugger_extended_notification): New public method.
12658         (mono_debugger_trampoline_compiled): New public method.
12660         * debug-mini.c
12661         (MonoDebuggerThreadInfo): Added `thread' and
12662         `extended_notifications' fields.
12664         * debug-debugger.c
12665         (debugger_executable_code_buffer): New static variable.
12667         * debug-debugger.h
12668         (MonoDebuggerInfo): Added `executable_code_buffer',
12669         `executable_code_buffer_size', `breakpoint_info_area',
12670         `breakpoint_table' and `breakpoint_table_size'.
12672 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
12674         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
12675         that IP  either is an unused value or the vtable pointer. IMT 
12676         calls use vtable + offset now. Reduced by almost half the size
12677         of IMT entries.
12679 2007-10-26  Jonathan Chambers <joncham@gmail.com>
12681         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
12682         defines to access param registers. Replace long usage with
12683         gsize as sizeof(long) != sizeof(void*) on Win64.
12685         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
12686         on Win64. Fix intrinsic, use _AddressOfReturnAddress
12687         instead of non-existant _GetAddressOfReturnAddress.
12689         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
12690         param registers. Save/restore %rdi and %rsi in MonoLMF.
12692         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
12693         param registers. Modify (throw_exception) signature to take 
12694         %rdi and %rsi on Win64. 
12696         Code is contributed under MIT/X11 license.
12698 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
12700         * helpers.c: unlink debugging output files.
12702 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
12704         * mini.c: Move mono_create_ftnptr () to object.c.
12706 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
12708         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
12709         optional. This function can now be used to disassemble code generated
12710         outside the JIT such as trampolines and IMT thunks.
12712         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
12714         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
12715         vtable pointer from a ldr instruction.
12717         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
12718         new IMT call sequence.
12720         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
12721         call sequence for interface invocations.
12723         * mini-arm.c (mono_arch_emit_imt_argument): added, required
12724         for imt support. This function is empty since IMT on ARM requires no
12725         special handling on the IR side.
12727         * mini-arm.c (mono_arch_find_imt_method): added, required for
12728         imt support.
12730         * mini-arm.c (mono_arch_find_this_argument): added, required
12731         for imt support.
12733         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
12734         a ldr instruction to load a value stored in the code stream.
12736         * mini-arm.c (mono_arch_build_imt_thunk):added, required
12737         for imt support.
12740 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
12742         * mini.c (mini_init): Install the jump trampoline callback.
12744 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12746         * mini-trampolines.c: handle synchronized methods with the common
12747         vtable trampoline (bug #335601).
12749 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
12751         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
12753         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
12754         64 bit platforms.
12756         * mini-ia64.h mini-ia64.c: Add support for IMT.
12758         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
12759         prolog. Fixes #331958.
12761 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
12763         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
12765 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12767         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
12768         trampoline.
12770 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
12772         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
12773         trampoline.
12775 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
12777         * mini-x86.c, mini-x86.h: x86 support for the common vtable
12778         trampoline.
12780 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
12782         * mini-trampolines.c: changed the magic rampoline to understand
12783         the common vtable trampoline method: the method to invoke is
12784         determined by the vtable displacement of the call.
12786 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
12788         * mini.c, mini.h: register the common vtable trampoline if the
12789         architecture supports it.
12791 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
12793         * cpu-amd64.md: use the correct max length for tls_get.
12795 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
12797         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
12798         CEE_STELEM_ANY. Fixes #333696.
12800 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
12802         * exceptions-x86.c: provide more graceful handling of the case where
12803         we followed a bogus function pointer from managed code (bug #332866).
12805 2007-10-11  Mark Probst  <mark.probst@gmail.com>
12807         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
12808         replaces the generic_shared flag and will carry more information
12809         in the future.
12811         * generic-sharing.c: Added mini_type_stack_size() which allows
12812         allows open types if given a generic sharing context.
12813         mini_get_basic_type_from_generic() takes a
12814         MonoGenericSharingContext* instead of a MonoCompile* now.
12816         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
12817         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
12818         mini-sparc.c, mini-x86.c: Trivial changes required by the two
12819         changes above.  Just passing arguments through to the right
12820         places.
12822 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
12824         * mini-arm.c: unify the call emission to emit_code_seq().
12826 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
12828         * tramp-arm.c: reduced the trampoline size.
12830 2007-10-10  Mark Probst  <mark.probst@gmail.com>
12832         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
12833         variable handling out of arch-specific code.
12835 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
12837         * mini-arm.c: implemented fast delegate dispatch.
12839 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
12841         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
12842         that fp elimination is turned off if the space required by locals is too
12843         big. Fixes #331958.
12845 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
12847         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
12848         ARM to the new style trampoline.
12850 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
12852         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
12854         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
12856 2007-10-09  Martin Baulig  <martin@ximian.com>
12858         * debug-debugger.h
12859         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
12860         `field_info_offset_offset'.     
12862 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
12864         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
12865         removed more internal usage of the r11 register and made it available
12866         to the register allocator.
12868 2007-10-08  Mark Probst  <mark.probst@gmail.com>
12870         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
12871         when sharing generics and treat type variables as references.
12873 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
12875         * mini-ppc.c: started removing the internal uses of register r11
12876         to eventually allow the register allocator to manage it as an
12877         additional available register.
12879 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
12881         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
12883 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
12885         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
12886         specific trampolines as they are not performance critical as a jump
12887         target (maybe align as before only for AOT code?). This saves about
12888         200 KB of native code on x86 for monodevelop startup.
12890 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
12892         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
12893         monodevelop startup.
12895 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
12897         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
12899         * mini-sparc.h mini-sparc.c: Implement IMT support.
12901         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
12902         its smaller and doesn't clobber sparc_g1.
12904         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
12906 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
12908         * mini-ppc.c: optimized the size of the IMT thunks a bit.
12910 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
12912         * mini-ppc.c: implemented fast delegate invocation.
12914 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
12916         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
12918 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
12920         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
12921         code to the new style trampoline in preparation for IMT support.
12923 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
12925         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
12926         systems already. This also reduces the specific trampiline sizes and
12927         prepares for the use of r12 as the IMT identifier register.
12929 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
12931         * mini-mips.h: endianess fix (simplified from a patch by
12932         Thomas Kunze <thommy@tabao.de>, bug #323737).
12934 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
12936         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
12937         to access ucontext fields and enable netbsd support
12938         (partially from Magnus Henoch <mange@freemail.hu>).
12940 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
12942         * genmdesc.pl: patch from Henryk Plotz <henryk@openmoko.org> to
12943         use the preprocessor from the CPP env var if it is set.
12945 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
12947         * mini-trampolines.c: fixed an assertion and moved it earlier in the
12948         code, before interface_offset gets used.
12950 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
12952         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
12953         mono_class_setup_vtable () before accessing klass->vtable.
12955 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
12957         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
12958         hackish.
12960 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
12962         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
12963         IMT slots (this saves hundreds of KB of memory in programs like
12964         IronPython and Monodevelop).
12966 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
12968         * mini.c: print the delegate counter.
12970 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
12972         * mini-x86.c: make it easier to enable the debugging code for IMT
12973         slots.
12975 2007-09-28  Martin Baulig  <martin@ximian.com>
12977         * debug-debugger.h
12978         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
12979         `mono_method_klass_offset' and `mono_method_token_offset'.
12981 2007-09-20  Mark Probst  <mark.probst@gmail.com>
12983         * mini.c: First generics sharing implementation.  Can only share
12984         in very simple cases.  If sharing doesn't work it falls back to
12985         dedicated compilation.
12987         * mini.h: Flag in MonoCompile to specify whether generic
12988         compilation is shared.  Flags enum for marking which generic inst
12989         of a context is used.  Prototypes for helper functions.
12991         * generic-sharing.c: Helper functions for generic method sharing.
12993         * optflags-def.h: Optimization flag (gshared) for enabling generic
12994         method sharing added.
12996         * Makefile.am: generic-sharing.c added.
12998 2007-09-19 Daniel Nauck <dna@mono-project.de>
13000         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
13002 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
13003         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
13004         fixes bug 325507.
13006 2007-09-19  Martin Baulig  <martin@ximian.com>
13008         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
13009         mono_debug_cleanup() is now part of mono_cleanup().
13011 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
13013         * driver.c (mono_main): Fix a warning.
13015 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
13017         * aot-compiler.c: Optimize various parts when processing large assemblies.
13018         Fixes ##325568.
13020         * mini.c (mono_patch_info_hash): Improve hash function.
13022 2007-09-14  Jonathan Chambers <joncham@gmail.com>
13024         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
13025         
13026         Code is contributed under MIT/X11 license.
13028 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
13030         * mini.c (mini_init): Fix a leak.
13032         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
13034 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
13036         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
13038 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
13040         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
13042 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
13044         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
13045         variance tests.
13047         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
13049         * mini.c (handle_alloc): Enable managed allocators in AOT code.
13051         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
13053         * aot-runtime.c (decode_patch_info): Ditto.
13055 2007-09-12  Jonathan Chambers <joncham@gmail.com>
13057         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
13058         static case. Cache delegates in architecture specific code, 
13059         based on number of parameters.
13060         
13061         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
13062         in architecture specific code, based on number of parameters.
13063         
13064         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
13065         caching happen in architecture specific code now.
13066         
13067         Code is contributed under MIT/X11 license.
13069 2007-09-12  Jonathan Chambers <joncham@gmail.com>
13071         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
13072         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
13073         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
13075         Code is contributed under MIT/X11 license.
13077 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
13078         * mini.c: (mono_thread_abort) Fixed bug #82416.
13080 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
13082         * mini.: hook the new managed GC allocation feature into the JIT.
13084 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
13086         * mini.c: implementation for the new runtime tls opcode.
13088 2007-09-11  Martin Baulig  <martin@ximian.com>
13090         * debug-debugger.h
13091         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
13092         `mono_method_inflated_offset'.
13094 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
13096         * driver.c mini.h mini.c: Add a new devel command line option for injecting
13097         async exceptions into a method.
13099         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
13100         purpose of testing whenever the unwinder works at every instruction.
13102 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
13104         * mini.c: check accessibility of method used in ldftn (fixes
13105         bug #82635).
13107 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
13109         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
13111         * inssel.brg: Fix a warning.
13113 2007-09-03  Martin Baulig  <martin@ximian.com>
13115         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
13116         now takes the `main_method' as argument.
13118 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
13120         * cpu-sparc.md (endfilter): Add missing src1:i argument.
13122 2007-08-30  Jonathan Chambers <joncham@gmail.com>
13124         * driver.c: include the cil-coff.h header on Windows.
13125         
13126         Code is contributed under MIT/X11 license.
13128 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
13130         * mini.c, driver.c: don't include the cil-coff.h header.
13132 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
13134         * mini.c: flag places that needs fixes fo soft-float support.
13136 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
13138         * mini.h, inssel-float.brg: fix soft-float constant loads on big
13139         endian systems (partially from Dean Jenkins, bug #81924).
13141 2007-08-28  Mark Probst  <mark.probst@gmail.com>
13143         * mini.c (check_linkdemand): Remove embedded reference object in
13144         call to LinkDemandSecurityException.
13145         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
13146         with an IntPtr instead of a reference object.
13148 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
13150         * mini.c (handle_initobj): Handle alignment properly.
13152         * inssel.brg (mini_emit_memset): Ditto. 
13154         * inssel.brg (mini_emit_memcpy): Ditto. 
13156         * inssel-sparc.brg: Ditto.              
13158         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
13160 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
13162         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
13163         exceptions raised in unmanaged code. Fixes part of #82594.
13165 2007-08-24  Mark Probst  <mark.probst@gmail.com>
13167         * mini.c (mono_method_to_ir), declsec.c
13168         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
13170 2007-08-22  Martin Baulig  <martin@ximian.com>
13172         * debug-mini.h
13173         (MonoDebuggerThreadInfo): New typedef.
13174         (mono_debugger_thread_table): New global variable.
13175         (mono_debugger_thread_created): New public function.
13176         (mono_debugger_thread_cleanup): New public function.
13178         * debug-debugger.h
13179         (MonoDebuggerInfo):
13180         - removed `get_current_thread' and `lookup_assembly'.
13181         - removed `data_table'.
13182         - added `thread_table'.
13184         * mini.c
13185         (mono_thread_start_cb): Call mono_debugger_thread_created().
13186         (mono_thread_attach_cb): Likewise.
13187         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
13188         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
13189         initial domain.
13191         * driver.c (mono_main): Move mono_debug_init() up, before calling
13192         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
13194 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
13196         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
13197         together when passing several arguments of type double (gives a small
13198         speedup and saves a few bytes of generated code).
13200 2007-08-20  Jb Evain  <jbevain@novell.com>
13202         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
13204 2007-08-20  Jb Evain  <jbevain@novell.com>
13206         * mini.c (mono_method_to_ir): throw MethodAccessException
13207         and FieldAccessException instead of InvalidProgramException.
13209 2007-08-20  Mark Probst  <mark.probst@gmail.com>
13211         * mini.c: CoreCLR security checks.
13213         * mini.h: Removed MonoSecurityMode (moved to
13214         metadata/security-manager.h) and mono_security_mode global var
13215         (replaced by set/get functions in security-manager.h).
13217         * driver.c: Added "core-clr-test" security mode for testing.  Used
13218         set-function for setting security mode.
13220 2007-08-17  Mark Probst  <mark.probst@gmail.com>
13222         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
13223         the new jit_info_table.
13225         * driver.c: Test code for the new jit_info_table (enabled by the
13226         define MONO_JIT_INFO_TABLE_TEST).
13228 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
13230         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
13231         detection of call <REG> instruction sequence. Fixes build on freebsd.
13233 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
13235         * mini-exceptions.c: Fix a warning.
13237 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
13239         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
13240         stack overflow handling code on amd64 too.
13242         * mini-exceptions.c (mono_setup_altstack): Make this use 
13243         mono_thread_get_stack_bounds ().
13245         * mini-x86.h: Disable sigaltstack on solaris x86.
13247 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
13249         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
13251 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
13253         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
13255 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
13257         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
13259         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
13261 2007-08-03  Neale Ferguson <neale@sinenomine.net>
13263         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
13264         due to alignment.
13266 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
13268         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
13269         to be emitted (bug #82281).
13271 2007-08-01  Martin Baulig  <martin@ximian.com>
13273         Merged the `debugger-dublin' branch.
13275         * debug-debugger.h (MonoDebuggerInfo):
13276         Removed the `old_*' compatibility entries.
13277         Added `debugger_version' and `data_table'.
13278         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
13279         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
13281         * debug-mini.c
13282         (MiniDebugMethodBreakpointInfo): Add `address_list'.
13283         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
13284         instead of a `gconstpointer'.
13285         (mono_debugger_insert_method_breakpoint): Return a
13286         `MonoDebugMethodAddressList *'.
13288 2007-06-28  Martin Baulig  <martin@ximian.com>
13290         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
13292 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
13294         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
13295         __builtin_frame_address () since it is broken on older gcc versions.
13297 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
13299         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
13300         on the stack overflow handling and made the managed stack overflows
13301         catchable in most cases using soft guard pages.
13302         * exceptions-x86.c: added code to restore the protection in the soft
13303         guard pages at the end of exception handling.
13305 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
13307         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
13309 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
13311         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
13312         exception handling.
13314 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
13316         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
13317         signal handling support until it has been ported to the new mechanism.
13318         * mini.c: fixed stack overflow detection and use the new
13319         architecture code  to handle signals on the altstack.
13321 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
13323         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
13324         stack overflows on the alt stack.
13326 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
13328         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
13329         stack overflows on the alt stack.
13331 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
13333         * exceptions-ppc.c: cleanup preparing for altstack support.
13335 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
13337         * exceptions-arm.c: cleanup preparing for altstack support.
13339 2007-07-27  Mark Probst  <mark.probst@gmail.com>
13341         * mini.c (print_jit_stats): Output hazard pointer stats.
13343 2007-07-26  Mark Probst  <mark.probst@gmail.com>
13345         * driver.c, mini.c: Replaced security mode flags with a single
13346         enum variable.
13348 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
13350         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
13352 2007-07-25  Mark Probst  <mark.probst@gmail.com>
13354         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
13355         (which doesn't do anything yet) for activating Core CLR
13356         (Silverlight) security.
13358 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
13360         * mini-codegen.c: work around a possible gcc bug on arm.
13362 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
13364         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
13365         message for platforms that don't support AOT compilation.
13367 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
13369         * mini.h, mini.c, driver.c: temporary smcs hack.
13371 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
13373         * mini-arm.h, mini-arm.c: arm EABI fixes.
13375 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
13377         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
13378         case.
13380         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
13381         trampolines taking a method argument.
13383         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
13385         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
13386         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
13388         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
13389         JIT compilation throws an exception. Fixes #82050.
13391 2007-07-19  Mark Probst  <mark.probst@gmail.com>
13393         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
13394         with the MONO_EXCEPTION_ defines.
13396 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
13398         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
13399         #82117.
13400         
13401         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
13402         the cause of an assertion.
13404 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
13406         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
13407         removed.
13409 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
13411         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
13412         assert. Should fix #82103.
13414 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
13416         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
13417         here too. Fixes #82095.
13419         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
13420         addresses.
13422         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
13424         * mini-amd64.h: Enable IMT for amd64.
13425         
13426         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
13428 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
13430         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
13432 2007-07-12  Mark Probst  <mark.probst@gmail.com>
13434         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
13435         as soon as check_linkdemand sets an exception_type.
13437 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
13439         * mini-x86.c: fixed offsets for IMT call sequence.
13440         * mini-x86.h: enable IMT again.
13442 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
13444         * trace.c (mono_trace_enter_method): Decode MonoType too.
13446         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
13448         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
13450         * mini-amd64.c: Add preliminary IMT implementation.
13451         
13452 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
13454         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
13455         understand the new IMT-base interface invocation (thanks to
13456         Daniel Nauck for the report and the remote debugging session).
13458 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
13460         * mini-x86.c: size and speed optimizations for the IMT bsearch.
13462 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
13464         * Makefile.am (aotcheck): Make this actually use the AOTed code.
13466 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
13468         * mini-trampolines.c: implement AOT IMT support.
13469         * mini-x86.h: enable IMT support for wider testing.
13471 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
13473         * inssel.brg (emit_imt_argument): Add aot support here.
13475         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
13477 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
13479         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
13480         of the IMT implementation, partially from massi, with my
13481         implementation of the bsearch sequence. Disabled by default until
13482         the AOT code is implemented.
13484 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
13486         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
13488         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
13490 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
13492         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
13493         arch-independent IMT JIT code from Massimiliano
13494         Mantione (massi@ximian.com) with small cleanups from me.
13496 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
13498         * Makefile.am: fix svn invocation to get the svn revision to be
13499         independent of the local language (build fix).
13501 2007-07-09  Mark Probst  <mark.probst@gmail.com>
13503         * mini.c (inline_method): Reset cfg->exception_type if the
13504         inlining is aborted.  Fixes: 82049.
13506 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
13508         * mini.c: remove assert from exception handling code when exception_ptr
13509         is not set.
13511 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
13513         * mini.c (mono_codegen): Add an assert.
13515         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
13516         enter and leave code.
13517         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
13519 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
13521         * mini-ppc.c: fixed memory corruption for localloc(0)
13522         (bug #81852).
13524 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
13525         
13526         * mini.c: Fix warnings.
13528 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
13530         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
13531         to emit better double->int conversions.
13533 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
13535         * mini.c: the provided Min/Max optimizations are valid for unisgned
13536         ints.
13538 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
13540         * 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
13542 2007-06-28  Miguel de Icaza  <miguel@novell.com>
13544         * mini.c (mono_running_on_valgrind): Add support for reporting the
13545         method and  its boundaries to valgrind.
13547 2007-06-28  Martin Baulig  <martin@ximian.com>
13549         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
13551 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
13553         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
13555         * generic.2.cs: Add new test case.
13557 2007-06-25  Martin Baulig  <martin@ximian.com>
13559         Merged the `debugger-dublin' branch.
13561         * debug-mini.c
13562         (mono_debugger_insert_method_breakpoint): New public method.
13563         (mono_debugger_remove_method_breakpoint): Likewise.
13564         (mono_debugger_check_breakpoints): New static method.
13565         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
13567         * debug-debugger.h (MonoDebuggerInfo):
13568         Renamed (to keep backward compatibility in the vtable):
13569         `insert_breakpoint' -> `old_insert_breakpoint'.
13570         `remove_breakpoint' -> `old_remove_breakpoint'.
13571         `create_string' -> `old_create_string'.
13572         `lookup_class' -> `old_lookup_class'.
13573         `lookup_type' -> removed; changed into a dummy field.
13574         `lookup_assembly' -> `old_lookup_assembly'.
13575         Added (same functionality, but different signature):
13576         `create_string', `lookup_class', `lookup_assembly'
13577         Added new:
13578         `get_method_addr_or_bpt', `remove_method_breakpoint',
13579         `runtime_class_init'.
13581         * debug-debugger.c: Merged the `debugger-dublin' branch.
13583 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
13585         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
13586         well.
13587         (peephole_pass): Likewise.
13589 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
13591         * driver.c: hopefully make setaffinity work also for ancient
13592         versions of linux.
13594 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
13596         * driver.c : win32 build fix.
13598 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
13600         * driver.c: check for the MONO_NO_SMP env var and bind to a single
13601         processor if it is set.
13603 2007-06-21  Martin Baulig  <martin@ximian.com>
13605         * debug-mini.h: New file.
13607         * debug-mini.c
13608         (mono_debugger_insert_breakpoint_full): Moved here from
13609         ../metadata/mono-debug-debugger.c.
13610         (mono_debugger_remove_breakpoint): Likewise.
13611         (mono_debugger_breakpoint_callback): Likewise.
13613 2007-06-15  Raja R Harinath  <rharinath@novell.com>
13615         * jit-icalls.c (mono_helper_compile_generic_method): Update to
13616         changes in MonoGenericClass.
13618 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
13620         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
13622 2007-06-14  Raja R Harinath  <rharinath@novell.com>
13624         * jit-icalls.c (mono_helper_compile_generic_method): Update to
13625         removal of MonoGenericMethod.
13627 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
13629         * mini-exceptions.c: hooks for the exception events profiling API.
13631 2007-06-14  Randolph Chung  <tausq@debian.org>
13633         * Makefile.ma: Add hppa target.
13634         * mini-arch.h: Include mini-hppa.h
13635         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
13636         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
13637         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
13639 2007-06-14  Randolph Chung  <tausq@debian.org>
13641         * inssel.brg: Add rules for "chained" compare-branch operations so that
13642         a single compare op can affect multiple branches.  Adjust cost for
13643         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
13644         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
13645         cost for some rules so that they can more easily be overridden by
13646         per-arch rules (with fixes from lupus).
13647         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
13649 2007-06-13  Randolph Chung  <tausq@debian.org>
13651         * mini-ops.h: Reorder branch ops so that they match the order of the
13652         corresponding CEE_* ops.  The code expects them this way.
13653         Add new ops for HPPA target.
13654         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
13656 2007-06-13  Randolph Chung  <tausq@debian.org>
13658         * mini-exceptions.c: Handle cases where the stack grows towards
13659         larger addresses.
13660         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
13662 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
13664         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
13665         counter.
13666         * driver.c: explain where a non-matching corlib is found.
13668 2007-06-13  Mark Probst  <mark.probst@gmail.com>
13670         * mini.c (print_jit_stats): Output dynamic code allocation stats.
13672 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
13674         * mini-exceptions.c: Generate a method profile leave event during
13675         an exception to ensure that the profiler gets notified.
13677 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
13679         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
13680         branch.
13682         * cpu-amd64.md: Add long_and/or/xor opcodes.
13684 2007-06-06  Wade Berrier  <wberrier@novell.com>
13686         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
13687         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
13688         length of instruction shr_imm (expected 8, got 10)
13690 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
13692         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
13694 2007-06-06  Mark Probst  <mark.probst@gmail.com>
13696         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
13697         MonoInternalHashTable again (fixed bug in the internal hash table
13698         code).
13700 2007-06-06  Mark Probst  <mark.probst@gmail.com>
13702         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
13703         Have to figure out what makes it crash the SWF regression.
13705 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
13707         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
13709 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
13711         * mini.c: optimize out the type check when storing null in a
13712         reference array.
13714 2007-06-04  Mark Probst  <mark.probst@gmail.com>
13716         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
13717         MonoInternalHashTable.
13719 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
13721         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
13722         signed integer methods.
13724 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
13726         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
13727         permanently since the current approach doesn't work.
13729 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
13731         * inssel.brg (stmt): Only call delegate->invoke_impl if 
13732         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
13734 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
13736         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
13737         the sreg2==rdx case.
13738         
13739         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
13740         account if it contains a rex prefix.
13741         (peephole_pass): Handle OP_FMOVE as well.
13743 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
13745         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
13746         as it causes regressions.
13748 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
13750         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
13751         static case as well.
13753         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
13755         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
13756         (mono_arch_get_this_arg_from_call): Ditto.
13758         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
13760         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
13761         invoke_impl field.
13763         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
13764         (mono_arch_get_this_arg_from_call): Ditto.
13766         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
13767         
13768         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
13769         try to create optimized invoke code and use that for further invocations. 
13770         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
13772         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
13774 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
13776         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
13777         sealed classes or methods.
13778         *devirtualization.cs: tests for the new optimization
13780 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
13782         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
13783         by the update_volatile () function.
13785 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
13787         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
13788         require it.
13790         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
13792 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
13794         * mini.c: Add configure checks for header files.
13795         * mini-x86.c: Add configure checks for header files.
13796         * trace.c: Add configure checks for header files.
13797         * aot-runtime.c: Add configure checks for header files.
13798         * aot-compiler.c: Add configure checks for header files.
13799         * driver.c: Add configure checks for header files.
13800         * mini-codegen.c: Add configure checks for header files.
13801         
13802         Code is contributed under MIT/X11 license.
13804 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
13806         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
13807         icompare_imm -128 + op_iclt. Fixes #81703.
13809 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
13811         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
13813 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
13815         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
13816         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
13817         so that all isinst checks now use "interface_bitmap".
13819 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
13821         * cpu-amd64.md (jmp): Fix a warning.
13823         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
13825         * basic.cs: Add new regression test.
13827         * basic.cs: Remove test which is now in basic-long.cs.
13829         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
13831         * basic-long.cs: Add new test.
13832         
13833 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
13835         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
13837 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
13839         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
13841         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
13842         places.
13843         
13844         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
13845         throwing code a bit.
13847         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
13848         the exception throwing code a bit.
13850         * mini-x86.c (get_call_info): Allocate result from a mempool.
13852 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
13854         * aot-compiler.c (find_typespec_for_class): Fix the assert.
13856         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
13858         * mini.h (MonoCompile): Add 'token_info_hash' field.
13860         * mini.c: Save token->method associations during compilation so the AOT 
13861         compiler can use it.
13862         
13863         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
13864         which reference generic classes and methods.
13866 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
13868         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
13870         * aot-compiler.c (compile_method): Fix a typo in a comment.
13872         * aot-runtime.c (decode_cached_class_info): Skip generic types.
13874         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
13875         everything generic.
13877         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
13879 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
13881         * mini.h (MonoCompile): Add 'args' field.
13883         * mini.c (mono_compile_create_vars): Store variables representing the arguments
13884         into cfg->args.
13886         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
13888 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
13890         * mini.c (mono_compile_get_interface_var): Remove this unused function.
13892         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
13894         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
13895         opcodes for some opcodes.
13897         * mini.h *.brg *.c: Use the new opcodes.
13899 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
13901         * mini.h: Bumped aot revision.
13903         * inssel.brg: modified code generation of type checks for interfaces
13904         to use the new "MonoClass.interface_bitmap" instead of the old
13905         "MonoClass.interface_offsets".
13907 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
13909         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
13911 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
13913         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
13914         64 bit platforms.
13916 2007-04-27  Neale Ferguson <neale@sinenomine.net>
13918         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
13920 2007-04-27  Wade Berrier  <wberrier@novell.com>
13922         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
13923         mini.h) to fix build.
13925 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
13927         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
13928         
13929         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
13930         causes the corlib unit tests to fail.
13932 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
13934         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
13936         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
13938         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
13939         opcodes to the comparison relations.
13941         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
13942         opcodes to their types.
13943         
13944         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
13946         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
13947         it in cfg->arch.cinfo.
13949         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
13951         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
13952         cfg->cil_offset_to_bb.
13954 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
13956         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
13957         created becase of initlocals.
13959 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
13961         * mini-alpha.c cpu-alpha.md: More alpha port work from 
13962         Sergey Tikhonov <tsv@solvo.ru>.
13964 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
13966         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
13968 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
13970         * cpu-s390.md (break): Correct the length of break instruction.
13972 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
13974         * mini.c: fix a couple of soft-float issues and comments.
13976 2007-04-15  Miguel de Icaza  <miguel@novell.com>
13978         * trace.c (is_filenamechar): - is also a filename char.
13980 2007-04-15  Neale Ferguson <neale@sinenomine.net>
13982         * mini-s390.c: Correct checking for enum type in return value processing.
13984 2007-04-14  Raja R Harinath  <rharinath@novell.com>
13986         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
13987         (version.h): Makefile is in the build directory.
13989 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
13991         * mini-amd64.h: fix for assertion failure on Solaris/amd64
13993 2007-04-11  Martin Baulig  <martin@ximian.com>
13995         * mini.c (can_access_member): Fix handling of generic classes;
13996         fixes #81259.
13998 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
14000         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
14002 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
14004         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
14006 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
14008         * mini-codegen.c: make sure the right spill amount is
14009         used for fp or integer registers (fixes the float_sub_spill() on ppc).
14011 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
14013         * mini-ppc.c: fixes for the fp_branch_nan test.
14015 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
14017         * basic.cs: Comment out new test which still fails on ia64.
14019 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
14021         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
14023 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
14025         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
14027 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
14029         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
14030         on 64 bit machines. Fixes part of #80738.
14032         * basic.cs: Add regression test.
14034 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
14036         * inssel.brg basic.cs: Revert previous change to fix build.
14038         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
14039         platforms.
14040         
14041         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
14043         * basic.cs: Add new regression test.
14045 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
14047         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
14048         many arguments.
14050 2007-03-16  Neale Ferguson <neale@sinenomine.net>
14052         * cpu-s390x.md: Correct length of break instruction.
14054 2007-03-16  Neale Ferguson <neale@sinenomine.net>
14056         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
14057         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
14059 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
14061         * *.c: Begin WIN64 port.
14062         * mini.c:  Use correct register in profiler.
14063         * mini-amd64.c: No inline assembly on Win64.
14064         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
14065         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
14066         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
14067         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
14068         mono_arch_ip_from_context for Win64.
14069         
14070         Contributed under MIT/X11 license.
14072 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
14074         * exceptions-amd64.c (seh_handler): Ditto.
14076         * exceptions-x86.c (seh_handler): Fix a memory leak.
14078 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
14080         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
14081         mini-s390x.c: fixed peephole optimizations to deal
14082         correctly with 1 and 2 byte reload avoidance.
14084 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
14086         * cpu-s390.md, cpu-s390x.md: update localloc length.
14088 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
14090         * cpu-g4.md: added missing descriptions.
14092 2007-03-14  Miguel de Icaza  <miguel@novell.com>
14094         *  Makefile.am: Add support so the tail tests are not executed on
14095         PowerPC as that is a known limitation of the PowerPC port.
14097 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
14099         * runmdesc.bat:  Move to msvc directory.
14100         
14101 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
14103         * runmdesc.bat:  Run executable that was produced by the current
14104         target and sent via an argument.
14105         
14106 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
14108         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
14109         #81102.
14111         * generics.2.cs: Add regression test.
14113 2007-03-09  Wade berrier  <wberrier@novell.com>
14115         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
14117 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
14119         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
14120         AOT code depends on this.
14122 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
14124         * mini.c: more precise tracking of types in the eval stack
14125         (part of fix for bug #81044).
14127 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
14129         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
14131         * aot-compiler.c (encode_patch): Remove an obsolete comment.
14133 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
14135         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
14137         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
14139 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
14141         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
14142         a pointer on 64 bit systems. Fixes #80190.
14144         * iltests.il: Add new regression test.
14146 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
14148         * mini.c: inline a constant for Environment.IsRunningOnWindows.
14150 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
14152         * trace.c: Remove an erroneous alignemnt check when tracing.
14153           Fixes --trace on OSX86.
14155 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
14157         * mini-$(arch).h: initialize SP in context for all the archs.
14159 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
14161         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
14162         regressions in the thread tests.
14164 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
14166         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
14167         - fixed implementation of LOCALLOC opcode
14168         - implemented non-un compare for floats
14169         - code cleanup
14170         - implementation of FDIV and CKFINITE opcodes
14171         - fixes for latest mono updates
14172         - additional arch opcodes
14174 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
14176         * Makefile.am: simplify and merge rules for cross-compilation.
14178 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
14180         * local-propagation.c: Actually *apply* the fix for bug 80591...
14182 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
14184         * mini-exceptions.c: backuot part of the last change
14185         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
14187 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
14188         * inssel.brg: Fix bug 59286.
14191 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
14193         * mini-exceptions.c: patch from Zoltan to correctly check for
14194         stack boundaries (using the stack register, not the frame register),
14195         fixes bugs #80724, #79717.
14197 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
14199         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
14200         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
14202         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
14203         presence of frame pointer elimination.
14205 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
14206         
14207         * mini-x86.h: NetBSD UCONTEX_REG defines.
14209 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
14211         * inssel-amd64.brg: Fix amd64 build.
14213 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
14215         * mini.h: remove extern to workaround what looks likes gcc bug 26905
14216         on amd64.
14218 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
14220         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
14221         ends.
14223         * mini-<ARCH>.c: Use mono_is_regsize_var ().
14225 2007-01-30 Mark Mason <mason@broadcom.com>
14227            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
14228            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
14229            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
14230            beginning support for CEE_JMP [not quite working yet]
14231            * tramp-mips.c: LMF handling now works
14232         
14233 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
14235         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
14237         * mini.h (NULLIFY_INS): New macro.
14239 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
14241         * mini.c: statistical profiler fix for windows, patch
14242         from Tor Lillqvist (tml@novell.com).
14244 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
14245         * local-propagation.c: Fix bug 80591.
14247 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
14249         * Makefile.am: put back the --export-dynamic option as with
14250         the previous gmodule flags (thanks to Robert Jordan).
14252 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
14254         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
14256         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
14257         simplify and speed up the local register allocator. Also rename some fields
14258         like iassign->vassign.
14259         
14260         * regalloc.c: Remove some functions which are no longer used since their
14261         inlined version is in mini-codegen.c.
14262         
14263         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
14265         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
14267 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
14269         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
14270         narrowing. Fixes #80622.
14272         * iltests.il: Add new regresssion test. 
14274 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
14276         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
14277         debug-debugger.c, debug-debugger.h: warning fixes.
14278         * driver.c: updated copyright year and made it fit in one line.
14280 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
14282         * aot-runtime.c: updated to use mono-dl instead of gmodule.
14284 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
14286         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
14288         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
14290         * iltests.il: Add new test for bug #80507.
14292 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
14294         * mini-arm.h: use soft-float also on vfp for now.
14296 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
14298         * mini.c: fix some more soft-float issues.
14300 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
14302         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
14304 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
14305         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
14306         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
14307         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
14309 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
14311         * mini-arm.c: typo fix.
14313 2007-01-23  Neale Ferguson <neale@sinenomine.net>
14315         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
14317 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
14319         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
14320         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
14322         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
14324         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
14326         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
14327         
14328         * inssel.brg: Fix a warning.
14330         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
14332         * abcremoval.c ssa.c ssapre.c: Update after this change.
14333         
14334         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
14336         * dominators.c (df_set): Use mono_bitset_union_fast.    
14338 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
14340         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
14341         mini-codegen.c: reduce relocations and memory usage for the cpu
14342         description.
14344 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
14346         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
14348         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
14349         to reduce their size.
14351 2007-01-19 Mark Mason <mason@broadcom.com>
14353         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
14354         * mini-mips.c: more configuration macros, support long conditional branches, additional
14355         asserts, fix epilog instrumentation.
14356         * mini-mips.h: use standard stack walk
14357         * cpu-mips.md: increase size of div, rem and conditional branches
14358         
14359 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
14361         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
14362         to cpu spec data.
14364 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
14366         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
14367         (compile_method): Ditto.
14369         * aot-runtime.c (decode_klass_info): Ditto.
14371         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
14372         needed by the code generated by inssel.brg. Also fix a warning.
14374 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
14376         * mini.c: deal with enums that become genericinsts by
14377         being nested in a generic class (bug #79956).
14379 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
14381         * mini.c: match the generic definition to check for
14382         private access with generic types (bug #78431).
14384 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
14386         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
14387         to make life easier for people cross-compiling that insist on not
14388         using scratchbox.
14390 2007-01-17 Mark Mason <mason@broadcom.com>
14392         * inssel-long.brg: patch to deal with mips missing flags
14393         * inssel-long32-mips.brg: implement overflow checks
14394         * insset-mips.brg: implement overflow checks
14395         * mini-mips.h: implement conditional exception handling
14396         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
14397           Remove unused code, minor cleanups.
14398         * exceptions-mips.c: minor cleanups
14399         * mini-ops.h: add mips conditional exception ops
14400         * cpu-mips.md: add mips conditional exception ops
14402         
14403 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
14405         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
14406         to deal with mips missing of flags.
14408 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
14410         * exceptions-ppc.c: execute fault handlers.
14412 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
14414         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
14416 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
14418         * mini.c: handle also floating point values in initialize_array.
14420 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
14422         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
14423         array initialization and make it conditional on the intrins option.
14425 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
14427         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
14428         relocations and put the patch info names close to the enum definition.
14430 2007-01-15 Mark Mason <mason@broadcom.com>
14432         * basic.cs, exceptions.cs: break up large tests to increase debugability.
14434 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
14436         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
14438 2007-01-12  Raja R Harinath  <rharinath@novell.com>
14440         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
14442 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
14444         * Makefile.am: distribute the mips sources.
14446 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
14448         * mini-codegen.h: handle bug #80489 here, by excluding ecx
14449         directly.
14451 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
14453         * cpu-x86.md: back out for now as this triggers other regressions.
14455 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
14457         * cpu-x86.md: force src1 and dest regpair for long shift instructions
14458         to eax:edx, so ecx can't get allocated to them (bug #80489).
14460 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
14462         * mini.c, mini-exceptions.c: enabled running fault handlers
14463         (bug #80469).
14465 2007-01-03  Miguel de Icaza  <miguel@novell.com>
14467         * driver.c: If nothing fail, do not use the string "failed",
14468         because it makes it very annoying to view test result logs on the
14469         web. 
14471 2006-12-30  Miguel de Icaza  <miguel@novell.com>
14473         * debug-debugger.c (mono_debugger_main): Rename "main" to
14474         "main_method" to prevent a warning.
14476         Remove a warning for unused field.
14478 2006-12-28  Martin Baulig  <martin@ximian.com>
14480         * debug-debugger.c
14481         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
14483 2006-12-22  Martin Baulig  <martin@ximian.com>
14485         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
14486         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
14487         seperate `.mdb_debug_info' section, so we can access it from the
14488         debugger even if the binary is stripped.
14490         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
14491         from the `.mdb_debug_info' here to prevent the linker from
14492         removing that section.
14494         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
14495         mdb-debug-info64.s.
14497 2006-12-19  Robert Jordan  <robertj@gmx.net>
14499         * mini-x86: enable the code to return small structures in
14500         registers for FreeBSD as well. Fixes bug #80278.
14501         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
14503 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14505         * mini-x86.c: align the stack when calling the profiler
14506         function instrumenting the prolog (on OSX).
14508 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
14510         * mini.c: emit a break opcode where Debugger.Break () is called.
14512 2006-12-13  Miguel de Icaza  <miguel@novell.com>
14514         * mini.c (mono_method_to_ir): Provide useful information on this
14515         assert, to prevent others from debugging like I did.
14517 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
14519         * mini.c: enable code which was incorrectly commented
14520         (bug #80235).
14522 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
14524         * mini-x86.c: enable on OSX, too, the code to return small
14525         structures in registers.
14527 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
14529         * mini-x86.c: remove the use of the dynamic code manager here, too.
14531 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
14533         * mini.h, debug-debugger.c, tramp-*.c: fixed 
14534         mono_debugger_create_notification_function() to use
14535         mono_global_codeman_reserve () instead of a dynamic code manager.
14537 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
14539         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
14540         ves_array_element_address() jit icall and use a generated
14541         managed method instead (which is about 4 times faster for a rank 3
14542         array access).
14544 2006-11-29  Mark Mason  <mason@broadcom.com>
14546         * basic-calls.cs: additional tests for passing
14547         structures as function arguments.
14549 2006-11-29  Mark Mason  <mason@broadcom.com>
14551         * mini-mips.h: disable custom exception handling
14552         * mini-mips.c: throw/rethrow should use jalr to call
14553         exception stubs.  Fixed bug with passing structures
14554         by value. More support for tracing floating point
14555         functions.
14557 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
14559         * mini.c: fixed typo in the soft-float ldind.r4 handling
14560         (bug #80086).
14562 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
14564         * mini.c, mini.h, driver.c: added --runtime command line
14565         option to select a different runtime than the autodetected one.
14566         * jit.h: added API for embedders to initialize with a specific
14567         runtime version.
14569 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
14571         * mini.c: handle also boxing of r4 values (bug #80024).
14573 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
14575         * mini-ppc.c: force indirect calls until we reserve
14576         enough address space for all the generated code.
14578 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
14580         * exceptions-arm.c: workaround bugs in the libc definition
14581         of struct ucontext.
14583 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
14585         * inssel.brg: fixes from me and Mark Mason.
14587 2006-11-23  Dick Porter  <dick@ximian.com>
14589         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
14590         semaphore display now we've fixed the initial value
14592 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14594         * inssel.brg: partially revert the last change to fix the build.
14596 2006-11-21  Mark Mason  <mason@broadcom.com>
14598         * inssel.brg: Add and use compare-and-branch macros to support
14599         architectures that do not have condition code registers (ie. MIPS).
14600         * *-mips.{c,brg,md}: Fix copyright statements
14602 2006-11-20  Mark Mason  <mason@broadcom.com>
14604         * Makefile.am: remove mini-codegen.c from list of MIPS sources
14605         * mini.c: Allow GET_CONTEXT to be specified by the arch port
14606         * mini.h: Added declaration for mono_print_ins()
14607         * mini-codegen.c: added ins_spec initializer for MIPS
14608         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
14609         vreg to be virtual and hreg to be non-virtual.
14610         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
14611         is not yet working/implemented correctly.
14612         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
14613         non-static, fixup calls to print_ins() from other parts in the file.
14615 2006-11-20  Mark Mason  <mason@broadcom.com>
14617         * basic-calls.cs: added tests for passing structures as arguments
14618         to calls.
14620 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
14622         * inssel-long32.brg: optimize signed division by power of two.
14624 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
14626         * mini-arm.c: added support for interworking with thumb code
14627         (mono must be still be built using the ARM instruction encoding).
14629 2006-11-19  Miguel de Icaza  <miguel@novell.com>
14631         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
14632         verifier has different rules for it.   Fixes a few verifier issues
14633         in the test suite.
14635         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
14636         at the end, so people know what happened.
14638 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
14640         * brach-opts.c: in optimize_exception_target() make sure we
14641         are in a catch clause (fixes bug #79871).
14643 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
14645         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
14646         more soft-float support fixes.
14648 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
14650         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
14651         that are passed half on the stack and half in registers.
14653 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
14655         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
14656         more mips integration work from Mark E Mason 
14657         <mark.e.mason@broadcom.com>.
14659 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
14661         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
14662         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
14663         tramp-mips.c: added sources for the mips port, not
14664         integrated in the build yet. Contributed by
14665         Mark E Mason <mark.e.mason@broadcom.com>.
14667 2006-11-14  Neale Ferguson <neale@sinenomine.net>
14669         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
14671 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
14673         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
14674         put the soft-float rules in its own file since it seems to
14675         break s390 compilation.
14677 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
14679         * mini-arm.c: fixed wrnings.
14681 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
14683         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
14684         inssel-arm.brg: ARM support for soft-float.
14686 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
14688         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
14689         loads and stores of 32 bit fp values.
14691 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
14693         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
14695         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
14696         works. Fixes #79852 and #79463.
14698 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
14700         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
14701         more soft-float support WIP and fixes.
14703 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
14705         * mini-arm.c: some VFP updates.
14707 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
14709         * mini-exceptions.c: 0 is a valid local var offset in some
14710         architectures, don't assert (bug #78508).
14712 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
14714         * exceptions-arm.c: fixed off by one error in stack walk code.
14716 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
14718         * mini.h, mini.c: more precise tracking of type load exceptions.
14720 2006-11-03  Robert Jordan  <robertj@gmx.net>
14722         * Makefile.am: [WIN32] Add monow.exe target.
14723         * driver.c: [WIN32] Don't detach the console when debugging.
14724         Fixes bug #79797.
14725         
14726 2006-10-30  Miguel de Icaza  <miguel@novell.com>
14728         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
14730 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
14732         * aot-compiler.c (emit_method_info): Add a case missed earlier.
14734         * driver.c (mini_regression): Fix --regression with AOT.
14736         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
14738 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
14740         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
14742         * mini-sparc.h: Don't use sigaction on sparc/linux.
14744         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
14746         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
14748         * mini-exceptions.c: Add proper include files for getpid ().
14750 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
14752         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
14753         address instead of a MonoJitInfo* to avoid decoding the exception info for the
14754         method.
14756         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
14757         name cache to reduce its size.
14759         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
14761 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
14763         * mini-x86.c: Save/restore the current LMF structure more efficiently using
14764         the mono_lmf TLS variable.
14766         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
14767         trampoline lmf frames.  
14769         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
14771 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
14773         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
14774         the mono_lmf TLS variable.
14776         * mini-exceptions.c: Access the LMF structure through accessors.
14778         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
14779         variable instead of in jit_tls->lmf.
14781         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
14782         
14783         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
14784         trampoline lmf frames.
14786         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
14788 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
14790        * mini.c trace.c mini-x86.c: Revert these too.
14791         
14792        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
14793        signature change.
14795 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
14797         * genmdesc.c: removed now dead code.
14799 2006-10-09  Robert Jordan <robertj@gmx.net>
14801         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
14803 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
14805         * mini.h: do not leave gaps in the opcode values.
14807 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
14809         * jit-icalls.h: flag functions as internal here, too.
14811 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
14813         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
14814         functions with the internal attribute.
14816 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
14818         * aot-compiler.c: fclose the file descriptor in the profile read loop.
14820 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
14822         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
14823         for soft-float.
14825 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
14827         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
14828         tail calls as on other platforms.
14830         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
14832         * iltests.il: Add a few tailcall tests.
14834 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14836         * driver.c: fix loop for old compilers (bug #79521).
14838 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
14840         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
14842         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
14844         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
14845         metadata without any code.
14847         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
14848         more precise debugging information using gdb.
14850 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
14852         * inssel-ia64.brg: Make the helper methods static.
14854 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
14856         * inssel-x86.brg: make the helper methods static.
14858 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
14860         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
14862 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
14864         * mini.c: updates for monoburg changes.
14865         * inssel.brg: make a few helper functions static as they should.
14867 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
14869         * Makefile.am: Move mini-codegen.c to common_sources.
14871 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
14873         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
14874         instructions.
14875         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
14876         mini-ppc.h: port to use the common local register allocator.
14878 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
14880         * mini.h: Remove the comment too then.
14882 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
14884         * mini.h: put back backend.data which is to be used shortly and
14885         doesn't increase the size of MonoInst. If any 64 bit arch aligned
14886         pointers on 4 byte boundaries it'd have much bigger issues running
14887         and you can ifdef it out anyway.
14889 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
14891         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
14892         MonoInst size by 4 bytes on 64 bit machines.
14894 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
14896         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
14897         replacement with more meaningful field names. Arch maintainers, please
14898         check the assigned names are good enough for your arch.
14900 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
14902         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
14903         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
14905 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
14907         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
14908         relocations and memory requirements, put the optimization flags
14909         definitions in their own file.
14911 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
14913         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
14915         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
14917 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
14919         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
14921 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
14923         * inssel.brg: use the correct function to get the size of an item
14924         in an array, given an element class.
14925         * aot-compiler.c: do not access class->class_size directly.
14927 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
14929         * mini.h, debug-mini.c: added a debugging function to print
14930         info about local variables and arguments in a jitted method.
14932 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
14934         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
14936         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
14938 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
14940         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
14941         inner and outer loops when passing vtypes.
14943 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
14945         * mini-ppc.c: take into account the cpu errata for cache flushing
14946         which caused some random errors (bug #79381).
14948 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
14950         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
14951         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
14953 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
14955         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
14956         loaded.
14958         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
14959         freebsd ports tree.
14961         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
14962         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
14964         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
14965         displacement.
14967 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
14969         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
14971 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
14973         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
14974         macro does not have to be changed during debugging.
14976         * 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>.
14978         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
14980         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
14981         
14982         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
14983         MONO_ARCH_NO_EMULATE_MUL is defined.
14985         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
14987         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
14989         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
14991         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
14992         
14993 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
14995         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
14996         stuff to mini-exceptions.c where it is used.
14998         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
14999         setup code, the real one is in mini-exceptions.c.
15001         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
15002         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
15003         some changes from the freebsd ports tree.
15005         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
15006         constants.
15007         
15008         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
15010 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
15012         * mini.c: on Linux, check for /proc to be mounted
15013         (bug# 79351, novell bug#201204).
15015 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
15017         * mini.c: handle cases where pthread_attr_getstack() behaves
15018         incorrectly (bug #78096).
15020 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
15022         * mini-arm.c: support larger stack frames (bug #79272).
15024 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
15026         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
15028         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
15029         tokens.
15031         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
15032         mono_class_from_name () to find a class from its name.
15034         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
15036 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
15038         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
15040 2006-09-05  Kornel Pal  <kornelpal@gmail.com>
15042         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
15044 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
15046         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
15047         callinfo->trampoline.
15049         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
15050         fixes #79271.
15051         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
15052         future.
15054 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
15056         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
15058 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
15060         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
15061         stats.method_trampolines, it is already done by the generic trampoline code.
15063         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
15064         
15065 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
15067         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
15069         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
15071         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
15073         * mini.c (print_jit_stats): Print mscorlib mempool size too.
15074         
15075         * mini.c (print_jit_stats): Print new stats.
15077         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
15079 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
15081         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
15082         Address on two dimensional arrays. Fixes #78729.
15084         * mini.h (MonoCompile): Add a 'skip_visibility' field.
15086         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
15087         a method.
15089         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
15091         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
15092         #79130.
15093         
15094         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
15095         a race condition.
15096         (mini_get_ldelema_ins): Ditto.
15098 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
15100         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
15101         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
15102         Fixes #79213.
15104 2006-08-29 Neale Ferguson <neale@sinenomine.net>
15106         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
15107         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
15109         * exceptions-s390x.c: Cosmetic change.
15111         * tramp-s390.c: Fix warning.
15113         * cpu-s390.md: Correct length of mul_imm.
15115 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
15117         * aot-compiler.c: added binary writer with ELF backend
15118         implementation (only on Linux/x86 for now).
15120 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
15122         * Makefile.am: Don't run net 2.0 AOT tests.
15124         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
15125         (mono_compile_assembly): Skip net 2.0 assemblies as well.
15127         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
15129 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
15131         * aot-compiler.c: simplified and refactored the asm-writing code
15132         to allow different backends.
15134 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
15136         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
15138         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
15139         little. Share patches of type TYPE_FROM_HANDLE as well.
15141         * mini.c (mono_patch_info_equal): New helper function.
15142         (mono_patch_info_hash): Ditto.
15144         * aot-compiler.c (emit_method_code): Fix s390 build.
15146         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
15147         is not handled because it is stored as a flag and not as a type ctor. Fixes
15148         #79016.
15150 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
15152         * aot-compiler.c: Fix computation of GOT slot statistics.
15153         
15154         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
15155         Also remove support for not PIC AOT.
15157         * mini.h: Bump AOT file format version.
15159         * objects.cs: Add a test for #78990.
15161         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
15162         (peter.dettman@iinet.net.au). Fixes #79087.
15164         * basic-long.cs: Add a test for the above.
15166 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
15168         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
15169         
15170         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
15171         code somewhat.
15173 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
15175         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
15176         exceptions.
15178 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
15180         * mini.c: Don't verify COM proxy invoke calls
15181         
15183 2006-08-10  Dick Porter  <dick@ximian.com>
15185         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
15186         which process is holding semaphores locked.
15188 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
15190         * mini-ia64.c mini-amd64.c: Fix #79027.
15192         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
15194         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
15196         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
15197         implicit arguments in a vararg call. Fixes #79027.
15199 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
15201         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
15202         (mono_get_array_new_va_signature): Ditto.
15204 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
15206         * aot-runtime.c: Call init_plt lazily.
15208         * inssel-long.brg: Fix unsigned long->int conversion.
15210         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
15212         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
15213         that most data is now in the .rss/.data section.
15215 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
15217         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
15219         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
15221         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
15223         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
15225         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
15226         virtual call. Fixes #79010.
15228         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
15229         and use the result as the this argument in the real call.
15231         * generics.2.cs: Add a new test for #79010.
15232         
15233 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
15235         * mini-x86.c: Fix a warning.
15237         * aot-compiler.c: Add a bunch of statistics.
15239         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
15241 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
15243         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
15245 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
15247         * 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>.
15249 2006-07-13  Miguel de Icaza  <miguel@novell.com>
15251         * mini.c (mono_method_to_ir): Obtain the original method in the
15252         CIL stream and use this to perform validation.
15254         Fixed: #78816
15256 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
15258         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
15259         (mono_arch_call_opcode): Ditto.
15261         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
15262         #78826.
15264         * mini.c (mono_patch_info_dup_mp): New helper function.
15265         
15266         * aot-compiler.c (compile_method): Fix some of the memory allocated during
15267         compilation. Fixes #78827.
15269 2006-07-18  Kornel Pal  <kornelpal@gmail.com>
15271         * declsec.c: Use original security informations for
15272           MONO_WRAPPER_MANAGED_TO_MANAGED.
15274 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
15276         * mini.c: Allow Com Interop methods/classes and
15277         don't verify COM wrapper calls
15278         
15280 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
15282         * inssel-long32.brg: Fix long->i4 checked conversion.
15284         * exceptions.cs: Add a test for the above.
15286 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
15288         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
15290         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
15291         leaks.
15293         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
15294         #78775.
15296 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
15298         * mini.c: Fix solaris/x86 exception handling.
15300         * Makefile.am: Get rid of $(ICU_LIBS).
15302 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
15304         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
15305         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
15306         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
15308         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
15310         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
15311         this function causes a SIGSEGV.
15313 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
15315         * mini.c: Remove unused solaris/x86 includes.
15317 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
15319         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
15321 2006-06-20  Jb Evain  <jbevain@gmail.com>
15323         * cpu-g4.md: fix max length of start_handler instruction.
15325 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
15326         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
15328 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
15329         * ssa.c: Fixed bug 78653 for SSA based deadce.
15330         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
15331         MonoInst.flags, used in SSA based deadce.
15332         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
15333         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
15335 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
15337         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
15338         it can end up using non executable memory on ppc64 systems
15339         running ppc32 userspace (fix from Johannes Berg).
15341 2006-06-14  Dick Porter  <dick@ximian.com>
15343         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
15344         4.1.1
15346 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
15347         * mini.c: Made so that inline is locally disabled if it would
15348         trigger a .cctor, because too many apps depend on this behavior
15349         (which seems to be also the one of the MS CLR).
15351 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
15353         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
15354         No idea why this worked before.
15356         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
15357         which branch to outer exception clauses since they could skip the
15358         inner finally clauses. Fixes #78633.
15360         * exceptions.cs: Add a test for the above.
15362         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
15363         Fixes #78629.
15365         * iltests.il: Add a test for the above.
15367 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
15369         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
15370         after the end of a try bblock, to prevent asserts in mini_method_compile ().
15372         * iltests.il: Add a test for the above.
15374 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
15376         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
15377         
15378         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
15379         methods as instrinsics.
15381 2006-06-09  Wade Berrier <wberrier@novell.com>
15383         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
15384         (simple-cee-ops.h ssapre-mini-ops.h)
15386 2006-06-09  Neale Ferguson <neale@sinenomine.net>
15388         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
15389         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
15390         instruction).
15391         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
15392         * cpu-s390x.md: Fix max. length values for a couple of instructions.
15394 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
15396         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
15398 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
15400         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
15401         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
15402         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
15403         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
15404         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
15405         of opcodes, so that bug 78549 should not happen again.
15406         * ssapre.c: Updated to use the renamed files.
15408 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
15410         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
15411         in OP_ATOMIC_EXCHANGE_I4.
15413 2006-06-07  Wade Berrier <wberrier@novell.com>
15415         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
15416         in mono_debugger_create_notification_function)
15418 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
15420         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
15421         
15422         * mini.c (type_from_stack_type): Disable some changes which do not
15423         seem to work.
15425         * driver.c: Reenable opts.
15427         * mini.h (MonoStackSlot): New structure to keep track of the verification state
15428         of the evaluation stack.
15429         
15430         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
15431         evaluation stack trace at entry to the bblock.
15433         * mini.c (merge_stacks): New function to perform verification of stack merges.
15434         Turned off by default.
15436         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
15437         STACK_MP.
15438         
15439 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
15441         * local-propagation.c: Fixed bug 78549.
15443 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
15445         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
15447 2006-06-02  Miguel de Icaza  <miguel@novell.com>
15449         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
15450         tramp-arm.c, tramp-ia64.c
15451         (mono_debugger_create_notification_function): Update signature to
15452         new signature and use new protocol for creating the notification
15453         function.  
15455         Should fix the build.
15457 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
15459         * exceptions-ppc.c (mono_jit_walk_stack)
15460         (ves_icall_get_frame_info): Fix the build
15462 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
15464         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
15466 2006-05-31  Raja R Harinath  <rharinath@novell.com>
15468         * il2tests.2.il: New file for generics CIL tests.  Add test for
15469         #78019.
15470         * Makefile.am: Update.
15472         Fix #78019
15473         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
15474         to nullable types.
15476 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
15478         * aliasing.c: Fixed bug 78311.
15480 2006-05-29  Martin Baulig  <martin@ximian.com>
15482         * mini-exceptions.c (mono_find_jit_info): When computing the
15483         native offset, check whether we're actually inside the method's
15484         code; call mono_debug_print_stack_frame() to format the frame.
15485         (ves_icall_System_Exception_get_trace): Call
15486         mono_debug_print_stack_frame() to format the stack frame.
15487         (ves_icall_get_trace): Update to the new debugging API.
15488         (mono_jit_walk_stack_from_ctx): Likewise.
15489         (ves_icall_get_frame_info): Likewise.
15491         * mini.c (get_method_from_ip): Use the new debugging API.
15492         (mono_print_method_from_ip): Likewise.
15494         * exceptions-ppc.c
15495         (mono_jit_walk_stack): Use the new debugging API.
15496         (ves_icall_get_frame_info): Likewise.   
15498 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
15500         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
15502 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
15504         * mini.c: Added "limitator" to inline for debugging.
15506 2006-05-24  Martin Baulig  <martin@ximian.com>
15508         * debug-debugger.c (mono_debugger_init): Create a private,
15509         malloc()-based code manager for the notification function and
15510         intentionally leak it on exit.  This fixes the crash-on-exit race
15511         condition.
15513         * tramp-amd64.c
15514         (mono_debugger_create_notification_function): Added
15515         `MonoCodeManager *' argument.
15517         * tramp-x86.c
15518         (mono_debugger_create_notification_function): Added
15519         `MonoCodeManager *' argument.
15521 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
15523         * aliasing.c: Fixed 64 bit issue.
15524         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
15525         default since all known bugs are fixed (one more time!).
15527 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
15529         * mini.c: write barrier support.
15531 2006-05-23  Martin Baulig  <martin@ximian.com>
15533         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
15534         check at the top of the file.
15536 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
15538         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
15539         reverting changes without reason and without changelog entries.
15541 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
15543         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
15544         to a few opcodes. Fixes #78439.
15546         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
15547         consistency with other archs.
15549         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
15551 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
15553         * debug-debugger.c: fix the build.
15555 2006-05-17  Martin Baulig  <martin@ximian.com>
15557         * debug-debugger.c
15558         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
15559         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
15560         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
15561         (debugger_attach): Call GC_mono_debugger_add_all_threads().
15563 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
15565         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
15567 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
15569         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
15570         MONO_TYPE_GENERICINST.
15571         
15572         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
15573         MONO_TYPE_GENERICINST.
15575 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
15577         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
15578         #78325.
15580 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
15582         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
15583         mempool.
15584         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
15586 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
15588         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
15589         mono_trace_cleanup ().
15591         * iltests.il: Fix problem with the newly added test.
15593         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
15594         due to register constraints, free up the previous hreg. Fixes #78314.
15596         * iltests.il: Add new test for #78314.  
15598         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
15599         Interlocked.Add. Fixes #78312.
15601         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
15602         
15603 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
15605         * inssel.brg (mini_emit_virtual_call): Fix a warning.
15607 2006-05-05  Martin Baulig  <martin@ximian.com>
15609         * debug-mini.c (mono_debug_open_block): New method.
15611         * mini-amd64.c
15612         (mono_arch_output_basic_block): Call mono_debug_open_block() at
15613         the beginning of each basic block.
15615         * mini-x86.c
15616         (mono_arch_output_basic_block): Call mono_debug_open_block() at
15617         the beginning of each basic block.
15619 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
15621         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
15622         default until I understand why they break the build on amd64.
15624 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
15626         * mini.c (mini_cleanup): Call mono_cleanup ().
15628         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
15629         errors.
15631 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
15633         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
15634         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
15635         default since all known bugs are fixed, and I cannot reproduce bug
15636         77944... I'm asking Matt Hargett to test again after this commit.
15638 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
15640         * mini-codegen.c: Fixed typo that thrashed inline.
15642 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
15644         * dominators.c (compute_dominators): Avoid using a worklist since
15645         it is not correct in some cases. Instead, iterate over all bblocks as
15646         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
15648 2006-04-28  Miguel de Icaza  <miguel@novell.com>
15650         * mini.c (mono_jit_compile_method_inner): Use
15651         mono_prepare_exception_from_error that resets the value
15652         internally.
15654 2006-04-27  Miguel de Icaza  <miguel@novell.com>
15656         * mini.c: Move the mini_loader_error_to_exception to metadata. 
15657         
15658 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
15660         * aliasing.c: Fixed bug 78210.
15662 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
15664         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
15665         default until all their problems (or the ones they trigger) are fixed.
15667 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
15669         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
15670         
15671         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
15672         as loaded only after resolving patches since that could invoke the same method.
15674         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
15676         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
15677         functions.
15679         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
15680         AOT loader.
15682         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
15683         stack.
15685         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
15686         made from AOT code through the PLT table.
15688         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
15689         holding the plt offset when a call is made to the aot plt trampoline.
15690         
15691 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
15693         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
15694         amd64 AOT support.
15696         * Makefile.am (common_sources): Fix build breakage.
15698         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
15699         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
15700         intra-assembly calls if possible.
15701         
15702         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
15704         * mini-trampolines.c: Handle PLT entries.
15706         * mini.c: Avoid creating a GOT var for calls.
15708         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
15709         from mscorlib code.
15711         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
15712         from mscorlib code.
15714         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
15715         AOT code.       
15717         * mini.h: Bump AOT file format version.
15718         
15719         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
15720         covers more cases.
15722 2006-04-25  Martin Baulig  <martin@ximian.com>
15724         * driver.c: Disable copyprop, consprop and inline when running
15725         inside the debugger.
15727 2006-04-25  Martin Baulig  <martin@ximian.com>
15729         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
15730         with `get_current_thread' and added `detach'.
15731         (MonoDebuggerMetadataInfo): Added `thread_size',
15732         `thread_tid_offset', `thread_stack_ptr_offset' and
15733         `thread_end_stack_offset'.
15735 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
15737         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
15738         aot-runtime.c.
15740         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
15741         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
15743         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
15745         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
15747         * aot.c: Add support for ADJUSTED_IID.  
15749 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
15751         * aot.c (emit_method_order): Don't align method_order_end.
15753         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
15754         the interface ID changes.
15756 2006-04-21  Dick Porter  <dick@ximian.com>
15758         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
15759         cleaning up a thread.  Fixes the new part of bug 77470.
15761 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
15763         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
15764         to managed wrapper.
15765                      
15766 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
15768         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
15769         
15770         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
15771         SIGSEGV. Fixes #78072.
15773         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
15774         unregister our SIGABRT handler.
15776 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
15778         * mini.c: Disabled inline where it can alter the call stack in a
15779         way visible from managed code.
15780         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
15781         default.
15783 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
15785         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
15786         on other platforms. Fixes #78089.
15788 2006-04-13  Martin Baulig  <martin@ximian.com>
15790         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
15791         determine whether we're inside the debugger.
15793         * debug-debugger.h
15794         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
15796 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
15798         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
15799         handler clauses. Fixes #78024.
15801         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
15802         in the CALL_MEMBASE opcodes. Fixes #78088.
15803         (mono_arch_get_vcall_slot_addr): Ditto.
15805 2006-04-10  Martin Baulig  <martin@ximian.com>
15807         * debug-debugger.c: The thread handling code has now been moved
15808         into ../metadata/threads.c.
15810 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
15812         * driver.c (mono_main): Fix --with-gc=none build.
15814         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
15815         (mono_spillvar_offset_float): Ditto.
15816         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
15817         hreg, not when its !global, since on ia64, there is a third category: stacked
15818         registers.      
15820 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
15822         * mini.c: set MonoInst->klass for load field address and a few other
15823         places.
15825 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
15827         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
15829 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
15831         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
15832         the branch opt changes.
15834 2006-04-06  Dick Porter  <dick@ximian.com>
15836         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
15837         
15838         * wapihandles.c (mini_wapi_seminfo): 
15839         * driver.c (mono_main): Add semaphore info option
15841 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
15843         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
15844         branch optimization changes. Fixes #78009.
15846 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
15848         * mini.c: ignore accessibility of methods in managed->native wrappers.
15850 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
15852         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
15853         
15854         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
15856 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
15858         * mini.c: Modify the branch optimizations to preserve the invariant that
15859         the entries inside the in_bb and out_bb arrays are unique.
15860         (mono_unlink_bblock): Avoid creation of new arrays.
15862 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
15864         * mini.c (mono_unlink_bblock): Fix regression caused by previous
15865         change (#77992).
15867 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
15869         * mini.c (optimize_branches): Remove the "optimizations" in
15870         the cbranch1/cbranch2 -> branch cases which were causing several
15871         problems in the past. Fixes #77986.
15873 2006-03-31  Chris Toshok  <toshok@ximian.com>
15875         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
15876         default optimizations :(
15878 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
15880         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
15881         branch.
15883 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
15885         * local-propagation.c: Added comments to structs and removed
15886         "Mono" prefixes from local tree mover types.
15888 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
15890         * Makefile.am (arch_sources): Define this for each architecture so 
15891         libmono_la_SOURCES is defined in one place.
15893 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
15895         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
15896         from handles/.
15898 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
15900         * driver.c: print the GC name supplied by configure.
15902 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
15904         * local-propagation.c: Added tree mover, and moved here all the
15905         local propagation code from mini.c
15906         * mini.c: Added support for treeprop, and moved all the local
15907         propagation code to local-propagation.c
15908         * mini.h: Added support for treeprop
15909         * driver.c: Added support for treeprop, enabled consprop, copyprop,
15910         treeprop, inline and deadce by default
15911         * Makefile.am: Added local-propagation.c
15913 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
15915         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
15917 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
15919         * debug-debugger.c: make it compile without the Boehm GC.
15921 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
15923         * mini.c: fixed issue with mismatch when an icall is registered
15924         with multiple names but same address.
15926 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
15928         * declsec.c, mini-exceptions.c: use write barrier to set reference
15929         fields of managed objects.
15931 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
15933         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
15934         (can_access_internals): Fix a warning.
15936         * mini.c (print_method_from_ip): Rename this to 
15937         mono_print_method_from_ip so it gets exported.
15939         * trace.c: Deal with strings inside StringBuilder's containing garbage
15940         and fix memory leaks. Fixes #77848.
15942 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
15944         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
15945         fixes #77787.
15947 2006-03-16 Neale Ferguson <neale@sinenomine.net>
15948         
15949         * mini-s390.c: Remove OP_X86_TEST_NULL.
15951 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
15953         * mini.c: use the correct GetHashCode() for the moving collector.
15955 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
15957         * liveness.c: Regalloc spill cost tuning.
15959 2006-03-15 Neale Ferguson <neale@sinenomine.net>
15960         
15961         * mini-s390x.h: Correct S390_LONG macro.
15963         * mini-s390x.c: Cleanup unused code.
15965 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
15967         * jit-icalls.h: New file.
15969         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
15970         icalls and include that instead of including jit-icalls.c.
15972         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
15973         OP_X86 opcodes.
15975 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
15977         * mini.c: when checking for member accessibility, also check for
15978         friend assemblies and for explicit interface implementations.
15980 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
15982         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
15984         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
15986         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
15987         common cases are done first.    
15989         * mini-ops.h: Only define platform specific opcodes on the given platform.
15991         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
15992         branch.
15993         
15994 2006-03-14  Martin Baulig  <martin@ximian.com>
15996         Revert Paolo's change from r57348:
15998         * mini.h: don't use gboolean for bitfields.
15999         * mini.c: verifier changes for fields and methods accessibility.
16001 2006-03-13  Neale Ferguson <neale@sinenomine.net>
16003         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
16005         * mini-s390x.c: Fix conv_r_un.
16007         * cpu-s390, cpu-s390x.md: Fix lengths.
16009 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
16011         * mini.c: nested types have access to all the nesting
16012         levels, not just the enclosing types.
16014 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
16016         * mini.c: added a few more verification checks.
16018 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
16020         * liveness.c: Merge optimizations from the linear-il branch.
16022 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
16024         * mini-ia64.c (emit_call): Add a comment.
16026         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
16028         * tramp-ia64.c: Fix some warnings.
16030 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
16032         * mini.h: don't use gboolean for bitfields.
16033         * mini.c: verifier changes for fields and methods accessibility.
16035 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
16037         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
16038         lazy icall wrapper changes.
16040         * dominators.c: Replace all the dominator algorithms with faster
16041         ones from the linear-il branch.
16043         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
16044         the mempool.
16046         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
16047         common cases are done first.
16049         * mini-amd64.c: Fix some warnings.
16051         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
16052         from the mempool.
16054         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
16055         added code.
16057         * mini.h: Add a missing prototype.
16059 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
16061         * mini.c: Compile icall wrappers lazily.
16063         * mini-codegen.c: Use printf instead of g_print since its much faster.
16065         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
16066         function.
16068         * mini.c (optimize_branches): Cache the negative result from 
16069         remove_block_if_useless ().
16071         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
16072         Also fix some bblock linking issues.
16074         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
16075         assembly files.
16077         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
16079         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
16080         accessed fields first, for better cache behavior.
16081         
16082 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
16084         * mini.c: speedup IList<T> array accesses.
16086 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
16088         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
16089         inline_costs counter. Fixes #77190.
16091 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
16093         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
16094         trace messages. Fixes #77706.
16096 2006-03-04  Martin Baulig  <martin@ximian.com>
16098         * tramp-amd64.c, tramp-x86.c
16099         (mono_debugger_create_notification_function): Use
16100         mono_global_codeman_reserve() to allocate a buffer at runtime and
16101         return it.
16103         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
16105         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
16106         notification function at runtime and then call `initialize' in the
16107         `MONO_DEBUGGER__debugger_info' vtable.
16109 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
16111         * iltests.il: Fix a visibility problem.
16113 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
16115         * driver.c, mini.c: add hooks for the counters API.
16117 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
16119         * driver.c: show disabled options.
16121 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
16123         * linear-scan.c: always use cost-driven selection.
16125 2006-02-28  Raja R Harinath  <rharinath@novell.com>
16127         * jit-icalls.c (helper_compile_generic_method): Revert change from
16128         2006-02-24.
16130 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
16132         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
16134 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
16136         * inssel.brg: style fixes, mostly to force the updated monoburg
16137         to run for people using svn.
16139 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
16141         * mini.c: match monoburg changes.
16143 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
16145         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
16146         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
16147         declaration in the header file.
16149 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
16151         * helpers.c: reduce relocations and mem usage.
16153 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
16155         * mini.h, mini-codegen.c: disable logging features if
16156         requested by configure.
16158 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
16160         * mini.c: tiny verifier changes.
16162 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
16164         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
16165         cpu-pentium.md: stack alignment changes for osx/x86,
16166         partially from Geoff Norton <gnorton@customerdna.com>.
16168 2006-02-24  Raja R Harinath  <harinath@gmail.com>
16170         * jit-icalls.c (helper_compile_generic_method): Update to changes
16171         in metadata/class.c.
16173 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
16174         
16175         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
16176         
16177         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
16178         interface calls with large offsets.
16180 2006-02-23  Raja R Harinath  <rharinath@novell.com>
16182         * jit-icalls.c (helper_compile_generic_method): Document the
16183         special-case we depend on so that we can inflate the method twice
16184         with the same context with no bad side-effects.
16186 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
16188         * mini-x86.c, mini-amd64.c: fix for case when xen support
16189         is disabled.
16191 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
16193         * mini-x86.c, mini-amd64.c: generate code to access tls items
16194         in a faster way for Xen systems.
16196 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
16198         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
16199         updates and compilation fixes for the OSX/x86 port, mostly from
16200         Geoff Norton <gnorton@customerdna.com>.
16202 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
16204         * inssel.brg: faster interface call implementation
16205         to sync with the interface_offsets MonoVTable changes.
16207 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
16209         * mini.c: more verification checks.
16211 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
16213         * mini.c: added a few more verification checks.
16215 2006-02-17      Neale Ferguson <neale@sinenomine.net>
16217         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
16218         facility on the processor and use it if available.
16220 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
16222         * driver.c, aot.c, mini.c: throw exception if the IL code is
16223         invalid or unverifiable.
16225 2006-02-17  Raja R Harinath  <rharinath@novell.com>
16227         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
16228         m.StructField.
16230 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
16232         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
16234 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16236         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
16237         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
16238         handling of instantiated generic valuetypes.
16240 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
16242         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
16243         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
16244         instead.
16246         * generics.2.cs: Revert the nullable reftypes tests.
16248 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
16250         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
16251         using __builtin_frame_address (1) as it doesn't work in the presence
16252         of optimizations. Hopefully fixes #77273.
16254         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
16255         -> generics.cs change as it doesn't work with some automake versions.
16257 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
16259         * mini.c: handle systems that sue a different way to
16260         retrieve the stack address of the current thread.
16262 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
16264         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
16265         it specially in the makefile.
16267         * generics.2.cs: Add tests for nullable reference types.
16269 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
16271         * mini.c: always handle the case when mono_jit_init()
16272         is called in a thread different from the main thread,
16273         confusing libgc (bug #77309).
16275 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
16277         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
16279 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
16281         * mini.c: change optimize_branches () to use a single loop
16282         and introduce a new optimization to simplify some range checks.
16284 2006-02-03  Martin Baulig  <martin@ximian.com>
16286         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
16287         and merged with debugger_thread_manager_add_thread().
16288         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
16289         inform the debugger about the main thread.
16291 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
16293         * basic.cs: Add test for div.un/rem.un constant folding.
16295 2006-02-03  Neale Ferguson <neale@sinenomine.net>
16297         * cpu-s390x.md: correct int_xor_imm length
16299 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
16301         * generics.2.cs: New test for #77442.
16303         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
16304         #77442.
16306 2006-02-02  Martin Baulig  <martin@ximian.com>
16308         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
16309         <mono/metadata/mono-debug-debugger.h>   
16311         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
16313 2006-02-02  Martin Baulig  <martin@ximian.com>
16315         * debug-debugger.h: New header file for debug-debugger.c.
16317         * debug-debugger.c: Big API cleanup; don't run the managed Main()
16318         function is a separate thread anymore; add support for attaching.
16320 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
16322         * tramp-x86.c: Fix a warning.
16324 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
16326         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
16327         on very large methods.
16329         * aot.c (load_patch_info): Fix a warning.
16331 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
16333         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
16334         mini-ops.h: alu membase optimizations.
16336 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
16338         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
16339         to speedup StringBuilder.
16341 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
16343         * dominators.c (mono_compute_natural_loops): Fix detection of
16344         loop body start blocks.
16346         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
16348 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
16350         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
16351         #75145.
16353 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
16355         * aliasing.c: Fixed aliasing issue on 64 bit archs.
16357 2006-01-25  Martin Baulig  <martin@ximian.com>
16359         * debug-debugger.c: Moved the `MonoDebuggerManager' and
16360         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
16361         started to cleanup this file a little bit.
16363 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
16365         * mini.c: optimize a codepath frequently happening in generics code.
16367 2006-01-23  Martin Baulig  <martin@ximian.com>
16369         * Makefile.am: Only compile debug-debugger.c on supported platforms.
16371         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
16372         functions directly.
16374         * driver.c: debug-debugger.c is only available if
16375         `MONO_DEBUGGER_SUPPORTED' is defined.   
16377 2006-01-23  Martin Baulig  <martin@ximian.com>
16379         * debug-debugger.c: Only enable this on platforms where the Mono
16380         Debugger is working (x86 and x86_64).
16382 2006-01-21  Martin Baulig  <martin@ximian.com>
16384         The Mono Debugger is now using the normal `mono' instead of the
16385         `mono-debugger-mini-wrapper' when executing managed code.
16387         * debug-debugger.c: New file; previously known as
16388         debugger/wrapper/wrapper.c.
16390         * debug-mini.c (mono_init_debugger): Removed.
16392         * driver.c (mono_main): Added new `--inside-mdb' command line
16393         argument which is used when running inside the debugger.
16395 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
16397         * liveness.c (mono_analyze_liveness): Remove some unused data
16398         structures.
16400 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
16402         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
16404 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
16406         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
16407         depends on implementation details of monobitset.
16409         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
16410         Fixes #77271.
16412 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
16414         * liveness.c: Update after monobitset changes.
16416 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
16418         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
16420 2006-01-11 Neale Ferguson <neale@sinenomine.net>
16422         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
16424         * mini-s390x.c: Remove warning messages.
16426 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
16428         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
16430 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
16432         * generics.2.cs: Add ldelem/stelem_any test.
16434 2006-01-10 Neale Ferguson <neale@sinenomine.net>
16436         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
16438 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
16440         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
16441         
16442 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
16444         * generics.2.cs: Reenable vtype tests.
16446         * inssel-x86.brg: Remove an icorrect valuetype rule.
16448 2006-01-06 Neale Ferguson <neale@sinenomine.net>
16450         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
16451         initial support for OP_ABS.
16453 2006-01-05 Neale Ferguson <neale@sinenomine.net>
16455         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
16457 2006-01-05 Neale Ferguson <neale@sinenomine.net>
16459         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
16460         conversion and implement LADD/LSUB.
16462         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
16463         architectures.
16465 2006-01-05 Neale Ferguson <neale@sinenomine.net>
16467         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
16469         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
16470         architectures.
16472 2006-01-05 Neale Ferguson <neale@sinenomine.net>
16474         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
16475         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
16476         (stack walk problem).
16478 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
16480         * aot.c (mono_aot_load_method): Fix a warning.
16482 2006-01-03  Neale Ferguson <neale@sinenomine.net>
16484         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
16486 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
16488         * iltests.il: Add test for #77148.
16490         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
16491         #77148.
16493 2006-01-03  Neale Ferguson <neale@sinenomine.net>
16495         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
16497 2006-01-03  Neale Ferguson <neale@sinenomine.net>
16499         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
16500         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
16502         * basic-long.cs: Add lconv-to-r4/r8 tests.
16504 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
16506         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
16508         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
16509         here as on other archs.
16511 2005-12-29 Neale Ferguson <neale@sinenomine.net>
16513         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
16515 2005-12-29 Neale Ferguson <neale@sinenomine.net>
16517         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
16518         
16519         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
16521         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
16522         instrument_prolog; Add memory_barrier instruction.
16524 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
16526         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
16528 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
16530         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
16532         * aliasing.c inssel.brg: Fix warnings.
16534         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
16535         could skip initialization of some parts of memory.
16537         * mini.c mini-ia64.c: Fix warnings.
16539         * inssel-sparc.brg: Add an implementation of lneg which actually works.
16541 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
16543         * aliasing.c (mono_build_aliasing_information): Add a workaround for
16544         a crash seen on sparc.
16546         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
16547         
16548         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
16550 2005-12-21 Neale Ferguson <neale@sinenomine.net>
16552         * mini-ops.h: Add s390_backchain instruction
16554         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
16556         * cpu-s390.md: Add s390_backchain instruction
16558         * mini-s390.c: Significant ABI changes
16560         * mini-s390.h: Cater for zero length structures
16562 2005-12-20 Neale Ferguson <neale@sinenomine.net>
16564         * mini-s390.c: ABI fixes
16566         * inssel-s390.brg: Remove debug statements
16568         * cpu-s390.md: Fix length of ATOMIC_xx operations
16570 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
16572         * basic-float.cs: Add float<->long conversion tests.
16574 2005-12-16 Neale Ferguson <neale@sinenomine.net>
16576         * mini-s390.c: Fix LOCALLOC processing.
16578         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
16580 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
16582         * iltests.il: Add tests for some opcodes not covered by the other
16583         tests.
16585 2005-12-15 Neale Ferguson <neale@sinenomine.net>
16587         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
16588         register loading for Tail processing; Correct trace output.
16590         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
16592         * cpu-s390.md: Correct size of jmp instruction. 
16594 2005-12-13 Neale Ferguson <neale@sinenomine.net>
16596         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
16598 2005-12-13 Neale Ferguson <neale@sinenomine.net>
16600         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
16601           Bring s390 up to current level.
16603 2005-12-12  Zltan Varga  <vargaz@gmail.com>
16605         * generics.2.cs: Disable the newly added tests as they do not work yet.
16606         
16607         * generics.2.cs: Add valuetype tests.
16609 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
16611         * basic-long.cs: Add i4->u8 test.
16613         * objects.cs: Add tests for JIT intrinsic.
16615         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
16616         optimizations lost by a mistake.
16618 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
16620         * basic-long.cs: Remove a test moved to objects.cs.
16622         * arrays.cs: Add more array tests.
16624 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
16626         * arrays.cs: Add new tests for multi-dimensional arrays.
16628 2005-12-06  Raja R Harinath  <rharinath@novell.com>
16630         * Makefile.am (test_sources2): Add generics.2.cs.
16631         (EXTRA_DIST): Add test_sources2.
16633 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
16635         Support for boxing and unboxing nullable types as well as the
16636         isinst operation on nullables, per the CLI ammendment.
16638         * inssel.brg (CEE_ISINST): Special case for nullable
16640         * mini.c (handle_unbox_nullable): new method
16641         (handle_box): Special case for nullable types
16642         (mono_method_to_ir): Call handle_unbox_nullable in correct
16643         places.
16645         * generics.2.cs: New test suite
16647         * Makefile.am: Support for regression tests with generics.
16649 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
16651         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
16652         allocated to registers. Fixes #76800.
16654 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
16656         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
16658 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
16660         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
16661         of platforms.
16663 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
16665         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
16666         objects.cs.
16668         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
16669         
16670         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
16671 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
16673         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
16674         single precision before storing to a single precision location.
16676 2005-11-28  Raja R Harinath  <rharinath@novell.com>
16678         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
16680 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
16682         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
16683         correct files.
16685         * basic.cs: Remove test_0_byte_compares test which was moved to
16686         objects.cs a long time ago.
16688 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
16690         * aliasing.c: Fixed aliasing issue on 64 bit archs.
16692 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
16694         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
16695         handlers are called.
16697         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
16698         throwing code.
16700          * mini-ia64.c: Add support for the throw->branch exception 
16701         optimization.   
16703         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
16705 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
16707         * mini.c: Enabled "fastpath" deadce :-)
16708         
16709 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
16711         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
16712         alias analysis pass to support it.
16713         * mini.h: Likewise.
16714         * ssa.c: Likewise.
16715         * liveness.c: Likewise (liveness computation can use aliasing
16716         information to be more accurate).
16717         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
16718         moreover made so that "--compile-all" uses the given optimization
16719         flags and not the default ones.
16720         * aliasing.c: Alias analysis (new file).
16721         * aliasing.h: Likewise.
16722         * Makefile.am: added "aliasing.c" and "aliasing.h".
16723         
16724 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
16726         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
16727         OP_L opcodes.
16729 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
16731         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
16732         fp >= end_of_stack exit condition, as it is not needed, and it might
16733         become true for fp eliminated frames.
16735 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
16737         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
16738         coded offsets.
16740 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
16742         * mini-arm.c: fixed alignment of doubles/longs to match
16743         the C ABI (bug #76635).
16745 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
16747         * aot.c: fix compilation with --enable-minimal=aot.
16749 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
16751         * mini-arm.c: fixed compatibility with the new
16752         floating point emulator package for compares.
16754 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
16756         * mini.c : reverted sig->pinvoke changes (r51396-51397).
16758 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
16760         * mini-exceptions.c (print_stack_frame): Output to stderr.
16761         (mono_handle_native_sigsegv): Ditto.
16763 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
16765         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
16766         OP_LCONV_TO_OVF_I implementation.
16768         * mini-amd64.c: Add support for the throw->branch exception 
16769         optimization.
16771         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
16772         when the catch clause catches a more general exception, i.e. Object.
16774 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
16776         * cpu-ia64.md: Remove unused opcodes.
16778         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
16779         specific defines for architectures defining USE_SIGACTION.
16781         * mini-ia64.c: Fix some warnings.
16783         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
16784         version seemed to skip a frame.
16786 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
16788         * mini.c: Clean up the usage of sig->pinvoke flag. Now
16789         only calls which are made to native code use this flag.
16791 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
16793         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
16794         varargs methods as well.
16795         
16796         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
16797         which have save_lmf set. Reorganize methods prologs a bit.
16799         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
16800         debugger to the proper place.
16802 2005-10-29  Martin Baulig  <martin@ximian.com>
16804         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
16805         when running inside the debugger until the debugger has support
16806         for it.
16808 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
16810         * mini.h: Fix a warning.
16812 2005-10-24  Miguel de Icaza  <miguel@novell.com>
16814         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
16815         we expose publicly, this returns the string.
16817 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
16819         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
16820         with fp elimination.
16822 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
16824         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
16825         native stacktrace using the glibc 'backtrace' function if available.
16827 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
16829         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
16831         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
16832         handle SIGSEGVs received while in native code.
16834         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
16835         code, call mono_handle_native_sigsegv which will abort the runtime
16836         after printing some diagnostics, instead of converting it into a
16837         confusing NullReferenceException.
16839 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
16841         * cpu-pentium.md: Remove unused opcodes.
16843 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
16845         * mini-amd64.h (MonoLMF): Add rsp field.
16847         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
16848         the lmf too.
16850 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
16852         * mini-codegen.c (get_register_spilling): Fix some warnings.
16854 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
16856         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
16857         elimination during exception handling. Enable fp elimination by
16858         default.
16860         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
16861         elimination.
16863 2005-10-16  Martin Baulig  <martin@ximian.com>
16865         * mini-exceptions.c
16866         (mono_debugger_run_finally): New public method for the debugger.
16868 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
16870         * debug-mini.c (mono_debug_init_method): Fix warning.
16872         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
16873         the 'exname' parameter const to fix some warnings.
16875 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
16877         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
16878         introduced by the previous patch.
16880 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
16882         * basic-float.cs: Add test for precision of float arithmetic.
16884         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
16885         when loading/storing single values from/to memory.
16887         * mini.c (mono_jit_compile_method_with_opt): Create the function
16888         pointers in the correct domain.
16890 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
16892         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
16893         introduced by previous patch.
16894         
16895         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
16896         when out_filter_idx is NULL.
16898         * mini-exceptions.c: Don't run filter clauses twice during exception
16899         handling. Fixes #75755.
16901 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
16903         * aot.c: Add support for ldflda wrappers.
16905         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
16906         #75902.
16908 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
16910         * mini.c, mini.h: do not consider exception handlers blocks when
16911         setting up interface variables.
16913 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
16915         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
16917 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
16919         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
16920         causes a regression.
16922         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
16924 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
16926         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
16927         of the OP_P definitions.
16929         * TODO: Add a proposal for dealing with the CEE/OP mess.
16931         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
16932         optimizations from the x86 port.
16934         * cpu-amd64.md: Ditto.
16936         * basic.cs basic-long.cs: Add tests.
16938 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
16940         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
16941         Patrik Torstensson's implementation of my exception-handling
16942         optimization idea, when the exception object is not used
16943         (bug #62150).
16945 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
16947         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
16948         of the mul_imm optimizations from the old jit.
16950 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
16952         * mini.c, liveness.c: patch by Patrik Torstensson and
16953         Zoltan Varga to improve performance in methods with
16954         exception clauses.
16956 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
16958         * driver.c: Remove 'Globalization' entry from --version.
16960 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
16962         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
16963         there is a profiler interested in JIT events.
16965         * aot.c: Load profile files produced by the AOT profiling module, and
16966         reorder methods based on the profiling info. Add a 'method_order' table
16967         to the AOT file to make mono_aot_find_jit_info work with the reordered
16968         methods.
16970         * mini.h: Bump AOT file version info.
16972 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
16974         * mini-arm.h: work around what looks like a gcc bug when optimizations
16975         are enabled.
16977 2005-09-28  Raja R Harinath  <rharinath@novell.com>
16979         * Makefile.am (AM_CFLAGS): Don't use += to append inside
16980         conditionals.  Use ...
16981         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
16983 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
16985         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
16986         to determine the amount of memory to copy when passing valuetypes.
16988         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
16989         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
16991 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
16993         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
16994         information about aot.
16996 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
16998         * *.c: Replace the use of {Enter,Leave}CriticalSection with
16999         macros. This will allow a deadlock debugger to easily be plugged
17000         in.
17002 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
17004         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
17006 2005-09-27  Raja R Harinath  <rharinath@novell.com>
17008         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
17009         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
17010         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
17011         ($(arch_built)) [CROSS_COMPILING]: Error out.
17013 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
17015         * aot.c: Add support for the no_special_static flag for classes.
17017 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
17019         * Reapply reverted patches.
17021         * *: Revert r50174 as well.
17023         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
17025 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
17027         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
17029 2005-09-23  Miguel de Icaza  <miguel@novell.com>
17031         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
17032         part of the SIG_HANDLER_SIGNATURE.  
17034 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
17036         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
17037         statistics.
17039         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
17040         introduced by previous patch.
17042 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
17044         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
17045         saved registers too.
17047         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
17048         upon the information returned by get_call_info ().
17049         
17050         * mini-x86.c (add_float): Fix stack size calculation.
17051         (mono_arch_call_opcode): Rewrite this so it works based up the
17052         information returned by get_call_info ().
17053         (mono_arch_get_this_vret_args): Ditto.
17055 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
17057         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
17058         in cinfo to determine the registers which need to be used.
17060 2005-09-20  Miguel de Icaza  <miguel@novell.com>
17062         * driver.c (mono_main): Add --server and --desktop flags. 
17064 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
17066         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
17067         registers as global registers.
17069         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
17070         longer needed with the new register allocator.
17072         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
17074         * cpu-ia64.md: Remove unused opcodes.
17075         
17076         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
17077         
17078 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
17080         * cpu-amd64.md: Remove unused opcodes.
17082         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
17083         needed with the new register allocator.
17085         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
17086         reg-reg moves.
17088 2005-09-16  Raja R Harinath  <rharinath@novell.com>
17090         * Makefile.am (check-local): Don't invoke semdel-wrapper.
17092 2005-09-16  Martin Baulig  <martin@ximian.com>
17094         * exceptions-amd64.c
17095         (throw_exception): Don't call mono_debugger_throw_exception() if
17096         we're a rethrow - see the FIXME in the code.
17098 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
17100         * mini.c (mono_init_exceptions): This only works on some architectures.
17101         
17102 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
17104         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
17105         on ia64.
17107         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
17109         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
17110         now in mini-exceptions.c.
17112 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
17114         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
17115         now in mini-exceptions.c.
17117 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
17119         * exceptions-x86.c: Applied patch from Patrik Torstensson 
17120         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
17122         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
17123         code into mini-exceptions.c. Add some assertions to it.
17125 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
17127         * aot.c (emit_section_change): Applied patch from "The Software Team" 
17128         (<software@solmersa.com>). Fix as errors on windows.
17130 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
17132         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
17133         method info into the LMF.
17135 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
17136         
17137         * mini-ia64.c: Add proper unwind info for method epilogs.
17139         * exceptions-ia64.c: Add some code to help debugging.
17140         
17141         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
17143         * mini-exceptions.c: Fix warning.
17145 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
17147         * mini.c: Really fix build.
17149         * mini-x86.c mini-amd64.c: Fix build.
17151 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
17153         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
17155         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
17156         some Interlocked methods as intrinsics.
17158         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
17159         for Thread methods as well.
17161         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
17163         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
17165         * mini-ia64.c mini-x86.c mini-amd64.c 
17166         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
17167         OP_MEMORY_BARRIER.
17168         
17169         * mini.c (mono_init_exceptions): Fix build breakage.
17171 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
17173         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
17174         of instructions. Use the new ia64_unw_op macros for emitting unwind
17175         info.
17177         * mini.c (mono_init_exceptions): Initialize exception handling
17178         related trampolines at startup.
17180 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
17182         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
17184 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
17186         * mini.c: Handle type loading errors gracefully during compilation and
17187         throw the appropriate exception.
17189 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
17191         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
17192         for the mono binary.
17194 2005-09-09  Martin Baulig  <martin@ximian.com>
17196         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
17197         the release.
17199 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
17201         * mini-arm.h: use emulation for conv.r.un for the release.
17203 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
17205         * mini-arm.c, objects.cs: more fixes and tests for them.
17207 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
17209         * mini-arm.c: align structures to at least 4 bytes to be able
17210         to keep our current optimized memcpy.
17212 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
17214         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
17216 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17218         * mini.c: ignore SIGPIPE.
17220 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
17222         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
17224         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
17226 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
17228         * mini.h: Add prototype for mono_allocate_stack_slots_full.
17230 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
17232         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
17233         exception handling support.
17234         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
17235         patch by Brian Koropoff <briank@marakicorp.com>).
17237 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
17239         * mini.c: revert another 'optimization' which breaks when
17240         items on the eval stack need to be saved at a basic block end
17241         (bug #75940).
17243 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
17245         * jit-icalls.c: for arrays, ensure we always provide
17246         lower bounds.
17248 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
17250         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
17251         
17252         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
17254 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
17256         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
17257         arguments in their original register.
17259 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
17261         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
17262         memset/memcpy.
17264         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
17265         when ssapre is enabled.
17267         * inssel-long.brg: Fix bug in previous patch.
17269         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
17270         multiplication by a constant.
17272 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
17274         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
17275         icc.
17277         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
17278         saving registers.
17280 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
17282         * inssel-arm.brg: apply changes tested by Brian Koropoff
17283         <briank@marakicorp.com>.
17285 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
17287         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
17288         
17289 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
17291         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
17292         to the same register if dreg is just a base register.
17293         (print_ins): Improve printing of membase opcodes.
17295         * inssel-x86.brg: Add optimized ldind(reg) rules.
17297         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
17299 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
17301         * mini.c: when running under valgrind, set the stack bottom for
17302         the GC at the actual approximate stack for the app (fixes running
17303         mono with valgrind).
17305 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
17307         * mini.c: do no break at the first valuetype to init found
17308         (fixes bug #75791).
17310 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
17312         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
17314 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
17316         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
17318 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
17320         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
17322 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
17324         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
17326         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
17327         code.
17329         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
17330         code.
17332         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
17333         methods.
17335 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
17337         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
17339 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
17341         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
17342         in the tail recursion optimization.
17344         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
17345         debug info into the assembly file.
17347         * iltests.il: Add test for filter regions.
17349         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
17350         initial stack of filter regions. Fixes #75755.
17352 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
17354         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
17355         stack requirements.
17357 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
17359         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
17360         the check for an already compiled method on non-ia64 platforms.
17361         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
17362         proper domain.
17364         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
17366         * inssel-x86.brg: Add some optimized call rules.
17368 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
17370         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
17371         method here.
17373         * mini.h mini-trampolines.c: Pass the trampoline argument to 
17374         mono_arch_patch_delegate_trampoline.
17376         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
17378         * mini-trampolines.c: Fix build.
17380         * mini-amd64.h: Add delegate trampolines.
17382         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
17384         * inssel-amd64.brg: Add optimized call rules.
17385         
17386         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
17388         * inssel-ia64.brg: Add optimized ldind(reg) rules.
17390 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
17392         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
17393         change.
17395         * mini-ia64.c: Remove LMF fixmes.
17397         * mini-ia64.h: Remove most fields from LMF.
17399         * inssel-ia64.brg (stmt): Fix unaligned access errors.
17401         * mini-trampolines.c: Add support for IA64 function descriptors.
17403         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
17404         for IA64 function descriptors.
17406 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
17408         * tramp-arm.c: patch the vtable for virtual calls. Added
17409         support code to register/unregister the LMF.
17410         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
17411         more LMF work.
17413 2005-08-19  Dick Porter  <dick@ximian.com>
17415         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
17416         bit value if needed.
17418 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
17420         * mini.c (mini_get_method): Move handling of wrapper data here.
17422         * mini.c (mono_method_to_ir): Add support for dynamic methods.
17424         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
17425         virtual.
17427         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
17428         bblock->code does not remain empty.
17430 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
17432         * arrays.cs: Add regression test for #75832.
17434         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
17435         rules. Fixes #75832.
17437         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
17438         instruction scheduling.
17440 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
17442         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
17444 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
17446         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
17448         * mini-codegen.c: Fix VC build.
17450         * cpu-pentium.md: Increase length of atomic_exhange_i4.
17452 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17454         * mini.h: fix signature for mono_register_opcode_emulation.
17456 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
17458         * mini.c: Get rid of most of the helper_sig_... constants using
17459         mono_create_icall_signature ().
17461 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
17463         * jit-icalls.c (helper_ldstr): New helper function.
17465         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
17467         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
17468         throw, load the string using a helper call instead of creating a string object.
17470         * aot.c: Update after LDSTR changes.
17472         * mini.h: Bump AOT file version.
17473         
17474         * aot.c: Save class size info into the AOT file. Print more statistics during
17475         compilation.
17477         * mini.h: Bump AOT file version.
17479         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
17480         ordering of disasm cases. Fixes #74957.
17482 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
17484         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
17485         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
17486         the generic code needed for the ARM port.
17488 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
17490         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
17491         inssel-arm.brg: more ARM features and fixes.
17493 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
17495         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
17496         ARM port work in progress.
17498 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
17500         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
17502         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
17504         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
17506         * inssel.brg (mini_emit_memset): Add support for unaligned access.
17508         * *-ia64.*: Ongoing IA64 work.
17509         
17510         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
17512 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
17514         * TODO: Remove out-of-data todo stuff.
17516         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
17517         dead code.
17519         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
17521         * mini.h: Bump corlib version.
17523 2005-07-27  Martin Baulig  <martin@ximian.com>
17525         * mini-codegen.c
17526         (create_copy_ins): Added `const unsigned char *ip' argument; set
17527         `copy->cil_code' from it.
17529 2005-07-27  Martin Baulig  <martin@ximian.com>
17531         * mini-exceptions.c (mono_handle_exception): Don't call
17532         mono_debugger_handle_exception() for filters.
17534 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
17536         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
17537         as well.
17539 2005-07-26  Martin Baulig  <martin@ximian.com>
17541         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
17543         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
17544         helper_compile_generic_method() if the method is actually virtual
17545         and non-final.
17547 2005-07-26  Martin Baulig  <martin@ximian.com>
17549         * mini.c
17550         (trampoline_code): Renamed to `mono_trampoline_code' and made it
17551         public; this is now accessed directly by the debugger.
17552         (mono_generic_trampoline_code): Removed.
17554         * debug-mini.c
17555         (mono_debug_init_method): Also add interncalls and wrappers.
17557 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
17559         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
17561 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
17563         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
17565 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
17567         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
17569 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
17571         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
17572         getting TLS offsets on AMD64 too.
17574 2005-07-20  Kornel Pal <kornelpal@hotmail.com>
17576         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
17578 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
17580         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
17581         inssel-arm.brg, mini-arm.h: ARM port work in progress.
17583 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
17585         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
17587         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
17588         to mini.c.
17590         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
17591         mono_sparc_is_virtual_call ().
17592         
17593         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
17595         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
17596         trampoline parameters.
17598         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
17599         
17600         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
17601         to mono_arch_get_vcall_slot_addr.
17603         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
17604         trampoline code.
17606         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
17608 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
17610         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
17612 2005-07-19  Martin Baulig  <martin@ximian.com>
17614         * exceptions-amd64.c (throw_exception): Call
17615         mono_debugger_throw_exception() here like we're doing it on i386.
17617 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
17619         * mini-ia64.c: Add optimized TLS access support.
17621 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
17623         * mini-exceptions.c: Ongoing IA64 work.
17625         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
17627         * mini.c: Use the default optimization set when embedding. Fixes
17628         #75194.
17630 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
17632         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
17633         of trampolines to a separate file.
17635         * mini-trampolines.c: New file.
17637         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
17638         separate file.
17639         
17640         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
17641         amd64/ia64 code.
17643         * mini-codegen.c: Fix cygwin build.
17645 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
17647         * mini.c: Add some minor changes needed by the IA64 port.
17649         * *-ia64.*: Ongoing IA64 work.
17651 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
17653         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
17654         trampolines into arch-independent and arch-dependent parts.
17656         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
17658 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
17660         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
17662         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
17663         the xp-regalloc-branch for amd64.
17665         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
17666         xp-regalloc-branch for x86.
17668 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
17670         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
17672 2005-07-06  Martin Baulig  <martin@ximian.com>
17674         * mini.c
17675         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
17676         (mono_jit_runtime_invoke): Likewise.
17678 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
17680         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
17681         on x86 too.
17682         
17683         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
17684         without loading their metadata. Reorganize the file format so exception handling+
17685         debug info is kept separate from normal method info. Create MonoJitInfo 
17686         structures for methods lazily.
17688         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
17689         loading metadata.
17690         (x86_class_init_trampoline): Patch AOT class init trampolines too.
17692         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
17694         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
17695         in AOT code.
17697         * mini.h: Bump AOT file version.
17699 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
17701         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
17703 2005-07-01  Raja R Harinath  <rharinath@novell.com>
17705         * Makefile.am (check-local): Call semdel-wrapper.
17707 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
17709         * mini-x86.c: Revert the last change as it seems to break the build..
17711 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
17713         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
17714         
17715         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
17717 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
17719         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
17720         outside of the macro, so strange stuff doesn't happen with gcc4
17721         (NEW_AOTCONST_TOKEN): Likewise.
17723 2005-06-28  Martin Baulig  <martin@ximian.com>
17725         * mini.c (mini_class_is_system_array): New static method; use this
17726         instead of `klass->parent == mono_defaults.array_class' everywhere
17727         since this also works for the new generic array class.
17729 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
17731         * inssel.brg: Remove warnings.
17733 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
17735         * mini-ia64.c: Ongoing IA64 work.
17737         * basic-float.cs: Add float->i1 conversion test.
17739         * iltests.il: Add conv.u4 test.
17741 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
17743         * inssel-long.brg: Fix bug caused by last change.
17745 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
17747         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
17748         BSDs.  Allows the x86 JIT to work on OSX86
17750 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
17752         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
17753         u4->i8 conversion.
17755         * mini-ia64.c: Ongoing IA64 work.
17757 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
17759         * mini-ia64.c: Ongoing IA64 work.
17761         * driver.c: Clean up jit_code_hash as well when using --regression.
17763         * inssel-long.brg: Fix long->i4/u4 conversion rules.
17765         * basic-long.cs: Add tests for long->u4 conversion.
17767 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
17769         * mini.c: Take mono_get_domainvar out of macros. This makes sure
17770         that we do not depend on undefined C behavior: the order stuff
17771         gets evaluated within an expression. Fixes mono when compiled on
17772         GCC 4.
17774 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
17776         * *-ia64.*: Ongoing IA64 work.
17778         * aot.c: Lower memory usage while loading AOT methods.
17780         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
17782         * mini.h: Bump AOT file format version.
17784 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
17786         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
17788 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
17790         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
17791         not on callee assembly). Fixed some comments.
17793 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
17795         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
17796         it gets proper disassembly.
17797         (emit_method_info): Remove some dead code.
17799         * mini.c (mini_method_compile): Allways allocate the GOT var in
17800         mono_method_to_ir for emulating opcodes.
17802 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
17804         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
17805         before freeing the code memory. Fixes #74990.
17807         * objects.cs: Add regression test for #74992.
17809         * liveness.c: Extend live ranges of arguments to the beginning of the
17810         method. Fixes #74992.
17812         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
17813         so it points into the faulting instruction.
17815 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
17817         * jit-icalls.c (mono_imul_ovf): Add exception handling.
17819         * *-ia64.*: Ongoing IA64 work.
17821         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
17823 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
17825         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
17827         * *-ia64.*: Ongoing IA64 work.
17829 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
17831         * basic-long.cs: Add tests for add/sub.ovf.
17833         * basic.cs: Add tests for sub.ovf.
17835         * *-ia64.*: Ongoing IA64 work.
17837 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
17839         * *-ia64.*: Ongoing IA64 work.
17841         * basic.cs: Add conv.ovf.i4.un test.
17843 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
17845         * mini.c: (remove_block_if_useless) Fixed bug 75061.
17846         
17847 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17849         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
17851 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
17853         * *-ia64.*: Ongoing IA64 work.
17855 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
17857         * trace.[ch]:
17858         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
17860 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
17862         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
17864 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
17866         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
17868         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
17869         of a call is callable by a near call.
17871 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
17873         * mini-ia64.c: Ongoing IA64 work.
17875 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
17877         * genmdesc.c: Make the generated array non-static.
17879         * inssel-long.brg: Fix LSHR_IMM rule.
17881         * *-ia64.*: Ongoing IA64 work.
17883         * *-ia64.*: Ongoing IA64 work.
17885 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
17887         * *-ia64.*: Ongoing IA64 work.
17889         * *-ia64.*: Ongoing IA64 work.
17890         
17891         * mini-ia64.c: Ongoing IA64 work.
17893         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
17895 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
17897         * objects.cs basic-calls.cs: Move some tests to objects.cs.
17898         
17899         * objects.cs basic-long.cs: Move some tests to objects.cs.
17901 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
17903         * *-ia64.*: Ongoing IA64 work.
17905         * iltests.il: Add a new test.
17907         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
17908         newobj. Fixes #75042.
17910 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
17912         * *-ia64.*: Ongoing IA64 work.
17913         
17914         * *-ia64.*: Ongoing IA64 work.
17915         
17916         * *-ia64.*: Ongoing IA64 work.
17918         * basic.cs objects.cs: Move tests accessing static variables as well.
17920         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
17922 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
17924         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
17926         * driver.c: Always print failed tests.
17928         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
17929         frame pointer.
17931         * *ia64*: Ongoing IA64 work.
17933 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
17935         * basic.cs: Add tests for add.ovf. Fix warnings.
17937 2005-05-18  Miguel de Icaza  <miguel@novell.com>
17939         * driver.c (mono_main): Avoid crash if no argument is passed to
17940         --break;  Do not use g_error, but f_printf.   And fix all other
17941         ocurrences of the same crash.
17943 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
17945         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
17946         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
17947         Fixes #74742.
17949 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
17951         * *-ia64.*: Add beginnings of IA64 backend.
17953         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
17955 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
17957         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
17958         Fixes #74925.
17960         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
17962         * mini-amd64.c: Fix a warning.
17964 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
17966         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
17967         in float_neg. Fixes #74897.
17969         * mini-amd64.c (emit_call): Fix another near call bug.
17971 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
17973         * declsec.c: Keep the appdomain information in the structure. Added a 
17974         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
17975         value gets overwritten).
17976         * declsec.h: Set the default MonoArray for the the stack to 6. Added
17977         an MonoAppDomain member to MonoSecurityFrame.
17978         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
17979         used in the stack walk. Now use a MonoArray which grow (double) when
17980         it gets full.
17982 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
17984         * mini.c: Re-enabled runtime cleanup, since running threads should
17985         now properly stop when exiting.
17987 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
17989         * mini-codegen.c: New file contaning the arch-independent local
17990         register allocator. Not used by any architectures yet.
17992         * mini.h linear-scan.c: Merge some changes from the 
17993         mini-xp-local-regalloc branch.
17995 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
17997         * mini-amd64.c (emit_call): Fix calls to native functions when the
17998         runtime is compiled as a shared library. Fixes #74756.
18000         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
18001         on a literal field. Fixes #74751.
18003 2005-04-25  Raja R Harinath  <rharinath@novell.com>
18005         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
18007 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
18009         * objects.cs: Add missing null casting test.
18011 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
18013         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
18014         in wrapper methods. Also rename 'address' variable to 'offset'.
18016 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
18018         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
18019         warnings.
18020         
18021         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
18023         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
18024         work on windows.
18026 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
18028         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
18030 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
18032         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
18033         just the last bytes.
18035 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
18037         * aot.c (mono_compile_assembly): Fix warning.
18039         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
18040         by the _MSC_VER stuff.
18042 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
18044         * inssel-long.brg: Fix #74588.
18046         * cpu-amd64.md: Fix #74591.
18048         * iltests.il: Add new regression tests.
18050 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
18052         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
18053         valuetype.
18055 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
18057         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
18059         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
18060         from Bill Middleton <flashdict@gmail.com>.
18062 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
18064         * arrays.cs: Add new regression test. Fix warnings.
18066 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
18068         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
18069         and leakage in CKFINITE.
18071         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
18072         this to a null op since it is called on amd64 too.
18074         * exceptions-amd64.c (get_throw_trampoline): Align stack.
18076         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
18077         body since this is not used on amd64.
18078         
18079         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
18081         * mini-amd64.c: Remove obsolete fixmes.
18083         * mini.c (print_method_from_ip): Fix debugging support.
18085 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
18087         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
18088         so that expressions that don't give much gain are not reduced.
18089         * ssapre.h: Likewise.
18091 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
18093         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
18095         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
18097         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
18099 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
18101         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
18103         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
18105 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
18107         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
18108         stack touching.
18110         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
18112         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
18114         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
18116         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
18117         MONO_ARCH_USE_SIGACTION. Fixes #74252.
18119         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
18121         * mini-x86.c: Fix up stack overflow handling.   
18123         * exceptions.cs: Add new regression test.
18125 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
18127         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
18128         mono_jit_thread_attach.
18130         * mini.c (mono_method_to_ir): Verify called method is not abstract.
18132 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
18134         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
18135         avoid calling constructors using callvirt.
18137         * inssel.brg: Fix #74073.
18139 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
18141         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
18142         compilation with non-GCC compilers.
18143         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
18144         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
18146 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
18148         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
18149         klass->interface_offsets (will likely fix bug#74073).
18151 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
18153         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
18155 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
18157         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
18158         to amd64_div_reg_size ().
18159         
18160         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
18162 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
18164         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
18166 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
18168         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
18170 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
18172         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
18173         
18174         * mini.c (mono_precompile_assembly): Load and precompile referenced
18175         assemblies as well. Fixes #74015.
18177 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
18179         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
18181 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
18183         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
18184         a lot of checks and (anyway) permissions cannot work until corlib is 
18185         loaded.
18187 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
18189         * mini-ppc.c: fixed ABI issue on sysv/ppc.
18191 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
18193         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
18194         calls (fixes bug#72824).
18196 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
18198         * mini.c: fix tail recursion elimination (see test in bug#73936).
18200 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
18202         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
18203         some fp functions in sse2 mode.
18205 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
18207         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
18209 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
18211         * mini.h mini.c: Add mono_get_jit_tls_key ().
18213         * mini-x86.c: Enable fast TLS support on windows.
18215 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
18217         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
18218         * mini.c: Check for p/invoke method when generating code. If a
18219         p/invoke method, or it's class, isn't decorated with [Suppress
18220         UnmanagedCodeSecurity] then generate code to call System.Security.
18221         UnmanagedDemand (only if the security manager is active).
18223 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
18225         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
18226         last change as it seems to cause strange crashes.
18227         
18228 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
18230         * *.c: handle unsafe function pointers where needed.
18232 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
18234         * mini.c (mono_jit_free_method): Remove the fixme too.
18236 2005-03-15  Miguel de Icaza  <miguel@novell.com>
18238         * mini.c: As discussed, make the code actually free the delegate
18239         thunk now, to enable the debugging of delegate problems, use
18240         MONO_DEBUG=1 when running Mono. 
18242         This takes also care of parts of the leaks as seen by Joe.
18244 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
18246         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
18247         thread_tls_offset calculation.
18249 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
18251         * declsec.c: Reworked linkdemand checks for icall. The previous code
18252         was using the declaration code (untrusted) and didn't work as expected
18253         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
18254         specific case.
18256 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
18258         * iltests.il: Add new localloc test.
18260         * mini-amd64.c: Handle large stack allocations the same way as on
18261         windows if stack overflow handling is working.
18262         
18263         * mini-amd64.c: Allocate the signal stack using mmap.
18265         * mini.c (sigsegv_signal_handler): Fix reading of context.
18267         * mini-exceptions.c: Fix up stack overflow handling.
18269         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
18271         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
18273         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
18275         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
18277         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
18278         tramp_init functions as they are no longer needed.
18280 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
18282         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
18283         
18284         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
18286         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
18287         
18288         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
18289         support that now.
18291         * mini-ops.h: Add OP_LMUL_IMM.
18293         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
18294         long mul/div opcodes as intrinsic.
18296         * mini-amd64.c (emit_call): Handle the case when the callee might be
18297         an AOT method.
18299 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
18301         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
18302         extra safe.
18303         
18304         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
18306         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
18308 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
18310         * mini.c (mono_codegen): Don't leak here, to help people running
18311         monogrind.
18313 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
18315         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
18316         conversions in sse2 mode.
18318         * basic-float.cs: Add regression test.
18319         
18320         * mini-amd64.c: Reenable sse2.
18322 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
18324         * mini-amd64.c: Disable sse2 until some regressions are fixed.
18326 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
18328         * driver.c: Copyright text should include 2005.
18329         
18330 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
18332         * cpu-amd64.md (load_membase): Fix more max lengths.
18334 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
18336         * cpu-amd64.md (load_membase): Fix max length.
18338         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
18340         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
18342         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
18343         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
18345         * basic-float.cs: Add rounding regression test.
18347         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
18349 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
18351         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
18352         structures in registers for pinvoke wrappers.
18354 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
18356         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
18358 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
18360         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
18361         wrapper to mono_jit_thread_attach.
18363         * mini.c (mini_jit_thread_attach): New jit icall.
18365         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
18366         native->managed wrappers.
18368         * exceptions.cs: Add new regression test.
18370         * mini.c (optimize_branches): Check regions in the cbranch to throw
18371         block case as well. Fixes #73242.
18373 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
18375         * mini.c: thread safety fixes.
18377 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
18379         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
18380         patching stuff, since delegates use jump trampolines so there is
18381         no caller.
18383         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
18384         jump trampolines.
18385         
18386         * tramp-amd64.c: Fix build.
18388         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
18389         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
18391         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
18392         Rename this to mono_arch....
18393         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
18395         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
18397         * mini-amd64.c (emit_call): If both the caller and the callee is
18398         guaranteed to have 32 bit addresses, emit a normal call.
18400         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
18402         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
18403         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
18404         method_ptr inside delegates.
18406 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
18408         * mini.c (mono_jit_free_method): Free the method info even if the native code is
18409         invalidated. Fixes #73001.
18411         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
18413         * mini-x86.c: Only use stdcall for pinvokes on windows.
18415 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
18417         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
18418         * mini-x86.c: remove unreliable __thread var offset detection,
18419         use the correct accessors and enable by default.
18421 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
18423         * mini.c (mono_jit_free_method): Fix memory leak.
18425 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
18427         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
18429 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
18431         * cpu-amd64.md: Fix lengths of atomic opcodes.
18433 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
18435         * driver.c: try to not imply using ICU is any good.
18437 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
18439         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
18440         functions as inline ops.
18442         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
18443         some Interlocked functions as inline ops.
18445         * mini.c (move_basic_block_to_end): Fix bug in last patch.
18447         * mini.h (MonoBasicBlock): Reorganize fields a bit.
18449         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
18451         * mini.c: Add support for OP_NOT_TAKEN.
18453         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
18454         structures in registers for pinvoke wrappers.
18456         * mini-amd64.c: Fix warnings.
18458 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
18460         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
18462         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
18464         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
18465         address instead of loading the address from it.
18467         * mini-x86.c: Add support for returning small structs in registers
18468         on Win32. Fixes part of #70864.
18469         
18470 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
18472         * trace.c (get_token): Improve error checking.
18474 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
18476         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
18478 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
18480         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
18481         it can be reused for MonoClass.
18482         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
18483         _LINKDEMAND.
18485 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
18487         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
18488         instead of a MonoReflectionMethod. The method information wasn't used
18489         when displaying SecurityException details (but will be now).
18491 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
18493         * Makefile.am : windows build fix.
18495 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
18497         * iltests.il: Add new regression test.
18499         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
18500         #72522.
18502 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
18504         * mini.c: Moved linkdemand check into helper function check_linkdemand
18505         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
18506         LDFTN, LDVIRTFTN).
18508 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
18510         * declsec.c: Added statistics counter for different kinds of 
18511         LinkDemands.
18512         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
18513         (and commented) declaration.
18514         * mini.c: Added statistics counter for security Demand code 
18515         generation. Added display of security statistics.
18517 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
18519         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
18520         Fix compilation errors under gcc-2.95.
18522 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
18524         * mini.c, driver.c: Use the new jit trampoline hashtable
18526 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
18528         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
18530 2005-02-11  Martin Baulig  <martin@ximian.com>
18532         * debug-mini.c (mono_debug_close_method): Free the line number array.
18534 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
18536         * aot.c: Break up large methods into smaller ones. Share GOT slots for
18537         icalls.
18539         * mini.h: Bump AOT file format version. 
18541 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
18543         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
18544         APTC and P/Invoke.
18545         * declsec.h: Added macros to get/set lazyly initialized security 
18546         informations about assemblies. Added new enum for different type of
18547         possible LinkDemand violation. Added function to check LinkDemands.
18548         * mini.h: Added a field to MonoCompile to hold any security violation
18549         detected when JITting a method (so it can be thrown later).
18550         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
18551         and CEE_CALLVIRT. Added code to throw exception at the end of
18552         mini_method_compile (note: the exception is unhandled right now).
18554 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
18556         * mini.c, jit-icalls.c: use the managed implementation of
18557         memset for initobj and memset, to avoid managed <-> unmanaged
18558         transitions.
18560 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
18562         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
18563         optimization if it would need a GOT var.
18565         * basic.cs: Add tests for constant propagation and switch statements.
18567         * ssa.c: Fix out-of-range constant propagation and switch statements.
18569 2005-02-09    <vargaz@freemail.hu>
18571         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
18573 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
18575         * cpu-amd64.md (load_membase): Fix max length of load_membase.
18577 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
18579         * mini.c: update to new signature of mono_class_get_allocation_ftn().
18581 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
18583         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
18584         arithmetic operations.
18586 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
18588         * mini-ppc.c: add a workaround for broken user code that
18589         DllImports vararg functions with non-vararg signatures.
18591 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
18593         * mini.c (mono_jit_compile_method_inner): Add detection and a 
18594         meaningfull error message for assemblies written in Managed C++.
18596         * tramp-amd64.c mini-amd64.h: Add support for 
18597         create_trampoline_from_token ().
18599         * aot.c mini-x86.c abcremoval.c: Applied patch from
18600         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
18602 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
18604         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
18605         which takes a MonoImage/token as parameter instead of a MonoMethod.
18607         * aot.c: Use the new trampoline for initializing vtables.
18609         * aot.c: Add support for ldfld/stfld_remote wrappers.
18611         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
18612         rules for compare <MEM>, IMM.
18614         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
18616         * aot.c: Handle inherited finalizers correctly.
18618 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
18620         * inssel.brg (stmt): Add a missing _setup_... ().
18622         * aot.c: Save some parts of the class state to the AOT file and use it
18623         to recompute that state when a class is initialized.
18625         * mini.c: Install AOT hooks into the runtime.
18627         * mini.h: Bump AOT file format version.
18628         
18629         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
18630         Fixes #72148.
18632         * iltests.il: Add new test.
18634 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
18636         * mini.c: fix typo.
18638 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
18640         * mini.c: setup the statistical profiler in the thread attach
18641         callback to cope with the new single thread code.
18643 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
18645         * mini-ppc.c: ensure we have enough room for the profiler
18646         calls (fixed bug#72084).
18648 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
18650         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
18651         it.
18653 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
18655         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
18657 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
18659         * ssapre.c: Fixed an issue with down safety (this allows IronPython
18660         to succesfully execute parrotbench).
18661         * ssapre.h: Likewise.
18663 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
18665         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
18666         variable for stores to method arguments (fixes a SSAPRE issue).
18668 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
18670         * mini.c: handle value types in dup, fixes gen-112.cs.
18672 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
18674         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
18675         sequence for calls in dynamic methods to avoid thunks.
18677 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
18679         * mini.c: correctly remove dynamic methods from the hashtable.
18681 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
18683         * driver.c: Disabled SSAPRE until fix the bug that appears
18684         in IronPython's parrotbench.
18686 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
18688         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
18690         * mini.c (mono_method_to_ir): Revert the previous change.
18691         
18692         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
18693         when AOT compiling.
18695         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
18696         mono_jit_info_table_find () etc. when running under valgrind.
18698         * inssel.brg: Fix warnings.
18700         * mini-exceptions.c: Fix warnings.
18702 2005-01-31  Martin Baulig  <martin@ximian.com>
18704         * driver.c (compile_all_methods_thread_main): Don't try to compile
18705         generic methods or anything which has type parameters.
18707 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
18709         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
18711         * TestDriver.cs: Add --verbose flags.
18713         * graph.c ssa.c: Fix 64 bit warnings.
18714         
18715         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
18716         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
18717         Fix 64 bit warnings.
18719         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
18720         variable not spotted by gcc.
18721         
18722         * mini-amd64.c inssel-amd64.brg: Applied patch from  
18723         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
18724         X86_COMPARE_MEMBASE opcodes.
18726         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
18728 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
18730         * *: MonoMethod->signature might be NULL now. You *MUST* use
18731         mono_method_signature.
18733 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
18735         * driver.c (compile_all_methods_thread_main): Compile the methods
18736         without invoking cctors.
18738 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
18740         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
18741         * basic-calls.cs: test for the above.
18743 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
18745         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
18746         MonoJitInfo changes.
18748 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
18750         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
18751         eagerly if it contains dynamic methods.
18752         
18753         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
18755         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
18756         trace, it is now computed by an icall from trace_ips.
18757         
18758         * mini-exceptions.c: Fix a warning.
18760 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
18762         * mini-exceptions.c: don't bother getting stack trace info if
18763         it's not going to be used.
18765 2005-01-27  Raja R Harinath  <rharinath@novell.com>
18767         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
18768         ssapre-mini-ops.h.
18770 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
18772         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
18774         * aot.c: Avoid calling mono_method_get_header () if not needed.
18776         * mini.h: Bump AOT file format version.
18777         
18778         * mini.c (mono_emit_native_call): Allocate a GOT var here.
18780         * mini.c (mono_print_tree): Print more info for calls.
18782 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
18784         * declsec.h: Remove warning by adding missing include for marshal.h
18786 2005-01-26  Martin Baulig  <martin@ximian.com>
18788         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
18789         `ip' twice.
18791 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
18793         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
18794         flags.
18796         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
18798         * aot.c (mono_compile_assembly): Fix a warning.
18800 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
18802         * declsec.c: Look for security attributes on the original MonoMethod 
18803         (and not the wrapped one). This fix permissions on icalls.
18805 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
18807         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
18809         * mini.c (mono_allocate_stack_slots): Add a fixme.
18811         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
18813 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
18815         * inssel.brg: optimize casts of sealed types (more
18816         optimizations waiting for fixes in remoting).
18818 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
18820         * inssel.brg (stmt): Add another dummy rule.
18822         * driver.c: Fix warnings.
18824         * driver.c (mono_main): If running under valgrind, instruct glib to use
18825         the system allocation functions so valgrind can track the memory
18826         allocated by the g_... functions.
18828         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
18830         * mini-ops.h: Add OP_DUMMY_STORE opcode.
18832         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
18834         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
18835         variables in try regions.
18837         * mini.c (mini_method_compile): Don't disable optimizations on large
18838         methods when AOT compiling.
18840         * mini.c (mono_allocate_stack_slots): New arch independent method to 
18841         allocate stack slots. Not yet used.
18843 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
18845         * debug-mini.c (mono_debug_close_method): Plug some leaks.
18847 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
18849         * mini-ppc.c: make the branch info relative as the code
18850         buffer can be reallocated.
18852 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
18854         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
18855         * driver.c: Removed the AOT/security restriction. Now initialize the
18856         security manager (in metadata) if --security is used.
18857         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
18858         rather than the pointer to declarative security, when AOT is used.
18860 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
18862         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
18863         basic blocks, reduced intrinsic exception throwing code size.
18865 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
18867         * driver.c (mini_usage): Reorder the usage screen.
18869 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
18871         * mini.c (mono_resolve_patch_target): Fix warning.
18873 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
18875         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
18876         previous patch.
18878         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
18880         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
18881         breaks the amd64 build.
18883         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
18884         register allocation. Fixes #71454.
18886         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
18888         * arrays.cs: Add new regression test.   
18890 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
18892         * ssapre.c: Turned usage of snprintf to GString.
18893         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
18894         (I left it on by mistake in my previous commit).
18896 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
18898         * mini.c, cfold.c, basic-calls.cs: preserve side effects
18899         on cond branch optimization (fixes bug# 71515).
18901 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
18903         * abcremoval.c: Fixed bug 71062.
18904         * abcremoval.h: Likewise.
18906 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
18908         * mini.c: Added a new functionality to optimize_branches, the removal
18909         of useless basic blocks, and fixed some problem in the removal of
18910         critical edges; some utility functions added for both purposes.
18911         * ssapre.c: Added complex expression support, and fixed bug 70637.
18912         * ssapre.h: Likewise.
18913         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
18914         enabled in SSAPRE.
18915         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
18916         * driver.c: Re-enabled SSAPRE.
18918 2005-01-19  Martin Baulig  <martin@ximian.com>
18920         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
18921         the result of mono_get_method_constrained().
18923 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
18925         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
18926         manager.
18928 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
18930         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
18931         be detected.  Fixes #59296.
18933 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
18935         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
18936         which can happen. Fixes #71361.
18938 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
18940         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
18941         manager.
18943 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
18945         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
18946         appdomain-unload.exe to fail.
18947         
18948         * mini.c: Fix some memory leaks.
18950 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
18952         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
18953         Fixed bug and sped up some codepaths.
18955 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
18957         * mini.c: Fix some memory leaks.
18959         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
18960         conversion.
18962         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
18964         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
18965         #71320.
18967         * iltests.il: Add regression test for #71320.
18969 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
18971         * mini.c (mono_codegen): Fix installation of profiler hooks.
18973         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
18975 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
18977         * mini.h, mini.c, cfold.c: optimize access to enum
18978         readonly fields, too. Eval conditional branches if possible
18979         to perform unreachable code removal in more cases.
18981 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
18983         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
18985         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
18986         code manager.
18988         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
18989         WinXP DEP. Fixes #71244.
18991 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
18993         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
18995 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
18997         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
18999 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
19001         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
19002         changes.
19004         * mini.h: Bump AOT version.
19006         * mini.h (MonoCompile): Change exvar to a hash table.
19008         * mini.c: Allocate a separate exvar for each handler block.
19010         * mini.c: Get rid of the computation of filter_lengths, its not needed.
19012         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
19013         ex var with the pending exception and only throw if the two are equal.
19014         Fixes #68552.
19015         
19016         * exceptions.cs: Add tests for rethrow and nested catch clauses.
19018         * mini-x86.c: Fix warnings.
19020         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
19021         used by all the ports now.
19023         * aot.c: Add write-symbols and save-temps options.
19025 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
19027         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
19029 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
19031         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
19032         operations.
19034         * tramp-s390.c: Check vtable slot belongs to the domain.
19036         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
19037         as per other platforms.
19039         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
19041 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
19043         * driver.c: we don't run the Main() code in a subthread anymore.
19045 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
19047         * mini.c: added experimental rtc support in the statistical
19048         profiler: if the user has the permission, more accurate statistics
19049         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
19050         The MONO_RTC value must be restricted to what the linux rtc allows:
19051         power of two from 64 to 8192 Hz.
19053 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
19055         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
19057 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
19059         * mini-ppc.c: better icache flush for smp.
19061 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
19063         * mini-amd64.c (emit_move_return_value): Fix memory leak.
19065         * mini-x86.c (get_call_info): Add the get_call_info () code from the
19066         amd64 port, not yet used.
19068 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
19070         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
19071         a struct type.
19073 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
19075         * driver.c: Added --security option to activate the security manager.
19076         Right now this will allow code generation for declarative demands and
19077         is disabled when AOT is specified.
19078         * mini.c: Add code generation for declarative security demands.
19079         * mini.h: Add mono_use_security_manager as an extern gboolean.
19081 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
19083         * aot.c (mono_compile_assembly): Speed up compilation a bit by
19084         emitting more dense assembly code.
19086         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
19087         exception throwing stuff.
19089 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
19091         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
19092         dead code.
19094         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
19095         left in by mistake.
19097         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
19098         fixed.
19100         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
19102         * tramp-*.c: Only patch vtable slots if the object is in the current
19103         domain. Fixes appdomain-unload.exe.
19105         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
19106         
19107         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
19108         x86 branch.
19110 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
19112         * mini.c (reverse_branch_op): New helper function.
19114         * mini.c (optimize_branches): Run the new optimization only on 
19115         platforms which support it. Also reverse all kinds of branches.
19117         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
19119         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
19120         a throw statement.
19122         * mini.c (optimize_branches): Reverse not-equals branches if the false
19123         bblock is a throw. This happens a lot of time with argument checking in
19124         corlib.
19126         * mini.c (mono_codegen): Add support for placing basic blocks after
19127         the function epilogue.
19129         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
19130         function epilogue.
19131         
19132 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
19134         * mini.c (setup_stat_profiler): Only set this up if the platform
19135         supports ITIMER_PROF.
19137 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
19139         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
19140         previous patch.
19142         * inssel.brg: Fix a warning.
19144 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
19146         * mini.c: added support for statistical profiler 
19147         (run with: --profile=default:stat).
19149 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
19151         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
19153         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
19155         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
19156         related to global registers from the amd64 port.
19158 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
19160         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
19162         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
19163         with global registers.
19164         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
19166         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
19168 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
19170         * debug-mini.c (encode_value): Fix off-by-one.
19172         * aot.c (encode_value): Likewise.
19174         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
19176 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
19178         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
19179         AOT.
19181         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
19182         
19183         * aot.c (emit_method_info): Increase size of temp buffer.
19185         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
19186         the AOT case.
19188 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
19190         * aot.c (emit_method_info): Fix build.
19191         
19192         * aot.c: Further rework of the AOT file format to reduce the size of
19193         the method info data.
19195         * mini.h: Bump AOT file format version.
19197 2004-12-27  Martin Baulig  <martin@ximian.com>
19199         * mini.c (mini_get_method): New static method; call
19200         mono_get_method_full() and mono_get_inflated_method().
19201         (mono_method_to_ir): Use mini_get_method() instead of
19202         mono_get_method_full(). 
19204 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
19206         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
19208 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
19210         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
19212         * inssel-amd64.brg: Add some optimization rules.
19214 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
19216         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
19217         standard not GC'd stuff is fine.
19219 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
19221         * aot.c: Rework the AOT file format to get rid of most of the global
19222         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
19224         * mini.h: Bump AOT file format version.
19225         
19226 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
19228         * mini.h: Bump AOT file format version.
19230         * aot.c (mono_aot_is_got_entry): New function to determine if an 
19231         address is inside a GOT.
19233         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
19235         * cpu-pentium.md: Increase the maximum size of some instructions which
19236         might involve a got access.
19237         
19238         * mini.c (get_method_from_ip): Another debug helper function.
19240         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
19241         when got var accesses are created during the decompose phase.
19243         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
19245         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
19246         argument mini_compile_method and to MonoCompile, and use this to
19247         determine whenever a given method is compiled for AOT. This allows the
19248         other methods compiled during AOT compilation to be free of AOT stuff,
19249         so the backends does not need to add special support for them by
19250         creating a fake GOT etc.
19252         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
19253         longer needed.
19255 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
19257         * mini.c (mono_method_to_ir): It turns out that some of the
19258         x-appdomain wrappers are lax with types, so just ignore this for
19259         all wrappers.
19261         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
19262         at the vtable->klass. If it is non-shared code we can just use the
19263         vtable.
19265 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
19267         * mini-ppc.c: access MonoDomain from tls, too.
19269 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
19271         * declsec.c: Removed unused variable (and related warning ;-)
19273 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
19275         * iltests.il: New test for LDELEMA on an array of ref types.
19277         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
19278         all ldelema's on reftypes.
19279         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
19280         it was the wrong place to put it.
19282         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
19283         register to pop to make this cleaner, at the request of Paolo.
19285 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
19287         * mini-ops.h (OP_GETHASHCODE): New op.
19289         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
19291         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
19292         operation.
19294         For a microbenchmark, this reduces the cost of Hashtable.get_Item
19295         by 25%.
19296         
19297         * mini-x86.c (mono_arch_output_basic_block): Rather than
19299         add ebp, 4
19301         Emit
19303         pop edx
19305         The first is 3 bytes while the second is 1. This saves 36 kb on
19306         mscorlib, quite a big saving. When bootstraping mcs, I was able to
19307         see a small boost because of icache locality.
19309         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
19311 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
19313         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
19314         started code sharing with the generic code.
19316 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
19318         * mini-ppc.c, cpu-g4.md: added code for direct access to
19319         tls data slots.
19321 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
19323         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
19324          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
19325         to OP_TLS_GET.
19327 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
19329         * declsec.c|h: Added functions to cache the declarative stack modifiers
19330         in MonoJitInfo and to create a security frame from a MonoJitInfo 
19331         structure.
19332         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
19333         created. Register internal calls for System.Security.SecurityFrame::
19334         _GetSecurityFrame and _GetSecurityStack.
19335         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
19336         the definitions for the new stack walk/callback mechanism.
19337         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
19338         first security frame for LinkDemands and InheritanceDemands) and
19339         GetSecurityStack for Demands. Both use the new mono_walk_stack code
19340         from lupus.
19341         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
19342         walk initialization (lupus).
19344 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
19346         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
19347         idiom.
19348         (handle_loaded_temps): Do not create a temporary variable for
19349         things that we know are temps. They will never be modified.
19350         (mono_spill_call): Set MONO_INST_IS_TEMP
19351         (mono_emulate_opcode): ditto
19352         (emit_tree): ditto
19353         (mono_method_to_ir.CEE_DUP): ditto
19355 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
19357         * mini.c (type_to_eval_stack_type): Make this handle the void type
19358         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
19359         (emit_tree): use ip_in_bb to special case some common idioms
19360         Update all callers to pass in the IP.
19361         (mono_method_to_ir): Make CEE_CALL* do the above as well.
19363         This gives us a nice 2% speedup in mcs bootstrap.
19365         * mini-x86.c (peephole_pass): Peephole pass to make
19366         mov  [foo], eax
19367         push [foo]
19369         into
19371         mov [foo], eax
19372         push eax
19374         * mini.c (ip_in_bb): new method.
19375         (mono_method_to_ir): use this method rather than doing the hash
19376         lookup ourselves.
19378         * linear-scan.c (mono_linear_scan): When expiring actives, you
19379         don't need to keep around variables that expire on this
19380         instruction. This makes it so that:
19381              a = b + 1
19382         will turn into:
19383              store (ebx add (ebx, 1))
19384         which will become
19385              add ebx, 1
19387 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
19389         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
19390         combination to avoid doing two copies. Fix up problems with previous
19391         patch.
19393         * mini.c: Fix 64 bit warnings.
19395         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
19397 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
19399         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
19400         changes from the x86 code.
19402         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
19404 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
19406         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
19407         throwing code to reduce its size, unify the AOT and non-aot code and 
19408         get rid of relocations in the AOT case.
19410         * mini-x86.h mini.c exceptions-x86.c 
19411         (mono_arch_get_throw_corlib_exception): New arch specific function to 
19412         raise corlib exceptions which doesn't require relocations in the 
19413         caller.
19415         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
19417 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
19419         * mini.c (mono_emit_method_call): Only allocate the got var when it is
19420         needed.
19422         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
19423         in the AOT case.
19425 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
19427         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
19428         with add function when used from Inc/dec atomic 
19429         functions. Re-enabled optimization on x86.
19430         * mini-ops.h: renamed atomic_add functions to
19431         allow _add to match the Interlocked::Add and
19432         _add_next to match Interlocked::Inc/Dec.
19434 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
19436         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
19437         linking of BBs to the end BB, and enabled SSAPRE also with
19438         consprop and copyprop (which was prevented by that bug).
19440 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
19442         * mini-x86.c: disabling the Interlocked optimizing code. 
19444 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
19446         * aot.c (load_aot_module): Move reading of got_addr after the AOT
19447         file version check.
19448         
19449 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
19451         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
19452         interlocked optimization due lack of support on x86, rewrote 
19453         exchange to take into account that base may be in eax.
19454         
19455         xsp works again; activated Interlocked optimizing code.
19456         
19457 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
19459         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
19461 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
19463         * mini-ops.h: Add new opcodes.
19465         * mini.h: Add new patch types. Add got_var to MonoCompile.
19467         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
19468         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
19469         make it work with all kinds of patchable code.
19471         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
19472         address of the GOT, and referencing entries in the GOT.
19474         * mini.c: Add code to load the GOT address if needed by an opcode.
19476         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
19477         independent AOT code on the x86 using an elf-style Global Offset Table.
19479 2004-12-14  Raja R Harinath  <rharinath@novell.com>
19481         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
19483 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19485         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
19486         when running xsp.
19488 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
19490         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
19491         of Interlocked:Increment/Decrement/Add as inline ops.
19492         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
19494 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
19496         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
19497         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
19499 2004-12-12  Duncan Mak  <duncan@ximian.com>
19501         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
19502         again. `patch_info->table_size' is no longer valid after Zoltan's
19503         commit #37636.
19505 2004-12-12  Martin Baulig  <martin@ximian.com>
19507         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
19508         if we are the "real" method, ie. not an inlined method inside it.
19510 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
19512         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
19513         before we look in the special fields table. This fixes
19514         ../tests/thread-static-init.cs.
19516 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
19518         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
19519         for Array get_Rank and get_Length. Fixes bug #70465.
19521 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
19523         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
19524         separate structure to reduce the size of MonoJumpInfo.
19526 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
19528         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
19530 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
19532         * mini.c (mini_get_inst_for_method): Changed to allow ports
19533         to return a MonoInst instead of opcode 
19534         (renamed mini_get_opcode_for_method to better reflect the new functionality)
19535         
19536         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
19537         Allow ports to return a created MonoInst instead of op-code, will enable
19538         new optimizations.
19539         (renamed mini_get_opcode_for_method to better reflected the functionality)
19541 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
19543         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
19545 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
19547         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
19548         Fixes #69985.
19550 2004-12-08  Martin Baulig  <martin@ximian.com>
19552         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
19553         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
19555 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
19557         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
19558         correctly.
19560         * exceptions.cs: Disable some tests which depend on properties of x86 fp
19561         arithmetic.
19563 2004-12-08  Raja R Harinath  <rharinath@novell.com>
19565         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
19567 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
19569         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
19570         bug introduced by the previous patch.
19572 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
19574         * mini-ppc.c, objectc.cs: handle large structs passed by value
19575         (fixes bug #69972).
19577 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
19579         * mini-ppc.c: OP_ARGLIST implementation from
19580         Geoff Norton  <gnorton@customerdna.com>.
19582 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
19584         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
19585         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
19587 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
19589         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
19591 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19593         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
19594         support.
19596 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
19598         * mini-sparc.c: Zero out localled-ed memory.
19600         * iltests.il: Add tests for zeroing out localloc-ed memory.
19602 2004-12-04  Martin Baulig  <martin@ximian.com>
19604         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
19605         mono_method_get_signature_full().       
19607 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
19609         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
19610         and some utility functions (always for SSAPRE), integrated SSAPRE.
19611         * mini.h: Likewise.
19612         * driver.c: Added ssapre option.
19613         * ssa.c: Small fix on OP_ARG handling.
19614         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
19615         * Makefile.am: Likewise.
19617 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
19619         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
19620         now in the xp code.
19622         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
19623         icall.
19625 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19627         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
19628         
19629         * cpu-s390.md : Increase instruction length of oparglist.
19631         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
19633 2004-11-30  Martin Baulig  <martin@ximian.com>
19635         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
19636         virtual generic methods.  We call a special helper_compile_generic_method()
19637         icall to retrieve the method from the vtable, inflate and compile
19638         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
19640         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
19642 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
19644         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
19646 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
19648         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
19649         Fixes #69929.
19651 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
19653         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
19654         platforms with PIC aot.
19656 2004-11-28  Martin Baulig  <martin@ximian.com>
19658         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
19659         Fixes gen-112.cs.
19661 2004-11-28  Martin Baulig  <martin@ximian.com>
19663         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
19664         the result of mono_type_get_underlying_type() to check whether
19665         we're byref.
19667 2004-11-26  Martin Baulig  <martin@ximian.com>
19669         * mini.c
19670         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
19671         in the g_assert().
19673 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
19675         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
19676         the same way as the other arguments so they won't get clobbered.
19678         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
19679         calls through R11 since it is clobbered by the trampoline code.
19681 2004-11-26  Raja R Harinath  <rharinath@novell.com>
19683         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
19684         pick up in-tree mscorlib.dll.
19686 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
19688         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
19690         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
19691         runtime data/code are now stored in a table similar to the GOT in ELF. 
19692         This allows the code itself to be position independent.
19694         * aot.c: Fix loading of referenced assemblies after the lazy assembly
19695         loading changes.
19697         * aot.c: Attach ELF type (object/function) directives to all global
19698         symbols.
19700         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
19702         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
19704         * mini-amd64.h: Turn on PIC AOT code.
19706         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
19707         returning the offset within an OP_AOTCONST instruction where the GOT
19708         offset needs to be added.
19710         * mini.h: Bump AOT file format version.
19712 2004-11-25  Martin Baulig  <martin@ximian.com>
19714         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
19715         uninflated generic methods.
19717 2004-11-25  Martin Baulig  <martin@ximian.com>
19719         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
19721 2004-11-24  Martin Baulig  <martin@ximian.com>
19723         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
19724         original klass (this only applies for generic instances).
19726 2004-11-24  Martin Baulig  <martin@ximian.com>
19728         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
19729         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
19730         that array).
19732 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
19734         * mini.c (mono_method_to_ir): Disable inlining for methods containing
19735         localloc. Fixes #69678.
19737         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
19738         
19739 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
19741         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
19742         used SSE registers on pinvoke calls. Fixes #69774.
19744 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
19746         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
19747         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
19749 2004-11-23  Raja R Harinath  <rharinath@novell.com>
19751         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
19752         Refer directly to the mcs/ tree.
19754 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19756         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
19757         Check if a trampoline for a synchronized method is required. 
19759 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
19761         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
19762         with localloc if needed. Throe arithmetric exception in
19763         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
19764         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
19766 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
19768         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
19769         types before switching on type.  Fixes #69622.
19771 2004-11-19  Raja R Harinath  <rharinath@novell.com>
19773         * Makefile.am (check-local): New.  Integrate into 'make check'.
19774         (MCS,RUNTIME): Define using in-tree mono and mcs.
19775         (ILASM): New.
19776         (%.exe): Use $(ILASM).
19778 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
19780         * mini-ppc.c: adjust initial prolog size (bug #69691).
19782 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
19784         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
19785         #69664.
19787 2004-11-17  Raja R Harinath  <rharinath@novell.com>
19789         * Makefile.am (clean-local): Rename from 'clean'.
19791 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19793         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
19794         to mono_arch_is_int_overflow. 
19795         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
19796         SIGFPE events.
19798 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
19800         * declsec.c|h: New files to support declarative security attributes.
19801         Added function to check if a method has (applicable) security.
19802         * mini.c|h: Add check for declarative security attributes in
19803         mono_method_check_inlining.
19804         * Makefile.am: Added declsec.c and declsec.h to the build.
19806 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
19808         * mini.c, mini.h: update to keep dynamic code info per-domain.
19810 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
19812         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
19813         (mini_init): Get rid of it from here too.
19815 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
19817         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
19818         implemented OP_RETHROW (patch by Geoff Norton
19819         <gnorton@customerdna.com>).
19821 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
19823         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
19824         between appdomains.  Fixes appdomain-unload on PPC.
19826 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
19828         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
19829         mini-exceptions.c: handle the new wrapper types.
19830         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
19831         token value as a MonoClass* when compiling a wrapper.
19832         mono_jit_create_remoting_trampoline now takes an additional
19833         MonoRemotingTarget parameter.
19834         
19835 2004-11-10  Martin Baulig  <martin@localhost>
19837         * mini.c (mono_method_to_ir): Use `generic_container->context'
19838         rather than creating a new one.
19840 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
19842         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
19844         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
19846 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
19848         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
19849         the experimental aot cache stuff.
19851 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
19853         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
19854         mini-exceptions.c: update to exception clause structure changes.
19856 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
19858         * exceptions-x86.c (throw_exception): Fix warnings.
19860         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
19861         for OP_RETHROW.
19863 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
19865         * exceptions-sparc.c (get_throw_exception): Really fix this.
19867 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
19869         * tramp-*.c: we no longer support icalls without wrappers, so
19870         a bit of code can be removed here
19872 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
19874         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
19875         patch.
19877         * cpu-sparc.md: Add op_rethrow.
19879         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
19881         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
19883         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
19884         * mini-ops.h: Add OP_RETHROW.
19886         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
19888         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
19890 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
19891         
19892         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
19893         Makes the output much easier to read
19895 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
19897         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
19898         prevents another huge leak when compiling with ssa. Secondly, the
19899         performance of doing this rather than freeing the lists is much
19900         better. GList does a lock every time you allocate a list link,
19901         so that it can use a memory pool. So, it is better to just use
19902         a memory pool of our own.
19903         
19904         * ssa.c, linear-scan.c: replace g_list_remove_link with
19905         g_list_delete.  The remove one does not free the GList, so we were
19906         leaking memory. On -O=all --compile-all with corlib, this cut down
19907         3 MB of allocations.
19909 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
19911         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
19913         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
19915         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
19916         into a new function mono_create_jit_trampoline ().
19918 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
19920         * trace.c (get_spec): Allow tracing of classes without a namespace.
19922 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
19924         * mini.c: Fix pointer overwrite in mini_method_compile.
19926 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
19928         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
19929         The darwin ABI needs some special handling for 1 and 2 byte structs
19930         Lets use lbz/lhz instead of lwz everywhere.
19931         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
19932         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
19933         Use stb/sth for the former, and put the latter always on stack instead of in
19934         argument registers.
19936 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
19938         * trace.c (is_filenamechar): Add '_'.
19940 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
19942         * mini-s390.c: Fix prolog length to allow for large trace requirements.
19944         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
19946 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
19948         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
19949         depends on libmonogc. Fixes #68805.
19951 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
19953         * mini.c (mono_jit_free_method): Provide extra information for
19954         this error.  Currently this leaks, but will be turned into a
19955         developer option in the future.
19957 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
19959         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
19961 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
19963         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
19964         boundary. Fixes reading of PATCH_INFO_R4 and R8.
19965         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
19967 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
19969         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
19970         trampolines for AOT code.
19972 2004-10-22    <vargaz@freemail.hu>
19974         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
19975         constructed types. Fixes #68136.
19977 2004-10-21  Martin Baulig  <martin@ximian.com>
19979         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
19980         if it returns true, unwind the stack to the call instruction.
19982 2004-10-21    <vargaz@freemail.hu>
19984         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
19986         * mini.h: Bump AOT version number.
19988         * objects.cs: Add another test for unbox trampolines.
19990         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
19991         valuetype methods.
19993 2004-10-20    <vargaz@freemail.hu>
19995         * driver.c: Add SHARED to the set of optimizations tested.
19997         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
19999         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
20000         used by CEE_NEWARR.
20002         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
20004 2004-10-20  Martin Baulig  <martin@ximian.com>
20006         * mini-exceptions.c (mono_handle_exception): Call
20007         mono_debugger_handle_exception() to tell the debugger about
20008         catch/finally clauses.
20010 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
20012         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
20014         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
20015         #68447.
20017 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
20019         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
20020         methods as their native size, fixed bug #57543, #57545.
20021         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
20022         This saves a temporary register and mullw call down into 1 (minor perf
20023         increase for cases like sum = sum * 5;  This use to translate into:
20024             li r11,5
20025             mullw r28,r28,r11
20026         It now translates to
20027             mulli r28,r28,5
20029 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
20031         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
20032         #68388.
20034 2004-10-11  Martin Baulig  <martin@ximian.com>
20036         * mini.c (mono_method_to_ir): If we're a generic method, get the
20037         MonoGenericContainer from our MonoMethodNormal and create a
20038         MonoGenericContext from it.
20040 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
20042         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
20044         * basic-long.cs: Add test for checked i8->i2 cast.
20046 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20048         * inssel-ppc.brg: added a couple of speedup rules.
20050 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
20052         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
20053         to speed up rebuilds.
20055 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20057         * mini-s390.c: Minor fix to OP_OR_IMM.
20059 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
20061         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
20062         better. Fixes appdomain-unload.exe on sparc.
20064 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
20066         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
20067         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
20068         see bug 67324.
20070 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
20072         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
20074 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
20076         * mini.c: Always generate a field read/write wrapper for members
20077         of the class MarshalByRefObject since the actual instance could
20078         be a CBO.
20080 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
20082         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
20084 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
20086         * driver.c mini.h trace.c: Move the setting of the main assembly into
20087         a separate function called mono_trace_set_assembly () and call it after
20088         actually loading the main assembly. Fixes #66872.
20090 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
20092         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
20093         using the code manager.
20095 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
20097         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
20099 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
20101         * cpu-amd64.md: Fix bug in previous patch.
20102         
20103         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
20104         #66650.
20106 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
20108         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
20109         mini-exceptions.c: updates for changed stack walk interface.
20111 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20113         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
20115 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
20117         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
20119 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
20121         * driver.c (mini_regression_list): Do not call mono_assembly_close 
20122         since assemblies can't be unloaded.
20123         
20124 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
20126         * cpu-amd64.md: Fix more instruction lengths.
20128         * cpu-amd64.md: Fix lengths of some instructions.
20130 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
20132         * inssel.brg: Make the array ldelema check aot friendly.
20134 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
20136         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
20138         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
20140 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
20142         * mini-x86.c: Fix build.
20144         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
20145         mono_type_get_underlying_type () helper function to simplify code.
20146         
20147 2004-09-09  Martin Baulig  <martin@ximian.com>
20149         * mini-amd64.c: Don't access `type->data.klass' directly, call
20150         mono_class_from_mono_type() instead since the type may be a
20151         generic instance.
20153 2004-09-09  Martin Baulig  <martin@ximian.com>
20155         * mini-amd64.c (get_call_info): Fix support for generic instances.
20156         (add_valuetype): Use mono_class_from_mono_type() to get the class
20157         since we can be a generic instance.
20159 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
20161         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
20163 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
20165         * liveness.c: reset spill costs on each scan: bug 62107
20167 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
20169         * exceptions-sparc.c (mono_arch_find_jit_info): remove
20170         unnecessary line that doesn't compile
20172 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
20174         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
20175         trampolines, make them call an error function so people can fix their
20176         code.
20178 2004-09-06  Martin Baulig  <martin@ximian.com>
20180         * mini.c (mono_method_to_ir): When initializing locals, handle a
20181         generic instances like a valuetype if it's a valuetype and like a
20182         class if it's a class.
20184 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
20186         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
20187         stack. Fixes #64674.
20189         * exceptions.cs: Add test for unwinding of call arguments.
20191 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
20193         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
20194         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
20195         set the carry/borrow flag). The sparc and s390 implementations
20196         can now use optimized versions (and simplify the code). ppc bugfixes.
20198 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
20200         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
20202 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
20204         * inssel-amd64.brg: Remove leftover 32 bit rule.
20206         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
20208 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
20210         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
20211         mono_arch_find_jit_info functions into a new function. Fix a memory
20212         leak.
20214         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
20215         refactored code.
20216         
20217 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
20219         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
20220         as well.
20221         
20222         * exceptions.cs: Add array size tests.
20224         * mini.c: Allocate a separate icall wrapper for each arity of 
20225         mono_array_new_va. Fixes #59509.
20227         * exceptions.cs: Add testcase for 64578.
20229         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
20231         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
20232         
20233 2004-09-02  Martin Baulig  <martin@ximian.com>
20235         * mini.c (mono_method_to_ir): When initializing the locals, call
20236         handle_initobj() on the generic instance itself, not its
20237         underlying type.
20239 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
20241         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
20242         MonoJitInfo for dynamic methods.
20244         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
20246         * mini.c: Add support for freeing JIT data for dynamic methods.
20247         
20248 2004-09-01  Martin Baulig  <martin@ximian.com>
20250         * mini-x86.c (is_regsize_var): Added support for generic
20251         instances.
20252         (mono_arch_emit_prolog): Make this compile again, use
20253         `x86_push_imm_template (code)'.
20255 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
20257         * mini-x86.c: make all push_imm instructions that get
20258         patched always emit the long form
20260 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
20262         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
20263         in a per-domain hash.
20265         * mini-amd64.c (merge_argument_class_from_type): Handle generic
20266         types.
20268 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
20270         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
20271         work.
20272         
20273         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
20274         work.
20276         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
20277         Beginnings of SSE2 support.
20279         * exceptions.cs: Add more tests for checked int<->uint casts.
20281 2004-08-28  Martin Baulig  <martin@ximian.com>
20283         * mini-x86.c (mono_arch_instrument_epilog): Added support for
20284         generic instances.
20286         * mini.c
20287         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
20288         Handle generic instances recursively.
20290 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20292         * iltests.il: test for conv.u8 on a constant
20294 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20296         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
20297         LCONV_x4 (shrun_32 (membase)).
20299 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
20301         * inssel-x86.brg: c&p rules for push/setret of long
20303 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20305         * inssel-x86.brg: c&p rules for compare (base, regvar) and
20306         compare (regvar, base)
20308         * inssel-x86.brg: more burg love
20310         * inssel.brg: more cleanup
20312         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
20314 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
20316         * basic-long.cs, basic-calls.cs: new tests for optimization.
20318 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
20320         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
20321         patch.
20323 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
20325         * mini-amd64.c (read_tls_offset_from_method): Add another case.
20326         
20327 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
20329         * inssel.brg (mini_emit_memcpy): use 
20330         NO_UNALIGNED_ACCESS to disable memcpy optimization
20332 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
20334         * mini-amd64.c: Handle generic types in various places.
20336         * mini.c (mono_method_to_ir): Handle generic types in init locals.
20338 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
20340         * mini.c (handle_box): Fix warning.
20342         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
20344         * mini-amd64.h: Enable the emit_state optimization.
20346         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
20348         * mini-amd64.c: Add some new 64 bit peephole opts.
20350         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
20352         * cpu-amd64.md: sreg1 of div instructions must be %rax.
20354         * mini-amd64.c: Register allocator fixes.
20356         * mini.c: Add an optimization to emit_state to avoid allocation of new
20357         registers on some platforms.
20359 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
20361         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
20363         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
20364         allocation. Fixes #63085.
20366         * basic-long.cs: Add new regression test.
20368         * mini-amd64.c: Register allocator improvements.
20370 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
20372         * mini-amd64.c (read_tls_offset_from_method): Add another code
20373         sequence.
20375         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
20376         instruction sequence for nullifying class init trampolines.
20378         * objects.cs: Add new regalloc test.
20380         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
20382 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
20384         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
20385         
20386         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
20387         arguments.
20389         * driver.c: Fix profiling after TLS changes.
20390         
20391         * driver.c (mono_main): Set mono_stats.enabled if needed.
20393         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
20394         CEE_BOX.
20396 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
20398         * mini-x86.c: use a 1 op rather than a 2 op tls access
20399         instruction -> faster.
20401 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
20403         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
20404         x86 backend.
20406 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
20408         * exceptions-sparc.c (throw_exception): fix typo
20410 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
20412         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
20413         set tree->dreg correctly with tls. Allow any
20414         register to be used.
20416         * mini-x86.c (read_tls_offset_from_method): add new code
20417         generation pattern seen with GCC.
20420 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
20422         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
20423         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
20424         exceptions-sparc.c: fix some performance issues in exception
20425         handling and setting of the stack trace for exceptions that were
20426         already thrown.
20428 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
20430         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
20431         x86 backend.
20432         
20433         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
20434         registers.
20436 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
20438         This patch inlines tls access, when possible.
20439         
20440         * mini.h: new arch functions for TLS intrinsics.
20441         All platforms updated with a stub.
20443         * mini.c: use the new intrinsics
20445         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
20446         arch specific intrinsic for tls variables
20448 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
20450         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
20451         under windows.
20453 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
20455         * mini.c: thread local allocation
20457 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
20459         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
20461         * Makefile.am: Link against the static version of libmonogc.
20462         
20463         * Makefile.am: Link the static versions of the convenience libraries
20464         into the mono executable.
20466         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
20468 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
20470         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
20471         on integer overflow.
20473         * mini-amd64.c: Reorganize function call code.
20475         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
20477 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
20479         * inssel-x86.brg: use xor eax,eax.
20480         
20481         * basic.cs: new tests
20483 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
20485         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
20486         in exception throwing code.
20487         
20488 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
20490         * inssel-x86.brg: use xor esi,esi.
20492 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
20494         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
20495         can trace methods compiled during mini_init () too.
20497         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
20498         CEE_CONV_U4.
20500 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
20502         * Makefile.am: static link on x86 (r=zoltan)
20504 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
20506         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
20507         code since it causes some programs to fail.
20509 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
20511         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
20513 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
20515         * mini.c: ovfops_op_map - add STACK_OBJ case for
20516         CONV_I 
20517         * basic.cs: add test_0_pin_string as test
20518         case for above.
20520 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
20522         * Makefile.am: build C# if srcdir != builddir
20524 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
20526         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
20527         fall-through blocks.
20529 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
20531         * driver.c: enable loop by default again and include abcrem in -O=all.
20533 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
20535         * iltests.il: Add some localloc tests.
20537         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
20539         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
20540         Fixes #62574.
20542         * inssel-amd64.brg: Add some optimizations.
20544         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
20545         for gcc-3.4.
20547         * Makefile.am: Statically link mono against libmono on AMD64.
20548         
20549         * mini-amd64.c inssel-amd64.brg: Optimizations.
20551 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
20553         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
20555         * tramp-amd64.c: Patch calling code in trampolines.
20557 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
20559         * mini-amd64.c: pinvoke struct passing fixes.
20561 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
20563         * mini-sparc.c: redo change, make mono_arch_cpu_init call
20564         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
20566 2004-08-05  Duncan Mak  <duncan@ximian.com>
20568         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
20569         CEE_LDELEM_ANY.
20571 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
20573         * mini-amd64.c (emit_move_return_value): Move return value for normal
20574         calls too.
20576 2004-08-05  Martin Baulig  <martin@ximian.com>
20578         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
20579         `type->type'; just modify `type' itself when dealing with enums
20580         and generic instances.
20581         (check_call_signature): Make `simple_type' a `MonoType *'.
20583 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
20585         * mini.c: Use OP_PADD to add offsets to addresses.
20587         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
20589 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
20591         * mini-sparc.c (mono_arch_emit_epilog): fix check
20592         for folding last op into restore instruction
20594 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
20596         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
20597         helper methods using the code manager.
20598         
20599         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
20601         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
20603 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20604         
20605         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
20606           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
20608         * mini-s390.c: fix tail processing
20610 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
20612         * mini-ppc.c: mul.ovf.un exception name fix.
20614 2004-08-03  Martin Baulig  <martin@ximian.com>
20616         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
20617         instances; before jumping to `handle_enum', also modify `ptype'.
20619 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
20621         * cpu-sparc.md: fcall maximal length too small.
20623 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
20625         * mini-amd64.c mini.h: Add initial support for passing/returning 
20626         structures to/from pinvoked methods.
20628 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
20630         * mini-ppc.c: reg allocator fix.
20632 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
20634         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
20636         * inssel.brg: Optimize memset on 64 bit machines.
20638         * mini-amd64.c: Fix some vararg cases.
20640 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
20642         * mini-s390.c: Corrected macro in emit_float_to_int
20644         * s390-abi.cs: Tests to exercise the s390 ABI
20646 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
20648         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
20649         caller saved regs.
20651         * basic.cs: Add a test for add.ovf.un.
20653 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
20655         * mini-sparc.c: add case for OP_IDIV_UN
20657 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
20659         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
20660         
20661         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
20663 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
20665         * basic.cs: regression tests.
20667         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
20668         regressions.
20670 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
20672         * basic.cs: Add a new test.
20674         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
20675         and AOT. Various fixes and optimizations.
20677         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
20679 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
20681         * mini-ppc.c: make sure temp regs are not used for global reg
20682         allocation.
20684 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
20686         * cpu-sparc.md: conv_i8 fix for 64bits
20688         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
20690 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
20691         
20692         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
20693         add opcode for cmp BYTE PTR [eax], imm.
20695         * inssel.brg: Make memcpy and memset takes bases.
20697 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
20699         * *-amd64.*: More AMD64 work.
20700         
20701 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
20703         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
20704         add a compare-not-equal opcode.
20705         
20706 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
20708         * mini.c: Use mono_init_from_assembly instead of mono_init.
20709         
20710 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
20712         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
20714         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
20716         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
20718         * inssel.brg: 64 bit fixes.
20720         * mini.h (MonoCallInst): Add some AMD64 specific data.
20722         * mini.h: Add some OP_P opcodes.
20724 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
20726         * basic.cs: tests for 61797 and 61740
20728 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
20730         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
20731         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
20733 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
20735         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
20737         * *-amd64*.*: Ongoing AMD64 work.
20739 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
20741         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
20743         * *-amd64*: Ongoing AMD64 work.
20745         * mini-arch.h: Add AMD64 support.
20747         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
20749         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
20751         * mini-ops.h: Add new opcodes.
20753         * Makefile.am: Add AMD64 support.
20755         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
20756         rules into the inssel-long*.brg files.
20758         * *-amd64.*: Add beginnings of AMD64 backend.
20760 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
20762         * mini.c (print_dfn): commenting out the code that prints
20763         the cil. With -O=deadce, this makes -v -v crash.
20764         
20765         * cpu-pentium.md: make checkthis have a length of 2
20767 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
20769         * mini-sparc.h: fix implementations of __builtin
20770         functions for Sun compiler for V9.
20772 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
20774         * mini.c: use the new stelem.ref wrapper
20775         * exceptions.cs, arrays.cs: new stelem.ref tests
20777 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
20779         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
20780         new XSP should work with these changes).
20782 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
20783         
20784         * inssel-{long32,x86,}.brg: trivial optimizations.
20785         
20786 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
20788         * mini.c: load value when emitting box operation in
20789         constrained calls.
20791 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
20793         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
20794         is one byte shorter than cmp DWORD PTR [eax], 0.
20796 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
20798         * inssel-ppc.brg: arguments on the stack are always
20799         relative to the stack pointer (spotted by Neale Ferguson).
20801 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
20803         * exceptions-x86.c: delay appending the method name to the trace until
20804         after mono_jit_info_table_find is called, as this gets the real
20805         MonoMethod.
20807 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
20809         * aot.c: register roots
20811 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
20813         * aot.c : I could just use PLATFORM_WIN32 flag.
20815 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
20817         * aot.c : Reverting the previous fix. This time it broke linux build.
20819 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
20821         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
20823 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
20825         * mini.c (handle_stack_args): Remove some more debugging code.
20826         
20827         * mini.c (handle_stack_args): Remove debug output left in by mistake.
20829         * driver.c mini.h aot.c: Allow additional options to be specified with
20830         --aot and pass them to mono_compile_assembly.
20832         * aot.c: Add experimental code to AOT compile all loaded assemblies
20833         on demand and save the code into a cache in the filesystem.
20835         * aot.c: Add support for more wrapper methods.
20836         
20837         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
20838         58863.
20840         * cpu-*.md: Remove removed opcodes.
20842         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
20843         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
20844         related icalls to marshal.c.
20846 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
20848         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
20850         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
20852         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
20854 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
20855         * liveness.c: If liveness is recomputated we need to reset the information
20856         for each variable. This way, if the liveness range has been narrowed
20857         by optimizations that happened after the last computation, we can return
20858         a smaller range.
20859         
20860         For example, if you have
20861         
20862         {
20863                 int i = 0;
20864                 
20865                 // Tons of code that does not affect i
20866                 
20867                 i = foo ();
20868                 ...
20869         }
20870         
20871         i = 0 is dead code and will be removed by SSA. However, when
20872         linear scan gets to the code, i will still appear to be live
20873         throughout the entire block. This prevents good register allocation.
20875 2004-07-06  Martin Baulig  <martin@ximian.com>
20877         * debug-mini.c (mono_debug_init_method): Allow
20878         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
20879         (mono_debug_add_icall_wrapper): New method.
20881         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
20883 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
20885         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
20886         optimization.
20888 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
20890         * aot.c (mono_aot_load_method): Fix loading of debug info.
20892 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
20894         * aot.c: Add logging support.
20896 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
20898         * mini.h: Add prototype for mono_print_method_from_ip.
20900         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
20902         * inssel.brg: 64 bit fixes.
20904         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
20905         inssel-long32.brg.
20907         * Makefile.am: Add SPARC64 support.
20909 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
20911         * aot.c: Fix alignment problems on 32 bit platforms.
20913 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
20915         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
20916         SPARC64.
20918         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
20919         problems.
20921         * mini.h: Bump AOT file version. Some 64 bit fixes.
20923 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
20925         * inssel-sparc.brg: Add new rule to avoid register moves.
20927         * inssel.brg: Add ldind_to_load_membase helper function.
20929 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
20931         * mini.c: OffsetToStringData intrinsic.
20932         
20933 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
20935         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
20937         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
20938         regression tests.
20940         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
20941 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
20943         * mini.c: reinstated mono_compile_get_interface_var()
20944         on x86, too, since the change breaks the Gtk# build there as well.
20946 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20948         * driver.c: remove loop from the default optimizations: it seems to
20949         interact badly with some of the other options (see bug #60613).
20951 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
20953         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
20954         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
20956 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
20958         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
20959         vararg-using methods.
20961 2004-06-21  Martin Baulig  <martin@ximian.com>
20963         * mini/mini-exceptions.c
20964         (mono_handle_exception): Added `gpointer original_ip' argument.
20965         After calling mono_unhandled_exception(), call
20966         mono_debugger_unhandled_exception() and if that returns true,
20967         restore the context and return.
20969 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
20971         * mini-ppc.c: prefer the use of relative branches so
20972         they won't need to be patched in aot code (patch from Patrick Beard).
20974 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
20976         * aot.c: patch from Patrick Beard to make the output assembly
20977         more correct for the MacOSX assembler. Small tweak to
20978         generate sane images on Linux/PPC, too.
20980 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20982         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
20983         case until bug #59509 is fixed (shows up in #60332).
20985 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
20987         * mini.c: make sure the needed wrappers are compiled, too, with
20988         precomp.
20990 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
20992         * driver.c: remove NPTL reference in --version output.
20994 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
20996         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
20997         generate valid assembly for the Mach-O assembler.
20999 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
21001         * driver.c: don't include abcrem in the all optimization specifier
21002         since it slows down jit compilation too much for now.
21004 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
21006         * mini.c: use BIGMUL only if both operands have the same signage.
21007         * iltests.il: Test for bug 60056. (errors related to signage in
21008         BIGMUL).
21010         r=lupus.
21012 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
21014         * mini.c, aot.c: memory leak fixes.
21016 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
21018         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
21020 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
21022         * Makefile.am: remove the -static hack completely, it links in
21023         statically glib as well.
21025 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
21027         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
21028         * exceptions.cs: make it compile with new mcs/csc.
21030 2004-06-03 Massimiliano Mantione <massi@ximian.com>
21031         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
21032         and added relevant test case.
21034 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
21036         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
21037         regressions in gtk-sharp.
21039 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
21041         * exceptions.cs: New regression tests.
21043         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
21045 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
21047         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
21049 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
21051         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
21053         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
21055 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
21057         * mini.c (mono_jit_runtime_invoke): Init class in this
21058         method instead of trusting mono_jit_compile_method to
21059         do the work (because wrappers can be in object class)
21061 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
21063         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
21065         * basic-long.cs: New regression test.
21067 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
21069         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
21070         and div/rem checks.
21072 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
21074         * Makefile.am: fix miguel's change to build mono statically against
21075         libmono (track build dependencies).
21077 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
21079         * cfold.c: Some glib versions do not have G_MININT32.
21081 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
21083         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
21084         with precision of tan, atan, sin and cos, and implemented related
21085         regressions tests (fixes bug 54467, but one new problem appeared and
21086         is not fixed yet).
21088 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
21090         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
21092         * exceptions.cs: Add test for constant folding && division by zero.
21094         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
21095         since driver.c is in libmono too, so the optimization was useless.
21097         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
21098         variable to driver.c so the compiler can emit more efficient code to
21099         access them.
21101 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21103         * Makefile.am: don't distribute generated inssel.[ch] files.
21105 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
21107         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
21108         into the default appdomain. Fixes #58707.
21110         * jit-icalls.c: Remove the broken approximation for truncl, doing
21111         no conversion is better.
21113         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
21114         Fixes #58863.
21116 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
21118         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
21119         of the mcrxr instruction which is not available on some processors
21120         even if it's documented to be. Implement add and sub overflow correctly
21121         (still not complete for long unsigned). Speed up icalls a bit.
21123 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
21125         * mini.c (mono_jit_compile_method_with_opt): Make sure that
21126         we run .cctor in the current domain instead of target_domain.
21127         
21128         Fixes bug #58558, .cctor not being called in -O=shared.
21130 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
21132         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
21134 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
21136         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
21137         which can be done with an imm8, do it that way.
21138         (mono_arch_output_basic_block): ditto for a jmp
21139         (mono_arch_emit_prolog): Computate maximum offset of a label.
21141 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
21143         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
21144         now tries to allocate prefered physical reg's for virtual
21145         regs. This reduces the number of emited spills/loads with
21146         20-30% on our core assemblies.
21148 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
21150         * jit-icalls.c: truncl() is not needed and trunc() is
21151         the correct thing to do anyway (bug #58287).
21153 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
21155         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
21156         if available.
21158 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
21160         * driver.c: enable loop optimizations by default.
21162 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
21164         * mini-x86.c: fix calc of max loop size when aligning loops start.
21166 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
21168         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
21169         the stack.
21171 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
21173         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
21174         should set carry.
21176         * basic-long.cs: Add tests for add/subtract of immediates with carry.
21178         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
21179         
21180         * mini.c (inline_method): Allways inline some wrappers even if the cost
21181         is too large. Fixes #58785.
21183         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
21184         
21185 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
21187         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
21188         (crichton@gimp.org). Beginning of support for sparc/linux.
21190         * mini-sparc.c: Optimize retrieval of LMF address.
21192 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
21194         * exceptions-ppc.c:  handle alloca in methods with clauses.
21196 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
21198         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
21200 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
21202         * mini.c: Delegate most of the abort signal work to 
21203           mono_thread_request_interruption, which also handles Stop and Suspend
21204           states.
21206 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
21208         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
21209         supports the save/restore lmf opcodes.
21211 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
21213         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
21214         by gcc-3.4 as well.
21216         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
21218 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
21220         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
21221         methods which contain array accesses.
21223         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
21224         boundaries. Fixes #58537.
21226         * iltests.il: Add regression test for #58537.
21228 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
21230         * mini-x86.c (mono_arch_local_regalloc): Last part of
21231         fix for bug #58633 (releasing register to early).
21233 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
21235         * basic-long.cs: Add new regression test.
21237 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
21239         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
21240         register too early on the chain.
21242 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
21244         * mini.c (create_helper_signature): Use a helper function to reduce
21245         the code which needs to be written. Also set the calling convention of
21246         icalls on windows. Fixes #57840.
21248 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
21250         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
21251         exceptions-ppc.c: added helper function to get the instruction address
21252         from a signal handler context.
21254 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
21256         * helpers.c: use g_get_tmp_dir. Invokes happyness 
21257         from gonzalo.
21259 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
21261         * helpers.c: Add new env variable to pass args to objdump.
21262         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
21264 2004-05-17  Radek Doulik  <rodo@ximian.com>
21266         * Makefile.am (common_sources): added abcremoval.h so it get
21267         disted and daily mono packages on go-mono.com will build again
21269 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
21271         * abcremoval.c: Fixed coding style, added copyright header.
21273         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
21275         * mini.h: Added prototype for abc removal main function.
21277         * build_relations_propagation_table.pl: Added copyright header.
21279 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
21281         * basic-long.cs: reg test for complex ceq_long bug.
21283 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
21285         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
21286         reg in long and clob case (bug #58343). Fixed/added comments.
21288 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
21290         * mini.c (mono_jit_runtime_invoke): Follow new convention
21291         of calling the invoke method with an function pointer.
21293 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
21295         * ChangeLog: Fix author of memory leak patch.
21297 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
21299         * Makefile.am: fix make dist as well...
21302 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
21304         * cfold.c: Made so that conversions from pointer to int4 are no-ops
21305         on archs where pointers are 4 bytes long.
21307         * Makefile.am: Added abcremoval.c source file.
21309         * abcremoval.c: Added abcremoval.c.
21311         * abcremoval.h: Added abcremoval.h.
21313         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
21315         * inssel.brg: Enabled bounds check removal.
21317         * mini.c: Added support for abcrem optimization.
21319         * mini.h: Added abcrem optimization label.
21321         * driver.c: Added support for abcrem optimization.
21323         * propagated_relations_table.def: Added propagated_relations_table.def.
21325 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
21327         * mini.c, cfold.c: fix style.
21329 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
21331         * mini.c: handle issue with the low-level implementation of
21332         some long opcodes (bug #54209).
21334 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
21336         * basic.cs: test for my new cmov stuff.
21338 2004-05-13      Patrik Torstensson
21340         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
21341         opt and added peephole documentation.
21343 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
21345         * tramp-ppc.c: rewrote the generic trampoline code.
21347 2004-05-11      Patrik Torstensson
21349         * mini-x86.c: optimize long shl/shr asm code (one less branch)
21351 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
21353         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
21355         * mini.h mini.c dominators.c: Applied patch from Derek Woo
21356         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
21358         * mini.c: Add new icalls for AsAny marshalling.
21360 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
21362         * tramp-ppc.c, mini-ppc.c: more cleanups.
21364 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21366         * mini.c: no warnings.
21368 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21370         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
21372 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
21374         * mini.c: In the thread abort signal handler, if the thread is in the
21375         process of being stoped, don't throw the Abort exception, just stop the
21376         thread.
21378 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
21380         * tramp-ppc.c: removed old code.
21382 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21384         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
21385         do some simple speed optimizations on ppc.
21387 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
21389         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
21390         and large offsets in load/store.
21392 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
21394         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
21395         it causes regressions.
21397 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
21399         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
21400         support.
21402 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
21404         * jit-icalls.c: remove warnings.
21405         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
21406         speedups for unsafe code.
21408 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
21410         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
21412 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
21414         * basic-calls.cs: Add new regression test.
21416         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
21417         more portable.
21419         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
21421         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
21422         is no longer used.
21424 2004-05-06      Patrik Torstensson
21426         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
21427         long reg allocation in any reg (not only eax:edx) and implemented 
21428         long shl/shr ops in asm instead of helpers.
21430 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
21432         * mini-sparc.h: Fix warnings.
21434         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
21435         stack.
21437         * mini-exceptions.c (mono_handle_exception): Call the filter in a
21438         separate statement for clarity.
21440         * mini-sparc.c: Update status.
21442 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
21444         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
21445         here.
21447 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
21449         * inssel-ppc.brg: another small pre-release workaround:
21450         we don't do overflow detection for long_sub_un.
21452 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
21454         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
21455         (also works around a weird ppc bug: 57957).
21457 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
21459         * tramp-ppc.c: trampoline fixes.
21461 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
21463         * mini-ppc.c: fixed typos.
21465 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
21467         * mini-ppc.c, exceptions-ppc.c: more code saves registers
21468         at the top of the stack. Fixed typos. Use a frame registers
21469         for all the methods with exception clauses.
21471 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
21473         * exceptions-ppc.c: restore fp registers.
21475 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
21477         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
21478         order from the stack top (moved the stack room to save the
21479         return value for trace after the param area). Fixed corruption
21480         in restoring registers on unwind.
21482 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
21484         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
21486 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
21488         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
21489         and prolog/epilog for methods that use it. Allow
21490         enough param area room for varargs methods. Fix miguel's
21491         breakage in exception handling.
21493 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
21495         * Makefile.am: run genmdesc only on current arch.
21497 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21499         * exceptions-x86.c:
21500         * mini-x86.h: fix the build on windows.
21502 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
21504         * 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.
21506         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
21508         * mini-exceptions.c: New file.
21509         
21510         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
21511         Move some parts of the x86 exception handling code to an 
21512         arch-independent file so it can be shared with other ports.
21514 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
21516         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
21518 2004-04-26  David Waite  <mass@akuma.org>
21520         * driver.c: remove comma from end of enumeration declaration
21522 2004-04-26  Jackson Harper  <jackson@ximian.com>
21524         * driver.c: parse config file before loading first assembly. This
21525         allows the user gac to be enabled/disabled. 
21526         
21527 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
21529         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
21530         simpler mechanism: we do not care what is encoded initially
21531         (branch absolute or relative), we care about the code and its
21532         target.  I kept the old code for reference for now.
21534         The new code tries first to determine if the jump is anywhere in
21535         the -/+32 absolute meg range, if it succeeds, it encodes using the
21536         absolute branch;  If not, it tried to find something in the
21537         relative range, if not, it uses the handle_thunk code. 
21539 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
21541         * exceptions-ppc.c: use the correct ip register on macosx.
21543 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
21545         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
21547 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
21549         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
21550         Raise exception on integer divide by zero by hand since the hw
21551         doesn't support it. Handle NaNs in FP compares.
21553 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
21555         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
21556         code reducing duplication between the platforms and enabled
21557         signal exception handling (on linux for now).
21559 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
21561         * exceptions-ppc.c: more macosx support.
21563 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
21565         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
21567 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
21569         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
21571 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
21573         * iltests.il: more tests.
21575 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
21577         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
21578         vars as well.
21580 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
21582         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
21584 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
21586         * liveness.c: Mark variables as volatile in all basic blocks reachable
21587         from exception clauses.
21589 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
21591         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
21592         inlining.
21594 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
21596         * iltests.il, basic.cs: more tests for regalloc.
21598 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
21600         * iltests.il: Some tests for register allocation modifications
21601         I have locally.
21603 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
21605         * exceptions.cs: Add regression test for bug #56782.
21607         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
21608         original stack trace if an exception is rethrown. Fixes #56782. Oh,
21609         the beauty of fixing the same thing in 5 different files...
21611 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
21613         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
21614         methods.
21616 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
21618         * mini.c: Add support for STRWLPARRAY marshalling convention.
21620 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
21622         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
21623         to init the context to setup the regs pointer).
21625 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
21627         * exceptions-ppc.c: more exceptions work.
21629 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
21631         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
21632         not allowed.
21634 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
21636         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
21637         can use the memory directly.
21639         * cpu-pentium.md: Update documentation from a post from Zoltan. 
21641         add x86_add_membase, x86_sub_membase, x86_mul_membase
21643 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
21645         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
21646         GENERAL_REGS they were also hardcoded for all PPC ports.
21648         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
21650         Remove hard-coded limit for floating point registers, use
21651         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
21653         Notice that in MacOS X calling conventions you can fit a lot more
21654         floating point values in registers, so I should update the PInvoke
21655         test to excercise the passing of floating point values on the
21656         stack (currently broken).
21657         
21658 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
21660         * tramp-ppc.c (create_trampoline_code): Added
21661         JUMP_TRAMPOLINE_SIZE. 
21662         (ppc_magic_trampoline): Follow the pattern from
21663         x86_magic_trampoline: if code is set to zero, return. 
21664         (create_trampoline_code): Always pass MonoMethod to the jump
21665         trampoline, before it was passing a null.
21666         (mono_arch_create_jump_trampoline): Implement the jump stub, could
21667         share the code with mono_arch_create_jit_trampoline. 
21669         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
21670         implemented.
21671         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
21672         implemented.  
21674         * cpu-g4.md: Added length for jmp instruction, the worst case
21675         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
21676         for save_lmf).
21678 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
21680         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
21682 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
21684         * mini.c: Only set bblock->real_offset when adding a new bblock, and
21685         before each IL instruction.
21687         * mini.c (CEE_BOX): Fix warnings.
21689 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21691         * mini.c: removed a few unused vars and extra whitespace.
21693 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
21695         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
21696         checks.
21697         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
21698         index.
21699         (OP_GETCHR): use the above
21700         (CEE_LDELEMA): use the above.
21702         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
21703         version of the generic impl.
21704         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
21705         (CEE_LDELEMA): use the above.
21707 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
21709         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
21710         Fixes #56317.
21712         * iltests.il: Added new regression test for #56317.
21714 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
21716         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
21717         under NetBSD. Fixes #56450.
21719         * liveness.c (update_gen_kill_set): Fix previous patch.
21721 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21723         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
21725 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
21727         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
21728         ldsfld and ldsflda.
21730         * inssel-sparc.brg: Add more optimizations.
21732         * mini-sparc.c: Replace multiply/divide with shifts if possible.
21734 2004-04-01  Martin Baulig  <martin@ximian.com>
21736         * mini.c (handle_box): New static function; moved the
21737         implementation of CEE_BOX here.
21738         (mono_method_to_ir): Added `constrained_call' variable.
21739         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
21740         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
21741         mono_method_get_constrained() to get the method.
21743 2004-04-01  Martin Baulig  <martin@ximian.com>
21745         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
21746         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
21747         (mono_method_to_ir): We don't need these macros anymore since
21748         mono_class_get_full() already takes care of it. 
21750 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21752         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
21753         use @function (as doesn't accept #function here) and check the return
21754         value of system and stop if fails.
21756 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21758         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
21760 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
21762         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
21764         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
21766         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
21767         #56223.
21769         * basic-long.cs: Add test for negation of Int64.MinValue.
21771 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
21773         * mini-sparc.c: Update status.
21775         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
21777         * exceptions-sparc.c: Fix return value in filters.
21779         * inssel-sparc.brg: Fix register allocation in some rules.
21781 2004-03-28  Martin Baulig  <martin@ximian.com>
21783         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
21784         if neccessary.  
21786 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
21788         * mini-x86.c (mono_arch_patch_code): Fix warnings.
21789         
21790         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
21791         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
21792         remove unused conv_u4 opcode.
21794         * mini-x86.c: Remove valgrind workaround since it slows down things
21795         even when mono is not run under valgrind.
21797 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
21799         * mini-sparc.c: Update status.
21801         * inssel-sparc.brg: Add some optimizations.
21803         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
21804         future delay slot filling. Add support for varargs, tail calls and JMP.
21806         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
21807         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
21809         * inssel.brg: Fix register allocation in OP_ARGLIST.
21811         * inssel.brg: Fix warnings.
21813 2004-03-25  Martin Baulig  <martin@ximian.com>
21815         * mini.c (inflate_generic_field): Removed.
21816         (mini_get_method): Removed, use mono_get_method_full(),
21817         (mini_get_class): Removed, use mono_class_get_full().
21818         (mono_method_to_ir): Pass our generic context to
21819         mono_field_from_token().        
21821 2004-03-25  Martin Baulig  <martin@ximian.com>
21823         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
21824         of a `MonoMethod *'.
21825         (mini_get_method): Take a `MonoGenericContext *' instead
21826         of a `MonoMethod *'.
21827         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
21828         a new local variable called `generic_context' which holds the
21829         current `MonoGenericContext *'; use it to lookup things.
21831 2004-03-24  Martin Baulig  <martin@ximian.com>
21833         * mini.c (mini_get_class): New static method; if we're inside a
21834         generic instance, inflate the class if neccessary.
21835         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
21837 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
21839         * iltests.il: New regression test for #55976.
21841         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
21842         #55976.
21844 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
21846         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
21847         output.
21849 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
21851         * liveness.c: Consider SSA stores as well as loads when making vars
21852         volatile.
21854         * exceptions.cs: New regression tests for register allocation.
21855         
21856 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
21858         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
21859         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
21860           domain lock only to protect puntual access to data structures.
21861           Added access lock for sighash, jit_icall_hash_name, 
21862           jit_icall_hash_addr and domain->code_mp.
21864 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
21866         * driver.c: Print SIGSEGV handling method.
21868         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
21870         * mini.c (setup_jit_tls_data): Handle case when this is called
21871         multiple times for a thread.
21873         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
21874         is different from fbxx_un. Fixes #54303. Also use constants instead of
21875         magic numbers in a lot of places.
21877 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
21879         * exceptions.cs: Fix cctor test when --regression is used.
21881 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
21883         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
21884         for Linux/ppc.
21886 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
21888         * inssel-ppc.brg: fixed register assignments for some rules.
21890 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
21892         * exceptions.cs: Add test for exceptions in static constructors.
21894         * mini.c (mono_jit_compile_method_with_out): Move the calling of
21895         static constructors outside the domain lock. Fixes #55720.
21897 2004-03-17  Martin Baulig  <martin@ximian.com>
21899         * mini.c (get_generic_field_inst): Removed, this'll never happen.
21900         (inflate_generic_field): Take the `MonoMethod *' instead of the
21901         `MonoClass *' and added support for generic method.
21902         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
21903         have a `field->parent->gen_params', only inflate the field if it's
21904         an open constructed type.
21906 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
21908         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
21909         exception object instead of the preconstructed ones.
21911 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21913         * mini.c: reverted changed to sigsegv_signal_handler commited
21914         accidentally in the previous patch.
21916 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
21918         * mini.c:
21919         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
21920         running --aot with an old assembly.
21922 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
21924         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
21925         point values.
21927         * mini-sparc.c: Add support for v9 branches with prediction.
21929 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
21931         * mini.c (mini_init): #warning is GNUC only
21933         * mini-sparc.h: implement __builtin_frame_address
21934         and __builtin_return_address for Sun C compiler
21936 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
21938         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
21940 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
21942         * basic-calls.cs: Add test for unaligned byref long argument passing.
21944         * mini-ops.h: Add sparcv9 compare and branch instructions.
21946         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
21947         v9 instructions if we have a v9 cpu.
21949         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
21950         registers for global allocation.
21952         * exceptions-sparc.c: Fixes.
21953         
21954 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
21956         * liveness.c (mono_analyze_liveness): Optimized version.
21958         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
21960         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
21961         sparc work.
21963         * basic-float.cs basic-calls.cs: New regression tests.
21965 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
21967         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
21968         sigaltstack implementation.
21970         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
21971         
21972         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
21973         stuff if SIGSEGV_ON_ALTSTACK is not defined.
21975 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
21977         * mini.c: Fix warnings.
21978         
21979         * mini.c (mono_resolve_patch_target): New function which contains the
21980         arch independent part of the patching process.
21982         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
21983         patching code to a separate function.
21985 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
21987         * mini.c (add_signal_handler): ifdef out on Windows
21989 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
21991         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
21992         cpu-sparc.md: Add exception handling support + other fixes.
21994         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
21995         typed GC detection in --version.
21997         * basic.cs exceptions.cs: New regression tests.
21999         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
22000         the arch specific code can store data during a compilation.
22002         * mini-ops.h: Add OP_SETFRET.
22004         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
22005         function, register a separate icall for each arity, so the icalls can
22006         get a wrapper.
22007         
22008         * mini.c (mono_print_tree): Print negative offsets in a more readable
22009         form.
22010         
22011         * mini.c: Make signal handling work on sparc.
22012         
22013         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
22015         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
22017         * jit-icalls.c: Emulate truncl by aintl on solaris.
22019         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
22021 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
22023         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
22025 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
22027         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
22028         a MarshalByRef type, inline a method that performs the check, taking into
22029         account that the object can be a proxy. Also implemented tow new opcodes:
22030         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
22031         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
22032         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
22034 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
22036         * mini-ppc.c: if a relative branch displacement is too big
22037         but it points to and area reachable with an absolute branch, 
22038         avoid the thunks.
22040 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
22042         * mini.c: optimize small copies in cpblk.
22044 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
22046         * basic-calls.cs basic-float.cs: New regression tests.
22048         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
22049         negative offsets from %fp. Implement localloc. Fix local register 
22050         allocation. Fix the case when the this argument needs to be saved to
22051         the stack. Implement some missing opcodes.
22053 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
22055         * mini.c (mini_method_compile): Reenable global regalloc in methods
22056         with exception handlers.
22058         * linear-scan.c (mono_varlist_sort): Fix warning.
22060         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
22062         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
22063         regalloc costs.
22065         * liveness.c: Make all variables uses in exception clauses volatile, to
22066         prevent them from being allocated to registers. Fixes #42136.
22068 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
22070         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
22071         causes regressions.
22073         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
22074         argument to mono_arch_regalloc_cost.
22076         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
22077         precisely.
22079 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
22081         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
22082         Make the cost of allocating a variable to a register arch dependent.
22084         * basic-calls.cs: Fix compilation of tests.
22085         
22086         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
22087         helper function to cut back on the number of #ifdefs needed.
22089         * mini-ppc.c: Fix compilation.
22091         * basic-calls.cs: New regression tests.
22093         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
22095         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
22096         of l0 since that is callee saved.
22098         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
22099         to virtual calls.
22101         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
22102         of delay instruction.
22104         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
22106         * mini.h (MonoCallInst): Add 'virtual' flag.
22108         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
22110 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
22112         * *.cs: New regression tests.
22114         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
22115         work.
22117         * mini.c (mono_runtime_install_handlers): Fix build.
22119         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
22120         'signal_stack_size' members.
22122         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
22123         alternate signal stack.
22125         * exceptions-x86.c: Add stack overflow handling.
22127         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
22128         functions to arch independent code.
22130         * mini.c (mono_print_tree): Print more detailed info for load_membase
22131         opcodes.
22132         
22133 2004-02-23  Martin Baulig  <martin@ximian.com>
22135         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
22137 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
22139         * mini-x86.c: fixed reg allocation for div/rem.
22141 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
22143         * driver.c (mono_main): Report some configuratio options on --version.
22145 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
22147         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
22148         low in the address space. Correctly flush memory in thunks where we
22149         output native code.
22151 2004-02-20  Martin Baulig  <martin@ximian.com>
22153         * mini.c (mini_get_method): New static method; inflate all generic
22154         methods and methods in open generic instances.
22155         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
22156         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
22158 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
22160         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
22162         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
22164 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
22166         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
22168         * mini-sparc.c (flushi mono_arch_output_basic_block): make
22169         it compile using Sun's compiler.
22171 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
22173         * 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.
22175         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
22177 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
22179         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
22180         code.
22181         * mini-ppc.c: handle calls outside of the allowed range with thunks
22182         allocated using the code manager.
22183         * tramp-ppc.c: use the code manager to hold generated native code.
22184         Fixed the magic trampoline to just patch vtable entries.
22186 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
22188         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
22189         independent file.
22191 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
22193         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
22194         PPC.
22196         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
22197         if we have a working __thread implementation.
22199         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
22200         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
22202 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
22204         * mini-x86.c: Fix compilation under gcc 2.
22205         
22206 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
22208         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
22209         contains a call to the wrapped function.
22211         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
22212         OP_<CALL>_IMM opcodes, and use them under X86.
22213         
22214         * mini.c (mono_jit_find_compiled_method): Fix warning.
22216         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
22218         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
22220         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
22221         functionality to mini.c.
22223         * mini.c (mono_create_jump_trampoline): New function to create a jump
22224         trampoline. Return a compiled method instead of a trampoline if it
22225         exists. Add a cache for jump trampolines.
22227         * mini.c (mono_jit_find_compiled_method): New function to return a
22228         compiled method if it exists.
22230         * mini-x86.c: Call mono_create_jump_trampoline instead of 
22231         mono_arch_create_jit_trampoline.
22233         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
22234         a jump trampoline. Fixes #52092.
22235         
22236 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
22238         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
22239         which is not up-to-date. Add check_corlib_version () instead.
22241         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
22242         have to call it.
22243         
22244         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
22245         since newer valgrind versions do not need it.
22247         * mini.c (mono_jit_compile_method_with_opt): New helper function to
22248         compile a method with a given set of optimizations.
22250         * mini.c: Compile icall wrappers on-demand instead of at startup.
22252         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
22253         wrapper for an icall.
22255 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
22257         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
22258         #54063.
22260         * iltests.il: Add test for non-empty stack before switch instruction.
22262 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
22264         * mini.c: Add support for new stringbuilder marshalling conventions.
22266         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
22268 2004-02-01  Martin Baulig  <martin@ximian.com>
22270         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
22271         in `ginst->mtype_argv'.
22273 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
22275         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
22276         facilitate grepping.
22278 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
22280         * mini.c: fixed buglet in initobj generic implementation for references.
22282 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
22284         * Makefile.am: make the version script conditional.
22285         * jit-icalls.c: handle missing truncl().
22287 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
22289         * exceptions.cs: Add more tests for double->int conversion.
22291         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
22292         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
22294 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
22296         * driver.c: make --verbose --version emit an error
22297         if the loaded corlib doesn't match the runtime version.
22299 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
22301         * mini-ppc.h: export ppc_patch().
22302         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
22303         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
22304         on par or better than on MacOSX.
22306 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
22308         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
22309         mono_lookup_pinvoke_call.
22311         * mini-x86.c: Under windows, the default pinvoke calling convention is
22312         stdcall. Fixes #52834.
22314         * mini.c (optimize_branches): Add an upper bound to the number of
22315         iterations to prevent infinite loops on strange loops. Fixes #53003.
22317 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
22319         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
22320         and ISINST. Fixes #52093.
22322         * objects.cs (test_0_vector_array_cast): New tests.
22323         
22324 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
22326         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
22327         checking in Array.Set ().
22329         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
22330         #52590.
22332         * object.cs (test_0_multi_array_cast): New regression test.
22334 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
22336         * exceptions-ppc.c: fix build on Linux/PPC.
22338 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
22340         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
22341         running under valgrind.
22342         (x86_magic_trampoline): Fix build bustage.
22344         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
22345         negative values as well. This is needed for the encoding of the line number
22346         info, since sometimes the line numbers are not in increasing order.
22348 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
22350         * cpu-pentium.md (localloc): Increase the size of the localloc 
22351         instruction since it is a loop under Win32.
22353         * debug-mini.c (record_line_number): Get rid of unneccesary memory
22354         allocation.
22356 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
22358         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
22359         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
22360         Max Horn (max@quendi.de). Fix file names in comments.
22362 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
22364         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
22365         avoid stack overflow.
22366         (replace_usage): Avoid uninitialized variable warnings.
22368         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
22369         and taking the address of valuetype variables.
22371 2004-01-03  Patrik Torstensson
22373         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
22374         for other purposes than FP later on.
22376 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
22378         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
22379         of tail calls.
22381 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
22383         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
22385 2003-12-30  Patrik Torstensson <p@rxc.se>
22387         * mini-x86.h: Decreased number of availiable fp regs.
22388         Solves corner cases with FP spilling.
22390 2003-12-23  Patrik Torstensson <p@rxc.se>
22392         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
22393         for floating point stack tracking / spilling on x86. 
22394         Fixes bug #49012.
22395         
22396         * basic-float.cs: added float mul overflow test.
22398 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
22400         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
22402 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
22404         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
22405         supports for cond branches that overflow the immediate
22406         overflow offset. mcs can compile simple programs.
22408 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
22410         * exceptions-ppc.c: exception handling support wip:
22411         finally handlers get run on exception.
22413 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
22415         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
22416         profiling.
22418 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
22420         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
22421         initial support for stack walking and unwinding.
22423 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
22425         * driver.c (mono_main): Make corlib-out-of-sync message more 
22426         descriptive. Also remove verify_corlib call.
22428 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
22430         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
22431         not overlap with other call's arguments, too.
22433 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
22435         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
22436         move to arch-specific code the choice of arch-specific
22437         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
22438         * mini.c: ensure emulation calls will not interleave
22439         with other calls.
22441 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
22443         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
22444         the magic trampoline stack frame is dropped before executing
22445         the new method.
22447 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
22449         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
22450         and integer to fp conversions. Added support for overflowing
22451         arguments on the stack. Reserve a couple more registers as temps.
22452         Added support for aot compilation (as output still needs to be
22453         tweaked, though).
22455 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
22457         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
22458         Don't overwrite return register in some corner cases.
22460 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
22462         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
22463         static constructors when AOT compiling.
22465         * driver.c (mono_main): Call mono_check_corlib_version.
22467 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
22469         * cpu-g4.md, basic.cs: fixed div target register.
22471 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
22473         * mini-ppc.c, basic.cs: shl_imm fix with test.
22475 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
22477         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
22478         structures by value. Misc fixes.
22479         * objects.cs: more tests.
22481 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
22483         * mini-ppc.c: lconv.ovf.i implemented.
22485 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22487         * mini.c:
22488         (mini_init): don't error out if someone already called g_thread_init.
22490 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
22492         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
22493         to be any type per the spec. Fix abnormal memory usage when
22494         the same object is repeatedly thrown.
22496 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
22498         * mini.c: check for overruns in IL code.
22500 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
22502         * TODO: Add/remove some todo entries.
22504 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
22506         * driver.c (mono_main): Call mono_verify_corlib.
22508 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
22510         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
22511         This has been moved to mini.c
22512         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
22513         type being casted is marshalbyref it could be a proxy, so instead of
22514         emitting the type check code, emit a call to a runtime method that will
22515         perform the check by calling CanCastTo if needed.
22517 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
22519         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
22520         methods with large stack frames under Win32.
22522 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
22524         * Makefile.am: Distribute regression tests.
22526         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
22527         at the end instead of inserting each variable into the sorted list.
22529         * linear-scan.c (mono_varlist_sort): New helper function.
22530         
22531 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
22533         * mini.c: ensure arguments and locals are within bounds.
22535 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
22537         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
22538         related fixes.
22540 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
22542         * mini.c (mono_cprop_copy_values): Fix crash.
22544         * aot.c: Set verbosity back to 0.
22545         
22546 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
22548         * regalloc.c: complete memory leak fix by Laurent Morichetti
22549         (l_m@pacbell.net).
22551 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
22553         * driver.c (main_thread_handler): Revert the previous patch.
22555         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
22556         under valgrind.
22558         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
22559         memory from the memory pool.
22561         * driver.c (main_thread_handler): Turn on all optimizations when
22562         --aot is used.
22564         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
22565         an array for better performance.
22567         * regalloc.c (mono_regstate_assign): Fix memory leak.
22569         * debug-mini.c (mono_debug_serialize_debug_info): New function to
22570         serialize the debug info.
22572         * debug-mini.c (mono_debug_add_aot_method): New function to load the
22573         debug info from the serialized representation.
22575         * aot.c: Save debug info into the generated file and load it when 
22576         loading a method.
22578         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
22580 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
22582         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
22583         More FP-related fixes.
22585 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
22587         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
22588         and register allocation buglet. Hello world now runs.
22590 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
22592         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
22593         * tramp-ppc.c: fixed class init trampoline.
22594         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
22596 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
22598         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
22599         mini.c: more ppc changes/fixes.
22601 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
22603         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
22604         Also optimize the case when the arguments are the same in the caller 
22605         and in the callee.
22607         * iltests.il: Add tests for tail calls with valuetype arguments.
22609 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
22611         * mini-ppc.c: fixes for struct return type.
22613 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
22615         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
22616         mono_spillvar_offset() to arch-specific code.
22618 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
22620         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
22622 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
22624         * exceptions-x86.c: Fix stack space leaks.
22625         
22626         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
22627         registers from the lmf if the method has save_lmf set.
22629 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
22631         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
22632         of icall wrappers into InvokeInDomain, since these are now per-domain.
22634 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
22636         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
22637         make some opcode emulation and intrinsic ops enabled/disabled 
22638         according to the architecture. More fixes.
22640 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
22642         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
22644 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
22646         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
22647         arch-specific handling for 'this' and struct return type to
22648         arch-specific code.
22650 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22652         * aot.c: prevent divide by zero error when reporting (it happened with
22653         Accessibility.dll).
22655 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
22657         * mini.h (inst_switch): Remove unused macro.
22659 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
22661         * aot.c:
22662         (load_aot_module): free 'info->methods' and 'info' properly. No more
22663         "free(): invalid pointer blah" messages when you have an old aot
22664         compiled assembly.
22666 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
22668         * jit-icalls.c, mini.c: Added support for context static fields.
22670 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
22672         * mini.c (mono_method_blittable): Methods which set LastError are not 
22673         blittable either. Fixes #51108.
22674         
22675 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
22677         * mini.c: flush icache.
22678         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
22680 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
22682         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
22684 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
22686         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
22687         safe on IA32.
22689         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
22690         vararg calls.
22692         * inssel.brg (CEE_MKREFANY): Fix AOT case.
22694 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
22696         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
22697         instruction when the result is discarded.
22699         * iltests.il (test_0_div_regalloc): New regression test.
22701         * arrays.cs: Fix compilation error.
22703 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
22705         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
22706         float rules to inssel-x86.brg: sane architectures with FP registers
22707         don't need to implement these rules.
22709 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
22711         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
22713 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
22715         * mini.h, inssel-long32.brg: fixed endianess issues in int64
22716         implementation of 32 bit systems.
22718 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
22720         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
22721         (Jeroen Zwartepoorte).
22723 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
22725         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
22726         the caller and the callee matches.
22727         
22728         * mini.c (mono_method_to_ir): Add comment.
22730         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
22731         signbit is missing on some platforms.
22733 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
22735         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
22737         * mini.c (setup_jit_tls_data): Call the new function.
22738         
22739         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
22741         * mini-x86.c: Add experimental support for fast access to the lmf
22742         structure under NPTL/Linux 2.6.x.
22744 2003-11-06  Martin Baulig  <martin@ximian.com>
22746         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
22747         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
22748         the debugger.
22750 2003-11-02  Martin Baulig  <martin@ximian.com>
22752         * mini.c (inflate_generic_field): New static method.
22753         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
22754         generic instance and the field is declared in a generic type, call
22755         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
22757 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
22759         * mini.h mini.c (mono_method_same_domain): New function to return
22760         whenever the caller and the callee are in the same domain.
22762         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
22764 2003-10-30  Martin Baulig  <martin@ximian.com>
22766         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
22767         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
22768         method parameters.
22769         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
22770         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
22772 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
22774         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
22775         propagation.
22777         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
22778         object here, so it is in the correct appdomain etc.
22780 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
22782         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
22783         already done.
22784         (mono_method_to_ir): Avoid freeing the type created returned from
22785         mono_type_create_from_typespec, since it is put into an internal cache
22786         by the function. Fixes pointer.exe.
22788         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
22789         trampolines for icalls and pinvokes as well. Fixes #33569.
22791 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
22793         * mini.c: Update after appdomain changes.
22795         * mini.c (mono_jit_compile_method_inner): Allways compile native
22796         method wrappers in the root domain, since there can only be one
22797         instance of them, whose address is stored in method->info.
22799 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
22801         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
22802         environment variable. Instead detect automatically whenever running
22803         under valgrind using the magic macro RUNNING_ON_VALGRIND from
22804         valgrind.h.
22806 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
22808         * trace.c, trace.h: New files that implement the new trace option
22809         parsing. 
22811         * driver.c: Document new --trace options.
22813         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
22814         mini-x86.c: Apply:
22816         -       if (mono_jit_trace_calls)
22817         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
22819         * mini.h: prototypes.
22820         
22821 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
22823         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
22825         * mini.c inssel.brg: Implement typedefbyref opcodes.
22827         * mini.c (mono_jit_compile_method): Remove unused local variable.
22829         * mini.c (mono_jit_compile_method_inner): Ditto.
22830         
22831 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
22833         * tramp-x86.c (x86_class_init_trampoline): Fix build.
22834         
22835         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
22837 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
22839         * mini.c (mono_no_aot): Remove unused global variable.
22841         * mini.c: Thread safety fixes.
22843 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
22845         * mini.c (mono_create_class_init_trampoline): Add a lock around
22846         class_init_hash_addr.
22848         * arrays.cs (test_0_newarr_emulation): Add new regression test for
22849         #30073.
22851         * mini.c: Decompose the NEWARR instruction before decomposing its
22852         arguments. Fixes #30073.
22854 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
22856         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
22857         convention.
22859 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
22861         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
22863         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
22865         * driver.c: Add support for compiling icall wrappers to --compile.
22867 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
22869         * inssel.brg: The empty value in class->interface_offsets is -1, not
22870         0. Fixes #49287.
22872 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
22874         * objects.cs: New test for 'is' operator on an array of interfaces.
22876 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
22878         * tramp-ppc.c: update trampoline code to support jumps
22879         and class initialization.
22881 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
22883         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
22885         * inssel.brg (OP_UNBOXCAST): Fix #46027.
22887         * inssel.brg (OP_UNBOX): Remove unused rule.
22889         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
22890         region instead of one for each method. Fixes #47813.
22892 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
22894         * exceptions.cs (test_0_nested_finally): New regression test for
22895         nested exception handlers.
22897         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
22899         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
22901         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
22902         inlining.
22904         * mini.c (mono_method_check_inlining): Make the inlining limit 
22905         configurable by an environment variable.
22906         
22907         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
22909         * mini.h: Bump AOT file version.
22911         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
22912         token, store the image along with the token, since the token might not 
22913         refer to the same image as the method containing the relocation, 
22914         because of inlining.
22916 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
22918         * mini.c (mono_precompile_assemblies): New function to compile
22919         all methods in all loaded assemblies.
22921         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
22923         * regalloc.h regalloc.c (MonoRegState): Change the type of 
22924         iassign and fassign to int*, since they can contain large negative
22925         values if the register is spilled. Also added some comments. Fixes
22926         #45817.
22928         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
22929         under Win32. Fixes #42964.
22931 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
22933         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
22935         * aot.c: Added support for AOT compiling methods which contain calls
22936         to wrappers. Currently, only remoting-invoke-with-check wrappers are
22937         handled.
22938         
22939         * driver.c (compile_all_methods): Run the compilation in a thread
22940         managed by mono. Fixes #44023.
22942         * mini.c (mono_codegen): Print full method name in verbose output.
22944         * mini-x86.c (mono_arch_patch_code): Fix warning.
22945         
22946         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
22947         jumps, since the method we are jumping to might be domain-specific.
22949         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
22951 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
22953         * inssel.brg: string chars are unsigned.
22955 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
22957         * TODO: New todo item.
22959         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
22960         which calls mono_runtime_class_init and patches the call site to
22961         avoid further calls.
22962         (mono_arch_create_class_init_trampoline): New arch specific function 
22963         to create a class init trampoline.
22964         (create_trampoline_code): Generalized so it can create
22965         class init trampolines as well.
22967         * mini.c (helper_sig_class_init_trampoline): New helper variable.
22968         (mono_create_class_init_trampoline): New function to create and cache
22969         class init trampolines.
22970         (mono_find_class_init_trampoline_by_addr): New function to lookup the
22971         vtable given the address of a class init trampoline. Used by the
22972         patching process.
22973         (mono_codegen): Generate a call to a trampoline instead of
22974         mono_runtime_class_init in LDSFLD[A].
22975         (mono_codegen): Add relocations for the new trampoline.
22976         
22977         * mini.h mini-x86.c aot.c: Added a new relocation type: 
22978         MONO_PATCH_INFO_CLASS_INIT.
22980         * mini.h: Bump AOT version number.
22982         * aot.c: Create a copy of the loaded code instead of using the original
22983         so methods which call each other will be close in memory, improving
22984         cache behaviour.
22985         
22986         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
22987         patch since it breaks the regression tests.
22988         
22989         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
22990         for the register saving instruction sequence since the 
22991         frame_state_for function in glibc 2.3.2 don't seem to detect it.
22993 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
22995         * TODO: Fix todo item && remove another.
22997 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
22999         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
23000         previous checkin.
23002         * aot.c: Moved the check for MONO_LASTAOT into the initialization
23003         function of the module.
23005         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
23006         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
23007         --no-aot command line option.
23009 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
23011         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
23012         by Bernie Solomon (bernard@ugsolutions.com).
23014         * inssel.brg: Refactor the interface offset table related code into
23015         its separate functions and add support for the AOT case.
23017 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
23019         * aot.c (mono_aot_get_method_inner): Fix memory leak.
23020         
23021         * aot.c: Added mono_aot_verbose variable and made all debugging
23022         output depend on the value of this variable.
23024         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
23025         method_label and info_label.
23027         * mini.h mini-x86.c aot.c: Added a new relocation type 
23028         MONO_PATCH_INFO_IID for klass->interface_id.
23030         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
23031         the MonoJitInfo structure.
23033         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
23034         a non-root appdomain in shared mode.
23036 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
23038         * aot.c: make aot loader less verbose. Remove free of unused variable.
23040 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
23042         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
23044         * .cvsignore: Added *.dll.
23046         * mini.c (mono_print_tree_nl): New function callable while debugging.
23048         * mini.c (mono_print_code): Export this.
23050         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
23051         patched code.
23053 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
23055         * mini.h (MonoCompile): Added 'jit_info' field.
23057         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
23058         the cfg structure, since it is needed by the AOT compiler.
23060         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
23062         * aot.c: A major rewrite. Changes include:
23063         - save exception tables for methods which have them.
23064         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
23065         to g_module_symbol.
23066         - reworked the file format so it is now much smaller and needs
23067         fewer relocation entries.
23068         
23069 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
23071         * aot.c (load_aot_module): Fix build bustage on platforms without
23072         Boehm GC.
23074 2003-09-04  Martin Baulig  <martin@ximian.com>
23076         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
23078 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
23080         * TODO: Some new optimization ideas.
23082         * aot.c: Move AOT module loading logic here from mono_assembly_open.
23084         * aot.c: Save the optimization flags used to compile the code into
23085         the AOT module.
23087         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
23088         support emitting domain specific code.
23089         
23090         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
23091         no longer domain neutral. It can be made domain neutral by compiling 
23092         with --optimize=shared.
23094         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
23095         between appdomains.
23097         * driver.c mini.h mini.c: New --no-aot debugging option which disables
23098         loading of AOT code.
23100         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
23101         
23102         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
23103         if there is no domain neutrality information.
23105 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
23107         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
23108         format version into the generated library.
23110         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
23111         callee method into the caller since one of them could be shared.
23113         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
23114         system exceptions from AOT code now works.
23116         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
23117         method if it is domain neutral and the callee is not.
23119         * graph.c (cfg_emit_one_loop_level): Fix warning.
23121 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
23123         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
23124         last checkin.
23126 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
23128         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
23129         is needed  by code which is executed before mono_runtime_init ().
23130         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
23131         
23132         * mini.c (mono_thread_abort): Fix warning.
23133         (mono_jit_compile_method): Call static constructor in the AOT case too.
23135         * aot.c (mono_compile_assembly): Fix warning.
23137 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23139         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
23141 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
23143         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
23145         * cpu-pentium.md: Fix the length of call opcodes so they include the
23146         ESP restoring instruction. Fixes #47968.
23148 2003-08-28  Martin Baulig  <martin@ximian.com>
23150         * mini-x86.c (mono_arch_call_opcode): Added support for
23151         MONO_TYPE_GENERICINST.
23153         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
23155 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
23157         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
23158         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
23160         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
23161         metadata_section.
23163 2003-08-26  Martin Baulig  <martin@ximian.com>
23165         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
23166         when reporting an error, set this to the actual error location.
23167         (mono_method_to_ir): Report the correct error location if
23168         get_basic_blocks() returned an error.
23170 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
23172         * mini.c (mono_type_blittable): OBJECT is not blittable.
23173         (mono_method_blittable): Methods which have marshalling descriptors
23174         are not blittable either. Fixes #47842.
23176 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
23178         * driver.c mini.c: Use an environment variable instead of a global 
23179         variable. Also fix the build.
23181         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
23182         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
23183         reporting this. 
23185         * driver.c mini.c: Added --with-valgrind option to turn off some
23186         code which prevents mono from running under valgrind.
23188         * mini.c (mono_emit_call_args): Fixed warning.
23190         * mini.c (mono_emulate_opcode): Fixed warning.
23192 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23194         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
23195         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
23196         regalloc.c, regalloc.h: specify available registers in arch-specific
23197         code and support floats in the regallocator (patch by Laurent Morichetti 
23198         <l_m@pacbell.net>)
23200 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
23202         * mini.c: mono_thread_current() can be called only after
23203         mono_runtime_init(): rearrange code to not call it early on.
23205 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
23207         * mini.c: allocate jump tables in the code mempools.
23209 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
23211         * mini.c, mini.h: make sure per-thread data allocated by the jit is
23212         freed.
23214 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
23216         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
23217         12 to 16.  This fixes bug #47453.
23220 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
23222         * mini-ppc.c: fixed indexed load and unsigned compares.
23224 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
23226         * mini.c: reenabled installation of handler for
23227           thread abort signal.
23229 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23231         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
23232         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
23233         until it's fixed and actually useful.
23235 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
23237         * inssel-long32.brg: couple more opcodes implemented.
23239 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
23240         
23241         * mini-sparc.c: Even more opcodes implemeted.
23243 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
23245         * mini-sparc.c: More opcodes implemented.
23247 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
23249         * mini-sparc.c: More opcodes implemented.
23251 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
23253         * inssel-sparc.brg: Add some needed rules.  Direct
23254         copy from PPC.
23255         * Makefile.am: Use inssel-sparc.brg
23256         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
23257         an assert happy for now.
23259 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
23261         * mini-sparc.c: Fixed compile errors.
23262         * exceptions-sparc.c: Same.  We now produce a mono binary 
23263         on sparc-linux.  Yea.
23265 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
23267         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
23268         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
23269         They compile, but do not work.
23271 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
23273         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
23274         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
23275         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
23276         (ct@gentoo.org).
23278 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23280         * mini.c: more opcodes implemented and better support for generics.
23282 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
23284         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
23285         * mini.c, mini.h: first cut at generics support: some new instructions 
23286         added and changed the behaviour of some of the existing ones.
23288 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
23290         * mini.c: Removed definition of metadata_shared mutex here.
23292 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
23294         * mini-x86.c: make vararg calls work for instance methods.
23296 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
23298         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
23299         returns the arguments in a separte list, now.
23301 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
23303         * aot.c, mini.c: updates for array type representation changes.
23305 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
23307         * mini.c: register function to perform jit shutdown.
23309 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
23311         * mini.c: use a faster allocator if possible.
23313 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
23315         * aot.c: some cleanups and portability changes.
23317 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
23319         * mini.c: use faster allocation for CEE_BOX if possible.
23321 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
23323         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
23324         Moved inlined mempcy code to its own function so that is can be
23325         reused. Added an inline memset function as well (optimized initobj).
23326         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
23328 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
23330         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
23332 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
23334         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
23335         arch code can setup the cpu for CLR execution, if needed.
23336         We use it on x86 to set the precision of FP operations.
23338 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
23340         * mini.c: disable some optimizations if we can guess they'll cost too
23341         much for a given method.
23343 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
23345         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
23346         
23347 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
23348         * mini.h mini.c mini-x86.c: Added instruction level coverage 
23349         info collection support.
23351 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
23353         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
23354         is now implemented in the profiling API. Get rid of a couple of
23355         unnecessary global variables.
23357 2003-06-15  Nick Drochak <ndrochak@gol.com>
23359         * basic-long.cs: tests for negative values for bigmul, and unsigned.
23360         * cpu-g4.md: add op_bigmul and op_bigmul_un
23361         * cpu_pentium.md: add op_bigmul_un
23362         * inssel-long32.brg: add rule for unsigned bigmul
23363         * mini-ops.h: define OP_BIGMUL_UN
23364         * mini-x86.c: THE BUG: handle (un)signed properly
23365         * mini.c: choose unsigned opcode if needed.
23366         This set of patches fixes bug #44291
23368 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
23370         * mini.c (optimize_branches): improved to handle all kinds of
23371         conditional branches.
23373 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
23375         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
23376         don't raise exceptions.
23378 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
23380         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
23381         to arch-specific files.
23383 2003-06-09  Martin Baulig  <martin@ximian.com>
23385         * Makefile.am (libs): Added $(LIBGC_LIBS).
23387 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
23389         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
23390         and OP_ATAN (fixes bug#44293).
23392 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
23394         * Makefile.am, mini-x86.c: rename cpu description array to
23395         pentium_desc, since some compilers define the 'pentium' preprocessor
23396         symbol.
23398 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
23400         * mini.c (mini_select_instructions): add explicit branch if the
23401         following block is not the false target of a conditional branch -
23402         we need this with any optimization that reorder or remove bblocks
23404         * mini.c (optimize_branches): bug fixes
23406 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
23408         * mini.c (mono_method_to_ir): inline static readonly fields
23410         * ssa.c (fold_tree): start cfold support for long (very simple
23411         cases only)
23413         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
23415 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
23417         * inssel.brg: fixed memcpy (bug #44219).
23419 2003-06-05  Dick Porter  <dick@ximian.com>
23421         * driver.c: Set the glib log levels to not abort if g_message
23422         recurses.
23424         g_set_prgname() has to happen before mini_init() so that the
23425         process handle gets the info.
23426         
23427 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
23429         * driver.c: add intrins to the default optimizations to get wider
23430         exposure.
23432 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
23434         * mini.h: some large basic blocks will overflow a 16-bit
23435         integers for symbolic registers.
23437 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
23439         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
23440         (mono_arch_output_basic_block): fix bug 43499 
23442 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
23444         * mini.c: kill duplicated definition of mono_debug_format.
23446 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
23448         * mini-x86.c, arrays.cs: fixed register allocation bug.
23450 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
23452         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
23454         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
23456 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23458         * mini.c:
23459         (print_method_from_ip): also print source location information if
23460         available.
23462 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
23464         * mini.c (mono_find_block_region): bug fix in region code
23465         (mini_method_compile): enable removing unreachable code again, but
23466         only in methods without exception clauses.
23468 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
23470         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
23471         Implemented arglist opcode and handling of TypedReference type.
23472         Fixed x86 call convention when a structure is returned.
23473         Minimal support for calling static vararg methods.
23475 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
23477         * mini.c (mini_method_compile):  always remove unreachable code,
23478         because the code in them may be inconsistent  (access to dead
23479         variables for example).
23481 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
23483         * driver.c, debug-mini.c: warning fixes.
23485 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
23487         * Makefile.am, jit.h, mini.h: install header for embedding mono.
23489 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
23491         * mini.c: thread-static fields are registered in mono_class_vtable(),
23492         so ensure the function is called before checking for them.
23494 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
23496         * mini.c (optimize_branches): fix for bug 43586
23498         * jit-icalls.c (mono_llmult_ovf): added an additional check for
23499         overflow (fixes Bug #43639)
23501 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
23503         * mini.c, objects.cs: allow the use of stobj for primitive types.
23505 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
23507         * mini.c: be less strict about argument checking until we support
23508         running the verifier.
23510 2003-05-27  Nick Drochak <ndrochak@gol.com>
23512         * basic-long.cs: tests for (ulong)int * (ulong)int also
23513         * mini.c: use the same trick for (ulong)int * (ulong)int
23515 2003-05-27  Nick Drochak <ndrochak@gol.com>
23517         * basic-long.cs: add regression test for (long)int * (long)int
23518         * cpu-pentium.md: add op_bigmul specification
23519         * inssel-long32.brg: add OP_BIGMUL rule
23520         * mini-ops.h: add OP_BIGMUL
23521         * mini-x86.c: register allocator: handle case where src1 needs to be
23522         in EAX.
23523         * mini.c: substitute special BIGMUL opcode in the tree for 
23524         (long)int * (long)int
23526 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
23528         * jit-icalls.c: call the type ctor on field access if needed.
23530 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
23532         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
23533         to a method (including results of ldelema, bug#43207).
23535 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
23537         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
23538         colors to show exception handler blocks.
23540         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
23541         (fix for pinvoke7.cs).
23543 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
23545         * mini.h, mini.c: ensure correct initialization order for types that
23546         require it. Prepare for lazy compilation of jit icall wrappers.
23547         Provide a name for opcode emulation to reduce unneeded mallocing.
23549 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
23551         * mini-x86.c: better register restoring code and profiling
23552         support for tail calls.
23554 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
23556         * mini.h, driver.c: prepare for leaf methods optimization.
23558 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
23560         * mini.c: get targets of branches before converting a method.
23562 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
23564         * mini.c (optimize_branches): added some experimental code (disbaled) 
23566 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
23568         * mini.c (optimize_branches): fix branch to branch optimization 
23570         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
23572         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
23574         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
23576         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
23577         if needed.
23579 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
23581         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
23582         enable use of interface variables again.
23584         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
23585         I1 to registers because there is no simply way to sign extend 8bit
23586         quantities in caller saved registers on x86.
23588         * inssel-float.brg: set costs of some rules to 2 so
23589         that monobure always select the arch. specific ones if supplied,
23590         regardless of the order we pass the files to monoburg.
23592 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
23594         * mini.c, mini-x86.c: since the magic trampoline for jumps
23595         can't patch the code directly, we do it as soon as the
23596         method gets compiled.
23598 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
23600         * mini-x86.c, mini.h: introduce a new patching method
23601         to support CEE_JMP and tail calls.
23602         * mini.c: obey tail.call. Don't precompile methods target
23603         of CEE_JMP.
23604         * tramp-x86.c: new trampoline code to handle methods
23605         reached through a jump.
23607 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
23609         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
23610         bit values to registers
23612 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
23614         * mini.c (mono_compile_get_interface_var): share interface
23615         variables if possible.
23617 2003-05-16  Martin Baulig  <martin@ximian.com>
23619         * debug-mini.c (mono_init_debugger): New function to initialize
23620         the debugger.  This is not in the debugger since it needs to
23621         access some of mini's internals.
23623 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
23625         * mini.c (mono_method_to_ir): inlining fixes/cleanups
23627 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
23629         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
23630         for value type handling.
23632 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
23634         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
23635         (mono_method_check_inlining): enable inlining of all kinds of wrappers
23637 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
23639         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
23640           the constructor through a proxy.
23642 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
23644         * jit-icalls.c, inssel.brg: fixes to array element address
23645         calculations.
23647 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
23649         * mini-x86.c (is_regsize_var): allocate pointer to registers
23651 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
23653         * driver.c: fixed typo, added intrins to the set of optimizations
23654         tested with regressions.
23656 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
23658         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
23659         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
23660         test case.
23662 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
23664         * inssel.brg: remove some common pop instructions without side effects
23666 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
23668         * inssel-x86.brg: fixed thinko in int to double conversions.
23670 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
23672         * mini.c, jit-icalls.c: added runtime thread-static variable support.
23674 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
23676         * inssel-long32.brg: two more missing instructions.
23678 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
23680         * mini.c (mono_emit_call_args): set the cil_code for all arguments
23681         if not already set.
23683 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
23685         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
23686         correctly.
23688         * basic-float.cs: Added tests for negative zero.
23690 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
23692         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
23693         a couple of missing operations for long casts, with test cases.
23695 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23697         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
23699 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
23701         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
23702         code size estimation.
23704 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
23706         * mini.c (mono_jit_create_remoting_trampoline): make it work with
23707         abstract methods (fix bug 42542)
23709         * aot.c: add ability to handle array types
23710         
23711 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
23713         * mini.c: Call the _specific versions of the object allocation
23714         functions if possible.
23716 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
23718         * driver.c: call setlocale ().
23720 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
23722         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
23723         windows build.
23725 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
23727         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
23729         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
23730         wrappers (fix bug 42122)
23732 2003-05-04  Martin Baulig  <martin@ximian.com>
23734         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
23736         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
23737         s/mini_set_defaults/mono_set_defaults/g.
23739 2003-05-04  Martin Baulig  <martin@ximian.com>
23741         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
23743 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
23745         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
23746         (reported by Don Roberts).
23748 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
23750         * mini.c: temporarily work around two bugs for this release.
23752 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
23754         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
23755         that contains -export-dynamic and it makes using the ld script
23756         useless.
23757         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
23759 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
23761         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
23762         specific cpu.
23764 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
23766         * mini.c: make sure leave calls all the needed finally blocks,
23767         even when the target jumps out of multiple exception clauses.
23769 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
23771         * ldscript, Makefile.am: add linker script to reduce the number of
23772         exported symbols (should also fix the issues with libwine defining
23773         some of the same symbols in io-layer).
23775 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
23777         * driver.c (mini_main): Avoid assertion when no file name is given on 
23778         the command line.
23780 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
23782         * driver.c: added --version/-V command line option.
23783         Added the inline optimization in the regression tests.
23785 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
23787         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
23788         to the type in the method signature (fixes bug#42134).
23790 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
23792         * mini.c: when inlining, check this is not null only when needed (bug #42135).
23794 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
23796         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
23798 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23800         * driver.c: fixed bug #42100.
23802 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
23804         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
23806 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
23808         * mini.c: moved most of the code required to do inlining to its own
23809         function so it can be reused. Inline also ctors if appropriate.
23811 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
23813         * Makefile.am: Link with -export-dynamic so shared libs loaded by
23814         the runtime can call mono API functions.
23816 2003-04-27  Martin Baulig  <martin@ximian.com>
23818         * debug-mini.c (mono_debug_init_method): Added
23819         `guint32 breakpoint_id' argument; if the method has a breakpoint,
23820         send a notification to the debugger.
23822         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
23823         running in the Mono Debugger, just pass the breakpoint number to
23824         mono_debug_init_method().
23826         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
23828 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
23830         * mini.c: allow some more unsafe compares.
23832 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
23834         * mini-x86.c, Makefile.am: make distcheck works (partially from
23835         a patch by Richard Lee <r.h.lee@attbi.com>).
23836         * regset.c, regset.h: removed, they are unused.
23838 2003-04-25  Dick Porter  <dick@ximian.com>
23840         * driver.c: Usage reports the name as 'mono' not 'mini'
23841         * exceptions-x86.c: Build and run on freebsd
23843 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
23845         * Makefile.am: install the program with the 'mono' name and
23846         the library as libmono instead of mini and libmini.
23848 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
23850         * driver.c: provide the APIs for the embedding interface of the old jit.
23852 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
23854         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
23856 2003-04-23  Martin Baulig  <martin@ximian.com>
23858         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
23860         * driver.c: Added `--debug' command line argument to enable
23861         debugging support.
23863 2003-04-23  Martin Baulig  <martin@ximian.com>
23865         * debug.[ch]: Removed.  The code is now in
23866         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
23868         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
23869         last six months.
23871 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
23873         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
23875 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
23877         * mini.c:
23878         (mini_cleanup): moved mono_runtime_cleanup call after the call to
23879         mono_domain_finalize.
23880         (mini_method_compile): use mono_method_profile* if the the option is
23881         enabled.
23883 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
23885         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
23886         methods with their wrapper.
23888         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
23889         methods with their wrapper.
23891         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
23892         their wrapper.
23894         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
23895         wrapper.
23897         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
23898         methods.
23900 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
23902         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
23904 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
23906         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
23907         of the mempool. This is slightly faster and uses less memory
23909 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
23911         * mini.c: avoid O(n) allocation for variables.
23913 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
23915         * mini.c: handle items on the stack after inlining methods.
23917 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
23919         * mini.c: make the method->opcode optimization dependent
23920         on MONO_OPT_INSTRINS and do it lazily.
23922 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
23924         * driver.c: print overall results at the end of regression run.
23926 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
23928         * inssel.brg: don't overwrite symbolic registers.
23930 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
23932         * inssel-x86.brg: fix conversion from long to float.
23934 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
23936         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
23938 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
23940         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
23942         * driver.c: Added --print-vtable option as in the old JIT.
23944 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
23946         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
23948 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
23950         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
23952 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
23954         * mini.c regalloc.c regalloc.h: Fix memory leak.
23956 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
23958         * aot.c (mono_aot_get_method): register all used strings
23960 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
23962         * mini.c: always intern strings references with ldstr at compile time.
23964 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
23966         * Makefile.am: add BUILT_SOURCES.
23968 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
23970         * driver.c: give a better error message when the assembly to execute
23971         doesn't have an entry point.
23973 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
23975         * Makefile.am: added hack for automake
23977         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
23978         correct sematics.
23980         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
23982 22003-04-07  Martin Baulig  <martin@ximian.com>
23984         * Makefile.am: Added Makefile.am.
23986         * debugger-main.c: Removed, this is now in the debugger where it
23987         belongs.
23989         * mini.pc.in: Call this package `mini' for the moment.