2009-02-09 Geoff Norton <gnorton@novell.com>
[mono-project.git] / mono / mini / ChangeLog
blob18a8c8ed6b181b1d3b8507d6e015f4ff4efdd641
1 2009-02-10  Zoltan Varga  <vargaz@gmail.com>
3         * unwind.c (mono_unwind_get_dwarf_data_align): New helper function.
4         (mono_unwind_get_dwarf_pc_reg): Ditto.
6         * aot-compiler.c (emit_dwarf_abbrev): Another large reorganization.
7         Move almost all platform specific code to a set of arch_ functions, 
8         and document them to ease porting.
9         
10         * aot-compiler.c (mono_xdebug_init): Fix xdebug support.
12         * image-writer.h image-writer.c: New files, extracted from aot-compiler.c.
14         * aot-compiler.c: Extract the image writing functionality into a separate
15         module to reduce the size of this file.
17 2009-02-09  Geoff Norton  <gnorton@novell.com>
19         * mini-s390.c: Fix the signature of emit_sig_cookie.
21 2009-02-09  Zoltan Varga  <vargaz@gmail.com>
23         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_IMAGE.
25         * aot-runtime.c (is_shared_got_patch): Ditto.
27         * aot-runtime.c (load_named_code): Cope with the fact that 
28         decode_got_entry () won't decode the patch fully if its corresponding got
29         entry is already filled.
30         
31         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): 
32         Initialize *ji.
33         (mono_arch_create_monitor_exit_trampoline_full): Ditto.
35         * tramp-amd64.c (mono_arch_create_monitor_enter_trampoline_full): Use 'code'
36         as the moving pointer instead of 'buf' for consistency with the rest of the
37         codebase.
38         (mono_arch_create_monitor_exit_trampoline): Ditto.
40         * aot-compiler.c (emit_trampolines): Add throw_pending_exception/
41         generic_class_init trampolines.
42         (add_generic_class): Extract some code from add_generic_instances () into a
43         separate function so it can be called from other places too.
44         (compile_method): Call add_generic_class () for the classes of inflated methods
45         referenced by the method.
46         (can_encode_patch): Allow references to generic parameters.
48         * aot-runtime.c: Add support the patches required by the new trampolines.
49         
50         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Add full-aot
51         support.
53         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline_full): Add
54         full-aot support.
56         * exceptions-amd64.c (mono_arch_get_throw_pending_exception_full): Rename
57         this from get_throw_pending_exception, make the signature full aot compatible.
59         * Makefile.am (fullaotcheck): New target to run full-aot tests.
61         * method-to-ir.c (inline_method): Save/Restore cfg->ret_var_set too.
63         * exceptions.cs: Add a test.
65 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
67         * unwind.c (mono_unwind_frame): Eliminate the data_align_factor argument,
68         use the DWARF_DATA_ALIGN constant instead.
70         * exception-<ARCH>.c: Update after the above change.
72         * exceptions-arm.c (mono_arch_find_jit_info): Transition this to use the
73         dwarf unwinder.
75         * mini-arm.c: Enable the dwarf unwinder.
77         * mini-trampolines.c (mono_magic_trampoline): Use mono_class_get_vtable_entry ()
78         instead of mono_class_setup_vtable ().
80 2009-02-07  Zoltan Varga  <vargaz@gmail.com>
82         * exceptions-x86.c (mono_arch_find_jit_info): Transition this to use the
83         dwarf unwinder.
85         * mini-x86.h: Enable the dwarf unwinder.
87 2009-02-06  Raja R Harinath  <harinath@hurrynot.org>
89         Fix mcs/tests/test-7.cs
90         * mini-amd64.c (mono_arch_allocate_vars): Revert change from
91         2009-02-03.
93 2009-02-06  Zoltan Varga  <vargaz@gmail.com>
95         * mini.c (print_jit_stats): Remove some unused statistics.
97 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
99         * aot-compiler.c (emit_klass_info): Update after MonoClass changes.
101 2009-02-05  Mark Probst  <mark.probst@gmail.com>
103         * jit-icalls.c (mono_helper_compile_generic_method): Don't inflate
104         the method we get from mono_object_get_virtual_method() because
105         that function does it properly, now.
107 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
109         * unwind.c (mono_unwind_ops_encode): Handle offsets greater than 32 between
110         opcodes. Fixes #472775.
112 2009-02-05  Mark Probst  <mark.probst@gmail.com>
114         * mini-exceptions.c (ves_icall_get_frame_info): Account for the
115         fact that mono_find_jit_info() sometimes returns the context
116         corresponding to the jit info in new_ctx.  Fixes #472600.
118 2009-02-05  Zoltan Varga  <vargaz@gmail.com>
120         * method-to-ir.c mini-hppa.c mini.c trace.c mini-s390x.c aot-compiler.c
121         mini-s390.c: Use mono_class_enum_basetype () instead of accessing
122         klass->enum_basetype directly.
124         * aot-compiler.c (emit_class_dwarf_info): Add support for all possible
125         enum subtypes.
127         * unwind.c: Avoid 0 sized arrays.
129 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
131         * mini-exceptions.c (mono_setup_altstack): Use a more reasonable altstack
132         size on systems with 64k pages. Fixes #471389.
134 2009-02-04  Mark Probst  <mark.probst@gmail.com>
136         Contributed under the terms of the MIT/X11 license by Steven
137         Munroe <munroesj@us.ibm.com>.
139         * mini-ppc.c (mono_arch_output_basic_block): Generate better code
140         for LOADI4_MEMBASE.  Use addi instead of addic if it's not
141         necessary.
143 2009-02-04  Mark Probst  <mark.probst@gmail.com>
145         Contributed under the terms of the MIT/X11 license by Steven
146         Munroe <munroesj@us.ibm.com>.
148         * exceptions-ppc.c (mono_arch_get_restore_context): Code size
149         comparison fix.
151         * tramp-ppc.c (mono_arch_create_generic_class_init_trampoline):
152         The trampoline can be longer on PPC64.
154 2009-02-04  Mark Probst  <mark.probst@gmail.com>
156         Contributed under the terms of the MIT/X11 license by Steven
157         Munroe <munroesj@us.ibm.com>.
159         * mini-ppc.c: Compiler warning fixes and trivial code
160         simplifications.
162 2009-02-04  Zoltan Varga  <vargaz@gmail.com>
164         * method-to-ir.c (mono_spill_global_vars): Fix problems caused by reading
165         ins->dreg which could be a hardware register, not a vreg.
167         * aot-compiler.c (emit_method_dwarf_info): Ditto.
168         
169         * mini.h (MonoCompile): Remove vreg_to_var_num array, it is no longer used.
170         (struct MonoMethodVar): Add a vreg field, holding the vreg of variable.
172         * mini.c (mono_compile_create_var_for_vreg): Set var->vreg.
173         
174         * mini-amd64.c (mono_arch_output_basic_block): Avoid reading cfg->varinfo[..]
175         ->dreg, that is not the vreg we are looking for.
177         * mini-amd64.h mini-x86.h: Enable MONO_ARCH_LIVENESS_OPS again.
179         * mini-x86.c (mono_arch_output_basic_block): Add support for LIVERANGE_START/
180         LIVERANGE_END.
182         * method-to-ir.c (mono_spill_global_vars): Add an assert to help track down
183         strange crashes.
185 2009-02-03  Zoltan Varga  <vargaz@gmail.com>
187         * mini-x86.c (mono_arch_emit_prolog): Emit unwind info.
189         * aot-compiler.c (emit_line_number_info): Fix line number emission when
190         the line diff is 0.
192         * aot-compiler.c: Add xdebug support on x86.
194         * unwind.c: Add x86 support.
195         
196         * aot-compiler.c (emit_exception_debug_info): Control the emission of
197         unwind info using a new MONO_ARCH_HAVE_XP_UNWIND define.
199         * mini.c (mini_method_compile): Ditto.
200         
201         * mini-amd64.c (mono_arch_allocate_vars): Avoid setting cfg->ret->dreg to
202         the variable index.
204         * aot-compiler.c: Add emit_push_section ()/emit_pop_section () helper functions
205         which mimic .push_section/.pop_section in GAS.
206         
207         * aot-compiler.c: Emit precise live range information for variables.
209         * mini-amd64.c (mono_arch_output_basic_block): Add OP_LIVERANGE_START/END.
211         * method-to-ir.c (mono_spill_global_vars): Compute the instructions marking
212         the live ranges of variables, and emit OP_LIVERANGE_START/END opcodes for
213         them.
215         * mini-ops.h: Add OP_LIVERANGE_START/END opcodes to mark
216         the live ranges of variables.
218         * mini.h (struct MonoMethodVar): Add two fields containing the live range
219         of the variable in terms of native offsets.
221 2009-02-03  Rodrigo Kumpera  <rkumpera@novell.com>
223         * arrays.cs: Test for Get/SetValue of array with negate lower bounds.
224         
225 2009-02-02  Mark Probst  <mark.probst@gmail.com>
227         Contributed under the terms of the MIT/X11 license by Steven
228         Munroe <munroesj@us.ibm.com>.
230         * exceptions-ppc.c (restore_regs_from_context): Correct operand
231         order (offset then base reg) for ppc_load_multiple_regs.
232         (emit_save_saved_regs) Correct operand order for
233         ppc_store_multiple_regs.
234         (mono_arch_get_call_filter): Correct operand order for
235         ppc_load_multiple_regs.
237         * mini-ppc.c (emit_memcpy): Fix operand order for
238         ppc_load_reg_update and ppc_store_reg_update.
239         (mono_arch_output_basic_block): Correct operand order for ppc_lha.
240         (mono_arch_emit_epilog): Correct operand order for
241         ppc_load_multiple_regs.
243         * tramp-ppc.c (mono_arch_create_trampoline_code): Correct operand
244         order for ppc_store_multiple_regs and ppc_load_multiple_regs.
246 2009-02-02  Mark Probst  <mark.probst@gmail.com>
248         * cpu-ppc64.md: Fixed storer4_memindex length.
250 2009-02-02  Zoltan Varga  <vargaz@gmail.com>
252         * aot-compiler.c (emit_line_number_info): Optimize the size of the emitted
253         line number info.
254         
255         * aot-compiler.c (emit_line_number_info): Optimize this.
257 2009-02-01  Zoltan Varga  <vargaz@gmail.com>
259         * aot-compiler.c: Disassemble tokens in the IL disassembly.
260         
261         * aot-compiler.c: Add debug info for methods without debug info by
262         emitting an IL file and having the line number info referencing that file.
264         * aot-compiler.c: Optimize the size of the generated line number info.
266         * aot-compiler.c: Emit line number info in xdebug mode.
268         * aot-compiler.c (mono_save_xdebug_info): Receive a MonoCompile instead of a
269         million arguments.
271 2009-01-31  Zoltan Varga  <vargaz@gmail.com>
273         * aot-compiler.c (emit_method_dwarf_info): Emit names for local variables.
275         * driver.c (mono_main): Enable debugging support automatically if XDEBUG
276         is used.
278 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
280         * basic-calls.cs: Test for the weird crash found on arm.
281         
282 2009-01-31  Rodrigo Kumpera  <rkumpera@novell.com>
284         * cpu-arm.md: Increase the size of storer8_membase_reg and
285         loadr8_membase_reg to 24 bytes to accomodate the extra add.
287         * mini-arm.c (mono_arch_output_basic_block): Under FPA, when emitting
288         OP_STORER8_MEMBASE_REG and OP_LOADR8_MEMBASE_REG, add the original
289         reg to LR otherwise we'll be loading/storing from just the offset.
291 2009-01-30  Miguel de Icaza  <miguel@novell.com>
293         Question: if we are storing gint32's inside the "*native_offset",
294         should we change the signature to "gint32 *native_offset" to
295         ensure that we do not have type definition problems?
296         
297         * mini-exceptions.c (ves_icall_get_frame_info): Cast the gint32 to
298         an int * as this is what the other function expects, causes
299         problems with Freescale's compiler that defined int32_t to be a
300         long and makes int incompatible 
302 2009-01-30  Miguel de Icaza  <miguel@novell.com>
304         * Rename generic-sharing.c to mini-generic-sharing.c to avoid the
305         filename conflict with bjam.
307 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
309         * cpu-arm.md: Increase the size of storer8_membase_reg to 20 bytes
310         as it might use decomposed ops.
312 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
314         * jit-icalls.c (mono_imul_ovf): Fix one of the literals.
316         * mini.c (mini_init): Emulate mul.ovf opcodes if MONO_ARCH_EMULATE_MUL_OVF
317         is defined.
319         * mini-arm.h (MONO_ARCH_EMULATE_MUL_OVF): New define.
321         * mini-arm.c (mono_arch_build_imt_thunk): Rewrite this to allow large vtable
322         offsets.
324         * mini-arm.c (mono_arch_context_get_int_reg): Adapt this to the "clever"
325         way registers are stored in MonoContext on arm.
327         * unwind.c: Rewrite the handling of the cached_info array to use hazard pointers
328         instead of locking so mono_get_cached_unwind_info () becomes signal safe.
330         * mini.c (mini_init): Emuate OP_FCONV_TO_I when using soft float.
332         * mini-arm.c (emit_load_volatile_arguments): Avoid an unneccesary assert.
334         * mini.c (mini_init): Register mono_isfinite.
336         * jit-icalls.c (mono_isfinite): New jit icall.
338         * method-to-ir.c (mono_decompose_soft_float): Add support for OP_CKFINITE.
339         
340         * exceptions-arm.c (mono_arch_find_jit_info): When unwinding using the LMF,
341         set esp to ARMREG_FP instead of R12, since R12 stores the value of sp for
342         the parent frame.
344 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
346         * exceptions-arm.c (mono_arch_find_jit_info): The frame layout on arm have
347         separate frame and stack pointers, so we must use FP to find the register
348         spill area.
349         The FP reg is retrieved from the MonoContext::regs array.
351 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
353         * mini-arm.c (mono_arch_output_basic_block): Emit two cond ops for OP_FBGE
354         as FPA requires it.
356 2009-01-30  Rodrigo Kumpera  <rkumpera@novell.com>
358         * mini-arm.c (mono_arch_emit_setret): Emit OP_FMOVE for methods that
359         return R4 and R8 when not running under softfloat.
361         Fixes basic-calls.exe
363 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
365         * mini-arm.c: Implement some overflow opcodes.
367 2009-01-29  Miguel de Icaza  <miguel@novell.com>
369         * ssa.c: handle another alloca.h
371         * mini-exceptions.c (mono_handle_native_sigsegv): Do not use
372         PLATFORM_WIN32 for detecting if we have sigaction.   Instead use
373         MONO_ARCH_USE_SIGACTION. 
375         * aot-runtime.c, mini-exceptions.c: Replace platform define with
376         capability defines.
378         * method-to-ir.c (mono_method_to_ir): Type cast fix on some platforms.
380         * mini-ppc.h (MONO_ARCH_USE_SIGACTION): Do not define this for all
381         PPC targets as sigaction does not exist on all platforms, define
382         this on a per-platform basis.
384         Instead of erroring out if the platform is not defined, include
385         mini-ppc-os.h, and expect that the OS specific setting provides
386         the required information.   
388 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
390         * aot-compiler.c: Fix --enable-minimal=aot.
392 2009-01-30  Zoltan Varga  <vargaz@gmail.com>
394         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Fix the
395         previous change.
397 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
399         * exceptions-arm.c: Fix warnings.
401         * tramp-arm.c aot-compiler.c unwind.h unwind.c: Implement xdebug support for
402         ARM.
404         * mini-x86.c: Fix --enable-minimal=jit build.
406         * mini.c: Really fix --enable-minimal=jit build.
407         
408         * mini.c (construct_object_context_for_method): Move this outside
409         the DISABLE_JIT block to fix the --enable-minimal=jit build.
411         "Backported" of r124984 from 2.0 branch.
412         
413         * aot-compiler.c aot-runtime.c: Add full-aot support delegate BeginInvoke/EndInvoke.
415         "Backport" of r124977 + r124978 from 2.0 branch.
416         
417         * exceptions-arm.c (mono_arm_throw_exception_by_token): New helper function
418         to avoid calling mono_exception_from_token () from the throw trampoline.
419         (mono_arch_get_throw_exception_generic): call throw_exception_by_token
420         for throwing corlib exceptions, this fixes full-aot support for corlib
421         exceptions.
423         * aot-compiler.c (compile_method): Make a copy of cfg->locals to fix the build.
425 2009-01-29  Miguel de Icaza  <miguel@novell.com>
427         * mini-darwin.c, mini-windows.c, mini-posix.c: Commit the first
428         part of the changes to split the code in mini into operating
429         system specific files.
431         This patch was done by copying mini.c to the respective files to
432         preserve SVN history.
434 2009-01-29  Zoltan Varga  <vargaz@gmail.com>
436         * aot-compiler.c (emit_method_dwarf_info): Add minimal support for locals.
438 2009-01-28  Zoltan Varga  <vargaz@gmail.com>
440         * method-to-ir.c (mono_method_to_ir): Avoid generic sharing for calls made to
441         remoting-invoke-with-check wrappers of shared methods.
443         * mini.c (print_jit_stats): Print out major gc count/time for libgc too.
445 2009-01-27  Mark Probst  <mark.probst@gmail.com>
447         * method-to-ir.c (emit_stloc_ir): Only apply the reg-reg move
448         optimization if the top of stack is the last instruction in the
449         bblock.  Otherwise it might have been used after its definition.
450         Fixes #469742.
452 2009-01-27  Zoltan Varga  <vargaz@gmail.com>
454         * mini-trampolines.c (mono_magic_trampoline): Print out the caller
455         method as well when get_vcall_slot () fails to match a code sequence.
457         * mini-arm.c: Fix the android build, which doesn't have
458         __aeabi_read_tp.
460 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
462         * mini-s390x.c: Remove a stray declaration of emit_sig_cookie () to fix
463         the s390x build.
465 2009-01-26  Rodrigo Kumpera  <rkumpera@novell.com>
467         * unwind.c (mono_unwind_cleanup): Don't crash if cached_info is NULL.
469 2009-01-26  Zoltan Varga  <vargaz@gmail.com>
471         * mini.c (mini_method_compile): Save the unwind info generated by the JIT
472         and put its id into jinfo->used_regs. This is only used on amd64,
473         which is currently the only platform generating unwind info.
475         * exceptions-amd64.c: Instead of unwinding based on a register mask, use
476         the dwarf unwinder. This is required to correctly handle async exceptions
477         like thread abort and stack overflows, which can happen while a method
478         is in the middle of its prolog or epilog.
479         
480         * aot-runtime.c (mono_aot_get_unwind_info): New helper function to obtain
481         the unwind info belonging to an AOTed method.
483         * aot-compiler.c aot-runtime.c: Save/Load the unwind info emitted by the JIT
484         into cfg->unwind_ops.
485         
486         * unwind.c (mono_unwind_frame): Use <= instead of < for the loop exit check.
488         * mini.c (mini_init): Call mono_unwind_init ().
489         (mini_cleanup): Call mono_unwind_cleanup ().
491         * unwind.c: Add functions for managing a set of unwind info entries, allowing
492         unwind info to be shared between methods.
494         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info for the registers
495         saved in the LMF.
497         * exceptions-amd64.c (mono_arch_exceptions_init): Call 
498         get_throw_pending_exception () to avoid initialization races.
500         * mini-exceptions.c (mono_exceptions_init): Call an arch specific
501         mono_arch_exceptions_init () function.
503         * mini.h (MONO_INST_NEW): Remove duplicate setting of cil_code.
505 2009-01-25  Zoltan Varga  <vargaz@gmail.com>
507         * mini.c (mono_get_domain_intrinsic): New helper function.
508         (mono_get_thread_intrinsic): Ditto.
510         * mini-arm.c mini-ia64.c: Use the new helper functions.
511         
512         * method-to-ir.c (mono_method_to_ir): Fix the comment for
513         the last constrained_call change, since it is needed in the non-AOT
514         case as well.
516         * mini-arm.c: Implement OP_TLS_GET on arm eabi linux.
517         
518         * mini-arm.c (mono_arch_emit_prolog): Add an inlined version of 
519         mono_get_lmf_addr () on arm eabi linux.
521 2009-01-24  Zoltan Varga  <vargaz@gmail.com>
523         * mini-amd64.c (mono_arch_get_vcall_slot): Handle yet another
524         code sequence which matches a non-virtual call.
526 2009-01-23  Mark Probst  <mark.probst@gmail.com>
528         * mini-ppc.c (mono_arch_context_get_int_reg): Allow access to the
529         stack pointer (r1).
531 2009-01-23  Zoltan Varga  <vargaz@gmail.com>
533         * aot-compiler.c aot-runtime.c: Treat delegate-invoke wrappers similarly to
534         runtime-invoke wrappers, since they are also shared based on signature.
536 2009-01-22  Mark Probst  <mark.probst@gmail.com>
538         * mini-exceptions.c (ves_icall_get_frame_info): Fetch the generic
539         info from the (correct) context.
541 2009-01-22  Zoltan Varga  <vargaz@gmail.com>
543         * unwind.c (mono_unwind_frame): Remove a stray g_free ().
544         
545         * unwind.c (mono_unwind_frame): New function to unwind through a frame
546         using dwarf unwinding info. Not yet used.
548         * mini.c (mini_init): When using xdebug, disable freeing of domains.
550 2009-01-21  Mark Probst  <mark.probst@gmail.com>
552         * mini-ppc.c (mono_arch_delegate_invoke_impl): Return function
553         descriptors.
555         * mini-trampolines.c (mono_delegate_trampoline): Remove the PPC64
556         special case and handle mono_arch_delegate_invoke_impl() returning
557         function descriptors.
559         * tramp-ppc.c (mono_arch_create_trampoline_code): Delegate
560         trampolines return function descriptors, too.
562 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
564         * method-to-ir.c (handle_alloc): Avoid generic instances in the
565         out_of_line optimization.
567 2009-01-21  Martin Baulig  <martin@ximian.com>
569         * mini.h
570         (MonoCompile): Added `disable_deadce_vars' to disable removing
571         unused variables.
573         * mini.c
574         (mini_method_compile): Set `cfg->disable_deadce_vars' when running
575         inside the debugger.
577         * liveness.c (mono_analyze_liveness): Don't remove any unused
578         variables if `cfg->disable_deadce_vars' is set.
580 2009-01-21  Mark Probst  <mark.probst@gmail.com>
582         * method-to-ir.c: Only apply exception constructor optimization if
583         the the method actually belongs to an exception class.  Fixes
584         #467456.
586 2009-01-21  Zoltan Varga  <vargaz@gmail.com>
588         * mini-trampolines.c (mono_delegate_trampoline): Put back the previous
589         change inside a #ifdef __mono_ppc64__.
591         * aot-compiler.c (compile_method): Remove the previous limitation.
593         * method-to-ir.c (method-to-ir.c): Add support for the constrained prefix
594         on type variables in AOTed code.
595         
596         * aot-compiler.c (compile_method): Skip generic methods having type 
597         constraints on their generic parameters.
599         * aot-compiler.c (compile_method): Check for methods which cannot be
600         encoded inside RGCTX_FETCH patches as well.
602         * mini-exceptions.c (mono_print_thread_dump): Fix the windows
603         build.
605 2009-01-20  Mark Probst  <mark.probst@gmail.com>
607         * method-to-ir.c: Force the vtable variable in shared generic code
608         for the case that they might show up on a stack trace where they
609         are needed.
611         * mini-exceptions.c: Save and use generic sharing info as well as
612         IP in stack traces to resolve shared generic instantiations.
614 2009-01-20  Zoltan Varga  <vargaz@gmail.com>
616         * mini-trampolines.c (mono_delegate_trampoline): Revert the change which
617         added a mono_get_addr_from_ftnptr () as it breaks the ia64 build.
619 2009-01-20  Mark Probst  <mark.probst@gmail.com>
621         * method-to-ir.c: Do generic sharing for array constructors.
623 2009-01-20  Rodrigo Kumpera  <rkumpera@novell.com>
625         * mini-exceptions.c (mono_print_thread_dump): Add information
626         about the thread state using wapi_current_thread_desc.
628 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
630         * basic-simd.cs: Tests for the new constructors. 
632 2009-01-19  Rodrigo Kumpera  <rkumpera@novell.com>
634         * mini-ops.h: Added OP_EXPAND_*
636         * cpu-x86.md: Same.
638         * mini-x86.c (mono_arch_output_basic_block): Same.
639         
640         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for single element constructors.
642 2009-01-19  Zoltan Varga  <vargaz@gmail.com>
644         * iltests.il.in: Add a test for #467385.
646 2009-01-18  Rodrigo Kumpera  <rkumpera@novell.com>
648         * mini.c (mini_thread_cleanup): Don't cleanup TLS storage if the
649         thread been cleaned up is not the same currently in execution.
651         Fixes appdomain-unload crashes on windows, osx and linux variants
652         without the __thread keyword.
654 2009-01-18  Zoltan Varga  <vargaz@gmail.com>
656         * mini-arm.c (mono_arch_flush_icache): Applied patch from Koushik Dutta
657         (koush@koushikdutta.com). Implement this for android.
659         * helpers.c (mono_disassemble_code): Avoid assembler errors if the id
660         begins with a digit.
662         * method-to-ir.c: Call mono_gc_get_write_barrier () instead of
663         mono_marshal_get_write_barrier ().
665 2009-01-17  Rodrigo Kumpera  <rkumpera@novell.com>
667         * decompose.c (mono_decompose_vtype_opts): Fix the decomposition
668         of OP_VCALL_* ops for 8 bytes vtypes on 32 bits archs and platorms
669         that pass them on a register pair.
671         This affects windows, OSX and FreeBSD. The mono/tests/handleref.exe
672         test was crashing due to that.
674 Fri Jan 16 15:21:21 CET 2009 Paolo Molaro <lupus@ximian.com>
676         * exceptions-ppc.c: tweaks from malc (OV-Soft) to fix the size of the
677         trampoline code. Include ucontext.h only if available.
679 2009-01-15  Mark Probst  <mark.probst@gmail.com>
681         * mini.c: mono_domain_lookup_shared_generic() takes an open method
682         and doesn't check whether it's sharable, like it was before
683         removing the shared generics hash.  This brings IronPython
684         performance back to what it was before that change.
686 2009-01-14  Mark Probst  <mark.probst@gmail.com>
688         * method-to-ir.c: Handle delegate invocation optimization earlier,
689         otherwise it would be handled (much more slowly) by the
690         final/sealed optimization.
692 2009-01-13  Zoltan Varga  <vargaz@gmail.com>
694         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes when the current thread or
695         domain is not set. Fixes #465864.
697 2009-01-12  Mark Probst  <mark.probst@gmail.com>
699         * method-to-ir.c: Don't stop sharing of generic methods with catch
700         clauses - we already handle those.
702 2009-01-12  Mark Probst  <mark.probst@gmail.com>
704         * mini.c, mini.h: lookup_generic_method() is now
705         mono_domain_lookup_shared_generic() and uses the jit_code_hash,
706         making the shared_generics_hash obsolete.
708 2009-01-12  Mark Probst  <mark.probst@gmail.com>
710         * mini-ppc.c, exceptions-ppc.c, cpu-ppc.md, cpu-ppc64.md: Don't
711         use the red zone.  Make room on the stack first and then use it,
712         not the other way around.
714 2009-01-12  Zoltan Varga  <vargaz@gmail.com>
716         * mini.c (mini_init): Call mono_xdebug_init ().
718         * aot-compiler.c (mono_xdebug_init): Make this non-static.
720 2009-01-11  Zoltan Varga  <vargaz@gmail.com>
722         * TestDriver.cs: Add an --iter argument to run tests multiple times.
724         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Emit debug info for
725         trampolines.
727         * aot-compiler.c (mono_save_trampoline_xdebug_info): New function to emit
728         debug+unwind info for trampolines.
730         * mini.c (mono_create_unwind_op): New helper function.
732         * unwind.h: Add macros for emitting unwind ops without a MonoCompile.
734 2009-01-10  Zoltan Varga  <vargaz@gmail.com>
736         * aot-compiler.c: Fix the build.
738 2009-01-09  Zoltan Varga  <vargaz@gmail.com>
740         * Makefile.am: Update dtrace-prelink.sh location.
742 2009-01-08  Zoltan Varga  <vargaz@gmail.com>
744         * method-to-ir.c (mono_method_to_ir): Fix the check for the mscorlib ldstr 
745         optimization. Fixes #464520.
747 2009-01-07  Bill Holmes  <billholmes54@gmail.com>
749         * mini-amd64.c : Adding code to save/restore non-volatile registers
750            on Winx64.
752         * exceptions-amd64.c : Adding code to save/restore non-volatile 
753           registers on Winx64.
755         Contributed under MIT/X11 license.
757 2009-01-07  Zoltan Varga  <vargaz@gmail.com>
759         * mini-arm.c (mono_arch_flush_icache): Use __GNUC_PREREQ instead of checking
760         __GNUC_MINOR__ which can break when the major version changes.
762 2009-01-07  Rodrigo Kumpera  <rkumpera@novell.com>
764         * basic-simd.cs: Add tests for usage of the sizeof opcode.
766 2009-01-07  Geoff Norton  <gnorton@novell.com>
768         * helpers.c:  Allow mono -v -v -v to work on darwin.
770 2009-01-05  Bill Holmes  <billholmes54@gmail.com>
772         * mini-amd64.c (mono_arch_get_vcall_slot) : Handle an additional instruction
773           pattern. 
775         Contributed under MIT/X11 license.
777 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
779         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
780         instead of directly accessing type->data.klass. Fixes #462016.
781         (mono_allocate_stack_slots_full): Ditto.
783         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
784         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
786         * aot-compiler.c (emit_plt): Fix ARM build.
788 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
790         * branch-opts.c (mono_if_conversion): Optimize this using ins->prev.
791         
792         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
793         change.
795         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
796         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
797         #463357.
799         * iltests.il.in: Add a regression test.
801 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
803         * mini-codegen.c (mono_print_ins_index): Pretty print XPHI and VPHI.
805 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
807         * basic-simd.cs: Add a regression test for #462457.
809 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
811         * mini-ops.h: Add a definition of XPHI.
813         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
815         * ssa.c (op_phi_to_move): Handle XPHI.
817         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
819         Fixes #462457
821 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
823         * method-to-ir.c (mono_emit_rgctx_calli): Fix a warning.
825 2008-12-31  Geoff Norton  <gnorton@novell.com>
827         * mini-ppc.c: The prolog size allocated can be too small for darwin
828         ppc32 under certain circumstances.  Also fix a small logic bug.
830 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
832         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
833         while loading AOT methods.
835         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
836         since only the former is nulled out after a successful cast. This prevents
837         crashes with rethrown exceptions when using --debug=casts.
839 2008-12-24  Mark Probst  <mark.probst@gmail.com>
841         * mini.h: New macro for checking whether a method is final,
842         i.e. whether the method or its class is marked final.
844         * method-to-ir.c: Use the new macro for all final-checks
845         consistently.  Fixes the crash in the System.ServiceModel tests.
847 2008-12-23  Mark Probst  <mark.probst@gmail.com>
849         * mini-exceptions.c (get_exception_catch_class): Corrected another
850         overly strict assertion.
852 2008-12-23  Mark Probst  <mark.probst@gmail.com>
854         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
855         Clobbering it is not allowed because the caller might use it as
856         the vtable register in the interface call.
858 2008-12-19  Mark Probst  <mark.probst@gmail.com>
860         * mini-exceptions.c (get_exception_catch_class): Corrected an
861         overly strict assertion.
863 2008-12-18  Mark Mason  <mmason@upwardaccess.com>
864         
865         * method-to-ir.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P or sizeof(gpointer) when appropriate.
867         * mini.h: Move typedef to mgreg_t up above include of mini-arch.h
869         * local-propogation.c: use SIZEOF_REGISTER instead of SIZEOF_VOID_P when appropriate
871         * cpu-mips.md: correct lengths for certain long_ opcodes.
873         * mini-mips.h: Only emulate long operations when SIZEOF_REGISTER==4. Add missing func decl.
875         * 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().
876         
877 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
879         * exceptions-mips.c (mono_arch_find_jit_info): decode sd instructions as well when looking for registers.
880         
881 2008-12-17  Mark Mason  <mmason@upwardaccess.com>
882         
883         * mini-mips.c (mono_arch_output_basic_block): OP_JUMP_TABLE stores patch type in inst_c1, not inst_i1.
884         
885 2008-12-16  Rodrigo Kumpera  <rkumpera@novell.com>
887         * branch-opts.c (remove_block_if_useless): Even if BB0 falls through, don't add a br to the
888         next basic block.
889         
890 2008-12-16  Mark Mason  <mmason@upwardaccess.com>
892         * 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
894         * 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)
895         
896 2008-12-15  Mark Mason  <mmason@upwardaccess.com>
897         
898         * trace.c (mono_trace_enter_method): correctly handle arguments smaller than the stack slot size on big endian systems.
899         
900 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
902         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
903         gshared code. Fixes #458947.
905         * generics.cs: Add a test.
907 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
908         
909         * method-to-ir.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
910         
911         * mini-mips.c: first pass n32 code generation.
913         * mini-mips.h: datatypes and defines for n32 support.
915         * exceptions-mips.c: first pass n32 code generation.
916         
917         * tramp-mips.c: first pass n32 code generation.
918         
919         * cpu-mips.md: add long_ opcodes.
920         
921 2008-12-12  Mark Mason  <mmason@upwardaccess.com>
923         * liveness.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
925         * cfold.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
926         
927         * local-propogation.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
928         
929         * regalloc2.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
931         * mini.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
933         * mini-codegen.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
935         * ssa.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
937         * decompose.c: replace SIZEOF_VOID_P with SIZEOF_REGISTER where needed.
939         * helpers.c: for mips/n32, don't pass -mips32 to objdump
941 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
943         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
945 2008-12-12  Andrés G. Aragoneses  <aaragoneses@novell.com>
947         * driver.c: Sync --help-trace with man page (EXPR,EXPR).
949 2008-12-12  Mark Probst  <mark.probst@gmail.com>
951         * mini-ppc.h, exceptions-ppc.c, tramp-ppc.c: Create function
952         descriptors for helper functions directly in front of the code.
954 2008-12-11  Mark Probst  <mark.probst@gmail.com>
956         * method-to-ir.c: Removed an unnecessary assertion.
958 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
960         * method-to-ir.c: Merge SGEN changes from the old JIT.
962 2008-12-10  Zoltan Varga  <vargaz@gmail.com>
964         * driver.c (compile_all_methods_thread_main): Handle failure of
965         mono_get_method ().
967 2008-12-10  Mark Probst  <mark.probst@gmail.com>
969         * mini-ppc.c: Merged with mini-ppc64.c.
971         * mini-ppc.h: Define PPC_MINIMAL_PARAM_AREA_SIZE on all targets.
973         * Makefile.am: Use the same sources for PPC and PPC64.
975         * mini-ppc64.c: Removed.
977 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
979         * branch-opts.c (remove_block_if_useless): Extract fall through detection
980         code to mono_bb_is_fall_through.
981         
982         * branch-opts.c (mono_remove_critical_edges): Same.
984 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
986         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
987         expect that an OP_BR_REG will be there.
989 2008-12-09  Rodrigo Kumpera  <rkumpera@novell.com>
991         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
992         for the many branch ops. The original check miss OP_BR_REG.
994         Fixes #457574.
995         
996 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
998         * mini-mips.h mini-mips.c exceptions-mips.c tramp-mips.c: first round of changes necessary to eventually support n32.
1000 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
1002         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
1003         while holding the aot lock.
1005 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
1007         * mini-mips.c (mono_arch_output_basic_block): use mfc1/lwc1 instead of mfc1d/ldc1
1008         
1009 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
1011         * mini.c (mini_cleanup) : Adding a call to cominterop_release_all_rcws 
1012           to release all runtime callable wrappers held by the runtime.
1014         Contributed under MIT/X11 license.
1016 2008-12-09  Bill Holmes  <billholmes54@gmail.com>
1018         * tramp-amd64.c (mono_arch_create_trampoline_code_full) : Increase the code size for
1019           for Winx64.
1021         Contributed under MIT/X11 license.
1023 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
1025         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
1026         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
1028 2008-12-09  Mark Mason   <mmason@upwardaccess.com>
1030         * cpu-mips.md: fix ckfinite length
1032         * mini-mips.c: at least recognize n32 ABI when used (not yet supported)
1033         (mono_arch_lowering_pass): cleanup, rearrange for clarity
1034         (mono_arch_output_basic_block): implement OP_CKFINITE, add more asserts
1035         
1036 2008-12-08  Mark Mason   <mmason@upwardaccess.com>
1038         * exceptions-mips.c (mono_arch_find_jit_info): init new_ctx with ctx, dont' call setup_context.
1039         
1040 2008-12-08  Geoff Norton  <gnorton@novell.com>
1042         * tramp-amd64.c: r120895 stores RAX, so we need to increase the window
1043         size by 8 bytes as well.
1045 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1047         * basic-simd.cs: Fix method names for Vector16b.
1048         
1049 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1051         * basic-simd.cs: Fix method names for Vector16sb.
1053 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1055         * basic-simd.cs: Fix method names for Vector8us.
1056         
1057 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1059         * basic-simd.cs: Fix method names for Vector8s.
1060         
1061 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1063         * basic-simd.cs: Fix method names for Vector4ui.
1065 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1067         * basic-simd.cs: Fix method names for Vector2l.
1069 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1071         * basic-simd.cs: Fix method names for Vector2d.
1073 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1075         * simd-intrinsics.c (mono_emit_simd_intrinsics): Add support for intrinsics
1076         that are extension methods.
1078 2008-12-08  Rodrigo Kumpera  <rkumpera@novell.com>
1080         * basic-simd.cs: Fix method names for Vector4f.
1082 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
1084         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
1085         as such. Fixes #456669.
1087 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
1089         * mini-mips.c (mono_arch_emit_call): narrow float arguments when passing as args.
1090         
1091 2008-12-07  Mark Mason   <mmason@upwardaccess.com>
1093         * mini-mips.c (mono_arch_lowering_pass): don't handle OP_ICONV_TO_R* or OP_R*CONST
1094         (mono_arch_emit_setret): use OP_MIPS_CVTSD to return SP floats
1095         (mono_arch_output_basic_block): simplify FP load/store, handle OP_MIPS_FBLT_UN
1096         (mips_adjust_stackframe): handle FP spills
1097                 
1098         * mini-ops.h: add mips_mtc1_s2
1099         
1100         * cpu-mips.md: add mips_mtc1_s2
1101         
1102 2008-12-07  Zoltan Varga  <vargaz@gmail.com>
1104         * unwind.c: New file, move the unwind info encoding functions here from
1105         aot-compiler.c, so they could be used at runtime too.
1107 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
1109         * mini-mips.c (mono_arch_lowering_pass): handle OP_IMUL_IMM as well
1110         (mono_arch_output_basic_block): fix OP_LOCALLOC code generation
1111         
1112 2008-12-05  Mark Mason   <mmason@upwardaccess.com>
1114         * mini-mips.c: cleanup warnings
1115         (mono_arch_lowering_pass): handle OP_LOCALLOC_IMM
1116         (mips_adjust_stackframe): handle case of taking the address of stack locals
1117         
1118 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
1120         * aot-compiler.c: Implement a few functions missing from the asm writer.
1121         (emit_method_code): Only write symbols for methods when using the bin
1122         writer, since the assembler can't deal with the characters in our method
1123         names.
1125         * aot-compiler.c (is_plt_patch): ICALL_ADDR is also a plt patch.
1127         * method-to-ir.c (mono_method_to_ir): Transform aotconst+calli into a direct
1128         call.
1130         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Rework the code
1131         a bit to also restore %rax.
1133 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1135         * mini-ppc.c: Some simple merges from mini-ppc64.c.
1137 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
1139         * ssa.c (mono_ssa_compute): Only add an implicit reference at start for
1140         arguments.
1142 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1144         * exceptions-ppc.c: Merged with exceptions-ppc64.c.
1146         * mini-ppc.c, mini-ppc.h: Remove PPC_STACK_ALIGNMENT and use
1147         MONO_ARCH_FRAME_ALIGNMENT.  Struct for PPC64 function descriptors.
1149         * exceptions-ppc64.c: Removed.
1151         * Makefile.am: Use exceptions-ppc.c instead of exceptions-ppc64.c.
1153 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1155         * tramp-ppc.c, mini-ppc.c, mini-ppc.h: Merged tramp-ppc.c with
1156         tramp-ppc64.c.
1158         * Makefile.am: Use tramp-ppc.c instead of tramp-ppc64.c.
1160         * tramp-ppc64.c: Removed.
1162 2008-12-05  Zoltan Varga  <vargaz@gmail.com>
1164         * aot-compiler.c (add_generic_instances): Skip non-generic classes in
1165         the TYPESPEC table.
1167 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1169         * mini-ppc.h: Merged mini-ppc64.h with mini-ppc.h.
1171         * exceptions-ppc64.c, tramp-ppc64.c, mini-arch.h, Makefile.am: Use
1172         mini-ppc.h instead of mini-ppc64.h.
1174         * mini-ppc64.h: Removed.
1176 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1178         * mini-mips.c: introduce USE_LDC_SDC: use ldc1/sdc1 to load/store doubles, disabled by default
1179         
1180         * mini-mips.c (mono_arch_emit_outarg_vt): fix offset calculation for memcpy in structure passing.
1181         
1182 2008-12-05  Mark Probst  <mark.probst@gmail.com>
1184         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c:
1185         Removed FIRST/LAST_[GF]REG macros, to make merging PPC64 with PPC
1186         code easier.
1188 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1190         * basic-simd.cs: Tests for operator == and != on  Vector8us and Vector16b.
1192 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1194         * simd-intrinsics.c: Add support for operator == and != to Vector8(u)s and Vector16(s)b.
1196 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1198         * basic-simd.cs: Tests for operator == and != on Vector4f.
1200 2008-12-05  Rodrigo Kumpera  <rkumpera@novell.com>
1202         * simd-intrinsics.c (simd_intrinsic_emit_equality): Adapt to support Vector4f.
1204         * simd-intrinsics.c: Kill useless enum.
1206 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1208         * cpu-mips.md: add long_conv_to_ovf_i4_2
1209         * mini-mips.c: update/add various _OVF_ opcodes to fix test failures
1211 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1213         * mini-mips.c: ifdef protect automatic promotions of R4 to R8.
1214         
1215         * mini-mips.c (mono_arch_emit_setret): handle R4 case with FCONV_TO_R4 instead of FMOVE
1217 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1219         * mini-mips.c (mono_arch_output_basic_block): fix codegen for OP_OR_IMM/OP_IOR_IMM
1220         
1221 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1223         * basic-simd.cs: Add tests for new methods.
1225 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1227         * simd-intrinsics.c: Add support for operator == and !=
1228         on Vector4(u)i.
1230         * simd-methods.h: Add SN_op_Inequality and SN_op_Equality.
1232 2008-12-04  Rodrigo Kumpera  <rkumpera@novell.com>
1234         * simd-intrinsics.c: Remove ExtractByteMask intrinsics.
1236 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
1238         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
1240         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
1241         MONO_PATCH_INFO_ICALL_ADDR.
1243         * aot-runtime.c (MonoAotFileInfo): Correct order of fields.
1245         * aot-compiler.c: Resurrect full-aot support.
1247 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1249         * mini-mips.c (mono_arch_lowering_pass): handle OP_COMPARE and OP_ICOMPARE
1250         
1251 2008-12-04  Mark Mason   <mmason@upwardaccess.com>
1253         * mini-mips.c (mono_arch_output_basic_block): fix OP_IREM_UN code generation
1254         
1255 2008-12-03  Rodrigo Kumpera  <rkumpera@novell.com>
1257         * basic-simd.cs: Fix tests to work under ppc.
1258         Remove tests for methods that will be removed.
1260 2008-12-03  Mark Probst  <mark.probst@gmail.com>
1262         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
1263         generic type (via a typedef or typeref) correctly.
1265 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
1267         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
1268         diagnose an assertion failure.
1270 2008-12-02  Mark Probst  <mark.probst@gmail.com>
1272         * tramp-ppc64.c (mono_arch_create_rgctx_lazy_fetch_trampoline):
1273         Fix trampoline size.
1275         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: A few floating point
1276         conversion opcodes are implemented natively instead via emulation.
1278 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1280         * cpu-mips.md: remove mips_xori
1282         * mini-ops.h:  remove mips_xori
1284         * mini-mips.h: replace OP_MIPS_XORI with OP_IXOR
1286         * mini-mips.c (mono_arch_decompose_long_opts): Add ladd_imm, lsub, lsub_imm, lneg, lsub_ovf, lsub_ovf_un.
1287         
1288         * mini-mips.c (mono_arch_lowering_pass, mono_arch_output_basic_block): fix IXOR handling
1289         
1290 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1292         * cpu-mips.md: fix instruction lengths.
1294         * mini-mips.h: define MONO_ARCH_NO_IOV_CHECK
1296         * mini-mips.c: move most instruction rewriting into decompose_ops. Implement conditional branches and exceptions. Fix jump table patch handling. Implement add/sub OVF.
1298         * mini-ops.h: fix slti / sltiu op profiles.
1299         
1300 2008-12-02  Martin Baulig  <martin@ximian.com>
1302         * method-to-ir.c (mono_method_to_ir): Disable debugging
1303         information for the init locals block to make the debugger stop
1304         after all locals have been initalized.
1306 2008-12-02  Martin Baulig  <martin@ximian.com>
1308         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
1309         running inside the debugger.
1311 2008-12-01  Zoltan Varga  <vargaz@gmail.com>
1313         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
1314         is enabled.
1316         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
1317         alu->alu imm optimization which only shows if deadce is disabled.
1319         * aot-compiler.c: Rename the function names for the binary and asm writers
1320         so they can coexist in the same process. Rework the xdebug code to use the
1321         asm writer. This avoids the need to call into the runtime to dump the
1322         debugging info. Add more debugging info for types.
1324         * mini-<ARCH>.h: Kill MONO_ARCH_HAVE_NORMALIZE_OPCODES define.
1326         * genmdesc.c genmdesc.pl mini.h: Don't put the CEE_ opcodes into the
1327         cpu description tables, they can't occur in cpu-<ARCH>.md.
1329         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
1330         the stack in CEE_LDFLDA. Fixes #450542.
1332         * generics.cs: Add a new test.
1334 2008-12-01  Mark Mason   <mmason@upwardaccess.com>
1336         * mini-ops.h: updated MIPS opcodes
1337         * mini-mips.c: decompose long opts
1338         * mini-mips.h: decompose long opts
1339         
1340 2008-11-29  Mark Mason   <mmason@upwardaccess.com>
1342         * cpu-mips.md: fix length on int_rem_un
1343         * mini-mips.c (mips_stackframe_adjust): fix insertion of spillvars region in MIPS stackframes.
1344         
1345 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
1347         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
1349         * mini-codegen.c (mono_print_ins_index): Handle OP_VOIDCALL_MEMBASE.
1351 2008-11-29  Martin Baulig  <martin@ximian.com>
1353         * mini-exceptions.c (mono_handle_native_sigsegv): Check
1354         mono_debug_using_mono_debugger() in addition to the
1355         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
1357 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1359         * mini-ops.h: updated more MIPS opcodes
1360         * mini-mips.c: FP compare/branch working again, clean up last of CEE_ -> OP_ mappings
1361         * cpu-mips.md: Added MIPS versions of new FP compare/branch opcodes.
1362         
1363 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1365         * mini-ppc64.c: Patch the RGCTX fetch trampoline correctly.
1367 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1369         * mini-mips.c (mono_arch_emit_call): adding missing conversion to fp single when passing in integer arg register.
1370         * mini-mips.c (mips_adjust_stackframe): compensate for spill-down logic.
1371         * mini-ops.h: correct selected mips opcode entries
1372         
1373 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1375         * mini-ppc64.c, mini-ppc64.h: Enable generalized IMT thunks and
1376         make them work.
1378 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1380         * mini-ppc64.h, tramp-ppc64.c: Make generic code sharing work.
1382 2008-11-28  Mark Mason   <mmason@upwardaccess.com>
1384         * method-to-ir.c, mini-trampolines.c: protect IMG code with #ifdef MONO_ARCH_HAVE_IMT to fix compile errors.
1385         * mini-mips.c: Fixup stackframe assignments after allocation of spillvars.
1386         * mini-mips.h: disable IMT
1387         * tramp-mips.c (mono_arch_get_vcall_slot): fix offset extraction
1388         
1389 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1391         * mini-ppc64.c, mini-ppc64.h: Don't emulate long ops.
1393 2008-11-28  Mark Probst  <mark.probst@gmail.com>
1395         * mini-ppc64.c, exceptions-ppc64.c: Several fixes.
1397 2008-11-28  Zoltan Varga  <vargaz@gmail.com>
1399         * method-to-ir.c (handle_isinst): Use PCONST instead of ICONST for
1400         consistency.
1402 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1404         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1405         for Set/GetVector aligned versions.
1407 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1409         * basic-simd.cs: Add tests for Get/SetVector.
1411 2008-11-27  Mark Probst  <mark.probst@gmail.com>
1413         * mini.c: Removed g_slist_append_mempool().  Now in
1414         metadata/mempool.c.
1416 2008-11-27  Rodrigo Kumpera  <rkumpera@novell.com>
1418         * simd-intrinsics.c (mono_emit_vector_ldelema): Extract the element
1419         size properly and make the bounds check optional.
1421         * simd-intrinsics.c (emit_array_extension_intrinsics): Add support
1422         for SetVector and IsAligned.
1424 2008-11-27  Zoltan Varga  <vargaz@gmail.com>
1426         * mini.c: Remove unused mono_normalize_opcodes () function.
1428 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1430         * method-to-ir.c (mini_emit_inst_for_method): Small fix: we're
1431         using the new atomic add ops now.
1433         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Implemented atomic
1434         add.
1436 2008-11-26  Mark Probst  <mark.probst@gmail.com>
1438         * mini-ppc64.c: Several fixes.
1440 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1442         * cpu-mips.md: added jump_table
1443         * mini-mips.c: added jump_table. Eliminate compare-imm when lowering. Remove dead function.             
1445 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1447         * mini-mips.c, mini-mips.h, tramp-mips.c, cpu-mips.md: Initial upgrade of MIPS port to new IR.
1449 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1451         * mini-ops.h: corrected a handful of MIPS opcodes.
1453 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1455         * aot-compiler.c: MIPS to use ELF writer
1457 2008-11-25  Mark Mason   <mmason@upwardaccess.com>
1459         * mini-codegen.c: remove MIPS specific assert.
1461 2008-11-25  Mark Probst  <mark.probst@gmail.com>
1463         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Several
1464         fixes.  PPC64 now passes most of the runtime regressions.
1466 2008-11-24  Zoltan Varga  <vargaz@gmail.com>
1468         * regalloc2.c: Distinguish between use/def positions. Optimize the creation of
1469         volatile intervals a bit.
1471 2008-11-24  Mark Probst  <mark.probst@gmail.com>
1473         * basic-long.cs: New test case.
1475 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1477         * mini.c (mini_method_compile): Disable globalra for large methods for 
1478         now.
1480         * regalloc2.c (order_moves): Add fp support.
1482         * branch-opts.c (mono_remove_critical_edges): Split non-critical edges whose
1483         source bblock ends with an OP_BR_REG.
1485         * ratests.cs: Add a new test.
1487 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1489         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c: Disable generic code
1490         sharing.  PPC64 now passes generics.exe.
1492 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1494         * mini-ppc64.c: Several fixes.  PPC64 now runs iltests.exe.
1496 2008-11-23  Zoltan Varga  <vargaz@gmail.com>
1498         * exceptions-x86.c (mono_arch_find_jit_info): Avoid reading uninitialized
1499         memory when mono_jit_info_table_find () can't find the method in the
1500         LMF case.
1502         * aot-compiler.c (mono_save_xdebug_info): Emit complete debug info for
1503         AOTed code too.
1504         
1505         * aot-compiler.c (mono_save_xdebug_info): Make this work with the assembly
1506         writer too.
1508 2008-11-23  Mark Probst  <mark.probst@gmail.com>
1510         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, cpu-ppc64.md:
1511         Several fixes.  PPC64 now runs exceptions.exe and
1512         devirtualization.exe.
1514 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1516         * mini-ppc64.c, tramp-ppc64.c: Small fixes.  PPC64 now runs
1517         arrays.exe and basic-math.exe.
1519 2008-11-22  Mark Probst  <mark.probst@gmail.com>
1521         * mini-ppc64.c, mini-ppc64.h, exceptions-ppc64.c, tramp-ppc64.c,
1522         cpu-ppc64.md: Several fixes.  PPC64 now runs objects.exe.
1524 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1526         * simd-intrinsics.c: Add support ArrayExtension intrinsics.
1528 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1530         * method-to-ir.c: Move bounds checking macros to ir-emit.h
1532         * ir-emit.h: Move macros from method-to-ir.c to here.
1534 2008-11-21  Rodrigo Kumpera  <rkumpera@novell.com>
1536         * mini-ops.h: Correct the long simd ops to use LREG.
1538 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
1540         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
1541         
1542         * mini-ops.h: Correct the dreg type of a few long opcodes.
1544         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
1545         Add netbsd support.
1547 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
1549         * mini-ppc.c: remove negative stack references in epilog
1550         for platforms that don't support the red zone.
1552 2008-11-21  Mark Probst  <mark.probst@gmail.com>
1554         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
1555         point regs.  Now PPC64 passes basic-calls.exe.
1557 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1559         * basic-simd.cs: Add tests for accessors of Vector2l.
1561 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1563         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
1565         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
1566         
1567         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
1569 2008-11-21  Mark Probst  <mark.probst@gmail.com>
1571         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
1572         PPC64 passes basic-long.exe.
1574 2008-11-20  Mark Probst  <mark.probst@gmail.com>
1576         * decompose.c: Decompose carry and overflow add on PPC64 like on
1577         other 64 bit archs.  Don't decompose sub at all on PPC64.
1579         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
1580         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
1581         basic-long.exe.
1583 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1585         * basic-simd.cs: Add tests for accessors of Vector2d.
1587 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1589         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
1591         * cpu-x86.md: Same.
1593         * mini-x86.c (mono_arch_output_basic_block): Same.
1594         
1595         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
1597 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1599         * basic-simd.cs: Add tests for accessors of Vector4f.
1601 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1603         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
1605         * cpu-x86.md: Same.
1607         * mini-x86.c (mono_arch_output_basic_block): Same.
1608         
1609         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
1611 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1613         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
1615 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1617         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
1619         * cpu-x86.md: Same.
1621         * mini-x86.c (mono_arch_output_basic_block): Same.
1622         
1623         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
1625 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1627         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
1629 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1631         * simd-intrinsics.c: Enable setters for Vector16sb.
1633 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
1635         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
1637         * cpu-x86.md: Same.
1639         * mini-x86.c (mono_arch_output_basic_block): Same.
1640         
1641         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
1643 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
1645         * simd-intrinsics.c: Implement setter for Vector8us.
1647 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
1649         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
1650         for dead variables.
1652 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
1654         * mini-ppc.c: remove references to the red zone in the prolog
1655         (for systems that don't support it).
1657 2008-11-19  Mark Probst  <mark.probst@gmail.com>
1659         * cpu-ppc64.md: Fixed a few instruction lengths.
1661         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
1662         now.
1664 2008-11-19  Mark Probst  <mark.probst@gmail.com>
1666         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
1667         basic.exe now.
1669 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
1671         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
1673 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
1675         * mini-ops.h: Added OP_INSERT_I2.
1677         * cpu-x86.md: Same.
1679         * mini-x86.c (mono_arch_output_basic_block): Same.
1680         
1681         * simd-intrinsics.c: Implement setter for Vector8s.
1683         * simd-methods.h: Add the names of get setters of Vector8s.
1685 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1687         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
1688         
1689         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
1690         parameters.
1692         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1694 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1696         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
1697         for PPC64.  An empty program runs now.
1699 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
1701         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
1703         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
1704         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
1705         info for JITted code is emitted into a shared library, loadable into gdb.
1707 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1709         * Makefile.am: Changes to build PPC64.
1711         * mini-arch.h: Include mini-ppc64.h on PPC64.
1713 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1715         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
1716         in PPC code up to r119147.
1718 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1720         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1721         cpu-ppc64.md: Changes for PPC64.
1723         Based on code submitted by andreas.faerber@web.de at
1724         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
1725         X11/MIT license.
1727 2008-11-18  Mark Probst  <mark.probst@gmail.com>
1729         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
1730         cpu-ppc64.md: Copied from the corresponding PPC files from
1731         r118846.
1733 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
1735         * mini-ops.h: Added OP_ROUND.
1737         * cpu-x86.md: Added round.
1739         * mini-x86.c: Added support for intrinsicing Math.Round (double).
1741         * basic-math.cs: Added test_0_round to test rounding.
1743         Contributed under MIT/X11 license.
1745 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
1747         * aot-compiler.c : Fix the Winx64 build.
1749         Contributed under MIT/X11 license.
1751 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1753         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
1754         in OP_EXTRACT_R8 to avoid possible stack corruption.
1756 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1758         * mini-ops.h: Added OP_EXTRACT_R8/I8.
1760         * cpu-x86.md: Added extract_r8.
1762         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
1763         
1764         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
1765         a couple of OP_EXTRACT_I4.
1767         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
1769         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
1771 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
1773         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
1774         and not 4.1. 
1776 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
1778         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
1779         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
1781         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
1782         are not needed any more.
1784         * mini.h: Remove the unused INS_LIST macros.
1786         * mini.c (mini_method_compile): Remove a disable globalra case which is no
1787         longer needed.
1789         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
1790         ir-emit.h.
1792         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
1793         mono_alloc_ireg () instead.
1795         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
1796         macros.
1798         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
1799         on amd64.
1801         * aot-runtime.c (load_aot_module): Disable AOT when running under
1802         CAS.
1804         * mini-amd64.h: Change the monitor fastpath defines to check for
1805         !PLATFORM_WIN32 so they work on *bsd too.
1807         * mini.h mini.c mini-hhpa.c: Remove more unused code.
1809         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
1811         * mini.h (MonoCompile): Remove new_ir flag.
1813         * regalloc.h regalloc.c: Remove unused code.
1815         * cpu-*.md: Remove more unused opcodes.
1817         * simple-cee-ops.h simple-mini-ops.h: Removed.
1819         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
1820         
1821 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
1823         * aliasing.h: Removed.
1825         * *.c: Remove references to aliasing.h and inssel.h.
1827         * mini.c: Remove additional unused functions.
1829         * mini-ops.h cpu-*.md: Remove unused opcodes.
1831 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
1833         Remove the old JIT code.
1835         * inssel*.brg: Removed.
1837         * ssa.c abcremoval.c aliasing.c: Removed.
1839         * ssa2.c: Renamed to ssa.c.
1841         * abcremoval2.c: Renamed to abcremoval.c.
1843         * *.c: Removed all !cfg->new_ir code.
1845         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
1846         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
1848         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
1849         
1850 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
1852         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
1853         to simplify the code and cut back on the number of global symbols in the AOT
1854         file.
1855         
1856         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
1858 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
1860         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
1861         with the got/got_info tables.
1863         * mini.h: Bump AOT file format version.
1864         
1865         * unwind.h: New file, contains definitions for stack unwinding.
1867         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
1868         to cfg->unwind_ops.
1869         
1870         * aot-compiler.c: Generalize the emitting of unwind information to use the
1871         information in cfg->unwind_ops.
1873         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
1875         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
1876         AOT method frames. Enable writing symbols for methods by default.
1878 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
1880         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
1881         and make it work with vectors of element sizes 1, 2 and 4.
1883         * simd-intrinsics.c: Enable getter for all vectors with element size
1884         1, 2 or 4.
1886         * simd-methods.h: Add the names of other getters.
1888         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
1890         * cpu-x86.md: Same.
1892         * mini-x86.c: Same.
1894 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
1896         * mini-ppc.h: portability fix.
1898 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
1900         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
1901         buggy and will overwrite it.
1903 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1905         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
1906         Use it to emit local symbols for all methods so AOTed methods show up with
1907         their full name in gdb/valgrind output.
1909 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
1911         * mini-ppc.c: portability fixes.
1913 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
1915         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
1916         entries out of the if (!generic_shared...) code so it is always done.
1917         (mono_class_init_trampoline): Do the patching when running under valgrind
1918         too, newer versions of valgrind have no problems with it.
1920 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
1922         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
1923         further sections.
1925 2008-11-13  Mark Probst  <mark.probst@gmail.com>
1927         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
1928         filters.
1930 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1932         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
1934 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1936         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
1938         * cpu-x86.md: Same.
1940         * mini-x86.c: Same.
1942         * simd-intrinsics.c: Same.
1944 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1946         * simd-intrinsics.c: Enable constructor intrinsics for all types.
1948 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1950         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
1951         to work with more Vector types.
1953 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
1955         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
1956         store the elemens directly instead of using and intermediate.
1958 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
1960         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
1962         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
1963         to preserve %eax for aot plt trampolines.
1965         * aot-compiler.c (compile_method): Don't skip synchronized methods.
1966         (encode_method_ref): Flag synchronized methods so they won't go through
1967         the AOT trampoline.
1969         * aot-compiler.c: Additional work to support AOTing synchronized methods/
1970         wrappers.
1972         * cpu-ia64.md (jmp): Increase max length.
1974 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
1976         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
1977         open generic classes.
1979         * aot-compiler.c: Enable the ELF writer on ELF platforms.
1981         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
1982         box+brtrue optimization since it causes test failures on x86.
1984 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
1986         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
1988         * cpu-x86.md: Same.
1990         * mini-x86.c: Same.
1992         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
1993         for simd ctor values. 
1995         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
1996         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
1998 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
2000         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
2001         LogicalRightShift.
2003         * simd-instrincs.c: Same.
2005         * basic-simd.cs: Same.
2007 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
2009         * ratests.cs: Add more tests.
2011         * regalloc2.c (add_spill_code): Handle more corner cases.
2013 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
2015         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
2016         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
2017         both the source an destination of an instruction.
2019 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
2021         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
2022         wapihandles.c: more portability changes.
2024 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
2026         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
2027         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
2028         safe to execute in a signal handler and the kernel provides better
2029         the info in /proc/self/smaps. Avoid the assert on sigaction during
2030         cleanup.
2032 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
2034         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
2035         do the bblock linking hack if it is actually needed.
2037         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
2038         up linking.
2040         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
2041         crash problem is fixed.
2043         * branch-opts.c (mono_remove_critical_edges): Link up newly added
2044         bblocks.
2046         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
2047         for catch clauses.
2048         (mini_method_compile): Set the starting value of next_vreg to 
2049         MAX_IREGS + MAX_FREGS when using globalra.
2051         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
2052         filter clauses with BB_EXCEPTION_HANDLER.
2054         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
2056 2008-11-10  Mark Probst  <mark.probst@gmail.com>
2058         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
2059         space for stdcall.  Fixes regressions on Win32.
2061 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
2063         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
2064         bblocks.
2065         (linear_scan): Remove an assert which doesn't seem to be needed.
2067         * local-propagation.c (mono_local_deadce): Avoid a call to
2068         MONO_DELETE_INS which would screw up the instruction linking.
2070         * mini.c (mono_decompose_op_imm): Make this work with globalra.
2072         * regalloc2.c: Upgrade to work the current JIT code.
2074 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
2076         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
2077         case.
2079         * aot-runtime.c: Remove some dead code.
2081         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
2082         consistency.
2083         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
2085         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
2086         trampolines using sscanf since atoi doesn't work on large unsigned values.
2088         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
2089         Initialize code_size.
2091 2008-11-08  Mark Probst  <mark.probst@gmail.com>
2093         * method-to-ir.c (mini_emit_inst_for_method): Make
2094         Interlocked.CompareExchange work for Int arguments on 32 bit
2095         archs, as well.
2097 2008-11-07  Mark Probst  <mark.probst@gmail.com>
2099         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
2101 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
2103         * main.c Fix MSVC build.
2105         Contributed under MIT/X11 license.
2107 2008-11-06  Mark Probst  <mark.probst@gmail.com>
2109         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
2110         alignment larger than 8 bytes are aligned correctly, too.
2112         * mini.c: Honor the min_align field of MonoClass when laying out
2113         the stack.
2115 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
2117         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
2119         * aot-compiler.c (emit_plt): Fix a warning.
2120         
2121         * aot-compiler.c: Implement ARM support in the binary writer.
2123 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2125         * basic-simd.cs: Add test for getter with byref arg.
2126         Fix the naming of a few tests.
2127         Add missing checks to a test.
2129 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
2131         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
2133         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
2134         most of the full-aot support for monitor enter/exit trampolines.
2136         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
2137         enter/exit trampoline creation functions.
2139         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
2140         make dist.
2142 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
2144         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
2145         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
2146         implement the needed functionality without adding crap to the runtime.
2148 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
2150         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
2151         non-x86 builds.
2153         * mini.c (mono_build_date): New global version holding the build date in
2154         string format.
2155         
2156         * Makefile.am (buildver.c): Generate a file containing the build date.
2158         * main.c: Set the build date from the generated file.
2160         * mini.c (mono_get_runtime_build_info): New helper function returning build
2161         information in a string format.
2162         
2163         * driver.c (mono_main): Print the build date in --version.
2165         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
2166         file when the bind-to-runtime-version option is used.
2168 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2170         * simd-intrinsics.c: Fix bug when using getters and byref args. 
2172 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
2174         * simd-methods.h: Rename prefetch methods.
2176         * simd-intrinsics.c: Same.      
2178 2008-11-05  Mark Probst  <mark.probst@gmail.com>
2180         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
2181         sizes.
2183 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2185         * aot-compiler.c: Use the bundled elf header files instead of depending on
2186         the system one.
2187         
2188         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
2189         mempool.
2191         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
2192         on every call.
2194 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
2196         * cpu-x86.md: Add store nta ops.
2198         * mini-ops.h: Same.
2200         * mini-x86.c: Same.
2202         * mini.h: Add an enum for simd prefetch modes.
2204         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
2205         of store. Use the changed code to support store nta.
2207         * simd-intrinsics.c: Add prefetch ops for all vector types.
2209 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2211         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
2212         threads.
2213         
2214         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
2215         names.
2217         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
2218         trampolines.
2220 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2222         * mini-x86.c: Fixed commit.
2224 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2226         * aot-compiler.c (emit_plt): Align the plt section only on x86.
2228 2008-11-04  Mark Probst  <mark.probst@gmail.com>
2230         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
2231         and MONITOR_EXIT, for the ASM fastpaths.
2233         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
2234         available.
2236         * mini.c, patch-info.h: Signature and patch infos for
2237         Monitor.Enter/Exit trampolines.
2239         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
2241         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
2242         Monitor.Enter/Exit ASM fastpath for Linux.
2244 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
2246         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
2248         * objects.cs: Add a new test.
2249         
2250         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
2252         * aot-runtime.c (load_method): Run class initialization in the PLT case even
2253         if MONO_LOG_LEVEL is set.
2255         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
2257         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
2259         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
2260         
2261         * aot-compiler.c: Change the relocation code to use virtual addresses instead
2262         of file offsets. Align the sections belonging to the data segment to 
2263         PAGESIZE.
2265 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2267         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
2268         elf.h. Port it to amd64.
2270 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2272         * driver.c: Enable SIMD by default.
2274 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
2276         * cpu-x86.md: Add prefetch op.
2278         * mini-ops.h: Same.
2280         * mini-x86.c: Same.
2282         * mini.h: Add an enum for simd prefetch modes.
2284         * simd-methods.h: Add prefetch function names.
2286         * simd-intrinsics.c: Add prefetch ops for all vector types.
2288 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
2290         * aot-compiler.c (emit_bytes): Speed this up a little.
2292 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
2294         * aot-compiler.c: Add JIT time etc. statistics.
2295         
2296         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
2298         * mini.h (MonoCompile): Add 'got_offset' field.
2300         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
2301         method_got_offsets array.
2303         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
2304         wrappers.
2306         * aot-compiler.c (compile_method): Add generic method instances referenced
2307         by the method to the list of methods to be compiled, this is required so if
2308         A<T> references B<T>, and another assembly references A<int>, then it will
2309         also get a copy of B<int>.
2311         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
2312         when checking for monitor enter/exit.
2314 2008-10-30  Mark Probst  <mark.probst@gmail.com>
2316         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
2317         for Monitor.Enter and Monitor.Exit if enabled.
2319         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
2320         Solaris.
2322 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
2324         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
2325         of an OP_MOVE. Fixes #440046.
2327         * basic-long.cs: Add a new test.
2329 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2331         * mini.h: Add synchronization note for the managed counter-part.
2333         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
2334         returns the simd caps of the current cpu.
2336 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
2338         * basic-simd.cs: Remove Console.WriteLine.
2340 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2342         * basic-simd.cs: New tests for Vector2ul.
2344 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2346         * simd-intrinsics.c: Add new vector type Vector2ul.
2348 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2350         * basic-simd.cs: New tests for Vector2l.
2352 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2354         * cpu-x86.md: Add long version of most packed int ops.
2356         * mini-ops.h: Same.
2358         * mini-x86.h: Same.
2360         * simd-intrinsics.c: Add new vector type Vector2l.
2362 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
2364         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
2366         * simd-methods.h: Remove SN_op_BitwiseXor.
2368 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2370         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
2371         alignment.
2373 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2375         * basic-simd.cs: Test for Vector2d.
2377         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
2378         value.
2380 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2382         * cpu-x86.md: Add double version of all packed float ops.
2384         * mini-ops.h: Same.
2386         * mini-x86.h: Same.
2388         * simd-intrinsics.c: Add new vector type Vector2d.
2390         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
2392         * simd-methods.h: Add Duplicate.
2394 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
2396         * basic-simd.cs: Test for packing with signed saturation.
2398 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
2400         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
2401         found in the TYPESPEC table.
2403 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
2405         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
2406         too.
2408         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2410         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
2411         instead of the RVA, since the RVA can be changed by tools like the cil 
2412         stripper.
2414         * method-to-ir.c (mono_method_to_ir2): Ditto.
2416         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
2417         (deserialize_variable): Ditto.
2419 2008-10-25  Martin Baulig  <martin@ximian.com>
2421         * debug-mini.c (write_variable): Use
2422         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
2424 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2426         * cpu-x86.md: Add unsigned variants of packd and packw.
2428         * mini-ops.h: Same.
2430         * mini-x86.h: Emit the right instruction for packd and packw.
2431         Add unsigned variants of packd and packw.
2433         * simd-intrinsics.c: Packd and packw were used in place of their
2434         unsigned variants. Change that.
2435         Add intrinsics for (Signed)PackWithSignedSaturation.
2437         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
2439 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2441         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
2443 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2445         * mini-ops.h: Remove dword packed add/sub with saturation ops.
2447         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
2449         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
2450         sse instructions.
2452         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
2454 2008-10-24  Mark Probst  <mark.probst@gmail.com>
2456         * method-to-ir.c, mini.c: Special casing for the synchronized
2457         wrapper for the ldtoken+GetTypeFromHandle case.
2459 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2461         * mini.c (mono_replace_ins): Move this to branch-opts.c.
2463         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
2464         created/split bblocks.
2466 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2468         * mini-ops.h: Add packed signed mul high.
2469         
2470         * cpu-x86.md: Same.
2472         * mini-x86.c (mono_arch_output_basic_block): Same.
2474         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
2476         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
2478 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
2480         * basic-simd.cs: Tests for Vector16sb.
2482 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
2484         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
2486 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2488         * mini-ops.h: Add packed signed min, max and compare greater.
2489         
2490         * cpu-x86.md: Same.
2492         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
2493         saturation.
2495         * simd-methods.h: Add CompareGreaterThan.
2497         * simd-methods.h: Remove CompareEquals.
2499         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
2501         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
2503         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
2504         CompareEqual.
2506 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
2508         * basic-simd.cs: Fix tests due to change in the API.
2510 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2512         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
2514 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2516         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
2518         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
2519         inst_offset as this has invalid values for LDADDR.
2521 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2523         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2525         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
2527 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2529         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
2530         for accessing field->data.
2532 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2534         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
2536 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
2538         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
2540         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
2542 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
2544         * dominators.c (mono_compute_natural_loops): Allocate GList enties
2545         from the cfg mempool.
2547 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2549         * basic-simd.cs: Tests for new methods in Vector8us.
2551 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
2553         * mini-ops.h: Add multiply and store high.
2554         
2555         * cpu-x86.md: Same.
2557         * mini-x86.c (mono_arch_output_basic_block): Same.
2559         * simd-methods.h: Same.
2561         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
2562         and CompareEqual.
2564 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2566         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
2567         mono_class_setup_vtable ().
2569         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
2570         mono_class_get_vtable_entry () for accessing klass->vtable.
2572         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
2574         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
2575         found.
2577         * method-to-ir.c (mono_save_token_info): Don't save references made from
2578         wrappers.
2580         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
2581         of generic instances.
2583         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
2585 2008-10-19  Mark Probst  <mark.probst@gmail.com>
2587         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
2588         OP_JMP depends on the method signature.  Calculate it properly.
2590 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
2591         
2592         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
2593         called directly.
2595         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
2596         instances.
2597         (emit_extra_methods): Add another table mapping method indexes to 
2598         offsets in the extra_method_info table.
2600         * mini.h: Bump AOT file format version.
2601         
2602         * aot-runtime.c: Merge most of the code from mono_aot_get_method
2603         and mono_aot_get_method_from_token () into one function.
2605 2008-10-19  Mark Probst  <mark.probst@gmail.com>
2607         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
2608         separate counter.
2610 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
2612         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
2613         methods.
2615         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
2616         disable_aot.
2618         * mini.c (mono_patch_info_equal): Compare the generic context as well.
2620         * mini.h: Bump aot file format version.
2622         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
2623         AOT file can contain native code for methods which are not in the METHOD
2624         table. Generate code for non-sharable generic instances of generic methods
2625         found in the METHODSPEC table.
2626         
2627         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
2628         encoding generic type handles.
2630         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
2631         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
2633         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
2634         macros + MONO_ADD_INS.
2636         * mini.c (mono_jump_info_token_new2): New function which takes a generic
2637         context as well.
2639         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
2641         * mini.h: Bump aot file format version.
2643         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
2645 2008-10-17  Mark Probst  <mark.probst@gmail.com>
2647         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
2648         platforms, with definable stack alignment value.  Set to 16 now
2649         for all platforms.
2651         * mini.c, mini.h, driver.c: Command line option for disabling
2652         stack alignment.
2654 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2656         * basic-simd.cs: Tests for new methods in Vector4ui.
2658 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2660         * mini-ops.h: Add packed int shuffle.
2661         
2662         * cpu-x86.md: Same.
2664         * mini-x86.c (mono_arch_output_basic_block): Same.
2666         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
2667         extract mask, max, min, shuffle.
2669         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
2671 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
2673         * basic-simd.cs: Tests for new methods in Vector8us.
2675 2008-10-17  Mark Probst  <mark.probst@gmail.com>
2677         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
2678         RuntimeTypeHandle, not a TypedReference.
2680 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
2682         * simd-intrinsics.c: remove relocations.
2684 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
2686         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
2687         optimizations from the x86 backend.
2689 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
2691         * simd-methods.h, simd-intrinsics.c: debloat method names and
2692         prepare for no relocations.
2694 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2696         * mini-ops.h: Add packed min/equal and sum of absolute differences.
2697         
2698         * cpu-x86.md: Same.
2700         * mini-x86.c (mono_arch_output_basic_block): Same.
2702         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
2703         extract mask, max, min and sum of absolute differences.
2705         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
2706         method name.
2708 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2710         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
2711         Renamed one test for consistency.
2713 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2715         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
2716         fix to the code that deal with other blocks.
2718 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2720         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
2722 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
2724         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
2725         that deals with vreg interference. Explicitly check for OP_LDADDR to be
2726         able to process the source reg.
2728 2008-10-16  Martin Baulig  <martin@ximian.com>
2730         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
2732         * inssel.brg: Add `OP_HARD_NOP'.
2734         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
2736         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
2737         `OP_HARD_NOP' instruction when running inside the debugger.
2739         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
2740         `OP_HARD_NOP' instruction when running inside the debugger.
2742 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2744         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
2745         now works. The issue with the regalloc tripping up no longer
2746         happens.
2748         * simd-intrinsics.c (load_simd_vreg): Same.
2750 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2751         
2752         * basic-simd.cs: Tests for new Vector8ui methods.
2754 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2756         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
2757         only for type. This fixes crashes where MonoInst::klass is checked
2758         for ops of type != VTYPE or OBJ.
2760         * simd-intrinsics.c (load_simd_vreg): Same.
2762 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
2764         * mini-ops.h: Add ops for packed shuffle/max/avg and
2765         extract mask.
2766         
2767         * cpu-x86.md: Same.
2769         * mini-x86.c (mono_arch_output_basic_block): Same.
2771         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
2772         extract mask.
2774         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
2775         to emit extract mask op.
2777         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
2778         to emit word shuffles.
2780 2008-10-15  Mark Probst  <mark.probst@gmail.com>
2782         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
2783         the largest alignment needed by a variable, but at least
2784         sizeof(gpointer).
2786 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2788         * basic-simd.cs: Tests for the fixes in the last commit.
2790 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2792         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
2793         no longer handles STACK_PTR input.
2795         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
2797         * simd-intrinsics.c (load_simd_vreg): New function that works like 
2798         get_simd_vreg   but handles STACK_PTR input.
2800         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
2801         as the input can be an arbitrary pointer.
2803         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
2804         LDADDR local optimization directly otherwise use a store op.
2806 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2808         * basic-simd.cs: Tests for dup low and dup high.
2810 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
2812         * mini-ops.h: Add dup low and dup high ops.
2813         
2814         * cpu-x86.md: Same.
2816         * mini-x86.c (mono_arch_output_basic_block): Same.
2818         * simd-intrinsics.c (vector4f_intrinsics): Same.
2820 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2822         * basic-simd.cs: Tests for recently added functionality.
2824 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2826         * mini-ops.h: Add remaining sse1 fp ops.
2827         
2828         * cpu-x86.md: Add remaining sse1 fp ops.
2830         * mini-x86.c (mono_arch_output_basic_block): Same.
2832         * mini.h: Add enum for simd FP compare conditions.
2834         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
2836         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
2837         so the backed can generate the appropriate op.
2839 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
2840         This patch squeese one more byte from the SimdIntrinsc struct.
2842         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
2843         a a shift amount intead of simply or'ing it.
2845         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
2847         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
2848         byte so we can have an aditional flags field without increasing struct size.
2850         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
2851         against the simd_supported_versions bitmask.
2853         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
2855 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
2857         * mini.c: remove rawbuffer code (the only use here is unsafe because
2858         it takes locks during signal handling and the kernel now provides much
2859         better info in proc/pid/smaps these days).
2861 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
2863         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
2864         OP_X86_PUSH_OBJ. Fixes #434620.
2866         * objects.cs: Add a test.
2867         
2868 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
2870         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
2871         that the packuswb/packusdw don't work with unsigned numbers for what
2872         would be negative numbers in signed format.
2874         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
2875         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
2877         * mini-ops.h: Add doubleword forms of many ops and packing ones.
2879         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
2881         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
2883         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
2885         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
2886         add more ops.
2888         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
2889         version as the enum in mini.h.
2891         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
2892         for sse3 ops, check the simd_version field if present. This way the code
2893         works with all versions of sse.
2895 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2897         * simd-intrinsics.c: Fixed intrinsic name typo.
2899         * mini.h: Added missing simd exported function.
2901         * basic-simd.cs: Added tests for Vector4ui.
2902         Fixed broken test for Vector16b.
2904 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
2906         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
2907         the max length to 64.
2909 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2911         * method-to-ir.c: Only do the fast virtual generic method call for
2912         non-wrapper methods.
2914         * mini.h, mini-trampolines.c: The new generic virtual remoting
2915         trampoline handles virtual method calls via the vtable (as done by
2916         the fast virtual generic method calls) to remoting proxies.
2918         * mini.c (mono_jit_create_remoting_trampoline): For generic
2919         methods reate a generic virtual remoting trampoline.
2921         * mini-amd64.h: Enable fast virtual generic method calls again.
2923 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2925         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
2926         restore registers when doing tail calls.
2928 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2930         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
2931         Vector4ui.
2933 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2935         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
2937 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2939         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
2941 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2943         * basic-simd.cs: Retrofit for API changes.
2945 2008-10-10  Mark Probst  <mark.probst@gmail.com>
2947         * mini-ppc.c: Handle integer stack arguments for tail calls.
2949 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
2951         * optflags-def.h: Removed sse3 optimization.
2953         * driver.c: Same.
2955         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
2956         sse3.
2958         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
2960         * mini.h: Added enumeration with simd versions.
2962         * simd-intrinsics.c (emit_intrinsics): Use the new static var
2963         for detecting SSE3.
2965         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
2967         * mini.c (mini_init): Call mono_simd_intrinsics_init.
2969 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2971         * basic-simd.cs: Added tests for Vector8u and Vector16u.
2973         * basic-simd.cs: Fixed test naming.
2975 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
2977         * mini-ops.h: Added ops for packed and saturated math, shifts
2978         and packing/unpacking.
2980         * cpu-x86.md: Added descriptors for the above ops.
2982         * mini-x86.c: Added code to emmit the above ops.
2984         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
2986 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
2988         * aot-compiler.c (compile_method): Enable AOT for generic code.
2990         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
2992 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
2994         * mini.c: add a workaround for a common screwup that ends up blamed
2995         to mono (other processes blocking signal delivery).
2997 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
2999         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
3000         in the LDFLD/STFLD opcodes. Fixes #432673.
3002         * iltests.il.in: Add a new test.
3004 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
3006         * mini-arm.c: attach the thread in unmanaged->managed transitions
3007         using delegates (bug #433148).
3009 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
3011        * basic-simd.cs: Use new ShuffleSel constants.
3013 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
3015         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
3017         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
3018         only disable simd intrinsics if no sse2 is detected.
3020         * optflags-def.h: Added sse3.
3022         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
3023         is disabled.
3025 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
3027         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
3028         when adding delegate-invoke wrappers.
3030 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
3032         * Makefile.am: Reenable the simd tests.
3034 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
3036         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
3037           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
3038           other vreg is allocated to that hreg.
3040         Contributed under MIT/X11 license.
3042 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
3044         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
3045         yet checked in.
3047 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
3049         * basic-simd.cs: New test suite for SIMD intrinsics.
3051         * Makefile.am: Added new tests.
3053 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
3055         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
3057         * mini-ops.h: Same.
3059         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
3061         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
3062         using SSE2 aware opcodes.
3064         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
3065         is enabled, this code path is only reachable if conversion ops are emmited after
3066         mono_method_to_ir.
3068         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
3070         This optimization saves 6 bytes per conversion against the old version.
3072 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
3074         * aot-compiler.c (compile_method): Don't skip methods referencing 
3075         generic methods without a corresponding entry in token_info_hash, since
3076         encode_method_ref () can handle all generic methods now.
3078         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
3079         generic context is set.
3080         
3081         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
3082         generic sharing of LDTOKEN.
3084 2008-10-06  Mark Probst  <mark.probst@gmail.com>
3086         * mini-amd64.h: Temporarily disabled fast virtual generic method
3087         calls because it breaks the System.Runtime.Remoting tests.
3089 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
3091         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
3093         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
3094         so inlining actually works.
3095         (check_inline_caller_method_name_limit): Ditto.
3097 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
3099         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
3100         64 bit safety (from Olaf Hering and Andreas Färber).
3102 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
3103         
3104         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
3105         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
3106         unused virtual call support code.
3108         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
3109         
3110         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
3111         which can't use aot trampolines.
3112         (decode_patch): Don't create aot trampolines for methods which can't use
3113         them.
3115         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
3116         use aot trampolines.
3118         * mini.h: Bump AOT image format version.
3119         
3120 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
3122         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
3123         to save_token_info () since cmethod is inflated for constrained calls.
3125         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
3127 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
3129         * Makefile.am: Add build rules for ppc64.
3130         This avoids the build failing at pedump with unresolved symbols
3131         due to lack of arch_sources. Instead it will now fail earlier
3132         due to lack of cpu-ppc64.md.
3134         Contributed under MIT/X11 license.
3136 2008-10-04  Mark Probst  <mark.probst@gmail.com>
3138         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
3139         tail calls.
3141         * iltests.il.in: Add test case for tail call with many arguments.
3143 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
3145         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
3146         to the fast virtual generic method code until the aot case is fixed.
3148 2008-10-03  Mark Probst  <mark.probst@gmail.com>
3150         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
3152 2008-10-03  Mark Probst  <mark.probst@gmail.com>
3154         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
3155         thunks.
3157 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
3158         
3159         * simd-intrinsics.c: Forgot to add this one.
3161         * mini-codegen.c: Fix macro in case SIMD is not supported.
3163 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
3164         
3165         This patch land initial JIT support for simd intrinsics.
3167         * mini-x86.h: Added new define to make --enable_minimal work on x86.
3169         * Makefile.am: Added simd-intrinsics.c
3171         * simd-intrinsics.c: New file with simd instrinsic related
3172         code.
3174         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
3176         * cpu-x86.md: Add simd related instructions.
3178         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
3180         * driver.c: Added two new --regression variants.
3182         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
3184         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
3186         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
3187         extract some complicated logic to helper functions.
3189         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
3191         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
3193         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
3194         the specialized simplification pass.
3196         * method-to-ir.c (mono_spill_global_vars): Use new macro.
3198         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
3200         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
3201         table.
3203         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
3204         if MONO_ARCH_NEED_SIMD_BANK is defined.
3206         * mini-ops.h: Added the new simd ops.
3208         * mini-x86.c: Added mono_arch_xregname.
3210         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
3212         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
3214         * mini-x86.h: Define simd related MONO_ARCH macros.
3216         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
3218         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
3220         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
3221         MONO_CLASS_IS_SIMD to deal with simd related IR.
3223         * mini.h (MonoInst): Added spill_var to the backend union.
3225         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
3227         * mini.h: Added forward declarations of the new simd fuctions.
3229         * optflags-def.h: Added new optimization names SIMD.
3231         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
3233         * regalloc.h: Added support for working with 3 register banks.
3235         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
3237         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
3239 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
3241         * mini-exceptions.c: remove 64 bit related ifdef clutter.
3243 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
3245         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
3246         instead of one on 64 bit systems.
3248         * method-to-ir.c: Remove unused includes.
3250 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
3252         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
3253         cfg->used_int_regs, since the two are different on arm.
3255 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3257         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
3258         mono_method_get_vtable_index() to get the vtable index.
3260 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3262         * method-to-ir.c (mono_method_to_ir2): Don't create native
3263         wrappers for array methods, because they're never called (and if
3264         they were called they wouldn't work).
3266 2008-10-02  Mark Probst  <mark.probst@gmail.com>
3268         * method-to-ir.c (mono_method_to_ir2): Array methods are
3269         special-cased and must not be invoked indirectly via the (M)RGCTX
3270         when generic sharing is turned on.  Fixes #431413.
3272 2008-10-01  Mark Probst  <mark.probst@gmail.com>
3274         * method-to-ir.c: When generic sharing is active, call
3275         non-interface virtual generic methods via the standard trampoline.
3277         * mini-trampolines.c: Handle virtual generic shared methods.
3279         * mini.h, mini-x86.c, mini-x86.h: New argument for
3280         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
3281         method thunks and which is the trampoline to call if the lookup
3282         fails.  Enable the virtual generic method thunk for x86.
3284         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
3285         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
3286         argument but assert that it's NULL, because these archs don't yet
3287         implement the virtual generic method thunk.  Changes in the IMT
3288         thunk data structures.
3290 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
3292         * aot-compiler.c (emit_globals): Avoid invalid characters in
3293         the static linking symbol.
3295         * objects.cs: Add a test for the range check optimization. Fix warnings.
3297         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
3298         optimization from the current JIT.
3300         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
3301         later in decompose_array_access_opts () to allow more optimizations.
3303         * method-to-ir.c (mono_handle_soft_float): Rename this to 
3304         mono_decompose_soft_float () for consistency.
3306         * mini-ops.h: Fix arguments of OP_STRLEN.
3308         * method-to-ir.c (save_cast_details): Extract the cast details saving code
3309         into a separate function.
3310         (reset_cast_details): Ditto.
3311         (handle_unbox): Save cast details. Fixes #431254.
3313         * method-to-ir.c: Remove some obsolete FIXMEs.
3315 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3317         * ir-emit.h (alloc_dreg): Write a warning before crashing.
3319 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3321         * mini-codegen.c: More work on macros to make them
3322         ready for multiple regbanks.
3324 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3326         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
3328         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
3330 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3332         * mini-codegen.c (mono_spillvar_offset): Proper support for
3333         multiple regbanks.
3335 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3337         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
3338         the stack overflow changes.
3340 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3342         * mini-codegen.c: Make all bank macros depend on reg_bank.
3344         * mini-codegen.c (mono_local_regalloc): Make free mask
3345         initialization regbank aware.
3347 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3349         * mini-codegen.c (mono_local_regalloc): Extract callee
3350         mask selection to a function and make it regbank aware.
3352 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
3354         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
3355         code to deal with many regbanks.
3357 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
3359         * mini-codegen.c: More fp->regbank changes.
3361 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3363         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
3364         of a hardcoded constant.
3366 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
3368         * method-to-ir.c (type_from_stack_type): Fix typo.
3370 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
3372         * mini-ia64.c (emit_move_return_value): Convert float return values to
3373         double.
3375         * objects.cs: Add a new test.
3376         
3377         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
3378         VARARG methods to fix an assert later.
3380         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
3381         end so it at least compiles.
3383 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3385         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
3387 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
3389         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
3390         optimization to a new function (emit_optimized_ldloca_ir) and enable
3391         it for both ldloca and ldloca_s.
3393 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
3395         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
3396         gshared CASTCLASS code.
3398         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
3399         amd64, where the libc stack unwinder encounters stack frames referring to
3400         native code in unmapped memory.
3402         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
3403         sharing.
3405         * generics.cs: Add new test.
3407 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
3409         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
3410         add a check that one of the ARM_FPU_ constants is defined.
3412         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
3413         
3414         * mini-exceptions.c: Fix build on non-altstack platforms.
3416         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
3417         sharing of vtypes.
3419         * ir-emit.h: Add a comment to NEW_PCONST.
3421         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
3423         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
3425         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
3426         after the changes to MonoJitDomainInfo.
3428 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3430         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
3432 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3434         * mini-ppc.c: Compiler warning fixes.
3436 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3438         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
3439         for pinvokes.
3441 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3443         * exceptions-ppc.c, mini-ppc.h: Compile
3444         mono_arch_handle_altstack_exception() on Darwin, too.
3446 2008-09-27  Mark Probst  <mark.probst@gmail.com>
3448         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
3449         work on archs which don't have generic sharing implemented, only
3450         without the vtable_arg.
3452 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3454         * mini.c: Added comment explaining why delegate ctor icall
3455         wrappers are compiled.
3457 2008-09-26  Mark Probst  <mark.probst@gmail.com>
3459         * mini.c: Don't produce trampolines to delegate ctor icall
3460         wrappers but compile them upfront.
3462 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
3464         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
3465         runtime-set function when going back to managed code. Currently this
3466         is used to set back the protection on the soft ovf pages and/or to
3467         throw the stack overflow exception that happened in unmanaged code.
3469 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
3471         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
3472         runtime-set function when going back to managed code. Currently this
3473         is used to set back the protection on the soft ovf pages and/or to
3474         throw the stack overflow exception that happened in unmanaged code.
3476 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
3478         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
3479         the support code for restoring stack protection after stack overflows
3480         that happen in unmanaged code. Don't set the exec permission on the
3481         soft overflow area.
3483 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
3485         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
3486         delegate->method_ptr is set. Fixes #428054.
3488 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3490         * tests.cs: Rename to ratests.cs.
3492         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
3493         emit_get_rgctx_... functions.
3495 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3497         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
3499 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3501         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
3502         before asserting that method is sharable.
3504 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3506         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
3507         whether method needs a static RGCTX wrapper used instead of
3508         complex conditions.
3510         * generic-sharing.c, mini.h: A few functions moved to
3511         metadata/generic-sharing.c.
3513 2008-09-25  Mark Probst  <mark.probst@gmail.com>
3515         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
3516         Generic code sharing for value types, which essentially means
3517         treating value type methods like static methods.  The RGCTX is
3518         passed in the same way.
3520 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
3522         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
3523         opcode when creating multi-dimensional arrays of open types.
3525         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
3526         open generic types.
3528         * generics.cs: Add a test.
3530         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
3532 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3534         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
3536         * mini.c (mini_method_compile): Set it when running under the debugger. 
3538         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
3539         vreg optimization if the flag is set.
3541         * driver.c (mono_main): Add --attach= option to pass options to
3542         the attach agent.
3544         * mini.c (sigquit_signal_handler): Start the attach agent.
3546         * ssapre.c: Disable this to save space since it is not yet ported to
3547         linear IR.
3549         * regalloc2.c: Disable this to save space.
3551         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
3553 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
3555         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
3556         the -v option useful again.
3558 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
3560         * mini-amd64.c (mono_arch_output_basic_block): Add support for
3561         --break-at-bb.
3563         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
3564         arrays of arrays. Fixes #428406.
3566         * method-to-ir.c (mini_emit_castclass): Ditto.
3568         * objects.cs: Add new test.
3569         
3570 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
3572         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
3573         was wrong at it choked against target_type_is_incompatible for byref types.
3575 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
3577         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
3578         places.
3580 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
3582         * mini-exceptions.c: update a few more exceptions-related counters.
3584 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
3586         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
3587         new functions to allocate from persistent mempools.
3589 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
3591         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
3592         multiple register banks in the future.
3594         * mini-codegen.c (mono_local_regalloc): Fix a warning.
3596 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
3598         * mini.c (type_to_eval_stack_type): Remove duplicated function.
3600         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
3602         * mini.h: Export type_to_eval_stack_type.
3604         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
3605         is only ins->klass of byref types.
3607 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
3609         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
3610         (mini_emit_memcpy2): Ditto.
3612         * mini-amd64.c: Fix a warning.
3614 2008-09-21  Mark Probst  <mark.probst@gmail.com>
3616         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
3617         linking.
3619 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
3621         * method-to-ir.c: Extract stloc micro-optimization to a
3622         function and apply it to all cases.
3624 2008-09-19  Mark Probst  <mark.probst@gmail.com>
3626         * method-to-ir.c: Don't fail generic code sharing in cases we
3627         already support.
3629 2008-09-18  Mark Probst  <mark.probst@gmail.com>
3631         * mini-ppc.c: Handle structs in tailcalls on Darwin.
3633 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
3635         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
3636         implementation.
3638 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
3640         * trace.c: make tracing more useful and correct, with per-thread
3641         id and indent info.
3643 2008-09-15  Mark Probst  <mark.probst@gmail.com>
3645         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
3646         doing a method call and the argument is an R4.
3648 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
3650         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
3651         generic methods.
3653 2008-09-13  Mark Probst  <mark.probst@gmail.com>
3655         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
3657 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
3659         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
3660         (MONO_JUMP_TABLE_FROM_INS): Ditto.
3662 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
3664         * driver.c: Add a --agent argument (not supported yet) to load managed
3665         agent assemblies before loading the main assembly, similarly to how the
3666         Java VM handles agents.
3668 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3670         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
3671         function to do stack layout of local variables.
3673 2008-09-11  Mark Probst  <mark.probst@gmail.com>
3675         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
3676         calculation.
3678 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
3680         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
3681         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
3682         JIT if DISABLE_JIT is defined.
3684         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
3685         defined.
3687 2008-09-10  Mark Probst  <mark.probst@gmail.com>
3689         * iltests.il.in: Disable the fconv test on PPC (the result is
3690         undefined according to ECMA).
3692 2008-09-10  Mark Probst  <mark.probst@gmail.com>
3694         * iltests.il.in: Enable tail call tests for PPC.
3696         * mini.h: Add variable for storing incoming valuetype argument
3697         addresses for tail calls.
3699         * mini-ppc.c: Implement valuetype arguments and return values for
3700         tailcalls on Linux.
3702 2008-09-09  Mark Probst  <mark.probst@gmail.com>
3704         * mini-ppc.c: Partially implement tail calls (struct arguments and
3705         return values not supported).
3707         * method-to-ir.c: Enable tail calls on PPC.
3709 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
3711         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
3712         runtime-invoke wrappers to work around the problem of them getting
3713         assigned to a random class.
3715         * aot-runtime.c (mono_aot_get_method): Ditto.
3716         
3717 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
3719         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
3720         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
3722 2008-09-07  Mark Probst  <mark.probst@gmail.com>
3724         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
3725         until they're implemented properly.
3727         * exceptions-ppc.c: Use arch-independent exception-handling code
3728         instead of custom one.
3730         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
3731         for Linear IR.
3733         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
3735         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
3736         applies when __powerpc__ is defined.
3738 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
3740         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
3741         methods to their code to avoid computing the full name of wrappers and
3742         doing a lookup in a string hash table.
3744 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
3746         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
3747         we identify bblocks before method_to_ir () is ran.
3749         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
3750         Also avoid optimizing branches pointing to themselves.
3752         * mini.c (mini_method_compile): Ditto. Fixes #422947.
3754 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
3756         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
3758 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
3760         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
3761         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
3762         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
3763         'buf'.
3765         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
3766         jumped to the same entry in plt_jump_table.
3768 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
3770         * method-to-ir.c (initialize_array_data): Handle field with RVA from
3771         dynamic images.
3773 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
3775         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
3776         other assignment can be if converted. Saves 1.5% on corlib size and fixes
3777         #421807.
3779 2008-08-29  Geoff Norton  <gnorton@novell.com>
3781         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
3782         segment, and doesn't properly handle .space as .text.  Fixes
3783         AOT Mach/ARM
3785 2008-08-29  Geoff Norton  <gnorton@novell.com>
3787         * mini.c: Disable the mach exception handler when running on 
3788         ARM
3790 2008-08-29  Geoff Norton  <gnorton@novell.com>
3792         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
3793         globals on Darwin/ARM
3795 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
3797         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
3798         since too many things depend on it. Instead, call 
3799         mono_runtime_set_no_exec ().
3800         
3801         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
3802         the new JIT.
3804         * aot-compiler.c: Add an 'asm-only' AOT option.
3806         * mini.c: Avoid initializing the runtime when doing AOT compilation.
3807                 
3808         * aot-compiler.c (compile_method): Disable gshared support for now as it
3809         doesn't yet work.
3811 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
3813         * mini-amd64.h : Fix a compiler warning.
3815         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
3816           Changed to use a callback function to retrieve the unwind info.
3817           This avoids problems observed when code blocks were removed by
3818           unloading an app domain.
3820         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
3821           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
3822           to work properly.
3824         Contributed under MIT/X11 license.
3826 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
3828         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
3829           case to keep the stack aligned to 8.
3831         Contributed under MIT/X11 license.
3833 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
3835         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
3836         avoid repeated linear searches.
3838 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
3840         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
3841         methods it can't handle.
3842         
3843         * aot-compiler.c (add_method): Avoid adding a method twice.
3844         (add_wrappers): Add runtime invoke wrappers for all methods.
3846         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
3847         function to create an aot-compatible version of this trampoline.
3849         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
3851 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
3853         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
3855         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
3856         with a generic sharing failure.
3858         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
3860         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
3861         CEE_RETHROW. Fixes #419634.
3863         * mini.c (mono_method_to_ir): Ditto.
3865         * exceptions.cs: Add a new test.
3866         
3867         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
3868         to mono_type_stack_size_internal () since some callers might not pass in
3869         an rgctx.
3871         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
3872         instrument_prolog. Fixes #419878.
3874         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
3875         doubles in soft float mode volatile.
3877 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
3879         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
3881         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
3882         to handle soft float correctly.
3884         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
3885         the fast path.
3887         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
3889         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
3890         to sp, since the generics catch code requires it.
3892         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
3893         copying.
3895         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
3896         mono_arch_emit_imt_argument ().
3898         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
3900         * mini-arm.c tramp-arm.c: Generic sharing updates.
3902 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
3904         * mini-arm.c: Fix the arm build.
3906         * generic-sharing.c (mini_type_get_underlying_type): New helper function
3907         handling enums, generic instances and generic sharing.
3908         (mini_type_stack_size_full): Ditto.
3910         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
3911         
3912         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
3914         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
3916         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
3917         trampolines.
3919         * mini-arm.c: Various small generic sharing changes.
3921         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
3922         this for x86.
3923         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
3924         custom code.
3926         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
3927         helper function to return a generic class init trampoline.
3929         * method-to-ir.c mini.c: Use it.
3930         
3931         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
3932         arch-specfic function to return a generic class init trampoline.
3934         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
3935         the GENERIC_CLASS_INIT custom code.
3937         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
3938         a fatal error, not a sharing failure.
3940         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
3941         needed.
3943         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
3944         trampoline argument from MONO_ARCH_VTABLE_REG.
3946         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3947         order of the arguments to the C trampoline: pass 'slot' as the trampoline
3948         argument, and pass the vtable in VTABLE_REG.
3950         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
3951         order of the arguments to the C trampoline: pass 'slot' as the trampoline
3952         argument, and pass the vtable in VTABLE_REG.
3953         (mono_arch_create_trampoline_code_full): Remove some special casing for
3954         the rgctx fetch trampoline.
3956         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
3957         Fixes #419273.
3959         * iltests.il: Add a test for it.
3961 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
3963         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
3965         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
3966         no longer needed.
3968         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
3969         use mono_jit_info_table_find () to avoid recursion.
3970         (mono_delegate_trampoline): Add a sync wrapper here.
3972         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
3973         here.
3975         * mini.c (mono_method_to_ir): Ditto.
3976         
3977         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
3978         add_sync_wrapper argument. Don't add a sync wrapper here.
3979         (mono_create_jump_trampoline): Don't add a sync wrapper here.
3981         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
3982         
3983 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3985         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
3986           of nonvolatile registers back from MonoContext to CONTEXT.
3988         Contributed under MIT/X11 license.
3990 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
3992         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
3993           arguments on Winx64 there are only 4 argument registers.  For this
3994           logic to work the last argument must be pulled from the stack.  
3996         Contributed under MIT/X11 license.
3998 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
4000         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4002         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
4003         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
4004         encode/decode_method_ref ().
4006         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
4008         * aot-runtime.c (decode_patch): Ditto.  
4010         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
4011         MONO_PATCH_INFO_METHOD.
4013         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
4014         MonoGenericJitInfo.
4016         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
4017         MonoGenericJitInfo.
4019         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
4021         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
4022         one from the caller.
4024         * aot-runtime.c (decode_generic_inst): New function to decode and
4025         return a interned generic inst.
4026         (decode_klass_ref): Use it.
4027         (decode_method_ref): Ditto.
4029         * aot-compiler.c (emit_exception_debug_info): Save 
4030         jinfo->has_generic_jit_info too.
4032 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
4034         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
4036         * iltests.il.in: Add a test for fconv_to_i.
4038         * liveness.c: Disable the liveness2 pass for now to save space.
4040         * regalloc2.c: Include mempool-internals.h to fix warnings.
4042         * aot-compiler.c (encode_method_ref): Encode the context of generic
4043         instance methods.
4045         * aot-runtime.c (decode_method_ref): Inflate generic methods using
4046         the context saved in the aot file.
4048         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
4050         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
4052         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
4053         volatile so they won't be optimized away.
4055 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
4057         * ssa.c:
4058         * ssa2.c:
4059         * mini.c:
4060         * regalloc2.c:
4061         * dominators.c: Remove duplicated functions that now are in
4062         mempool-internals.h.
4064 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
4066         * aot-compiler.c: Fix warnings.
4068         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
4070         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
4072         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
4073         as the patch type.
4075         * mini.c (mono_resolve_patch_target): Ditto.
4076         
4077         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
4078         (encode_klass_ref): Add support for encoding VARs/MVARs.
4080         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
4082         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
4083         the handling of the got entries into a separate 'decode_got_entry' function.
4084         Add support for RGCTX_FETCH.
4086         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
4087         clobbered by the trampoline code.
4089         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
4090         not clobbered by the indirect calling code.
4092 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
4094         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
4095         to fix the build.
4097 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
4099         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
4100         signature using the compilation mempool otherwise we would leak it.
4102 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
4104         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
4105         mono_emit_abs_call ().
4107         * patch-info.h: Add GENERIC_CLASS_INIT.
4109         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
4111         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
4112         as their target as a near call.
4114         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
4115         ABS handling code.
4116         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
4118         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
4119         call to a runtime function described by a patch.
4121         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
4122         mono_emit_abs_call, this has the advantage that the ABS handling code in
4123         mono_codegen () can handle them both, and can handle other stuff in the
4124         future without additional code.
4126         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
4127         entry.
4128         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
4129         abs addresses.
4131         * mini.h: Add missing bblock related prototypes.
4133         * mini.h (MonoCompile): Remove unused reverse_inst_list and
4134         reverse_inst_list_len fields.
4136         * mini.c: Refactor this file a bit by moving branch optimizations to 
4137         branch-opts.c.
4139         * method-to-ir.c: Merge generic sharing changes missed earlier.
4141         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
4143         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
4144         shared patches. Process METHODCONST as a shared patch.
4146         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
4147         as it crashes on the 2.0 mscorlib.
4149         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
4150         to cause crashes.
4151         
4152         * aot-compiler.c: Use is_plt_patch () in a few additional places.
4153         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
4154         by IMT.
4156         * aot-compiler.c: Reorganize the got handling code to be a bit more
4157         understandable.
4159 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
4161         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
4162         mono_patch_info_equals/hash, and use it to massively simplify
4163         get_plt_index ().
4165         * mini.c (mono_patch_info_hash): Simplify this and add support for
4166         more patch types.
4168         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
4170         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
4171         handling code, since an offset is not enough to identify a trampoline.
4173         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
4175 2008-08-17  Mark Probst  <mark.probst@gmail.com>
4177         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
4179         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
4181         * mini-ops.h: Argument and result types for OVF_CARRY ops.
4183         * decompose.c: PPC decompositions for various ops.
4185         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
4187 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
4189         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
4190         call the generic trampoline code using a call, instead of a jump, to
4191         remove some special casing from the generic trampoline code.
4193         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
4194         (mono_codegen): Ditto.
4196         * aot-compiler.c aot-runtime.c: Ditto.
4198         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
4200         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
4201         helper function to find the offset corresponding to a lazy fetch trampoline.
4203         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
4204         when doing generic sharing.
4206         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
4207         places.
4208         
4209         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
4210         mini-trampolines.c to be with the other trampoline creation functions.
4212         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
4213         as it is equal to method->signature in most cases, add a 
4214         mono_emit_method_call_full variant which takes a signature and an imt
4215         argument as well.
4217 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
4219         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
4220         to this function, since it could be computed easily from the method 
4221         argument.
4222         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
4223         more.
4225         * method-to-ir.c mini.c: Remove references to 
4226         compile_generic_method_wo_context.
4228         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
4229         generic method calls.
4230         
4231         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
4232         dimensional non-szarrays.
4234         * mini.c (mini_init): Register mono_array_new_1.
4236         * jit-icalls.c (mono_array_new_1): New jit icall.
4238         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
4239         pointing to the method.
4241         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
4242         method addresses belonging to METHOD_JUMP patches in the 
4243         jump_target_got_slot_hash.
4244         (mono_aot_load_method): Ditto.
4246         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
4247         METHOD_JUMP patches.
4249         * mini.c (mini_create_jit_domain_info): New helper function which 
4250         initializes/frees domain->runtime_info.
4251         (mini_free_jit_domain_info): Ditto.
4252         (mini_init): Install the domain hook functions with the runtime.
4254         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
4255         information maintained by the JIT.
4257         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
4258         insertion into jump_table_hash into mono_codegen (), also implement proper
4259         locking.
4261         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
4262         tail calls, it is already done by the aot code.
4263         
4264         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
4265         mechanism on amd64.
4267         * iltests.il.in: Make the jmp test a bit more complex.
4269         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
4270         generic instances which doesn't have a token.
4272         * aot-runtime.c (decode_method_ref): Ditto.
4273         
4274         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
4275         can handle this case now.
4276         (handle_box): Ditto.
4278 2008-08-15  Geoff Norton  <gnorton@novell.com>
4280         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
4281         debugging check.
4283 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
4285         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
4286         calling generic methods.
4288         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
4290         * aot-runtime.c (decode_patch_info): Ditto.
4292         * mini.c (mono_resolve_patch_target): Ditto.
4293         
4294         * patch-info.h: Add METHOD_RGCTX.
4296         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
4298 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
4300         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
4301         arguments in registers.
4303         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
4304         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
4306         * mini.c (mini_method_compile): Abort aot compilation for generic
4307         methods if generic sharing is disabled.
4308         
4309         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
4310         an mrgctx.
4312         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
4313         requiring an mrgctx.
4315         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
4316         store instructions when converting a vcall to a normal call.
4318         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
4319         mono_arch_find_jit_info.
4321 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
4323         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
4324         avoid calling mono_method_full_name () for every method even if the
4325         env var is not set.
4326         (check_inline_caller_method_name_limit): Ditto.
4328 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4330         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
4331         assemblies in one run.
4333         * aot-compiler.c (mono_compile_assembly): Only print out a count of
4334         skipped methods if it is not 0.
4336         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
4338 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4340         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
4341           MONO_ARCH_HAVE_UNWIND_TABLE.
4343         Contributed under MIT/X11 license.
4345 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
4347         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
4348           from default optimizaton list on Winx64.
4350         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
4352         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
4353           the LMF from the MonoJitTlsData structure.
4355         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
4357         Contributed under MIT/X11 license.
4359 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
4361         * mini.c (sigsegv_signal_handler): Fix the build.
4363         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
4364         assembly->aot_module.
4366         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
4367         hash table. This simplifies and speeds up a lot of code, and fixes support
4368         for .netmodules.
4370         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
4371         with the runtime.
4373         * mini-exceptions.c: Ditto.
4374         
4375         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
4376         'native_offset' argument, since these are computed in the 
4377         mono_find_jit_info () function.
4379         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
4380         is used by exceptions-ppc.c.
4382         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
4383         mono_arch_find_jit_info ().
4384         
4385         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
4386         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
4387         generic code in mini-exceptions.c.
4389 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
4391         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
4393         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
4394         
4395         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
4396         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
4397         called while holding the loader lock. Fixes #415608.
4398         (mono_aot_get_method_from_token_inner): Ditto.
4400 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4402         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
4403         to reduce differences between this and the generic implementation in
4404         mini-exceptions.c.
4405         (ves_icall_get_frame_info): Ditto.
4407         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
4409         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
4410         longer neccesarry.
4412         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
4413         mono_arch_get_call_filter () and make it non-static, for consistency with the
4414         other architectures.
4416 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
4418         * mini.c:
4419         * local-propagation.c:
4420         * mini-x86.c: Correct the name of arch defines.
4422 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
4424         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
4425         NO_EMULATE_LONG_SHIFT_OPS define.
4427 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
4429         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
4430         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
4432         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
4433         MACH fixes. Merged from the 2.0 branch.
4435         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
4437         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
4438         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
4440         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
4442         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
4443         mono_marshal_get_native_wrapper () signature changes.
4445 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
4447         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
4448         conversion bug under arm.
4450 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
4452         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
4454         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
4455         with overflow checking.
4457 2008-08-05  Marek Habersack  <mhabersack@novell.com>
4459         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
4460         to the genmdesc.pl file
4462 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
4464         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
4465         arg_array in the soft-float versions of the LOAD/STORE macros.
4467         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
4468         implementation.
4470         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
4472 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4474         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
4475         a float HFA. Fixes #413621.
4477 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
4479         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
4480         frame_size to args_size. Fixes build.
4482 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
4484         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
4485         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
4487         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
4488         the stack are not unaligned. Fixes #413247.
4489         
4490 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
4492         * mini.c: update jitted methods performance counters.
4494 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
4496         * mini-exceptions.c: increase the exceptions thrown performance
4497         counter in mono_handle_exception ().
4499 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
4501         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
4502         can work with netmodules.
4504 2008-07-28  Geoff Norton  <gnorton@novell.com>
4506         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
4507         regression tests.
4509 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4511         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
4512         correct place.
4514 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
4516         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4517           The float param registers and other param registers must be the 
4518           same index on Windows x64.
4520         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
4521           ArgValuetypeAddrInIReg argument case.  Setting the argument
4522           op to OP_VTARG_ADDR (OP_REGOFFSET)).
4524         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
4525           variable computed above as the copy length for arguments of storage
4526           type ArgValuetypeAddrInIReg.
4528         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
4529           ArgValuetypeAddrInIReg argument case.  This case will rely on
4530           mono_arch_emit_outarg_vt to emit the correct code later in the process.
4532         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
4533           a 32 byte stack allocation for all calls.  We will omit the adjustment for
4534           jump and tail call instructoins as they do not follow the typical call behavior.
4536         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
4537           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
4538           local variable and pass the local variable by reference to the called method.
4540         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
4541           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
4542           of a struct is passed in a register it must be saved with the other
4543           volatile argument on the stack.
4545         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
4546           frame pointer the stack adjustment value must be saved to the unwind 
4547           info structure.
4549         Contributed under MIT/X11 license.
4551 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
4553         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
4554         which got lost in the merge.
4556 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
4558         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
4559         build.
4561         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
4562         
4563         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
4564         icalls, since they won't be patched.
4566         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
4567         different code sequence when running under valgrind to prevent some valgrind
4568         errors.
4570         * iltests.il.in: Add new regression test.
4572         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
4573         end with a throw.
4575         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
4576         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
4578         * iltests.il.in: Add new test.
4580         * aot-compiler.c: Fix some warnings.
4582         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
4583         Fixes #412494.
4585 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
4587         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
4588         (mini_usage_jitdeveloper): Add a missing --wapi option.
4590 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4592         * mini-codegen.c: Simplify the is_fp macros.
4593         (free_up_ireg): Remove, use free_up_reg instead.
4594         (free_up_reg): Fix the fp case.
4596 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
4598         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
4599         lowered earlier.
4601         * exceptions-x86.c: Merge some changes which seemed to have got lost
4602         in the linear-ir merge.
4604         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
4606         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
4607         long vreg volatile even if the variable was already created.
4609         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
4610         volatile variables.
4612 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
4614         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
4616         * mini.c (mono_jit_compile_method_inner): Add support for 
4617         MONO_EXCEPTION_BAD_IMAGE.
4619         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
4620         mini_method_get_context () returns NULL. Fixes #356531.
4622         * mini.c (mono_method_to_ir): Ditto.
4623         
4624         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
4625         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
4627 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4629         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
4630         in the LDFTN implementation.
4632 2008-07-25  Mark Probst  <mark.probst@gmail.com>
4634         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
4635         code, patch calls to icalls, too, even if they're not in the
4636         shared generic code hash.  Fixes #411962.
4638 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
4640         * cpu-x86.md: Increase the length of the fcall opcodes.
4642         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
4643         calls returning floats.
4645         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
4646         on NEWARR.
4647         
4648         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
4649         missed earlier.
4651         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
4652         into the domain->method_code_hash.
4654         * aot-compiler.c: Fix win32 build.
4656         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
4657         
4658         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
4659         gshared NEWARR implementation.
4661         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
4663         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
4664         can be used outside of method_to_ir.
4666         * mini.h (MonoCompile): Add arg_types field.
4668         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
4669         
4670         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
4671         the values of the local arg_array and param_types array.
4673 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
4675         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
4676         got accesses might only get generated later when NEWOBJ is decomposed.
4677         
4678         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
4679         looking up the native code of the target method when a delegate is called
4680         for the first time.
4682         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
4683         optimization.
4685         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
4687         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
4688         AOT work on platforms without a working dlsym implementation.
4690         * mini.h: Bump AOT image format version.
4691         
4692 2008-07-24  Mark Probst  <mark.probst@gmail.com>
4694         * mini-exceptions.c: Free a MonoType with
4695         mono_metadata_free_type() instead of g_free().
4697         * aot-runtime.c: Free a MonoType.
4699 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
4701         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
4702         optimization.
4704         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
4705         fp stack on x86.
4707 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
4708         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
4709         profiler hook.
4711 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
4713         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
4714         NEWOBJ calls on valuetypes.
4716         * iltests.il.in: Add new test.
4718         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
4720 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
4722         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
4723         is no longer needed.
4725         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
4726         non register sized integer arguments.
4727         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
4728         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
4729         emit_memcpy2 ().
4731         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
4732         CEE_MONO_RETOBJ.
4733         
4734         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
4735         two a binop with different sized arguments is emitted.
4737         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
4738         instruction in the ins==NULL case.
4740 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
4742         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
4744         * mini-x86.c: Fix osx build.
4746         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
4747         opcodes as well.
4749         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
4750         instruction for non int sized variables.
4752         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
4753         implementation.
4755 2008-07-23  Robert Jordan  <robertj@gmx.net>
4757         * method-to-ir.c: Fix MSVC build.
4759 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
4761         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
4762         a non int sized type, widen it to an int since newer versions of gcc seem to
4763         generate code which needs this.
4765         * ssa2.c abcremoval2.c: Fix warnings.
4767         * *: Merge the Linear IR branch.
4769         The original branch is at trunk/branches/vargaz/mini-linear-il, and
4770         the ChangeLog file there describes all the changes done over the years. 
4771         Further documentation can be found at www.mono-project.com/Linear_IL.
4773 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
4775         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
4776           The float param registers and other param registers must be the 
4777           same index on Windows x64.
4779         Contributed under MIT/X11 license.
4781 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
4783         * mini.c: Make the previous fix GC safe.
4785 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
4787         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
4789 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
4791         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
4792           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
4793           ArgValuetypeAddrInIReg instead.
4795         Contributed under MIT/X11 license.
4797 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
4799         * mini-codegen.c (get_register_spilling): Fix a warning.
4801 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
4803         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
4804         for types which the initialization fails. Raises the provided exception
4805         at the right stop after cleanup.
4807 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
4809         * aot-compiler.c: Free most of the memory allocated during compilation.
4811         * mini.c (mini_parse_debug_options): Fix a leak.
4812         
4813         * mini.c (mini_method_compile): Don't add the method to the jit info tables
4814         during aot compilation.
4816 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
4818         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
4819         it has too much register pressure.
4821 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
4823         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
4825 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
4827         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4828         on x86.
4830         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
4831         on amd64 similar to the way it is done on arm.
4833         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
4835         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
4836         consistency, normalize error messages, avoid loading aot-only modules in
4837         normal mode.
4839         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
4840         for consistency.
4842         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
4844 2008-07-11  Martin Baulig  <martin@ximian.com>
4846         * debug-debugger.h
4847         (MonoDebuggerInfo): Add `interruption_request'.
4849 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
4851         * aot-compiler.c (emit_plt): Remove some dead code.
4853         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
4855         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
4856         return the plt info offset belonging to a given plt entry.
4858         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
4859         mono_aot_get_plt_info_offset.
4860         
4861         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
4862         similar to the amd64 code by makeing jumps through a separate jump table 
4863         instead of embedding the jump addresses into the code.
4865 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
4867         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
4868         method.
4870 2008-07-10  Martin Baulig  <martin@ximian.com>
4872         * mini.c (mini_method_compile): Disable generics sharing when
4873         running in the debugger.
4875 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
4877         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
4879         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
4880         the local register allocator from running out of registers on x86 when 
4881         using aot.
4883 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
4885         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
4886         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
4887         C4146.
4889         Contributed under MIT/X11 license.
4891 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
4893         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
4894         speed up the assembler.
4896 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
4898         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
4899         support.
4901         * mini.c: Move the soft float handling macros a bit earlier, add 
4902         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
4903         place.
4905         * mini.h: Add prototype for mono_arch_fixup_jinfo.
4907         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
4908         read-only to help catch code allocation requests.
4909         
4910         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
4911         and turn it off when using --aot-only or when compiling with --aot=full.
4913         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
4914         jump table for switches from the normal domain mempool, not the code
4915         manager.
4917         * mini-trampolines.c (get_unbox_trampoline): New function to return an
4918         unbox trampoline which handles aot-only mode too.
4920         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
4921         an AOTed unbox trampoline.
4923         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
4925 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
4927         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
4928         ""
4930         Contributed under MIT/X11 license.
4932 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
4934         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
4935           the unwind information for the method at the end of the allocated block.
4936           
4937         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
4938           MonoCompileArch to hold the unwind info for SEH on Winx64
4939         
4940         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
4941           frame pointer info for the method being compiled.
4942           
4943         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
4944           the call to mono_exception_from_token.
4945           
4946         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
4947           storing the method prolog information in a format that the Winx64 SEH can understand.  This
4948           information is stored a the end of the method block because it is all 32-bit offset based.
4950         Contributed under MIT/X11 license.
4952 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
4954         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
4956         * wapihandles.c: Fix warnings.
4958         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
4959         mode.
4961         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
4962         mono_jit_compile_method in aot-only mode since that calls the type 
4963         initializer.
4964         
4965         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
4966         get_delegate_invoke_impl in aot-only mode.
4968         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
4970 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
4972         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
4974         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
4975         is on by default.
4977         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
4979         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
4980         init trampoline from the AOT file as well.
4982         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
4983         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
4984         code.
4986         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
4987         mono_init.
4989         * exceptions-amd64.c: Add _full variants for the remaining exception code
4990         creation functions as well, allow emission of relocatable code, remove
4991         caching since that is now done by the caller.
4993         * mini-exceptions.c: Add _full variants for the remaining exception code
4994         creation functions as well, add aot-only support.
4996         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
4997         if we can determine a proper token for them.
4998         (add_wrappers): Add a few more wrappers.
4999         (emit_method_code): Remove some dead code.
5000         (emit_trampolines): Emit exception code too.
5002         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
5004         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
5005         mono_array_new_va which avoids varargs.
5007         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
5009         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
5010         mono_arch_create_specific_trampoline () in all places.
5012         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
5013         a bit so it can be used for other things as well.
5014         
5015         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
5016         on demand as well.
5018         * exceptions-amd64.c: Rename the caching from the exception code creation
5019         functions, it is done by the caller instead.
5020         
5021         * exceptions-amd64.c: Change the signature of the exception code creation 
5022         functions to allow the creation of relocatable code later.
5024         * mini-exceptions.c: Add a set of functions to query the various 
5025         runtime-generated exception functions.
5027         * mini.c mini-exceptions.c: Use the newly added functions instead of the
5028         mono_arch_.. () functions.
5029         
5030 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
5032         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
5034         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
5036         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
5037         (mini_get_vtable_trampoline): Ditto.
5039         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
5040         code in the AOT case by returning the code size and a list of relocations to
5041         the caller.
5043         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
5045 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
5047         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
5048           clean the stack.
5050         Contributed under MIT/X11 license.
5052 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
5054         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
5055         so the buffer size can be computed correctly. Fixes #404735.
5057         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
5058         normally as cfg->debug_info is already freed.
5060 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
5062         * mini-amd64.c: For calls returning vtypes in registers, don't store
5063         the return address on the stack, instead allocate a separate local for
5064         it. Fixes #404729.
5066 2008-07-05  Mark Probst  <mark.probst@gmail.com>
5068         * mini-trampolines.c, mini.h: Add an argument to
5069         mono_create_jit_trampoline_in_domain() for turning off the adding
5070         of the sync wrapper.
5072         * mini.c: Use the JIT trampoline without sync instead of
5073         ldftn_nosync in static RGCTX invoke wrappers so that the call can
5074         be patched.
5076 2008-07-04  Mark Probst  <mark.probst@gmail.com>
5078         * driver.c: Turn on GSHARED optimization by default.
5080 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
5082         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
5083         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
5085         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
5086         create a variant of the generic trampoline code callable from AOTed trampolines.
5088         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
5089         trampoline code callable from AOTed trampolines.
5091         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
5093 2008-07-04  Mark Probst  <mark.probst@gmail.com>
5095         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
5096         pass-through manner.
5098         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
5099         and don't fail sharing for them anymore.
5101         * mini-exceptions.c: Handle exceptions in shared generic methods.
5103         * generic-sharing.c: When checking the context of a generic
5104         method, also check its class's context.  Don't treat wrappers as
5105         sharable.
5107         * mini-trampolines.c: Some code factored out to
5108         metadata/generic-sharing.c.  Handle the MRGCTX case.
5110         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
5111         we must deal with the method being of another instantiation of the
5112         class.  Add static rgctx invoke wrappers to generic methods.
5114 2008-07-04  Mark Probst  <mark.probst@gmail.com>
5116         * mini.c: Provide all jit infos of generic shared methods with a
5117         generic jit info.
5119         * mini-exceptions.c: Handle the new situation that a generic info
5120         might be available, but not info about the this/vtable/mrgctx
5121         variable.
5123 2008-07-03  Mark Probst  <mark.probst@gmail.com>
5125         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
5126         generic methods.
5128 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
5130         * dominators.c (check_dominance_frontier): Fix a warning.
5132         * mini.h: Add some missing prototypes.
5134         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
5136         * driver.c (mono_jit_init_version): Correct the comments since the first
5137         argument should be the name of the root domain, not a filename.
5139         * aot-runtime.c (make_writable): Error out if this is called while running
5140         with --aot-only.
5141         (load_aot_module): Ditto.
5143         * aot-compiler.c: Really fix the computation of method indexes.
5145         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
5146         optimizations as this is no longer called frequently.
5148         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
5149         method and the invoke impl code and pass it to the delegate trampoline instead of
5150         just the delegate class.
5152 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
5154         * aot-compiler.c: Fixup the computation of method indexes.
5155         (add_wrappers): Create the base methods of the runtime invoke wrappers using
5156         the method builder infrastructure.
5158         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
5159         has no header.
5161         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
5162         mode, load the method right away instead of creating a trampoline.
5164         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
5166         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
5167         some checks a bit.
5169 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
5171         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
5172         (mono_aot_load_method): Use method_index instead of method->token.
5174         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
5175         can handle icalls etc. properly.
5177         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
5179         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
5181         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
5182         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
5183         JIT_ICALL_ADDR patch type.
5185         * patch-info.h: Add JIT_ICALL_ADDR patch type.
5187         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
5188         request flag.
5189         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
5191         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
5193 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
5195         * mini.c: Use domain->jit_code_hash_lock for controlling access to
5196         domain->jit_code_hash.
5198 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
5200         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
5202 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
5204         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
5205         get_this_arg_from_call, let it compute it when needed.
5207         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
5208         gsctx from code only when needed.
5210         * mini-trampolines.c (get_generic_context): Rename this to 
5211         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
5212         it can be called by the arch backends.
5214         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
5216 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
5218         * driver.c (mono_main): Add experimental --aot-only command line option.
5220         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
5221         set.
5223 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
5225         * driver.c (DllMain): Remove mono_module_handle.
5227         Contributed under MIT/X11 license.
5229 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
5231         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
5232         for emitting methods which are not in the source assembly. Detect and report
5233         failure of assembling+linking.
5234         
5235         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
5237         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
5239 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
5241         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
5243 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
5245         * mini.h: Remove some obsolete prototypes.
5247         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
5249 2008-06-24  Mark Probst  <mark.probst@gmail.com>
5251         * mini.c (get_object_generic_inst): Variable-sized arrays are not
5252         supported by Visual Studio, so use alloca().
5254 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
5256         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
5257         Fixes #402585.
5259 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5261         * mini.c: Fail sharing of a generic method if it contains an open
5262         catch clause (because we don't pass MRGCTXs yet).
5264 2008-06-23  Mark Probst  <mark.probst@gmail.com>
5266         * mini.c: When compiling a method with generic sharing, insert the
5267         method instantiated with an all-Object generic context into the
5268         jit info table, instead of the context of the first instantiation
5269         of the method we happen to compile.
5271 2008-06-18  Martin Baulig  <martin@ximian.com>
5273         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
5274         `major_version' and `minor_version'.
5276 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5278         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
5279         mono_method_is_generic_sharable_impl() takes an additional
5280         argument specifying whether to treat type variables as reference
5281         types.
5283 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5285         * mini.h: Removed obsolete prototypes.
5287 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5289         * mini.c: Don't fail generic sharing for initobj and sizeof - we
5290         already handle them.
5292 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5294         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
5295         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
5296         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
5297         tramp-x86.c: Added a MonoGenericContext* argument to
5298         mono_arch_get_unbox_trampoline() so that it can call other
5299         functions which require it.
5301 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5303         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
5304         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
5305         mono_arch_get_this_arg_from_call() takes a
5306         MonoGenericSharingContext* as well.
5308 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5310         * mini.c: Factor out code for emitting unbox into emit_unbox() and
5311         implement generic sharing of unbox.
5313 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5315         * mini.c: Don't compute the vtable to determine whether a field is
5316         special static, because it might not work for open types.
5318 2008-06-17  Mark Probst  <mark.probst@gmail.com>
5320         * mini.c: Removed the unused token_type and token_source arguments
5321         from get_runtime_generic_context_ptr().
5323 2008-06-17  Marek Habersack  <mhabersack@novell.com>
5325         * mini.c (ADD_BINOP): fix the build
5327 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
5329         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
5330         a widening op.
5332 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5334         * mini.h: Removed class relations enum that's not used anymore.
5336 2008-06-16  Mark Probst  <mark.probst@gmail.com>
5338         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
5340         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
5341         the lazy fetch trampoline access code.
5343 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
5345         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
5347 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
5349         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
5351         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
5353         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
5355 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5357         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
5358         intrinsics.
5360         * mini-ops.h: Add MIN/MAX_UN opcodes.
5362         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
5363         intrinsics.
5365         * basic-math.cs: Add more min/max tests.
5367         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5369 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5371         * mini.c: Small fix in the prologue of emit_castclass.
5373 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5375         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
5377         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
5378         do not work even for unsigned types. Fixes #400014.
5380         * basic-math.cs: Add regression tests for unsigned Min/Max.
5382 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5384         * mini.c: Added additional context_used argument to several
5385         functions, which will be needed for sharing generic methods.  Use
5386         GET_RGCTX macro wherever appropriate.  Declare only one
5387         context_used in mono_method_to_ir().
5389 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5391         * mini.c, generic-sharing.c: Removed generic class relations.
5393         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
5394         functions due to MRGCTX changes.
5396 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5398         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
5399         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
5400         with calculated IMT.
5402         * mini.c: Generic sharing of calls via generic interfaces.
5404         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
5405         generic method with non-constant MonoGenericContext*.  Instead,
5406         the context is taken out of the method itself.
5408 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5410         * mini.c: Generic sharing of ldvirtftn.
5412 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5414         * mini.c: Generic sharing of ldftn.
5416 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5418         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
5420 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5422         * mini.c: Generic sharing of the special case of ldtoken followed
5423         by a call to GetTypeFromHandle.
5425 2008-06-13  Mark Probst  <mark.probst@gmail.com>
5427         * mini.c: Generic sharing of box for nullable types.
5429 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
5431         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
5432         are passed on the stack. Fixes #324807.
5434 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
5436         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
5437         for the ArgValuetypeAddrInIReg case.
5439         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
5440         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
5442         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
5443         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
5444         local variable and pass the local variable by reference to the called method.
5445           
5446         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
5447         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
5449         Contributed under MIT/X11 license.
5451 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
5453         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
5455         * debug-mini.c (mono_debug_print_vars): Release memory after printing
5456         everything.
5458 2008-06-10  Martin Baulig  <martin@ximian.com>
5460         * debug-mini.c
5461         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
5463 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
5465         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
5466         possible error when no arguments are passed.
5468         Contributed under MIT/X11 license.
5470 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
5472         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
5473         where the file name is NULL.
5475 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
5477         * mini.c: Fix s390 build.
5479 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
5481         * trace.c (mono_trace_parse_options): Fix warnings.
5483         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
5485 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
5487         * mini.c (remove_block_if_useless): Avoid printing the method name.
5488         
5489         * mini.c: Remove needless setting of ins->cil_code which is now done by 
5490         MONO_INST_NEW.
5492         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
5493         LMF. Not yet used.
5495         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
5496         translated code after it has been patched.
5498 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
5500         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
5501         avoid problems during code patching on SMP systems.
5502         (emit_call): Avoid adding a patch info which is already added by 
5503         emit_call_body.
5504         (mono_arch_emit_exceptions): Ditto.
5506 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
5508         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
5509         MONO_TYPE_ISSTRUCT already checks for it.
5511 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
5513         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
5514           structs with floats on Winx64 the float registers are not used.  
5515           The integer registers are always used..
5516         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
5517           only one register will be used and only if the size of the struct 
5518           is 1,2,4, or 8 bytes.
5520         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
5521           to work for Winx64.
5523         Contributed under MIT/X11 license.
5525 2008-06-05  Martin Baulig  <martin@ximian.com>
5527         * debug-debugger.c (debugger_lookup_class): Also call
5528         mono_class_setup_methods() here; we're only called from RTI.
5530 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
5532         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
5533         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
5534         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
5535         Post-process object files and add dtrace-generated object, if necessary.
5537         Contributed under MIT/X11 license.
5539 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5541         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
5542         element class.
5544         * mini.c: Generic sharing for unbox.any and castclass.
5546 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5548         * mini.c: Ignore tailcall prefix in shared generic code and when
5549         doing calls which require a vtable/rgctx argument.
5551 2008-06-04  Mark Probst  <mark.probst@gmail.com>
5553         * mini.c: Don't free the JIT info.
5555         * driver.c: Changes in the JIT info table testing code.
5557 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
5559         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
5560         interruption. Fix some warnings.
5562         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
5563         interruption_checkpoint.
5565 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
5567         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
5568         from embedding applications.
5570 2008-06-02  William Holmes  <billholmes54@gmail.com>
5572         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
5573           reserving 32 bytes on the stack when making calls. 
5575         Contributed under MIT/X11 license.
5577 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
5579         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
5580         the linear IL branch.
5582         * driver.c: Print out more information for --version on arm.
5584 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
5586         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
5587         bb_exit instead, since out of line bblocks might not actually be emitted
5588         out-of-line.
5589         
5590         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
5591         maximum epilog size for out of line bblocks if tracing is enabled.
5593         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
5595 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
5597         * arrays.cs: Regression tests for allocating arrays with negative sizes.
5599 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
5601         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
5602         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
5603         opcodes.
5605 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
5607         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
5608         the 'value' to store is a constant.
5610         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
5612         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
5613         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
5615 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
5617         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
5618         for accessing method->generic_container.
5620 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
5622         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
5623         
5624         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
5626         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
5628         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
5629         fails.
5631 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
5633         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
5635         * mini.c: Handle the case when mono_class_vtable () fails.
5637 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
5638         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
5639         the stat profiler.
5641 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5643         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
5644         together with domain sharing.
5646 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5648         * mini.c: Treat callvirts to final methods like non-virtual calls
5649         when doing generic sharing, i.e. look them up in the runtime
5650         generic context.
5652 2008-05-22  Mark Probst  <mark.probst@gmail.com>
5654         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
5655         with computed types (for generic sharing).
5657         * mini.c: Generic sharing for mkrefany and refanyval.
5659 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
5661         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
5662         possible.
5664         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
5665         the generic sharing code.
5666         
5667         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
5668         when needed.
5670 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5672         * mini.h: Remove the declaration of mono_aot_init_vtable ().
5674 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
5676         * driver.c: updated copyright date
5678 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
5680         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
5681         needed.
5683 2008-05-19  Martin Baulig  <martin@ximian.com>
5685         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
5686         pointing to the new `_mono_debug_using_mono_debugger' variable.
5688         * driver.c
5689         (mono_main): Check mono_debug_using_mono_debugger() rather than
5690         the `MONO_INSIDE_MDB' environment variable to check whether we're
5691         inside the debugger.
5693 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
5695         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
5696         argument.
5698 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
5700         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
5702         * mini.c: Added mini_assembly_can_skip_verification. This
5703         function checks if the assembly requested to skip verification. 
5704         Fixes part of #387274.
5706 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
5708         * mini.c (mini_get_method): Disable the check for open generic classes when
5709         using generic sharing.
5711         * generics.cs: Add a test for #387034.
5713         * mini.c (mini_get_method): Check whenever the method class is an open generic
5714         type, and return NULL in that case, causing a verification error. Fixes
5715         #384123.
5717 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5719         * driver.c (mono_main): Revert r102623. The right
5720         thing to do is to enable the verifier under verifiable
5721         unless a --security flag was passed.
5723         We need this non-trivial behavior for --verify-all otherwise
5724         mcs-compileall won't be able to use it. As it needs everything to
5725         be verified under validil.
5727 2008-05-06  Martin Baulig  <martin@ximian.com>
5729         Fix #383749.
5731         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
5732         (mono_debugger_thread_cleanup): Likewise.
5733         (mono_debugger_extended_notification): Likewise.
5735 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5737         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
5738         against both inflated and non-inflated methods. We need to check against the
5739         generic definition for cases where the instantiated method is not visible.
5740         We need to check against the inflated types for cases where the instantiation
5741         changes any super type. This fixes #382986.
5743         Note that this doesn't need to be applied to other parts of mono_method_to_ir
5744         that check for visibiliy as generic params only appears as the type subject
5745         of tokens on call opcodes. Field manipulation and ldftn must always
5746         target an exact type.
5748 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
5750         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
5751         if no related --security flag is passed.
5753 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5755         * mini-arch.h: Prepare support for ppc64.
5757         Contributed under MIT/X11 license.
5759 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5761         * aot-runtime.c: Prepare support for ppc64.
5763         Contributed under MIT/X11 license.
5765 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
5767         * mini-ops.h: Prepare support for ppc64.
5769         Contributed under MIT/X11 license.
5771 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
5773         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
5775         Contributed under MIT/X11 license.
5777 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
5779         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
5780         assemblies, since aot_name is not a full path, causing us to load MS.NET 
5781         assemblies on windows.
5783 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
5785         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
5786         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
5787         * main.c: Use UTF-8 encoded command line instead of Windows default code
5788         page on Windows to support Unicode.
5789         * driver.c (DllMain): New function for mixed-mode assembly support.
5790         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
5791         export __stdcall functions without decoration.
5793         Contributed under MIT/X11 license.
5795 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5797         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
5798         saving it very early.
5800 2008-04-28  Mark Probst  <mark.probst@gmail.com>
5802         * mini.h, mini.c: Lots of code for accessing the old RGCTX
5803         deleted.  The only way to access the new RGCTX is via the
5804         trampline.
5806         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
5807         vtable instead of the RGCTX to static methods.
5809         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
5810         accessing the new RGCTX.
5812         * generic-sharing.c: There is no separation between self, type
5813         arguments and other types in the RGCTX anymore.
5815 2008-04-25  Jonathan Chambers <joncham@gmail.com>
5817         * mini-amd64.c (add_general): Remove previous stack adjustment.
5818         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
5819         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
5820         for 32 bytes of stack space reserved for all calls.
5821         
5822         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
5823         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
5824         adjustment.
5825         
5826         Code contributed under MIT/X11 license.
5828 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
5830         * mini.c (mini_method_verify): Only verify non-inflated methods, check
5831         against the root definition, peeling out method and type instantiations.
5832         Cache verify success results, code that fails verification is still
5833         checked multiple times.
5835 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
5837         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
5839 2008-04-23  Jonathan Chambers <joncham@gmail.com>
5841         * mini-amd64.c (add_general): Always increment stack on Win64.
5842         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
5843         on Win64.
5844         
5845         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
5846         stack based argument handling on Win64.
5847         
5848         Code contributed under MIT/X11 license.
5850 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
5852         * Makefile.am (version.h): Add support for git-svn.
5854 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
5856         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
5857         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
5858         avoiding allocations and libc functions which might deadlock.
5859         
5860         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
5861         'no-gdb-backtrace' option is set.
5863         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
5865         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
5867 2008-04-21  Martin Baulig  <martin@ximian.com>
5869         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
5870         and `get_lmf_addr'; `notification_address' is no longer a pointer.
5872 2008-04-21  Martin Baulig  <martin@ximian.com>
5874         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
5875         `thread_vtable', `event_handler_ptr' and `event_handler'.
5877 2008-04-21  Martin Baulig  <martin@ximian.com>
5879         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
5880         allows delayed initialization of the `executable_code_buffer' when
5881         attaching.
5883 2008-04-21  Martin Baulig  <martin@ximian.com>
5885         * mini.h (mono_debugger_create_notification_function): Removed.
5886         * tramp-*.c (mono_debugger_create_notification_function): Removed.
5888         * mdb-debug-info64.s
5889         (MONO_DEBUGGER__notification_function): Added this in the .text section.
5891         * mdb-debug-info32.s
5892         (MONO_DEBUGGER__notification_function): Added this in the .text section.
5894         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
5895         currently only works on x86 and x86_64, so don't create it on ppc.
5897 2008-04-21  Martin Baulig  <martin@ximian.com>
5899         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
5901         * mini.c
5902         (mini_method_compile): In the fp elimination check, check
5903         `debug_options.mdb_optimizations' in addition to
5904         mono_debug_using_mono_debugger().       
5906         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
5907         disable some JIT optimizations which are only disabled when
5908         running inside the debugger.
5909         Added `--help-debug' option to describe the debugging options.
5910         (parse_debug_options): New static function to parse the `--debug'
5911         options, so we can easily add more stuff in future.
5913 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
5915         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
5916         the method has no body.
5918 2008-04-19  Jonathan Chambers <joncham@gmail.com>
5920         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
5921         assembly is not allowed in MSVC 64-bit compiler. 
5922         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
5923         as we get floating point exceptions everywhere.
5924         
5925         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
5926         correctly align arguments for call to throw_exception.
5927         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
5928         
5929         Code contributed under MIT/X11 license.
5931 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
5933         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
5935 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
5937         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
5939         * mini-amd64.c (NEW_INS): Set cil_code.
5941         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
5942         from mini-amd64.c so all debugger related logic is in one place.
5944         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
5945         later won't have a random ip assigned to them.
5947 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
5949         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
5950         the arch specific function initializes code_size.
5951         (mono_create_delegate_trampoline): Ditto.
5953         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
5954         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
5955         platforms.
5957         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
5958         running under the debugger.
5960         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
5961         debugger.
5963         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
5964         debugger. Also move the disabling of optimizations here from driver.c.
5965         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
5966         debugger.
5968         * mini.h (MonoCompile): Add a few new flags.
5970 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
5972         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
5973         so the cil_code field of created MonoInst's is properly set.
5974         (mini_select_instructions): Ditto.
5976         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
5977         (MONO_INST_NEW_CALL): Ditto.
5979         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
5980         in many places so the ins->cil_code field is properly initialized.
5982         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
5983         place.
5985 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
5987         * mini.c (mini_method_compile): Print a different message when compiling a 
5988         shared method.
5989         
5990         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
5991         > 1.
5993 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
5995         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
5996         SSE2 instructions.
5998         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
5999         
6000 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
6002         * mini.c (handle_stack_args): Make this return void since its return value was
6003         never used. Also set cfg->unverifiable for invalid IL instead of calling
6004         G_BREAKPOINT ().
6006 2008-04-10  Mark Probst  <mark.probst@gmail.com>
6008         * mini.c: Make sure "this" is live in catch clauses with type
6009         variables in shared generic code.
6011 2008-04-08  Mark Probst  <mark.probst@gmail.com>
6013         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
6014         generic_class_is_reference_type() to ensure the proper behaviour
6015         when sharing generic code and the type in question is a type
6016         argument.
6018 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
6020         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
6021         race conditions when printing thread dumps. Fixes #377738.
6023 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
6024         
6025         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
6026         shows up when both MonoInst arguments can cause aliasig.
6027         There is likely no way in the current JIT to trigger this problem, but
6028         it showed up in the development of generics sharing, when in a new
6029         opcode both args of an OP_GROUP can be aliases (addresses of a local).
6030         When the generics sharing code will be committed, its tests will be
6031         valid also for this bug.
6033 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
6035         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
6036         PATCH_INFO_METHOD.
6038         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
6039         NULL.
6041 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
6043         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
6044         use a more detailed exception message for InvalidCastException.
6046         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
6048         * driver.c (mono_main): Add --debug=casts option to turn on better 
6049         InvalidCastException message details.
6051         * mini.c (mini_get_debug_options): New helper function to return the address of
6052         the debug_options variable.
6054         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
6055         the jit_tls TLS variable.
6057         * mini.c (mono_jit_tls): New TLS variable.
6059         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
6060         option is used.
6062 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
6064         * mini.h: Removed verifer related stuff. This code was moved to verify.c
6066         * mini.c: Removed verifer related stuff, code moved to verify.c.
6068         * driver.c: Using code from verify.c instead of mini.c.
6070 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
6072         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
6073         longer valid.
6075 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
6077         * mini.c (check_for_method_verify): Enabling verification of
6078         corlib if mono_verify_all is set. Bugs in the verifier preventing that
6079         have been fixed.
6081 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
6083         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
6084         caller saved registers as well.
6085         
6086         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
6087         saved registers as well.
6089 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
6091         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
6093         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
6094         code.
6096 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
6098         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
6099         to get_call_info.
6100         (get_call_info): Take a gsctx argument instead of 'cfg'.
6102 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
6104         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
6105         mono_verify_all is set.
6107         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
6109         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
6111 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
6113         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
6114         an exception.
6116         * driver.c mini.c mini.h: Add a --verify-all development option to test the
6117         verifier and the code generated by the compiler.
6119 2008-03-25  Mark Probst  <mark.probst@gmail.com>
6121         * mini.c: Generic sharing of the non-nullable case of the box
6122         instruction.
6124 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
6126         * inssel.brg: Fix the build.
6128         * iltests.il.in: Add a test for lconv.ovf.u8.un.
6130 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
6132         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
6133         Array:Address. Fixes #372410.
6135         * iltests.il.in: New tests for readonly prefix.
6137 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
6139         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
6140         mini-trampolines.c.
6142         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
6143         mini-exceptions.c.
6145         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
6146         
6147         * mini.c (mono_decompose_op_imm): New helper function.
6149         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
6150         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6151         return value.
6153         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
6154         mono_arch_output_basic_block. Fix warnings.
6156         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
6157         for now.
6159 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
6161         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
6162         since the extra frame is now detected automatically inside the loop.
6164         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
6165         opts which are now in mono_peephole_ins ().
6166         
6167         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
6169         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
6170         frames and skip duplicate managed-to-native frames. Fixes #367665.
6172         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
6173         opts which are now in mono_peephole_ins ().
6174         (mono_arch_peephole_pass_2): Ditto.
6176         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
6178         * mini-codegen.c (mono_peephole_ins): New helper function containing the
6179         arch independent peephole optimizations.
6181         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
6182         opts which are now in mono_peephole_ins ().
6184         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
6185         
6186         * mini-s390.c (mono_arch_output_basic_block): Fix build.
6188         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
6189         pattern.
6191         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
6192         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
6193         opcode. 
6195 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
6197         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
6198         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
6199         return value.
6201         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
6202         mono_arch_output_basic_block. Fix warnings.
6204 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6206         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6207         conv.ovf.u.un.
6209 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6211         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
6212         conv.ovf.u.un.
6214         * iltests.il: Add new tests.
6216 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
6218         * mini.c: Removed Windows version macros.
6220 2008-03-20  Mark Probst  <mark.probst@gmail.com>
6222         * generic-sharing.c: Put reflection types in the extensible part
6223         of the runtime generic context.
6225         * mini.c: Generic sharing of the GetTypeHandle special case of the
6226         ldtoken instruction.
6228 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
6230         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
6232         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
6233         
6234         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
6235         consistency with the other version on the linear IR branch.
6237         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
6239         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
6241         * iltests.il.in: Add new tests.
6243 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
6245         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
6247         * iltests.il.in: Add new tests.
6249 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6251         * mini.c: Two variables with the same name were declared in
6252         nesting contexts and one wasn't initialized.  Fixed.
6254 2008-03-19  Mark Probst  <mark.probst@gmail.com>
6256         * mini.c: Generic sharing of the initobj instruction.
6258 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
6260         * mini.c: make the test to optimize ldtoken from typeof() more
6261         precise.
6263 2008-03-18  Mark Probst  <mark.probst@gmail.com>
6265         * mini.c: Generic sharing of the initobj instruction for reference
6266         types.
6268 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
6270         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
6271         the mono_breakpoint_clean_code() code to perform bound checks.
6273 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
6275         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
6276         mono_arch_patch_callsite() to include the start of the managed method
6277         to be able to perform bound checks.
6279 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6281         * mini.c: Generic sharing for the isinst instruction.
6283 2008-03-17  Mark Probst  <mark.probst@gmail.com>
6285         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6286         inssel-long32-mips.brg: Added opcodes for doing indirect calls
6287         with the runtime generic context argument.
6289         * mini.c: Share calls to several types of unsharable methods by
6290         putting the address of the method code in the runtime generic
6291         context and doing an indirect call.
6293         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6294         to switches.
6296 2008-03-16  Mark Probst  <mark.probst@gmail.com>
6298         * generic-sharing.c: Change due to a change in the runtime genric
6299         context API.
6301 2008-03-15  Martin Baulig  <martin@ximian.com>
6303         * tramp-x86.c
6304         (mono_arch_nullify_class_init_trampoline): Add call to
6305         mono_breakpoint_clean_code() to make things work when running
6306         inside the debugger.
6308         * tramp-amd64.c
6309         (mono_arch_nullify_class_init_trampoline): Add call to
6310         mono_breakpoint_clean_code() to make things work when running
6311         inside the debugger.
6313 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6315         * inssel-long.brg (reg): Fix 64 bit build.
6317 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6319         * mini.c, mini.h: Share static generic code by passing it an
6320         implicit argument pointing to the runtime generic context.
6322         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
6323         inssel-long32-mips.brg: New opcodes for calling shared static,
6324         which need to be passed the runtime generic context.
6326         * mini-amd64.c, mini-x86.c: Save the runtime generic context
6327         argument on the stack in the prologue if needed.  New function for
6328         finding the runtime generic context argument from the registers
6329         saved by the trampoline.
6331         * mini-amd64.h, mini-x86.h: Specify which register to use for the
6332         runtime generic context argument.
6334         * tramp-amd64.c: Also restore the register used for the runtime
6335         generic context argument.
6337         * mini-trampoline.c: Resolve shared static calls by consulting the
6338         runtime generic context via the new argument.
6340         * generic-sharing.c: Add an argument to sharability-checking
6341         functions that specifies whether type variables should be treated
6342         as sharable type arguments.
6344         * inssel-x86.brg: Removed a superfluous, buggy rule.
6346         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
6347         to switches.
6349 2008-03-14  Martin Baulig  <martin@ximian.com>
6351         * debug-debugger.c (main_thread_handler): Call
6352         mono_runtime_run_main() without sending any notifications.
6354         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
6356 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
6358         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
6360 2008-03-14  Mark Probst  <mark.probst@gmail.com>
6362         * tramp-x86.c: Fixed register restore offsets in the trampoline
6363         code for ECX and EDX.
6365 2008-03-12  Geoff Norton  <gnorton@novell.com>
6367         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
6368         different ucontext_t implementations.
6369         * exceptions-arm.c: Use the above defines to get exceptions working on 
6370         iPhone (based on a patch by Luke Howard lukeh@padl.com)
6371         * mini-arm.c: Implement iPhone icache support (based on a patch by
6372         Luke Howard lukeh@padl.com)
6374 2008-03-12  Mark Probst  <mark.probst@gmail.com>
6376         * mini.c: Enable generic sharing of calls to non-static
6377         non-interface non-generic non-value-type methods.
6379         * mini-trampolines.c: Resolve calls from shared generic code.
6381 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
6383         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
6385         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
6387 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
6389         * mini.c: some fixes for the AOT compiler.
6391 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6393         * cpu-amd64.md: Add clob:1 to some float opcodes.
6395 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
6397         * mini.h: Added MiniVerifierMode enumeration.
6399         * mini.c: Added mini_verifier_set_mode to control
6400         the usage of the new verifier.
6402         * mini.c (mono_method): Integrated the new verifier.
6404         * driver.c: Extended --security option with validil and
6405         verifiable options to activate the new verifier.
6407 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
6409         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
6410         optimization to ctors taking 0 or 2 arguments too.
6412         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
6413         a bit.
6415         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
6417         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
6419 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
6421         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
6422         non-aot case as well.
6424         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
6426         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
6427         changes.
6429         * aot-compiler.c (encode_patch): Ditto.
6431         * mini.h (G_MININT32): Fix the definition of this.
6433 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
6435         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
6437         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
6439 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6441         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
6442         methods returning vtypes in registers.
6443         (mono_arch_allocate_vars): Ditto.
6445         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
6447         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
6449         * generics.cs: Add a test from the linear IR branch.
6451         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
6453         * mini.c (inline_method): Cache failed inline attempts.
6455 2008-03-04  Mark Probst  <mark.probst@gmail.com>
6457         * mini.c: For shared methods of generic classes put the location
6458         of "this" into the MonoGenericJitInfo.
6460         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
6461         register out of a MonoContext by register number.  Add the generic
6462         sharing context as an argument to mono_arch_find_this_argument().
6464         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
6465         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
6466         for new arch function.
6468         * mini-exception.c: Handle open exception clauses in shared
6469         generic code.
6471         * mini-trampolines.c: Supply additional argument to
6472         mono_arch_find_this_argument().
6474 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
6476         * Makefile.am (regtests): Run the bench.exe tests last.
6478 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
6480         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
6481         a bit.
6483 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
6485         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
6486         with MS.
6488         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
6489         
6490         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
6492         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
6493         whose class has no cctor.
6495         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
6497 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
6499         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
6500         unverified.
6502 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
6504         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
6505         to be in sync with the code on the linear IR branch.
6507         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
6509         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
6511 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
6513         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
6515         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
6517         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
6519         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
6521         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
6522         
6523         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
6524         body.
6526 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
6528         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
6529         OP_LOADR4_MEMBASE emission.
6531         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
6532         (mono_spillvar_offset_float): Ditto.
6534         * mini-mips.c (mono_arch_emit_prolog): Ditto.
6536         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
6537         emission.
6539         * basic-long.cs: Add regression tests for them.
6541         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
6542         use.
6543         (mono_arch_allocate_vars): Fix representation of single-precision float
6544         argument.
6545         (mono_arch_output_basic_block): Ditto.
6547         * inssel-mips.brg: Ditto, remove duplicate items.
6549         * mini-mips.c (emit_load_volatile_arguments): New function to handle
6550         arguments of tail calls as on other platforms.
6551         (mono_arch_output_basic_block): Handle tail calls.
6553         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
6554         register.
6556         * objects.cs (test_5_pass_static_struct): Add test for it.
6558         Contributed under MIT/X11 license.
6560 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
6562         * Makefile.am: Use gmcs for compiling the regression tests.
6564         * *.2.cs *.2.il: Rename to *.cs and *.il.
6566 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
6568         * regalloc.h: Make the vassign array smaller.
6570         * mini.c (mini_method_compile): Remove an unused field in cfg.
6572         * mini-codegen.c: Add a bunch of micro optimizations.
6574 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
6576         * regalloc.h: Remove some unused fields.
6578 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
6580         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
6582         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
6584 2008-02-22  Mark Probst  <mark.probst@gmail.com>
6586         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
6588         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
6589         trampoline: Fetch an entry from the runtime generic context.  If
6590         it's NULL, jump to the actual trampoline to fill the runtime
6591         generic context.  Otherwise, return it.
6593         * mini.c: Call the lazy fetch trampoline to get entries out of the
6594         runtime generic context.
6596         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
6597         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
6598         tramp-sparc.c: Stubs for the lazy fetch trampoline.
6600 2008-02-21  Mark Probst  <mark.probst@gmail.com>
6602         * mini.c: Fetch data out of the extensible part of the runtime
6603         generic context instead of calling a helper function.
6605         * generic-sharing.c: Some functions moved into
6606         metadata/generic-sharing.c.  Helper function for fetching other
6607         types now checks and asserts against extensible rgctx (just for
6608         debugging purposes - the helper function isn't called anymore
6609         unless for debugging).
6611 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
6613         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
6614         for tail calls up to the point that the tests in iltests.exe run. Also add a
6615         dummy CKFINITE implementation.
6616         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
6617         needed for trampoline LMF frames.
6619         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
6620         trampoline LMF frames.
6622 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
6624         * mini.c (inline_method): clean any pending loader error when inlining fail.
6625         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
6627 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
6629         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
6631         * aot-runtime.c (decode_patch_info): Ditto.
6633         * mini.c (mono_resolve_patch_target): Ditto.
6634         
6635         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
6636         icall wrappers.
6638         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
6639         
6640         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
6641         if it references an icall address.
6643 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
6645         * cpu-s390x.md: Remove some more unused opcodes.
6646         
6647         * cpu-s390x.md: Remove some unused opcodes.
6649         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
6650         mono_op_imm_to_op ().
6652         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
6653         instead of a switch statement.
6654         
6655         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
6656         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
6658         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
6659         
6660         * mini-codegen.c: Remove unused mono_regstate2_... functions.
6662         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
6663         -1.
6665 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
6667         * driver.c (mono_main): Improve error reporting when an assembly cannot be
6668         opened. Fixes #362607.
6670         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
6672         * iltests.il.in: Add a test for static methods in interfaces.
6674 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
6676         * genmdesc.c (build_table): Fix a crash on older glib versions.
6678         * cpu-sparc.md: Remove some unused opcodes.
6679         
6680         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
6681         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
6683         * cpu-amd64.md: Remove some unused opcodes.
6685         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
6686         like the other opcodes.
6688 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
6690         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
6692         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
6694         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
6695         variables 'cfg' instead of 'm' for consistency.
6697         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
6699         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
6700         argument holding the vtype return address, to avoid the ambigious use of
6701         cfg->ret for this purpose.
6703         * mini.c (NEW_RETLOADA): Use vret_addr if set.
6705         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
6706         
6707         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
6708         new mono_print_ins () function which only takes one argument.
6710 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
6712         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
6713         macro arguments.
6715 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
6717         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
6719         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
6721         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
6722         opcodes and other small changes.
6724         * mini-ops.h: Add some new opcodes from the linear IR branch.
6726         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
6728         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
6729         opcodes, use the REG_MEMBASE opcodes instead.
6730         
6731         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
6732         opcodes, use the REG_MEMBASE opcodes instead.
6733         
6734         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
6735         linear IR branch.
6737         * mini.c (mono_op_imm_to_op): New helper function.
6739         * mini-ops.h: Add some opcodes from linear IR branch.
6741 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
6743         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
6744         <tsv@solvo.ru>.
6746 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
6748         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
6749         OP_ICONV_TO_R4/R8.
6751         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
6753 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
6755         * aot-compiler.c (emit_method_code): Add an assert.
6757         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
6758         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
6759         methods.
6761 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
6763         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
6764         some load/store opcodes so they are consistent. 
6765         (mono_arch_emit_prolog): Simplify some code.
6767         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
6769         * objects.cs: Add tests for large argument offsets on ARM.
6771         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
6772         stack offsets. Fixes #359651.
6774         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
6776         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
6778         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
6780         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
6782         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
6784         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
6785         rid of CEE_CONV_R_UN.
6787         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
6789 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
6791         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
6793         * mini.c (mono_normalize_opcodes): Add some more opcodes.
6795         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
6797         * cpu-amd64.md: Remove some unused opcodes.
6799         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
6801         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
6803         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
6804         arch specific functions for its parts. Call the peephole pass after local
6805         regalloc so the prolog can compute a more accurate max_offset.
6806         
6807         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
6808         the corresponding OP_I/OP_L opcodes.
6810         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
6812         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
6814 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6816         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
6817         as they are handled in mini.c.
6819         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
6820         
6821         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
6822         case since it is handled in mini.c.
6824         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
6826         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
6828         * *.c: Use the new opcodes in the IR and back end code.
6830         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
6832         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
6834 2008-02-06  Mark Probst  <mark.probst@gmail.com>
6836         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
6837         an assert because it has a race condition.
6839 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
6841         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
6843         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
6845         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
6847         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
6848         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
6850 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
6852         * cpu-amd64.md (move): Correct the maximum size of move.
6854 2008-02-05  Mark Probst  <mark.probst@gmail.com>
6856         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
6857         the generic class init trampoline to return quickly if the class
6858         is already inited.
6860 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
6862         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
6863         issues where an 32 bit callsite cannot be patched by a 64 bit address.
6865 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
6867         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
6868         branch.
6870 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
6872         * objects.cs: Add some soft-float tests.
6874         * mini.c: Fix a couple more soft-float issues.
6876         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
6878         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
6879         avoid a REX prefix.
6881 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
6883         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
6884         exception happens while compiling a virtual method.
6886 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
6888         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
6889         
6890         * mini-sparc.c: Fix build.
6892         * mini-sparc.c (get_call_info): Add support for generic sharing.
6894         * mini-exceptions.c: Add a FIXME.
6896 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
6898         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
6899         altstack handling code.
6901         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
6902         
6903         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
6905         * mini-s390.c: Add support for generic sharing.
6907         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
6908         Fix CAS on s390.
6909         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6911         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
6913         * mini-s390x.c: Add support for generic sharing.
6914         
6915         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
6916         Fix CAS on ia64.
6917         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
6919         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
6920         can be used since it takes a 16 bit signed immediate.
6922         * inssel-s390x.brg: Fix OP_SETRET.
6924         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
6926         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
6928         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
6930         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
6932         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
6933         in one place.
6935         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
6936         stuff.
6938         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
6939         of the unused mono_arch_patch_delegate_trampoline stuff.
6941 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
6943         * basic-long.cs: Move the fp related tests to basic-float.cs.
6945         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
6947         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
6949         * basic-calls.cs: Add a test for proper float argument passing.
6951         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
6952         if the context corresponds to an exception received through a signal.
6954         * exceptions.cs: Add a test for nullref handling at the start of a try
6955         clause.
6957         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
6959         * jit-icalls.c (mono_break): New JIT icall.
6961         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
6963         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
6965 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
6967         * cpu-*.md: Get rid of unused opcodes.
6969         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
6971         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
6972         by all platforms.
6974         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
6975         define.
6977         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
6978         the arch independent trampoline code in mini-trampolines.c.
6980         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
6982         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
6984         * mini-s390.h: Remove an unused define.
6985         
6986         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
6987         the arch independent trampoline code in mini-trampolines.c.
6989         * mini-arm.c (mono_arch_emit_prolog): Fix build.
6991 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
6993         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
6995         * mini-s390.c (mono_arch_emit_prolog): Fix build.
6997         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
6999         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
7001         * cpu-amd64.md: Use smaller sizes for int opcodes.
7003         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
7005         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
7006         objects.cs.
7008         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
7009         debugging.
7011         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
7012         instead of though a pointer to save an indirection when accessing elements of
7013         the array.
7015         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
7016         some typos.
7017         (NOT_IMPLEMENTED): New helper macro.
7018         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
7019         of a bb.
7021         * *.c: Use the new helper macro.
7023 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
7025         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
7027 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
7029         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
7030         stack slots.
7032 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
7034         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
7035         profiling is enabled.
7036         
7037         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
7038         the end.
7039         (mono_arch_emit_prolog): Add more first bblock optimizations.
7041         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
7042         in order if possible.
7043         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
7044         bblock, since the arguments are still in their original registers.
7046         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
7048 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
7050         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
7051         as well.
7053         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
7054         offset 0.
7056         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
7058         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
7059         process async exceptions received while in unmanaged code.
7061         * mini.c (mini_init): Install a callback with the runtime which will be called
7062         when a thread receives an async exception while in unmanaged code.
7064         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
7066         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
7068 2008-01-16  Wade Berrier  <wberrier@novell.com>
7070         * cpu-g4.md:
7071         * cpu-arm.md:
7072         * cpu-s390x.md:
7073         fix build
7075 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
7077         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
7078         compilation with sun cc.
7080         * cpu-*.md: Fix the build.
7082         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
7084         * mini-amd64.h: Add some comments to the MonoLMF structure.
7086         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
7087         
7088         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
7089         in the LMF structure if possible. This saves two instructions in the
7090         managed->native wrappers.
7092         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
7094 2008-01-16  Mark Probst  <mark.probst@gmail.com>
7096         * generic-sharing.c: New type argument lookup code which uses the
7097         runtime generic context template.
7099 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
7101         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
7103         * mini-arm.c (add_general): Fix arm eabi parameter passing.
7104         (mono_arch_output_basic_block): Fix localloc implementation.
7106         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
7108         * mini-ia64.c (peephole_pass): Fix ia64 build.
7110         * mini-amd64.c (peephole_pass): Fix a warning.
7111         
7112         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
7113         at a constant offset from sp/fp.
7115         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
7116         instead of obtaining it from *lmf in the managed method case.
7118 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
7120         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
7122 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
7124         * mini.h (MonoInstList): New type.
7125         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
7126         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
7127         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
7128         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
7129         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
7130         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
7131         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
7132         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
7133         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
7134         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
7135         MONO_INST_LIST_FOR_EACH_ENTRY,
7136         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
7137         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
7138         mono_inst_list_first, mono_inst_list_last,
7139         mono_inst_list_next, mono_inst_list_prev): New instruction
7140         list handling interfaces.
7141         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
7142         list head 'ins_list'.
7143         (MonoInst): Replace next pointer with list head 'node'.
7144         (MonoCallInst): Make 'out_args' a MonoInstList.
7145         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
7146         (MonoCompile): Delete reverse_inst_list and
7147         reverse_inst_list_len.
7148         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
7149         mono_arch_lowering_pass, mono_arch_local_regalloc,
7150         mono_arch_output_basic_block, mono_arch_emit_prolog):
7151         Convert to new instruction lists.
7152         (insert_after_ins): Delete.
7153         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
7154         instruction lists.
7155         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
7156         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
7157         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
7158         mono_emulate_opcode, mono_emit_load_got_addr,
7159         inline_method, mono_method_to_ir, mono_print_bb_code,
7160         print_dfn, decompose_pass, nullify_basic_block,
7161         replace_out_block_in_code, remove_block_if_useless,
7162         merge_basic_blocks, move_basic_block_to_end,
7163         try_unsigned_compare, optimize_branches, mono_print_code,
7164         mini_select_instructions, remove_critical_edges): Likewise.
7165         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
7166         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
7167         mono_arch_output_basic_block, mono_arch_emit_prolog):
7168         Likewise.
7169         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
7170         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7171         mono_arch_output_basic_block): Likewise.
7172         (inst_list_prepend, insert_after_ins): Delete.
7173         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
7174         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
7175         instruction lists.
7176         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
7177         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
7178         mono_arch_emit_prolog): Likewise.
7179         * cfold.c (mono_constant_fold): Likewise.
7180         * liveness.c (visit_bb, mono_analyze_liveness,
7181         optimize_initlocals): Likewise.
7182         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
7183         * graph.c (mono_draw_code_cfg): Likewise.
7184         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
7185         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
7186         mono_ssa_cprop): Likewise.
7187         * abcremoval (get_relations_from_previous_bb, process_block):
7188         Likewise.
7189         * local-propagation (mono_cprop_invalidate_values,
7190         mono_local_cprop_bb): Likewise.
7191         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
7192         peephole_pass, mono_arch_output_basic_block,
7193         mono_arch_emit_prolog): Likewise.
7194         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
7195         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7196         mono_arch_emit_prolog): Likewise.
7197         (insert_after_ins): Delete.
7198         * aliasing.c (print_code_with_aliasing_information,
7199         mono_build_aliasing_information, mono_aliasing_deadce):
7200         Convert to new instruction lists.
7201         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
7202         peephole_pass, NEW_INS, mono_arch_lowering_pass,
7203         mono_arch_local_regalloc, mono_arch_output_basic_block):
7204         Likewise.
7205         (insert_after_ins): Delete.
7206         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
7207         peephole_pass, mono_arch_output_basic_block): Convert to
7208         new instruction lists.
7209         * mini-codegen (InstList, inst_list_prepend,
7210         insert_after_ins): Delete.
7211         (insert_before_ins, get_register_force_spilling,
7212         get_register_spilling, free_up_ireg, free_up_reg,
7213         create_copy_ins, create_spilled_store, alloc_int_reg,
7214         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
7215         to new instruction lists.
7216         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
7217         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
7218         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
7219         (insert_after_ins): Delete.
7220         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
7221         mono_arch_local_regalloc, mono_arch_output_basic_block,
7222         mono_arch_call_opcode): Convert to new instruction lists.
7223         (insert_after_ins): Delete.
7224         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
7225         peephole_pass, mono_arch_output_basic_block,
7226         mono_arch_emit_prolog): Convert to new instruction lists.
7228 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
7230         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
7232         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
7233         Fixes #353182.
7235         * Makefile.am (version.h): Make this work with non-bash shells.
7237 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
7239         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
7241 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
7243         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
7244         the InitializeArray optimization.
7246 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
7248         * mini.c driver.c: Don't include os/gc_wrapper.h.
7250 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
7252         * mini.c (print_jit_stats): Print GC statistics if available.
7254 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
7256         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
7258 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
7260         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
7262 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
7264         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
7265         
7266         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
7268         * driver.c (mono_main): Ditto.
7270 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
7272         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
7274         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
7275         in the vtable can't be encoded.
7276         (compile_method): Ditto.
7278 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
7280         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
7281         defined.
7283         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
7284         lmf->rbp.
7286         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
7287         the top LMF entry belongs to the current method.
7289         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
7291 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
7293         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
7294         
7295         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
7297         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
7299         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
7301         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
7303         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
7304         implementation.
7306         * basic-float.cs: Add an ulong->double cast test.
7308 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
7310         * mini.c (mono_method_to_ir): Fix a warning.
7312 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
7314         * mini-ops.h: Add OP_SWITCH.
7316         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
7317         CEE_SWITCH in back-end code, use OP_SWITCH instead.
7319 2007-12-11  Geoff Norton  <gnorton@novell.com>
7321         * mini-s390x.c: Minor change to the MAX() define to allow
7322         it to compile with other gcc versions.
7324 2007-12-11  Geoff Norton  <gnorton@novell.com>
7326         * cpu-s390x.md:
7327         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
7329 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7331         exceptions-arm.c (mono_arch_get_restore_context): Restore
7332         the frame pointer.
7334         exceptions-arm.c (throw_exception): Save the frame pointer.
7335         This is a partial fix for #323747. Only the client side is
7336         fixed.
7338 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
7340         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
7341         was using an unrelated variable to log the class which
7342         needed the cctor to be called. This was crashing on arm.
7344 2007-12-09  Robert Jordan  <robertj@gmx.net>
7346         * mini-x86.c (mono_arch_emit_epilog):
7347         Consider all kinds of 64-bit types. Fixes #323114.
7349 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
7351         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
7353 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7355         * mini-amd64.c (peephole_pass): Add a missing instruction check.
7357 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7359         * mini.c: run type ctor before allocating an object, not only
7360         when running it's constructor method (fixes at least part of bug #342507).
7362 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7363         
7364         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
7365         
7366         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
7367         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
7368         function.
7370         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
7371         mono_generic_class_init_trampoline () the same as it is done with the other
7372         trampolines.
7374         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
7375         aot-runtime.c aot-compiler.c: Implement AOT support.    
7377 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7379         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
7380         build for archs which don't have the vtable trampoline defined
7381         yet.
7383 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
7385         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
7387         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
7389         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
7391         * tramp-<ARCH>.c: Use the new helper function.
7393 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7395         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
7396         trampoline call, which takes a vtable argument.
7398         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
7399         OP_TRAMPCALL_VTABLEs like other calls.
7401         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
7402         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
7403         call.  Implemented a support function which fetches the vtable
7404         from a register set.
7406         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
7407         Implemented a generic class init trampoline, using the
7408         OP_TRAMPCALL_VTABLE opcode.
7410         * mini.c: Implemented static field access when sharing generic
7411         code.  This implies initing the class using the new
7412         OP_TRAMPCALL_VTABLE call.
7414 2007-12-07  Mark Probst  <mark.probst@gmail.com>
7416         * mini.c: Don't compile methods with sharing enabled if their
7417         classes are disabled for sharing.
7419 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7421         * inssel.brg: Add a missing sign extension to the GETCHR and array access
7422         opcodes. Fixes #346563.
7424         * objects.cs: Add a new test.
7426         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
7428         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
7429         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
7431 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
7433         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
7435 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
7437         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
7438         code stream.
7440 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
7442         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
7444         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
7445         optimization in the AOT case.
7446         
7447 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
7449         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
7450         
7451         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
7453         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
7455         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
7457         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
7458         is created by the inlined delegate ctor.
7460         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
7462         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
7464 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
7466         * cpu-x86.md: Fix the length of ckfinite.
7468 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
7470         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
7471         
7472         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
7473         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
7475         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
7477         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
7478         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
7480 2007-11-28  Martin Baulig  <martin@ximian.com>
7482         * mini-x86.c
7483         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
7484         after creating the trampoline.
7486 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
7488         * aot-runtime.c (load_aot_module): Check runtime version if needed.
7490         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
7491         the same version.
7493         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
7494         instead of the calling method to help AOT.
7496         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
7498 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
7500         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
7501         is defined.
7503 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
7505         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
7506         
7507         * aot-compiler.c (compile_method): Correct check for generic method definitions.
7508         (encode_method_ref): No need to handle generic method definitions specially.
7510         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
7512         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
7513         decode_klass_info.
7515         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
7516         encode_klass_info.
7517         (compile_method): Enable generic sharing.
7519 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
7521         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
7522         (mini_method_compile): Add preliminary support for AOTing shared generic code.
7524         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
7525         generic code.
7527         * mini-trampolines.c: Fix a warning.
7529         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
7530         NEW_PCONST.
7531         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
7532         (generic_class_is_reference_type): Remove unused function.
7534         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
7535         in the generic vtable trampoline case.
7537         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
7538         
7539         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
7540         return an AOT method based on a vtable slot.
7542         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
7544         * mini.c (mini_get_vtable_trampoline): Export this.
7546 2007-11-22  Martin Baulig  <martin@ximian.com>
7548         * debug-debugger.h
7549         (MonoDebuggerInfo): Move `debugger_version' up.
7551 2007-11-22  Martin Baulig  <martin@ximian.com>
7553         * mini-amd64.c
7554         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
7556         * mini-trampolines.c
7557         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
7558         after compiling the method.
7560 2007-11-20  Martin Baulig  <martin@ximian.com>
7562         * debug-mini.c
7563         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
7564         (mono_debugger_remove_breakpoint): Likewise.
7565         (mono_debugger_check_breakpoints): Likewise.
7567         * debug-debugger.c: Implement the new breakpoint interface here.
7569 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
7571         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
7572         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
7574         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
7576 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
7578         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
7580         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
7581         mini.c.
7583         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
7584         mini.c.
7586         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
7587         returning a vtype in a register.
7589         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
7590         here from the arch specific code.
7592         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
7593         mini.c.
7595         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
7596         (mono_arch_emit_prolog): Increment maximum prolog size.
7598         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
7599         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
7601         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
7602         MonoGenericSharingContext.
7604         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
7605         MonoGenericSharingContext. Allocate memory from the cfg mempool.
7607 2007-11-15  Mark Probst  <mark.probst@gmail.com>
7609         * mini.c, mini.h, generic-sharing.c: Functions for producing code
7610         which extract fields out of the runtime generic context.  Full
7611         sharing of the NEWARR opcode.
7613 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
7615         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
7616         --enable-minimal=ssa.
7618 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
7620         * mini-trampolines.c (mono_delegate_trampoline): Update after 
7621         mono_marshal_get_delegate_invoke () signature change.
7623 2007-11-13  Mark Probst  <mark.probst@gmail.com>
7625         * mini.c: Removed the shared context in favor of the generic
7626         sharing context.  Allocate the MonoJitInfo structure with room for
7627         the generic sharing context if it's needed.
7629         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
7630         domain-internals.h now.
7632         * mini-x86.c: Pass the generic sharing context to get_call_info ().
7634         * generic-sharing.c: Several changes for working without a shared
7635         context and instead operating on open types instead.
7637 2007-11-12  David S. Miller  <davem@davemloft.net>
7639        * inssel-sparc.brg: Fix double instruction emit.
7641 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
7643         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
7644         Get/Set/Address methods.
7645         
7646         * mini.c debug-debugger.c mini-trampolines.c: Update after 
7647         mono_marshal_get_delegate_invoke signature change.
7649 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7651         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
7652         This can happens with dynamic methods. Fixes the other bug in #322722.
7654 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
7656         * tramp-arm.c (mono_arch_patch_callsite): Support patching
7657         BX call sequence.
7659         * mini-arm.c (arm_patch): Implement patching of BX call
7660         sequence. Fixes one of the bugs in #322722.
7662 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
7664        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
7665        under Linux.  We only need to flush every 32-byte cache line.    
7667 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
7669         * mini.c:
7670         move_basic_block_to_end: Add branches when needed, eventually creating
7671         a new BB.
7672         optimize_branches: added a parameter that tells if it's ok to create
7673         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
7674         and avoid calling move_basic_block_to_end when it's not ok.
7675         Fixes bug 318677.
7677 2007-11-07  Mark Probst  <mark.probst@gmail.com>
7679         * mini.c: Abort inlining call to InitializeArray if something
7680         looks wrong.  Let the icall handle it, which now has proper safety
7681         checks.
7683 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
7685         * mini.c (mono_spill_call): add support for soft-float.
7687         * mini.c (mono_method_to_ir): add support for soft-float
7688         to inlined functions that return float.
7690         * mini.c (mono_method_to_ir): add support for soft-float
7691         to cee_stsfld opcode on float fields.
7693 2007-11-05  Geoff Norton  <gnorton@novell.com>
7695         * mini-x86.h: Fix the structure access for X86 Leopard.
7698 2007-11-05  Martin Baulig  <martin@ximian.com>
7700         * mini-trampolines.c
7701         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
7702         after compiling the method to notify the debugger.
7704 2007-11-05  Martin Baulig  <martin@ximian.com>
7706         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
7708 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
7710         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
7711         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
7713 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
7715         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
7716         native-to-managed wrappers.
7717         
7718 2007-11-01  Geoff Norton  <gnorton@novell.com>
7720         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
7721         members.
7723 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7725         * mini.c, mini-x86.c: when getting back from unmanaged code
7726         to managed via a marshaled delegate we also need to set the
7727         right domain.
7729 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7731         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
7732         for amd64.
7734 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
7736         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
7737         let the debugger or other external agents to tell the JIT when
7738         a sw breakpoint has been inserted in the code that the JIT needs
7739         to be able to inspect.
7741 2007-10-31  Martin Baulig  <martin@ximian.com>
7743         * debug-debugger.h
7744         (MonoDebuggerInfo): Remove `runtime_class_init'.
7746 2007-10-30  Martin Baulig  <martin@ximian.com>
7748         * debug-mini.h
7749         (mono_debugger_thread_created): Added `MonoThread *' argument.
7750         (mono_debugger_extended_notification): New public method.
7751         (mono_debugger_trampoline_compiled): New public method.
7753         * debug-mini.c
7754         (MonoDebuggerThreadInfo): Added `thread' and
7755         `extended_notifications' fields.
7757         * debug-debugger.c
7758         (debugger_executable_code_buffer): New static variable.
7760         * debug-debugger.h
7761         (MonoDebuggerInfo): Added `executable_code_buffer',
7762         `executable_code_buffer_size', `breakpoint_info_area',
7763         `breakpoint_table' and `breakpoint_table_size'.
7765 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
7767         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
7768         that IP  either is an unused value or the vtable pointer. IMT 
7769         calls use vtable + offset now. Reduced by almost half the size
7770         of IMT entries.
7772 2007-10-26  Jonathan Chambers <joncham@gmail.com>
7774         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
7775         defines to access param registers. Replace long usage with
7776         gsize as sizeof(long) != sizeof(void*) on Win64.
7778         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
7779         on Win64. Fix intrinsic, use _AddressOfReturnAddress
7780         instead of non-existant _GetAddressOfReturnAddress.
7782         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
7783         param registers. Save/restore %rdi and %rsi in MonoLMF.
7785         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
7786         param registers. Modify (throw_exception) signature to take 
7787         %rdi and %rsi on Win64. 
7789         Code is contributed under MIT/X11 license.
7791 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7793         * helpers.c: unlink debugging output files.
7795 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
7797         * mini.c: Move mono_create_ftnptr () to object.c.
7799 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
7801         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
7802         optional. This function can now be used to disassemble code generated
7803         outside the JIT such as trampolines and IMT thunks.
7805         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
7807         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
7808         vtable pointer from a ldr instruction.
7810         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
7811         new IMT call sequence.
7813         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
7814         call sequence for interface invocations.
7816         * mini-arm.c (mono_arch_emit_imt_argument): added, required
7817         for imt support. This function is empty since IMT on ARM requires no
7818         special handling on the IR side.
7820         * mini-arm.c (mono_arch_find_imt_method): added, required for
7821         imt support.
7823         * mini-arm.c (mono_arch_find_this_argument): added, required
7824         for imt support.
7826         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
7827         a ldr instruction to load a value stored in the code stream.
7829         * mini-arm.c (mono_arch_build_imt_thunk):added, required
7830         for imt support.
7833 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
7835         * mini.c (mini_init): Install the jump trampoline callback.
7837 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7839         * mini-trampolines.c: handle synchronized methods with the common
7840         vtable trampoline (bug #335601).
7842 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
7844         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
7846         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
7847         64 bit platforms.
7849         * mini-ia64.h mini-ia64.c: Add support for IMT.
7851         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
7852         prolog. Fixes #331958.
7854 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
7856         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
7858 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7860         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
7861         trampoline.
7863 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
7865         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
7866         trampoline.
7868 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
7870         * mini-x86.c, mini-x86.h: x86 support for the common vtable
7871         trampoline.
7873 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
7875         * mini-trampolines.c: changed the magic rampoline to understand
7876         the common vtable trampoline method: the method to invoke is
7877         determined by the vtable displacement of the call.
7879 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7881         * mini.c, mini.h: register the common vtable trampoline if the
7882         architecture supports it.
7884 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7886         * cpu-amd64.md: use the correct max length for tls_get.
7888 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
7890         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
7891         CEE_STELEM_ANY. Fixes #333696.
7893 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
7895         * exceptions-x86.c: provide more graceful handling of the case where
7896         we followed a bogus function pointer from managed code (bug #332866).
7898 2007-10-11  Mark Probst  <mark.probst@gmail.com>
7900         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
7901         replaces the generic_shared flag and will carry more information
7902         in the future.
7904         * generic-sharing.c: Added mini_type_stack_size() which allows
7905         allows open types if given a generic sharing context.
7906         mini_get_basic_type_from_generic() takes a
7907         MonoGenericSharingContext* instead of a MonoCompile* now.
7909         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
7910         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
7911         mini-sparc.c, mini-x86.c: Trivial changes required by the two
7912         changes above.  Just passing arguments through to the right
7913         places.
7915 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
7917         * mini-arm.c: unify the call emission to emit_code_seq().
7919 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
7921         * tramp-arm.c: reduced the trampoline size.
7923 2007-10-10  Mark Probst  <mark.probst@gmail.com>
7925         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
7926         variable handling out of arch-specific code.
7928 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
7930         * mini-arm.c: implemented fast delegate dispatch.
7932 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
7934         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
7935         that fp elimination is turned off if the space required by locals is too
7936         big. Fixes #331958.
7938 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7940         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
7941         ARM to the new style trampoline.
7943 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
7945         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
7947         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
7949 2007-10-09  Martin Baulig  <martin@ximian.com>
7951         * debug-debugger.h
7952         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
7953         `field_info_offset_offset'.     
7955 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
7957         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
7958         removed more internal usage of the r11 register and made it available
7959         to the register allocator.
7961 2007-10-08  Mark Probst  <mark.probst@gmail.com>
7963         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
7964         when sharing generics and treat type variables as references.
7966 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
7968         * mini-ppc.c: started removing the internal uses of register r11
7969         to eventually allow the register allocator to manage it as an
7970         additional available register.
7972 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7974         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
7976 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
7978         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
7979         specific trampolines as they are not performance critical as a jump
7980         target (maybe align as before only for AOT code?). This saves about
7981         200 KB of native code on x86 for monodevelop startup.
7983 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
7985         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
7986         monodevelop startup.
7988 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
7990         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
7992         * mini-sparc.h mini-sparc.c: Implement IMT support.
7994         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
7995         its smaller and doesn't clobber sparc_g1.
7997         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
7999 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
8001         * mini-ppc.c: optimized the size of the IMT thunks a bit.
8003 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8005         * mini-ppc.c: implemented fast delegate invocation.
8007 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
8009         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
8011 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
8013         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
8014         code to the new style trampoline in preparation for IMT support.
8016 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
8018         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
8019         systems already. This also reduces the specific trampiline sizes and
8020         prepares for the use of r12 as the IMT identifier register.
8022 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8024         * mini-mips.h: endianess fix (simplified from a patch by
8025         Thomas Kunze <thommy@tabao.de>, bug #323737).
8027 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
8029         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
8030         to access ucontext fields and enable netbsd support
8031         (partially from Magnus Henoch <mange@freemail.hu>).
8033 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8035         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
8036         use the preprocessor from the CPP env var if it is set.
8038 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
8040         * mini-trampolines.c: fixed an assertion and moved it earlier in the
8041         code, before interface_offset gets used.
8043 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
8045         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
8046         mono_class_setup_vtable () before accessing klass->vtable.
8048 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
8050         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
8051         hackish.
8053 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
8055         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
8056         IMT slots (this saves hundreds of KB of memory in programs like
8057         IronPython and Monodevelop).
8059 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8061         * mini.c: print the delegate counter.
8063 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
8065         * mini-x86.c: make it easier to enable the debugging code for IMT
8066         slots.
8068 2007-09-28  Martin Baulig  <martin@ximian.com>
8070         * debug-debugger.h
8071         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
8072         `mono_method_klass_offset' and `mono_method_token_offset'.
8074 2007-09-20  Mark Probst  <mark.probst@gmail.com>
8076         * mini.c: First generics sharing implementation.  Can only share
8077         in very simple cases.  If sharing doesn't work it falls back to
8078         dedicated compilation.
8080         * mini.h: Flag in MonoCompile to specify whether generic
8081         compilation is shared.  Flags enum for marking which generic inst
8082         of a context is used.  Prototypes for helper functions.
8084         * generic-sharing.c: Helper functions for generic method sharing.
8086         * optflags-def.h: Optimization flag (gshared) for enabling generic
8087         method sharing added.
8089         * Makefile.am: generic-sharing.c added.
8091 2007-09-19 Daniel Nauck <dna@mono-project.de>
8093         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
8095 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
8096         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
8097         fixes bug 325507.
8099 2007-09-19  Martin Baulig  <martin@ximian.com>
8101         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
8102         mono_debug_cleanup() is now part of mono_cleanup().
8104 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
8106         * driver.c (mono_main): Fix a warning.
8108 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
8110         * aot-compiler.c: Optimize various parts when processing large assemblies.
8111         Fixes ##325568.
8113         * mini.c (mono_patch_info_hash): Improve hash function.
8115 2007-09-14  Jonathan Chambers <joncham@gmail.com>
8117         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
8118         
8119         Code is contributed under MIT/X11 license.
8121 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
8123         * mini.c (mini_init): Fix a leak.
8125         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
8127 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8129         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
8131 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
8133         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
8135 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
8137         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
8138         variance tests.
8140         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
8142         * mini.c (handle_alloc): Enable managed allocators in AOT code.
8144         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
8146         * aot-runtime.c (decode_patch_info): Ditto.
8148 2007-09-12  Jonathan Chambers <joncham@gmail.com>
8150         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
8151         static case. Cache delegates in architecture specific code, 
8152         based on number of parameters.
8153         
8154         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
8155         in architecture specific code, based on number of parameters.
8156         
8157         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
8158         caching happen in architecture specific code now.
8159         
8160         Code is contributed under MIT/X11 license.
8162 2007-09-12  Jonathan Chambers <joncham@gmail.com>
8164         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
8165         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
8166         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
8168         Code is contributed under MIT/X11 license.
8170 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
8171         * mini.c: (mono_thread_abort) Fixed bug #82416.
8173 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8175         * mini.: hook the new managed GC allocation feature into the JIT.
8177 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8179         * mini.c: implementation for the new runtime tls opcode.
8181 2007-09-11  Martin Baulig  <martin@ximian.com>
8183         * debug-debugger.h
8184         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
8185         `mono_method_inflated_offset'.
8187 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
8189         * driver.c mini.h mini.c: Add a new devel command line option for injecting
8190         async exceptions into a method.
8192         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
8193         purpose of testing whenever the unwinder works at every instruction.
8195 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
8197         * mini.c: check accessibility of method used in ldftn (fixes
8198         bug #82635).
8200 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
8202         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
8204         * inssel.brg: Fix a warning.
8206 2007-09-03  Martin Baulig  <martin@ximian.com>
8208         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
8209         now takes the `main_method' as argument.
8211 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
8213         * cpu-sparc.md (endfilter): Add missing src1:i argument.
8215 2007-08-30  Jonathan Chambers <joncham@gmail.com>
8217         * driver.c: include the cil-coff.h header on Windows.
8218         
8219         Code is contributed under MIT/X11 license.
8221 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8223         * mini.c, driver.c: don't include the cil-coff.h header.
8225 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
8227         * mini.c: flag places that needs fixes fo soft-float support.
8229 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
8231         * mini.h, inssel-float.brg: fix soft-float constant loads on big
8232         endian systems (partially from Dean Jenkins, bug #81924).
8234 2007-08-28  Mark Probst  <mark.probst@gmail.com>
8236         * mini.c (check_linkdemand): Remove embedded reference object in
8237         call to LinkDemandSecurityException.
8238         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
8239         with an IntPtr instead of a reference object.
8241 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
8243         * mini.c (handle_initobj): Handle alignment properly.
8245         * inssel.brg (mini_emit_memset): Ditto. 
8247         * inssel.brg (mini_emit_memcpy): Ditto. 
8249         * inssel-sparc.brg: Ditto.              
8251         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
8253 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
8255         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
8256         exceptions raised in unmanaged code. Fixes part of #82594.
8258 2007-08-24  Mark Probst  <mark.probst@gmail.com>
8260         * mini.c (mono_method_to_ir), declsec.c
8261         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
8263 2007-08-22  Martin Baulig  <martin@ximian.com>
8265         * debug-mini.h
8266         (MonoDebuggerThreadInfo): New typedef.
8267         (mono_debugger_thread_table): New global variable.
8268         (mono_debugger_thread_created): New public function.
8269         (mono_debugger_thread_cleanup): New public function.
8271         * debug-debugger.h
8272         (MonoDebuggerInfo):
8273         - removed `get_current_thread' and `lookup_assembly'.
8274         - removed `data_table'.
8275         - added `thread_table'.
8277         * mini.c
8278         (mono_thread_start_cb): Call mono_debugger_thread_created().
8279         (mono_thread_attach_cb): Likewise.
8280         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
8281         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
8282         initial domain.
8284         * driver.c (mono_main): Move mono_debug_init() up, before calling
8285         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
8287 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8289         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
8290         together when passing several arguments of type double (gives a small
8291         speedup and saves a few bytes of generated code).
8293 2007-08-20  Jb Evain  <jbevain@novell.com>
8295         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
8297 2007-08-20  Jb Evain  <jbevain@novell.com>
8299         * mini.c (mono_method_to_ir): throw MethodAccessException
8300         and FieldAccessException instead of InvalidProgramException.
8302 2007-08-20  Mark Probst  <mark.probst@gmail.com>
8304         * mini.c: CoreCLR security checks.
8306         * mini.h: Removed MonoSecurityMode (moved to
8307         metadata/security-manager.h) and mono_security_mode global var
8308         (replaced by set/get functions in security-manager.h).
8310         * driver.c: Added "core-clr-test" security mode for testing.  Used
8311         set-function for setting security mode.
8313 2007-08-17  Mark Probst  <mark.probst@gmail.com>
8315         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
8316         the new jit_info_table.
8318         * driver.c: Test code for the new jit_info_table (enabled by the
8319         define MONO_JIT_INFO_TABLE_TEST).
8321 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
8323         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
8324         detection of call <REG> instruction sequence. Fixes build on freebsd.
8326 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
8328         * mini-exceptions.c: Fix a warning.
8330 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
8332         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
8333         stack overflow handling code on amd64 too.
8335         * mini-exceptions.c (mono_setup_altstack): Make this use 
8336         mono_thread_get_stack_bounds ().
8338         * mini-x86.h: Disable sigaltstack on solaris x86.
8340 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
8342         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
8344 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
8346         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
8348 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
8350         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
8352         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
8354 2007-08-03  Neale Ferguson <neale@sinenomine.net>
8356         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
8357         due to alignment.
8359 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8361         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
8362         to be emitted (bug #82281).
8364 2007-08-01  Martin Baulig  <martin@ximian.com>
8366         Merged the `debugger-dublin' branch.
8368         * debug-debugger.h (MonoDebuggerInfo):
8369         Removed the `old_*' compatibility entries.
8370         Added `debugger_version' and `data_table'.
8371         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
8372         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
8374         * debug-mini.c
8375         (MiniDebugMethodBreakpointInfo): Add `address_list'.
8376         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
8377         instead of a `gconstpointer'.
8378         (mono_debugger_insert_method_breakpoint): Return a
8379         `MonoDebugMethodAddressList *'.
8381 2007-06-28  Martin Baulig  <martin@ximian.com>
8383         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8385 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
8387         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
8388         __builtin_frame_address () since it is broken on older gcc versions.
8390 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
8392         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
8393         on the stack overflow handling and made the managed stack overflows
8394         catchable in most cases using soft guard pages.
8395         * exceptions-x86.c: added code to restore the protection in the soft
8396         guard pages at the end of exception handling.
8398 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
8400         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
8402 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8404         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
8405         exception handling.
8407 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
8409         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
8410         signal handling support until it has been ported to the new mechanism.
8411         * mini.c: fixed stack overflow detection and use the new
8412         architecture code  to handle signals on the altstack.
8414 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
8416         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
8417         stack overflows on the alt stack.
8419 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
8421         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
8422         stack overflows on the alt stack.
8424 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
8426         * exceptions-ppc.c: cleanup preparing for altstack support.
8428 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8430         * exceptions-arm.c: cleanup preparing for altstack support.
8432 2007-07-27  Mark Probst  <mark.probst@gmail.com>
8434         * mini.c (print_jit_stats): Output hazard pointer stats.
8436 2007-07-26  Mark Probst  <mark.probst@gmail.com>
8438         * driver.c, mini.c: Replaced security mode flags with a single
8439         enum variable.
8441 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8443         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
8445 2007-07-25  Mark Probst  <mark.probst@gmail.com>
8447         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
8448         (which doesn't do anything yet) for activating Core CLR
8449         (Silverlight) security.
8451 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
8453         * mini-codegen.c: work around a possible gcc bug on arm.
8455 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
8457         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
8458         message for platforms that don't support AOT compilation.
8460 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
8462         * mini.h, mini.c, driver.c: temporary smcs hack.
8464 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
8466         * mini-arm.h, mini-arm.c: arm EABI fixes.
8468 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
8470         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
8471         case.
8473         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
8474         trampolines taking a method argument.
8476         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
8478         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
8479         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
8481         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
8482         JIT compilation throws an exception. Fixes #82050.
8484 2007-07-19  Mark Probst  <mark.probst@gmail.com>
8486         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
8487         with the MONO_EXCEPTION_ defines.
8489 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
8491         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
8492         #82117.
8493         
8494         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
8495         the cause of an assertion.
8497 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
8499         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
8500         removed.
8502 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
8504         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
8505         assert. Should fix #82103.
8507 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
8509         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
8510         here too. Fixes #82095.
8512         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
8513         addresses.
8515         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
8517         * mini-amd64.h: Enable IMT for amd64.
8518         
8519         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
8521 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
8523         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
8525 2007-07-12  Mark Probst  <mark.probst@gmail.com>
8527         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
8528         as soon as check_linkdemand sets an exception_type.
8530 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
8532         * mini-x86.c: fixed offsets for IMT call sequence.
8533         * mini-x86.h: enable IMT again.
8535 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8537         * trace.c (mono_trace_enter_method): Decode MonoType too.
8539         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
8541         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
8543         * mini-amd64.c: Add preliminary IMT implementation.
8544         
8545 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
8547         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
8548         understand the new IMT-base interface invocation (thanks to
8549         Daniel Nauck for the report and the remote debugging session).
8551 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
8553         * mini-x86.c: size and speed optimizations for the IMT bsearch.
8555 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
8557         * Makefile.am (aotcheck): Make this actually use the AOTed code.
8559 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
8561         * mini-trampolines.c: implement AOT IMT support.
8562         * mini-x86.h: enable IMT support for wider testing.
8564 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8566         * inssel.brg (emit_imt_argument): Add aot support here.
8568         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
8570 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
8572         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
8573         of the IMT implementation, partially from massi, with my
8574         implementation of the bsearch sequence. Disabled by default until
8575         the AOT code is implemented.
8577 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
8579         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
8581         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
8583 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
8585         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
8586         arch-independent IMT JIT code from Massimiliano
8587         Mantione (massi@ximian.com) with small cleanups from me.
8589 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
8591         * Makefile.am: fix svn invocation to get the svn revision to be
8592         independent of the local language (build fix).
8594 2007-07-09  Mark Probst  <mark.probst@gmail.com>
8596         * mini.c (inline_method): Reset cfg->exception_type if the
8597         inlining is aborted.  Fixes: 82049.
8599 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
8601         * mini.c: remove assert from exception handling code when exception_ptr
8602         is not set.
8604 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8606         * mini.c (mono_codegen): Add an assert.
8608         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
8609         enter and leave code.
8610         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
8612 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
8614         * mini-ppc.c: fixed memory corruption for localloc(0)
8615         (bug #81852).
8617 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
8618         
8619         * mini.c: Fix warnings.
8621 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
8623         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
8624         to emit better double->int conversions.
8626 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
8628         * mini.c: the provided Min/Max optimizations are valid for unisgned
8629         ints.
8631 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
8633         * 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
8635 2007-06-28  Miguel de Icaza  <miguel@novell.com>
8637         * mini.c (mono_running_on_valgrind): Add support for reporting the
8638         method and  its boundaries to valgrind.
8640 2007-06-28  Martin Baulig  <martin@ximian.com>
8642         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
8644 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
8646         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
8648         * generic.2.cs: Add new test case.
8650 2007-06-25  Martin Baulig  <martin@ximian.com>
8652         Merged the `debugger-dublin' branch.
8654         * debug-mini.c
8655         (mono_debugger_insert_method_breakpoint): New public method.
8656         (mono_debugger_remove_method_breakpoint): Likewise.
8657         (mono_debugger_check_breakpoints): New static method.
8658         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
8660         * debug-debugger.h (MonoDebuggerInfo):
8661         Renamed (to keep backward compatibility in the vtable):
8662         `insert_breakpoint' -> `old_insert_breakpoint'.
8663         `remove_breakpoint' -> `old_remove_breakpoint'.
8664         `create_string' -> `old_create_string'.
8665         `lookup_class' -> `old_lookup_class'.
8666         `lookup_type' -> removed; changed into a dummy field.
8667         `lookup_assembly' -> `old_lookup_assembly'.
8668         Added (same functionality, but different signature):
8669         `create_string', `lookup_class', `lookup_assembly'
8670         Added new:
8671         `get_method_addr_or_bpt', `remove_method_breakpoint',
8672         `runtime_class_init'.
8674         * debug-debugger.c: Merged the `debugger-dublin' branch.
8676 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
8678         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
8679         well.
8680         (peephole_pass): Likewise.
8682 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
8684         * driver.c: hopefully make setaffinity work also for ancient
8685         versions of linux.
8687 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
8689         * driver.c : win32 build fix.
8691 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
8693         * driver.c: check for the MONO_NO_SMP env var and bind to a single
8694         processor if it is set.
8696 2007-06-21  Martin Baulig  <martin@ximian.com>
8698         * debug-mini.h: New file.
8700         * debug-mini.c
8701         (mono_debugger_insert_breakpoint_full): Moved here from
8702         ../metadata/mono-debug-debugger.c.
8703         (mono_debugger_remove_breakpoint): Likewise.
8704         (mono_debugger_breakpoint_callback): Likewise.
8706 2007-06-15  Raja R Harinath  <rharinath@novell.com>
8708         * jit-icalls.c (mono_helper_compile_generic_method): Update to
8709         changes in MonoGenericClass.
8711 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
8713         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
8715 2007-06-14  Raja R Harinath  <rharinath@novell.com>
8717         * jit-icalls.c (mono_helper_compile_generic_method): Update to
8718         removal of MonoGenericMethod.
8720 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8722         * mini-exceptions.c: hooks for the exception events profiling API.
8724 2007-06-14  Randolph Chung  <tausq@debian.org>
8726         * Makefile.ma: Add hppa target.
8727         * mini-arch.h: Include mini-hppa.h
8728         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
8729         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
8730         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8732 2007-06-14  Randolph Chung  <tausq@debian.org>
8734         * inssel.brg: Add rules for "chained" compare-branch operations so that
8735         a single compare op can affect multiple branches.  Adjust cost for
8736         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
8737         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
8738         cost for some rules so that they can more easily be overridden by
8739         per-arch rules (with fixes from lupus).
8740         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8742 2007-06-13  Randolph Chung  <tausq@debian.org>
8744         * mini-ops.h: Reorder branch ops so that they match the order of the
8745         corresponding CEE_* ops.  The code expects them this way.
8746         Add new ops for HPPA target.
8747         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8749 2007-06-13  Randolph Chung  <tausq@debian.org>
8751         * mini-exceptions.c: Handle cases where the stack grows towards
8752         larger addresses.
8753         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
8755 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
8757         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
8758         counter.
8759         * driver.c: explain where a non-matching corlib is found.
8761 2007-06-13  Mark Probst  <mark.probst@gmail.com>
8763         * mini.c (print_jit_stats): Output dynamic code allocation stats.
8765 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
8767         * mini-exceptions.c: Generate a method profile leave event during
8768         an exception to ensure that the profiler gets notified.
8770 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
8772         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
8773         branch.
8775         * cpu-amd64.md: Add long_and/or/xor opcodes.
8777 2007-06-06  Wade Berrier  <wberrier@novell.com>
8779         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
8780         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
8781         length of instruction shr_imm (expected 8, got 10)
8783 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
8785         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
8787 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8789         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8790         MonoInternalHashTable again (fixed bug in the internal hash table
8791         code).
8793 2007-06-06  Mark Probst  <mark.probst@gmail.com>
8795         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
8796         Have to figure out what makes it crash the SWF regression.
8798 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
8800         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
8802 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
8804         * mini.c: optimize out the type check when storing null in a
8805         reference array.
8807 2007-06-04  Mark Probst  <mark.probst@gmail.com>
8809         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
8810         MonoInternalHashTable.
8812 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
8814         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
8815         signed integer methods.
8817 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
8819         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
8820         permanently since the current approach doesn't work.
8822 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
8824         * inssel.brg (stmt): Only call delegate->invoke_impl if 
8825         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
8827 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
8829         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
8830         the sreg2==rdx case.
8831         
8832         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
8833         account if it contains a rex prefix.
8834         (peephole_pass): Handle OP_FMOVE as well.
8836 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
8838         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
8839         as it causes regressions.
8841 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
8843         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
8844         static case as well.
8846         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
8848         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8849         (mono_arch_get_this_arg_from_call): Ditto.
8851         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
8853         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
8854         invoke_impl field.
8856         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
8857         (mono_arch_get_this_arg_from_call): Ditto.
8859         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
8860         
8861         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
8862         try to create optimized invoke code and use that for further invocations. 
8863         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
8865         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
8867 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
8869         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
8870         sealed classes or methods.
8871         *devirtualization.cs: tests for the new optimization
8873 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
8875         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
8876         by the update_volatile () function.
8878 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
8880         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
8881         require it.
8883         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
8885 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
8887         * mini.c: Add configure checks for header files.
8888         * mini-x86.c: Add configure checks for header files.
8889         * trace.c: Add configure checks for header files.
8890         * aot-runtime.c: Add configure checks for header files.
8891         * aot-compiler.c: Add configure checks for header files.
8892         * driver.c: Add configure checks for header files.
8893         * mini-codegen.c: Add configure checks for header files.
8894         
8895         Code is contributed under MIT/X11 license.
8897 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
8899         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
8900         icompare_imm -128 + op_iclt. Fixes #81703.
8902 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
8904         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
8906 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
8908         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
8909         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
8910         so that all isinst checks now use "interface_bitmap".
8912 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
8914         * cpu-amd64.md (jmp): Fix a warning.
8916         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
8918         * basic.cs: Add new regression test.
8920         * basic.cs: Remove test which is now in basic-long.cs.
8922         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
8924         * basic-long.cs: Add new test.
8925         
8926 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
8928         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
8930 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
8932         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
8934         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
8935         places.
8936         
8937         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
8938         throwing code a bit.
8940         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
8941         the exception throwing code a bit.
8943         * mini-x86.c (get_call_info): Allocate result from a mempool.
8945 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
8947         * aot-compiler.c (find_typespec_for_class): Fix the assert.
8949         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
8951         * mini.h (MonoCompile): Add 'token_info_hash' field.
8953         * mini.c: Save token->method associations during compilation so the AOT 
8954         compiler can use it.
8955         
8956         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
8957         which reference generic classes and methods.
8959 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
8961         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
8963         * aot-compiler.c (compile_method): Fix a typo in a comment.
8965         * aot-runtime.c (decode_cached_class_info): Skip generic types.
8967         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
8968         everything generic.
8970         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
8972 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
8974         * mini.h (MonoCompile): Add 'args' field.
8976         * mini.c (mono_compile_create_vars): Store variables representing the arguments
8977         into cfg->args.
8979         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
8981 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
8983         * mini.c (mono_compile_get_interface_var): Remove this unused function.
8985         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
8987         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
8988         opcodes for some opcodes.
8990         * mini.h *.brg *.c: Use the new opcodes.
8992 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
8994         * mini.h: Bumped aot revision.
8996         * inssel.brg: modified code generation of type checks for interfaces
8997         to use the new "MonoClass.interface_bitmap" instead of the old
8998         "MonoClass.interface_offsets".
9000 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
9002         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
9004 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
9006         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
9007         64 bit platforms.
9009 2007-04-27  Neale Ferguson <neale@sinenomine.net>
9011         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
9013 2007-04-27  Wade Berrier  <wberrier@novell.com>
9015         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
9016         mini.h) to fix build.
9018 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
9020         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
9021         
9022         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
9023         causes the corlib unit tests to fail.
9025 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
9027         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
9029         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
9031         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
9032         opcodes to the comparison relations.
9034         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
9035         opcodes to their types.
9036         
9037         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
9039         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
9040         it in cfg->arch.cinfo.
9042         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
9044         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
9045         cfg->cil_offset_to_bb.
9047 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
9049         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
9050         created becase of initlocals.
9052 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
9054         * mini-alpha.c cpu-alpha.md: More alpha port work from 
9055         Sergey Tikhonov <tsv@solvo.ru>.
9057 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
9059         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
9061 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
9063         * cpu-s390.md (break): Correct the length of break instruction.
9065 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
9067         * mini.c: fix a couple of soft-float issues and comments.
9069 2007-04-15  Miguel de Icaza  <miguel@novell.com>
9071         * trace.c (is_filenamechar): - is also a filename char.
9073 2007-04-15  Neale Ferguson <neale@sinenomine.net>
9075         * mini-s390.c: Correct checking for enum type in return value processing.
9077 2007-04-14  Raja R Harinath  <rharinath@novell.com>
9079         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
9080         (version.h): Makefile is in the build directory.
9082 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
9084         * mini-amd64.h: fix for assertion failure on Solaris/amd64
9086 2007-04-11  Martin Baulig  <martin@ximian.com>
9088         * mini.c (can_access_member): Fix handling of generic classes;
9089         fixes #81259.
9091 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
9093         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
9095 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
9097         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
9099 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9101         * mini-codegen.c: make sure the right spill amount is
9102         used for fp or integer registers (fixes the float_sub_spill() on ppc).
9104 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
9106         * mini-ppc.c: fixes for the fp_branch_nan test.
9108 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
9110         * basic.cs: Comment out new test which still fails on ia64.
9112 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
9114         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
9116 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9118         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
9120 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
9122         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
9123         on 64 bit machines. Fixes part of #80738.
9125         * basic.cs: Add regression test.
9127 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
9129         * inssel.brg basic.cs: Revert previous change to fix build.
9131         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
9132         platforms.
9133         
9134         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
9136         * basic.cs: Add new regression test.
9138 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
9140         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
9141         many arguments.
9143 2007-03-16  Neale Ferguson <neale@sinenomine.net>
9145         * cpu-s390x.md: Correct length of break instruction.
9147 2007-03-16  Neale Ferguson <neale@sinenomine.net>
9149         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
9150         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
9152 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
9154         * *.c: Begin WIN64 port.
9155         * mini.c:  Use correct register in profiler.
9156         * mini-amd64.c: No inline assembly on Win64.
9157         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
9158         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
9159         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
9160         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
9161         mono_arch_ip_from_context for Win64.
9162         
9163         Contributed under MIT/X11 license.
9165 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
9167         * exceptions-amd64.c (seh_handler): Ditto.
9169         * exceptions-x86.c (seh_handler): Fix a memory leak.
9171 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
9173         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
9174         mini-s390x.c: fixed peephole optimizations to deal
9175         correctly with 1 and 2 byte reload avoidance.
9177 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
9179         * cpu-s390.md, cpu-s390x.md: update localloc length.
9181 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9183         * cpu-g4.md: added missing descriptions.
9185 2007-03-14  Miguel de Icaza  <miguel@novell.com>
9187         *  Makefile.am: Add support so the tail tests are not executed on
9188         PowerPC as that is a known limitation of the PowerPC port.
9190 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9192         * runmdesc.bat:  Move to msvc directory.
9193         
9194 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
9196         * runmdesc.bat:  Run executable that was produced by the current
9197         target and sent via an argument.
9198         
9199 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
9201         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
9202         #81102.
9204         * generics.2.cs: Add regression test.
9206 2007-03-09  Wade berrier  <wberrier@novell.com>
9208         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
9210 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
9212         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
9213         AOT code depends on this.
9215 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9217         * mini.c: more precise tracking of types in the eval stack
9218         (part of fix for bug #81044).
9220 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
9222         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
9224         * aot-compiler.c (encode_patch): Remove an obsolete comment.
9226 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
9228         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
9230         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
9232 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
9234         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
9235         a pointer on 64 bit systems. Fixes #80190.
9237         * iltests.il: Add new regression test.
9239 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9241         * mini.c: inline a constant for Environment.IsRunningOnWindows.
9243 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
9245         * trace.c: Remove an erroneous alignemnt check when tracing.
9246           Fixes --trace on OSX86.
9248 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9250         * mini-$(arch).h: initialize SP in context for all the archs.
9252 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
9254         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
9255         regressions in the thread tests.
9257 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
9259         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
9260         - fixed implementation of LOCALLOC opcode
9261         - implemented non-un compare for floats
9262         - code cleanup
9263         - implementation of FDIV and CKFINITE opcodes
9264         - fixes for latest mono updates
9265         - additional arch opcodes
9267 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9269         * Makefile.am: simplify and merge rules for cross-compilation.
9271 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
9273         * local-propagation.c: Actually *apply* the fix for bug 80591...
9275 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
9277         * mini-exceptions.c: backuot part of the last change
9278         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
9280 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
9281         * inssel.brg: Fix bug 59286.
9284 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
9286         * mini-exceptions.c: patch from Zoltan to correctly check for
9287         stack boundaries (using the stack register, not the frame register),
9288         fixes bugs #80724, #79717.
9290 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
9292         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
9293         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
9295         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
9296         presence of frame pointer elimination.
9298 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
9299         
9300         * mini-x86.h: NetBSD UCONTEX_REG defines.
9302 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
9304         * inssel-amd64.brg: Fix amd64 build.
9306 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
9308         * mini.h: remove extern to workaround what looks likes gcc bug 26905
9309         on amd64.
9311 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
9313         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
9314         ends.
9316         * mini-<ARCH>.c: Use mono_is_regsize_var ().
9318 2007-01-30 Mark Mason <mason@broadcom.com>
9320            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
9321            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
9322            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
9323            beginning support for CEE_JMP [not quite working yet]
9324            * tramp-mips.c: LMF handling now works
9325         
9326 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
9328         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
9330         * mini.h (NULLIFY_INS): New macro.
9332 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9334         * mini.c: statistical profiler fix for windows, patch
9335         from Tor Lillqvist (tml@novell.com).
9337 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
9338         * local-propagation.c: Fix bug 80591.
9340 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9342         * Makefile.am: put back the --export-dynamic option as with
9343         the previous gmodule flags (thanks to Robert Jordan).
9345 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
9347         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
9349         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
9350         simplify and speed up the local register allocator. Also rename some fields
9351         like iassign->vassign.
9352         
9353         * regalloc.c: Remove some functions which are no longer used since their
9354         inlined version is in mini-codegen.c.
9355         
9356         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
9358         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
9360 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
9362         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
9363         narrowing. Fixes #80622.
9365         * iltests.il: Add new regresssion test. 
9367 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9369         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
9370         debug-debugger.c, debug-debugger.h: warning fixes.
9371         * driver.c: updated copyright year and made it fit in one line.
9373 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
9375         * aot-runtime.c: updated to use mono-dl instead of gmodule.
9377 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
9379         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
9381         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
9383         * iltests.il: Add new test for bug #80507.
9385 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
9387         * mini-arm.h: use soft-float also on vfp for now.
9389 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9391         * mini.c: fix some more soft-float issues.
9393 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
9395         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
9397 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
9398         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
9399         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
9400         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
9402 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
9404         * mini-arm.c: typo fix.
9406 2007-01-23  Neale Ferguson <neale@sinenomine.net>
9408         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
9410 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
9412         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
9413         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
9415         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
9417         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
9419         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
9420         
9421         * inssel.brg: Fix a warning.
9423         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
9425         * abcremoval.c ssa.c ssapre.c: Update after this change.
9426         
9427         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
9429         * dominators.c (df_set): Use mono_bitset_union_fast.    
9431 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9433         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
9434         mini-codegen.c: reduce relocations and memory usage for the cpu
9435         description.
9437 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
9439         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
9441         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
9442         to reduce their size.
9444 2007-01-19 Mark Mason <mason@broadcom.com>
9446         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
9447         * mini-mips.c: more configuration macros, support long conditional branches, additional
9448         asserts, fix epilog instrumentation.
9449         * mini-mips.h: use standard stack walk
9450         * cpu-mips.md: increase size of div, rem and conditional branches
9451         
9452 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
9454         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
9455         to cpu spec data.
9457 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
9459         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
9460         (compile_method): Ditto.
9462         * aot-runtime.c (decode_klass_info): Ditto.
9464         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
9465         needed by the code generated by inssel.brg. Also fix a warning.
9467 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
9469         * mini.c: deal with enums that become genericinsts by
9470         being nested in a generic class (bug #79956).
9472 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
9474         * mini.c: match the generic definition to check for
9475         private access with generic types (bug #78431).
9477 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
9479         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
9480         to make life easier for people cross-compiling that insist on not
9481         using scratchbox.
9483 2007-01-17 Mark Mason <mason@broadcom.com>
9485         * inssel-long.brg: patch to deal with mips missing flags
9486         * inssel-long32-mips.brg: implement overflow checks
9487         * insset-mips.brg: implement overflow checks
9488         * mini-mips.h: implement conditional exception handling
9489         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
9490           Remove unused code, minor cleanups.
9491         * exceptions-mips.c: minor cleanups
9492         * mini-ops.h: add mips conditional exception ops
9493         * cpu-mips.md: add mips conditional exception ops
9495         
9496 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
9498         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
9499         to deal with mips missing of flags.
9501 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
9503         * exceptions-ppc.c: execute fault handlers.
9505 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
9507         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
9509 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
9511         * mini.c: handle also floating point values in initialize_array.
9513 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
9515         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
9516         array initialization and make it conditional on the intrins option.
9518 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
9520         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
9521         relocations and put the patch info names close to the enum definition.
9523 2007-01-15 Mark Mason <mason@broadcom.com>
9525         * basic.cs, exceptions.cs: break up large tests to increase debugability.
9527 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
9529         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
9531 2007-01-12  Raja R Harinath  <rharinath@novell.com>
9533         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
9535 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
9537         * Makefile.am: distribute the mips sources.
9539 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
9541         * mini-codegen.h: handle bug #80489 here, by excluding ecx
9542         directly.
9544 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
9546         * cpu-x86.md: back out for now as this triggers other regressions.
9548 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
9550         * cpu-x86.md: force src1 and dest regpair for long shift instructions
9551         to eax:edx, so ecx can't get allocated to them (bug #80489).
9553 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
9555         * mini.c, mini-exceptions.c: enabled running fault handlers
9556         (bug #80469).
9558 2007-01-03  Miguel de Icaza  <miguel@novell.com>
9560         * driver.c: If nothing fail, do not use the string "failed",
9561         because it makes it very annoying to view test result logs on the
9562         web. 
9564 2006-12-30  Miguel de Icaza  <miguel@novell.com>
9566         * debug-debugger.c (mono_debugger_main): Rename "main" to
9567         "main_method" to prevent a warning.
9569         Remove a warning for unused field.
9571 2006-12-28  Martin Baulig  <martin@ximian.com>
9573         * debug-debugger.c
9574         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
9576 2006-12-22  Martin Baulig  <martin@ximian.com>
9578         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
9579         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
9580         seperate `.mdb_debug_info' section, so we can access it from the
9581         debugger even if the binary is stripped.
9583         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
9584         from the `.mdb_debug_info' here to prevent the linker from
9585         removing that section.
9587         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
9588         mdb-debug-info64.s.
9590 2006-12-19  Robert Jordan  <robertj@gmx.net>
9592         * mini-x86: enable the code to return small structures in
9593         registers for FreeBSD as well. Fixes bug #80278.
9594         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
9596 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9598         * mini-x86.c: align the stack when calling the profiler
9599         function instrumenting the prolog (on OSX).
9601 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
9603         * mini.c: emit a break opcode where Debugger.Break () is called.
9605 2006-12-13  Miguel de Icaza  <miguel@novell.com>
9607         * mini.c (mono_method_to_ir): Provide useful information on this
9608         assert, to prevent others from debugging like I did.
9610 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9612         * mini.c: enable code which was incorrectly commented
9613         (bug #80235).
9615 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9617         * mini-x86.c: enable on OSX, too, the code to return small
9618         structures in registers.
9620 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9622         * mini-x86.c: remove the use of the dynamic code manager here, too.
9624 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9626         * mini.h, debug-debugger.c, tramp-*.c: fixed 
9627         mono_debugger_create_notification_function() to use
9628         mono_global_codeman_reserve () instead of a dynamic code manager.
9630 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
9632         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
9633         ves_array_element_address() jit icall and use a generated
9634         managed method instead (which is about 4 times faster for a rank 3
9635         array access).
9637 2006-11-29  Mark Mason  <mason@broadcom.com>
9639         * basic-calls.cs: additional tests for passing
9640         structures as function arguments.
9642 2006-11-29  Mark Mason  <mason@broadcom.com>
9644         * mini-mips.h: disable custom exception handling
9645         * mini-mips.c: throw/rethrow should use jalr to call
9646         exception stubs.  Fixed bug with passing structures
9647         by value. More support for tracing floating point
9648         functions.
9650 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9652         * mini.c: fixed typo in the soft-float ldind.r4 handling
9653         (bug #80086).
9655 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9657         * mini.c, mini.h, driver.c: added --runtime command line
9658         option to select a different runtime than the autodetected one.
9659         * jit.h: added API for embedders to initialize with a specific
9660         runtime version.
9662 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9664         * mini.c: handle also boxing of r4 values (bug #80024).
9666 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9668         * mini-ppc.c: force indirect calls until we reserve
9669         enough address space for all the generated code.
9671 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
9673         * exceptions-arm.c: workaround bugs in the libc definition
9674         of struct ucontext.
9676 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9678         * inssel.brg: fixes from me and Mark Mason.
9680 2006-11-23  Dick Porter  <dick@ximian.com>
9682         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
9683         semaphore display now we've fixed the initial value
9685 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9687         * inssel.brg: partially revert the last change to fix the build.
9689 2006-11-21  Mark Mason  <mason@broadcom.com>
9691         * inssel.brg: Add and use compare-and-branch macros to support
9692         architectures that do not have condition code registers (ie. MIPS).
9693         * *-mips.{c,brg,md}: Fix copyright statements
9695 2006-11-20  Mark Mason  <mason@broadcom.com>
9697         * Makefile.am: remove mini-codegen.c from list of MIPS sources
9698         * mini.c: Allow GET_CONTEXT to be specified by the arch port
9699         * mini.h: Added declaration for mono_print_ins()
9700         * mini-codegen.c: added ins_spec initializer for MIPS
9701         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
9702         vreg to be virtual and hreg to be non-virtual.
9703         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
9704         is not yet working/implemented correctly.
9705         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
9706         non-static, fixup calls to print_ins() from other parts in the file.
9708 2006-11-20  Mark Mason  <mason@broadcom.com>
9710         * basic-calls.cs: added tests for passing structures as arguments
9711         to calls.
9713 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9715         * inssel-long32.brg: optimize signed division by power of two.
9717 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
9719         * mini-arm.c: added support for interworking with thumb code
9720         (mono must be still be built using the ARM instruction encoding).
9722 2006-11-19  Miguel de Icaza  <miguel@novell.com>
9724         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
9725         verifier has different rules for it.   Fixes a few verifier issues
9726         in the test suite.
9728         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
9729         at the end, so people know what happened.
9731 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9733         * brach-opts.c: in optimize_exception_target() make sure we
9734         are in a catch clause (fixes bug #79871).
9736 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9738         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
9739         more soft-float support fixes.
9741 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
9743         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
9744         that are passed half on the stack and half in registers.
9746 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
9748         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
9749         more mips integration work from Mark E Mason 
9750         <mark.e.mason@broadcom.com>.
9752 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
9754         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
9755         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
9756         tramp-mips.c: added sources for the mips port, not
9757         integrated in the build yet. Contributed by
9758         Mark E Mason <mark.e.mason@broadcom.com>.
9760 2006-11-14  Neale Ferguson <neale@sinenomine.net>
9762         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
9764 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
9766         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
9767         put the soft-float rules in its own file since it seems to
9768         break s390 compilation.
9770 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
9772         * mini-arm.c: fixed wrnings.
9774 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
9776         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
9777         inssel-arm.brg: ARM support for soft-float.
9779 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
9781         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
9782         loads and stores of 32 bit fp values.
9784 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
9786         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
9788         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
9789         works. Fixes #79852 and #79463.
9791 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
9793         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
9794         more soft-float support WIP and fixes.
9796 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
9798         * mini-arm.c: some VFP updates.
9800 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9802         * mini-exceptions.c: 0 is a valid local var offset in some
9803         architectures, don't assert (bug #78508).
9805 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
9807         * exceptions-arm.c: fixed off by one error in stack walk code.
9809 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
9811         * mini.h, mini.c: more precise tracking of type load exceptions.
9813 2006-11-03  Robert Jordan  <robertj@gmx.net>
9815         * Makefile.am: [WIN32] Add monow.exe target.
9816         * driver.c: [WIN32] Don't detach the console when debugging.
9817         Fixes bug #79797.
9818         
9819 2006-10-30  Miguel de Icaza  <miguel@novell.com>
9821         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
9823 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
9825         * aot-compiler.c (emit_method_info): Add a case missed earlier.
9827         * driver.c (mini_regression): Fix --regression with AOT.
9829         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
9831 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
9833         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
9835         * mini-sparc.h: Don't use sigaction on sparc/linux.
9837         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
9839         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
9841         * mini-exceptions.c: Add proper include files for getpid ().
9843 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
9845         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
9846         address instead of a MonoJitInfo* to avoid decoding the exception info for the
9847         method.
9849         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
9850         name cache to reduce its size.
9852         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
9854 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
9856         * mini-x86.c: Save/restore the current LMF structure more efficiently using
9857         the mono_lmf TLS variable.
9859         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
9860         trampoline lmf frames.  
9862         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
9864 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
9866         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
9867         the mono_lmf TLS variable.
9869         * mini-exceptions.c: Access the LMF structure through accessors.
9871         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
9872         variable instead of in jit_tls->lmf.
9874         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
9875         
9876         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
9877         trampoline lmf frames.
9879         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
9881 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
9883        * mini.c trace.c mini-x86.c: Revert these too.
9884         
9885        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
9886        signature change.
9888 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
9890         * genmdesc.c: removed now dead code.
9892 2006-10-09  Robert Jordan <robertj@gmx.net>
9894         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
9896 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
9898         * mini.h: do not leave gaps in the opcode values.
9900 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
9902         * jit-icalls.h: flag functions as internal here, too.
9904 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
9906         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
9907         functions with the internal attribute.
9909 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
9911         * aot-compiler.c: fclose the file descriptor in the profile read loop.
9913 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
9915         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
9916         for soft-float.
9918 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
9920         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
9921         tail calls as on other platforms.
9923         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
9925         * iltests.il: Add a few tailcall tests.
9927 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9929         * driver.c: fix loop for old compilers (bug #79521).
9931 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
9933         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
9935         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
9937         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
9938         metadata without any code.
9940         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
9941         more precise debugging information using gdb.
9943 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
9945         * inssel-ia64.brg: Make the helper methods static.
9947 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9949         * inssel-x86.brg: make the helper methods static.
9951 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
9953         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
9955 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
9957         * mini.c: updates for monoburg changes.
9958         * inssel.brg: make a few helper functions static as they should.
9960 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
9962         * Makefile.am: Move mini-codegen.c to common_sources.
9964 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
9966         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
9967         instructions.
9968         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
9969         mini-ppc.h: port to use the common local register allocator.
9971 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9973         * mini.h: Remove the comment too then.
9975 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
9977         * mini.h: put back backend.data which is to be used shortly and
9978         doesn't increase the size of MonoInst. If any 64 bit arch aligned
9979         pointers on 4 byte boundaries it'd have much bigger issues running
9980         and you can ifdef it out anyway.
9982 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9984         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
9985         MonoInst size by 4 bytes on 64 bit machines.
9987 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
9989         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
9990         replacement with more meaningful field names. Arch maintainers, please
9991         check the assigned names are good enough for your arch.
9993 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
9995         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
9996         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
9998 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
10000         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
10001         relocations and memory requirements, put the optimization flags
10002         definitions in their own file.
10004 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
10006         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
10008         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
10010 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
10012         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
10014 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
10016         * inssel.brg: use the correct function to get the size of an item
10017         in an array, given an element class.
10018         * aot-compiler.c: do not access class->class_size directly.
10020 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
10022         * mini.h, debug-mini.c: added a debugging function to print
10023         info about local variables and arguments in a jitted method.
10025 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
10027         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
10029         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
10031 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
10033         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
10034         inner and outer loops when passing vtypes.
10036 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
10038         * mini-ppc.c: take into account the cpu errata for cache flushing
10039         which caused some random errors (bug #79381).
10041 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
10043         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
10044         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
10046 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
10048         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
10049         loaded.
10051         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
10052         freebsd ports tree.
10054         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
10055         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
10057         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
10058         displacement.
10060 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
10062         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
10064 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
10066         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
10067         macro does not have to be changed during debugging.
10069         * 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>.
10071         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
10073         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
10074         
10075         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
10076         MONO_ARCH_NO_EMULATE_MUL is defined.
10078         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
10080         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
10082         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
10084         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
10085         
10086 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
10088         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
10089         stuff to mini-exceptions.c where it is used.
10091         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
10092         setup code, the real one is in mini-exceptions.c.
10094         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
10095         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
10096         some changes from the freebsd ports tree.
10098         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
10099         constants.
10100         
10101         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
10103 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
10105         * mini.c: on Linux, check for /proc to be mounted
10106         (bug# 79351, novell bug#201204).
10108 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
10110         * mini.c: handle cases where pthread_attr_getstack() behaves
10111         incorrectly (bug #78096).
10113 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
10115         * mini-arm.c: support larger stack frames (bug #79272).
10117 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
10119         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
10121         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
10122         tokens.
10124         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
10125         mono_class_from_name () to find a class from its name.
10127         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
10129 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
10131         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
10133 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
10135         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
10137 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
10139         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
10140         callinfo->trampoline.
10142         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
10143         fixes #79271.
10144         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
10145         future.
10147 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
10149         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
10151 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
10153         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
10154         stats.method_trampolines, it is already done by the generic trampoline code.
10156         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
10157         
10158 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
10160         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
10162         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
10164         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
10166         * mini.c (print_jit_stats): Print mscorlib mempool size too.
10167         
10168         * mini.c (print_jit_stats): Print new stats.
10170         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
10172 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
10174         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
10175         Address on two dimensional arrays. Fixes #78729.
10177         * mini.h (MonoCompile): Add a 'skip_visibility' field.
10179         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
10180         a method.
10182         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
10184         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
10185         #79130.
10186         
10187         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
10188         a race condition.
10189         (mini_get_ldelema_ins): Ditto.
10191 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
10193         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
10194         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
10195         Fixes #79213.
10197 2006-08-29 Neale Ferguson <neale@sinenomine.net>
10199         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
10200         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
10202         * exceptions-s390x.c: Cosmetic change.
10204         * tramp-s390.c: Fix warning.
10206         * cpu-s390.md: Correct length of mul_imm.
10208 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
10210         * aot-compiler.c: added binary writer with ELF backend
10211         implementation (only on Linux/x86 for now).
10213 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10215         * Makefile.am: Don't run net 2.0 AOT tests.
10217         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
10218         (mono_compile_assembly): Skip net 2.0 assemblies as well.
10220         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
10222 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10224         * aot-compiler.c: simplified and refactored the asm-writing code
10225         to allow different backends.
10227 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
10229         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
10231         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
10232         little. Share patches of type TYPE_FROM_HANDLE as well.
10234         * mini.c (mono_patch_info_equal): New helper function.
10235         (mono_patch_info_hash): Ditto.
10237         * aot-compiler.c (emit_method_code): Fix s390 build.
10239         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
10240         is not handled because it is stored as a flag and not as a type ctor. Fixes
10241         #79016.
10243 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
10245         * aot-compiler.c: Fix computation of GOT slot statistics.
10246         
10247         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
10248         Also remove support for not PIC AOT.
10250         * mini.h: Bump AOT file format version.
10252         * objects.cs: Add a test for #78990.
10254         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
10255         (peter.dettman@iinet.net.au). Fixes #79087.
10257         * basic-long.cs: Add a test for the above.
10259 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
10261         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
10262         
10263         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
10264         code somewhat.
10266 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
10268         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
10269         exceptions.
10271 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
10273         * mini.c: Don't verify COM proxy invoke calls
10274         
10276 2006-08-10  Dick Porter  <dick@ximian.com>
10278         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
10279         which process is holding semaphores locked.
10281 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
10283         * mini-ia64.c mini-amd64.c: Fix #79027.
10285         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
10287         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
10289         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
10290         implicit arguments in a vararg call. Fixes #79027.
10292 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
10294         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
10295         (mono_get_array_new_va_signature): Ditto.
10297 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
10299         * aot-runtime.c: Call init_plt lazily.
10301         * inssel-long.brg: Fix unsigned long->int conversion.
10303         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
10305         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
10306         that most data is now in the .rss/.data section.
10308 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
10310         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
10312         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
10314         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
10316         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
10318         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
10319         virtual call. Fixes #79010.
10321         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
10322         and use the result as the this argument in the real call.
10324         * generics.2.cs: Add a new test for #79010.
10325         
10326 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
10328         * mini-x86.c: Fix a warning.
10330         * aot-compiler.c: Add a bunch of statistics.
10332         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
10334 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
10336         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
10338 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
10340         * 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>.
10342 2006-07-13  Miguel de Icaza  <miguel@novell.com>
10344         * mini.c (mono_method_to_ir): Obtain the original method in the
10345         CIL stream and use this to perform validation.
10347         Fixed: #78816
10349 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
10351         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
10352         (mono_arch_call_opcode): Ditto.
10354         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
10355         #78826.
10357         * mini.c (mono_patch_info_dup_mp): New helper function.
10358         
10359         * aot-compiler.c (compile_method): Fix some of the memory allocated during
10360         compilation. Fixes #78827.
10362 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
10364         * declsec.c: Use original security informations for
10365           MONO_WRAPPER_MANAGED_TO_MANAGED.
10367 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
10369         * mini.c: Allow Com Interop methods/classes and
10370         don't verify COM wrapper calls
10371         
10373 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
10375         * inssel-long32.brg: Fix long->i4 checked conversion.
10377         * exceptions.cs: Add a test for the above.
10379 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
10381         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
10383         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
10384         leaks.
10386         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
10387         #78775.
10389 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
10391         * mini.c: Fix solaris/x86 exception handling.
10393         * Makefile.am: Get rid of $(ICU_LIBS).
10395 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
10397         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
10398         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
10399         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
10401         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
10403         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
10404         this function causes a SIGSEGV.
10406 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
10408         * mini.c: Remove unused solaris/x86 includes.
10410 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
10412         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
10414 2006-06-20  Jb Evain  <jbevain@gmail.com>
10416         * cpu-g4.md: fix max length of start_handler instruction.
10418 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
10419         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
10421 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
10422         * ssa.c: Fixed bug 78653 for SSA based deadce.
10423         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
10424         MonoInst.flags, used in SSA based deadce.
10425         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
10426         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
10428 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
10430         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
10431         it can end up using non executable memory on ppc64 systems
10432         running ppc32 userspace (fix from Johannes Berg).
10434 2006-06-14  Dick Porter  <dick@ximian.com>
10436         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
10437         4.1.1
10439 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
10440         * mini.c: Made so that inline is locally disabled if it would
10441         trigger a .cctor, because too many apps depend on this behavior
10442         (which seems to be also the one of the MS CLR).
10444 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
10446         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
10447         No idea why this worked before.
10449         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
10450         which branch to outer exception clauses since they could skip the
10451         inner finally clauses. Fixes #78633.
10453         * exceptions.cs: Add a test for the above.
10455         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
10456         Fixes #78629.
10458         * iltests.il: Add a test for the above.
10460 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
10462         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
10463         after the end of a try bblock, to prevent asserts in mini_method_compile ().
10465         * iltests.il: Add a test for the above.
10467 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
10469         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
10470         
10471         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
10472         methods as instrinsics.
10474 2006-06-09  Wade Berrier <wberrier@novell.com>
10476         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
10477         (simple-cee-ops.h ssapre-mini-ops.h)
10479 2006-06-09  Neale Ferguson <neale@sinenomine.net>
10481         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
10482         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
10483         instruction).
10484         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
10485         * cpu-s390x.md: Fix max. length values for a couple of instructions.
10487 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
10489         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
10491 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
10493         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
10494         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
10495         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
10496         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
10497         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
10498         of opcodes, so that bug 78549 should not happen again.
10499         * ssapre.c: Updated to use the renamed files.
10501 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
10503         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
10504         in OP_ATOMIC_EXCHANGE_I4.
10506 2006-06-07  Wade Berrier <wberrier@novell.com>
10508         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
10509         in mono_debugger_create_notification_function)
10511 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
10513         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
10514         
10515         * mini.c (type_from_stack_type): Disable some changes which do not
10516         seem to work.
10518         * driver.c: Reenable opts.
10520         * mini.h (MonoStackSlot): New structure to keep track of the verification state
10521         of the evaluation stack.
10522         
10523         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
10524         evaluation stack trace at entry to the bblock.
10526         * mini.c (merge_stacks): New function to perform verification of stack merges.
10527         Turned off by default.
10529         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
10530         STACK_MP.
10531         
10532 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
10534         * local-propagation.c: Fixed bug 78549.
10536 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
10538         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
10540 2006-06-02  Miguel de Icaza  <miguel@novell.com>
10542         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
10543         tramp-arm.c, tramp-ia64.c
10544         (mono_debugger_create_notification_function): Update signature to
10545         new signature and use new protocol for creating the notification
10546         function.  
10548         Should fix the build.
10550 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
10552         * exceptions-ppc.c (mono_jit_walk_stack)
10553         (ves_icall_get_frame_info): Fix the build
10555 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
10557         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
10559 2006-05-31  Raja R Harinath  <rharinath@novell.com>
10561         * il2tests.2.il: New file for generics CIL tests.  Add test for
10562         #78019.
10563         * Makefile.am: Update.
10565         Fix #78019
10566         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
10567         to nullable types.
10569 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
10571         * aliasing.c: Fixed bug 78311.
10573 2006-05-29  Martin Baulig  <martin@ximian.com>
10575         * mini-exceptions.c (mono_find_jit_info): When computing the
10576         native offset, check whether we're actually inside the method's
10577         code; call mono_debug_print_stack_frame() to format the frame.
10578         (ves_icall_System_Exception_get_trace): Call
10579         mono_debug_print_stack_frame() to format the stack frame.
10580         (ves_icall_get_trace): Update to the new debugging API.
10581         (mono_jit_walk_stack_from_ctx): Likewise.
10582         (ves_icall_get_frame_info): Likewise.
10584         * mini.c (get_method_from_ip): Use the new debugging API.
10585         (mono_print_method_from_ip): Likewise.
10587         * exceptions-ppc.c
10588         (mono_jit_walk_stack): Use the new debugging API.
10589         (ves_icall_get_frame_info): Likewise.   
10591 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
10593         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
10595 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
10597         * mini.c: Added "limitator" to inline for debugging.
10599 2006-05-24  Martin Baulig  <martin@ximian.com>
10601         * debug-debugger.c (mono_debugger_init): Create a private,
10602         malloc()-based code manager for the notification function and
10603         intentionally leak it on exit.  This fixes the crash-on-exit race
10604         condition.
10606         * tramp-amd64.c
10607         (mono_debugger_create_notification_function): Added
10608         `MonoCodeManager *' argument.
10610         * tramp-x86.c
10611         (mono_debugger_create_notification_function): Added
10612         `MonoCodeManager *' argument.
10614 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
10616         * aliasing.c: Fixed 64 bit issue.
10617         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10618         default since all known bugs are fixed (one more time!).
10620 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
10622         * mini.c: write barrier support.
10624 2006-05-23  Martin Baulig  <martin@ximian.com>
10626         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
10627         check at the top of the file.
10629 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
10631         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
10632         reverting changes without reason and without changelog entries.
10634 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
10636         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
10637         to a few opcodes. Fixes #78439.
10639         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
10640         consistency with other archs.
10642         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
10644 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10646         * debug-debugger.c: fix the build.
10648 2006-05-17  Martin Baulig  <martin@ximian.com>
10650         * debug-debugger.c
10651         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
10652         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
10653         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
10654         (debugger_attach): Call GC_mono_debugger_add_all_threads().
10656 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
10658         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
10660 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
10662         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
10663         MONO_TYPE_GENERICINST.
10664         
10665         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
10666         MONO_TYPE_GENERICINST.
10668 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
10670         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
10671         #78325.
10673 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
10675         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
10676         mempool.
10677         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
10679 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
10681         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
10682         mono_trace_cleanup ().
10684         * iltests.il: Fix problem with the newly added test.
10686         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
10687         due to register constraints, free up the previous hreg. Fixes #78314.
10689         * iltests.il: Add new test for #78314.  
10691         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
10692         Interlocked.Add. Fixes #78312.
10694         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
10695         
10696 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
10698         * inssel.brg (mini_emit_virtual_call): Fix a warning.
10700 2006-05-05  Martin Baulig  <martin@ximian.com>
10702         * debug-mini.c (mono_debug_open_block): New method.
10704         * mini-amd64.c
10705         (mono_arch_output_basic_block): Call mono_debug_open_block() at
10706         the beginning of each basic block.
10708         * mini-x86.c
10709         (mono_arch_output_basic_block): Call mono_debug_open_block() at
10710         the beginning of each basic block.
10712 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
10714         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10715         default until I understand why they break the build on amd64.
10717 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
10719         * mini.c (mini_cleanup): Call mono_cleanup ().
10721         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
10722         errors.
10724 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
10726         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
10727         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
10728         default since all known bugs are fixed, and I cannot reproduce bug
10729         77944... I'm asking Matt Hargett to test again after this commit.
10731 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
10733         * mini-codegen.c: Fixed typo that thrashed inline.
10735 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
10737         * dominators.c (compute_dominators): Avoid using a worklist since
10738         it is not correct in some cases. Instead, iterate over all bblocks as
10739         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
10741 2006-04-28  Miguel de Icaza  <miguel@novell.com>
10743         * mini.c (mono_jit_compile_method_inner): Use
10744         mono_prepare_exception_from_error that resets the value
10745         internally.
10747 2006-04-27  Miguel de Icaza  <miguel@novell.com>
10749         * mini.c: Move the mini_loader_error_to_exception to metadata. 
10750         
10751 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
10753         * aliasing.c: Fixed bug 78210.
10755 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
10757         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
10758         default until all their problems (or the ones they trigger) are fixed.
10760 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
10762         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
10763         
10764         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
10765         as loaded only after resolving patches since that could invoke the same method.
10767         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
10769         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
10770         functions.
10772         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
10773         AOT loader.
10775         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
10776         stack.
10778         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
10779         made from AOT code through the PLT table.
10781         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
10782         holding the plt offset when a call is made to the aot plt trampoline.
10783         
10784 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
10786         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
10787         amd64 AOT support.
10789         * Makefile.am (common_sources): Fix build breakage.
10791         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
10792         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
10793         intra-assembly calls if possible.
10794         
10795         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
10797         * mini-trampolines.c: Handle PLT entries.
10799         * mini.c: Avoid creating a GOT var for calls.
10801         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
10802         from mscorlib code.
10804         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
10805         from mscorlib code.
10807         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
10808         AOT code.       
10810         * mini.h: Bump AOT file format version.
10811         
10812         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
10813         covers more cases.
10815 2006-04-25  Martin Baulig  <martin@ximian.com>
10817         * driver.c: Disable copyprop, consprop and inline when running
10818         inside the debugger.
10820 2006-04-25  Martin Baulig  <martin@ximian.com>
10822         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
10823         with `get_current_thread' and added `detach'.
10824         (MonoDebuggerMetadataInfo): Added `thread_size',
10825         `thread_tid_offset', `thread_stack_ptr_offset' and
10826         `thread_end_stack_offset'.
10828 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
10830         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
10831         aot-runtime.c.
10833         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
10834         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
10836         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
10838         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
10840         * aot.c: Add support for ADJUSTED_IID.  
10842 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
10844         * aot.c (emit_method_order): Don't align method_order_end.
10846         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
10847         the interface ID changes.
10849 2006-04-21  Dick Porter  <dick@ximian.com>
10851         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
10852         cleaning up a thread.  Fixes the new part of bug 77470.
10854 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
10856         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
10857         to managed wrapper.
10858                      
10859 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
10861         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
10862         
10863         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
10864         SIGSEGV. Fixes #78072.
10866         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
10867         unregister our SIGABRT handler.
10869 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
10871         * mini.c: Disabled inline where it can alter the call stack in a
10872         way visible from managed code.
10873         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
10874         default.
10876 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
10878         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
10879         on other platforms. Fixes #78089.
10881 2006-04-13  Martin Baulig  <martin@ximian.com>
10883         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
10884         determine whether we're inside the debugger.
10886         * debug-debugger.h
10887         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
10889 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
10891         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
10892         handler clauses. Fixes #78024.
10894         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
10895         in the CALL_MEMBASE opcodes. Fixes #78088.
10896         (mono_arch_get_vcall_slot_addr): Ditto.
10898 2006-04-10  Martin Baulig  <martin@ximian.com>
10900         * debug-debugger.c: The thread handling code has now been moved
10901         into ../metadata/threads.c.
10903 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
10905         * driver.c (mono_main): Fix --with-gc=none build.
10907         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
10908         (mono_spillvar_offset_float): Ditto.
10909         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
10910         hreg, not when its !global, since on ia64, there is a third category: stacked
10911         registers.      
10913 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
10915         * mini.c: set MonoInst->klass for load field address and a few other
10916         places.
10918 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
10920         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
10922 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
10924         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
10925         the branch opt changes.
10927 2006-04-06  Dick Porter  <dick@ximian.com>
10929         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
10930         
10931         * wapihandles.c (mini_wapi_seminfo): 
10932         * driver.c (mono_main): Add semaphore info option
10934 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
10936         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
10937         branch optimization changes. Fixes #78009.
10939 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
10941         * mini.c: ignore accessibility of methods in managed->native wrappers.
10943 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
10945         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
10946         
10947         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
10949 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
10951         * mini.c: Modify the branch optimizations to preserve the invariant that
10952         the entries inside the in_bb and out_bb arrays are unique.
10953         (mono_unlink_bblock): Avoid creation of new arrays.
10955 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
10957         * mini.c (mono_unlink_bblock): Fix regression caused by previous
10958         change (#77992).
10960 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
10962         * mini.c (optimize_branches): Remove the "optimizations" in
10963         the cbranch1/cbranch2 -> branch cases which were causing several
10964         problems in the past. Fixes #77986.
10966 2006-03-31  Chris Toshok  <toshok@ximian.com>
10968         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
10969         default optimizations :(
10971 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
10973         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
10974         branch.
10976 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
10978         * local-propagation.c: Added comments to structs and removed
10979         "Mono" prefixes from local tree mover types.
10981 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
10983         * Makefile.am (arch_sources): Define this for each architecture so 
10984         libmono_la_SOURCES is defined in one place.
10986 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
10988         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
10989         from handles/.
10991 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
10993         * driver.c: print the GC name supplied by configure.
10995 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
10997         * local-propagation.c: Added tree mover, and moved here all the
10998         local propagation code from mini.c
10999         * mini.c: Added support for treeprop, and moved all the local
11000         propagation code to local-propagation.c
11001         * mini.h: Added support for treeprop
11002         * driver.c: Added support for treeprop, enabled consprop, copyprop,
11003         treeprop, inline and deadce by default
11004         * Makefile.am: Added local-propagation.c
11006 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
11008         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
11010 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
11012         * debug-debugger.c: make it compile without the Boehm GC.
11014 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
11016         * mini.c: fixed issue with mismatch when an icall is registered
11017         with multiple names but same address.
11019 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11021         * declsec.c, mini-exceptions.c: use write barrier to set reference
11022         fields of managed objects.
11024 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
11026         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
11027         (can_access_internals): Fix a warning.
11029         * mini.c (print_method_from_ip): Rename this to 
11030         mono_print_method_from_ip so it gets exported.
11032         * trace.c: Deal with strings inside StringBuilder's containing garbage
11033         and fix memory leaks. Fixes #77848.
11035 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
11037         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
11038         fixes #77787.
11040 2006-03-16 Neale Ferguson <neale@sinenomine.net>
11041         
11042         * mini-s390.c: Remove OP_X86_TEST_NULL.
11044 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11046         * mini.c: use the correct GetHashCode() for the moving collector.
11048 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
11050         * liveness.c: Regalloc spill cost tuning.
11052 2006-03-15 Neale Ferguson <neale@sinenomine.net>
11053         
11054         * mini-s390x.h: Correct S390_LONG macro.
11056         * mini-s390x.c: Cleanup unused code.
11058 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
11060         * jit-icalls.h: New file.
11062         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
11063         icalls and include that instead of including jit-icalls.c.
11065         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
11066         OP_X86 opcodes.
11068 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
11070         * mini.c: when checking for member accessibility, also check for
11071         friend assemblies and for explicit interface implementations.
11073 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
11075         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
11077         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
11079         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
11080         common cases are done first.    
11082         * mini-ops.h: Only define platform specific opcodes on the given platform.
11084         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
11085         branch.
11086         
11087 2006-03-14  Martin Baulig  <martin@ximian.com>
11089         Revert Paolo's change from r57348:
11091         * mini.h: don't use gboolean for bitfields.
11092         * mini.c: verifier changes for fields and methods accessibility.
11094 2006-03-13  Neale Ferguson <neale@sinenomine.net>
11096         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
11098         * mini-s390x.c: Fix conv_r_un.
11100         * cpu-s390, cpu-s390x.md: Fix lengths.
11102 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
11104         * mini.c: nested types have access to all the nesting
11105         levels, not just the enclosing types.
11107 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
11109         * mini.c: added a few more verification checks.
11111 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
11113         * liveness.c: Merge optimizations from the linear-il branch.
11115 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
11117         * mini-ia64.c (emit_call): Add a comment.
11119         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
11121         * tramp-ia64.c: Fix some warnings.
11123 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
11125         * mini.h: don't use gboolean for bitfields.
11126         * mini.c: verifier changes for fields and methods accessibility.
11128 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
11130         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
11131         lazy icall wrapper changes.
11133         * dominators.c: Replace all the dominator algorithms with faster
11134         ones from the linear-il branch.
11136         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
11137         the mempool.
11139         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
11140         common cases are done first.
11142         * mini-amd64.c: Fix some warnings.
11144         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
11145         from the mempool.
11147         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
11148         added code.
11150         * mini.h: Add a missing prototype.
11152 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
11154         * mini.c: Compile icall wrappers lazily.
11156         * mini-codegen.c: Use printf instead of g_print since its much faster.
11158         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
11159         function.
11161         * mini.c (optimize_branches): Cache the negative result from 
11162         remove_block_if_useless ().
11164         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
11165         Also fix some bblock linking issues.
11167         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
11168         assembly files.
11170         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
11172         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
11173         accessed fields first, for better cache behavior.
11174         
11175 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
11177         * mini.c: speedup IList<T> array accesses.
11179 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
11181         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
11182         inline_costs counter. Fixes #77190.
11184 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
11186         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
11187         trace messages. Fixes #77706.
11189 2006-03-04  Martin Baulig  <martin@ximian.com>
11191         * tramp-amd64.c, tramp-x86.c
11192         (mono_debugger_create_notification_function): Use
11193         mono_global_codeman_reserve() to allocate a buffer at runtime and
11194         return it.
11196         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
11198         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
11199         notification function at runtime and then call `initialize' in the
11200         `MONO_DEBUGGER__debugger_info' vtable.
11202 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
11204         * iltests.il: Fix a visibility problem.
11206 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11208         * driver.c, mini.c: add hooks for the counters API.
11210 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
11212         * driver.c: show disabled options.
11214 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
11216         * linear-scan.c: always use cost-driven selection.
11218 2006-02-28  Raja R Harinath  <rharinath@novell.com>
11220         * jit-icalls.c (helper_compile_generic_method): Revert change from
11221         2006-02-24.
11223 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
11225         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
11227 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
11229         * inssel.brg: style fixes, mostly to force the updated monoburg
11230         to run for people using svn.
11232 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
11234         * mini.c: match monoburg changes.
11236 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
11238         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
11239         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
11240         declaration in the header file.
11242 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
11244         * helpers.c: reduce relocations and mem usage.
11246 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
11248         * mini.h, mini-codegen.c: disable logging features if
11249         requested by configure.
11251 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
11253         * mini.c: tiny verifier changes.
11255 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11257         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
11258         cpu-pentium.md: stack alignment changes for osx/x86,
11259         partially from Geoff Norton <gnorton@customerdna.com>.
11261 2006-02-24  Raja R Harinath  <harinath@gmail.com>
11263         * jit-icalls.c (helper_compile_generic_method): Update to changes
11264         in metadata/class.c.
11266 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
11267         
11268         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
11269         
11270         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
11271         interface calls with large offsets.
11273 2006-02-23  Raja R Harinath  <rharinath@novell.com>
11275         * jit-icalls.c (helper_compile_generic_method): Document the
11276         special-case we depend on so that we can inflate the method twice
11277         with the same context with no bad side-effects.
11279 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
11281         * mini-x86.c, mini-amd64.c: fix for case when xen support
11282         is disabled.
11284 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
11286         * mini-x86.c, mini-amd64.c: generate code to access tls items
11287         in a faster way for Xen systems.
11289 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
11291         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
11292         updates and compilation fixes for the OSX/x86 port, mostly from
11293         Geoff Norton <gnorton@customerdna.com>.
11295 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
11297         * inssel.brg: faster interface call implementation
11298         to sync with the interface_offsets MonoVTable changes.
11300 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
11302         * mini.c: more verification checks.
11304 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
11306         * mini.c: added a few more verification checks.
11308 2006-02-17      Neale Ferguson <neale@sinenomine.net>
11310         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
11311         facility on the processor and use it if available.
11313 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
11315         * driver.c, aot.c, mini.c: throw exception if the IL code is
11316         invalid or unverifiable.
11318 2006-02-17  Raja R Harinath  <rharinath@novell.com>
11320         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
11321         m.StructField.
11323 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
11325         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
11327 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11329         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
11330         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
11331         handling of instantiated generic valuetypes.
11333 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
11335         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
11336         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
11337         instead.
11339         * generics.2.cs: Revert the nullable reftypes tests.
11341 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
11343         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
11344         using __builtin_frame_address (1) as it doesn't work in the presence
11345         of optimizations. Hopefully fixes #77273.
11347         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
11348         -> generics.cs change as it doesn't work with some automake versions.
11350 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
11352         * mini.c: handle systems that sue a different way to
11353         retrieve the stack address of the current thread.
11355 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
11357         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
11358         it specially in the makefile.
11360         * generics.2.cs: Add tests for nullable reference types.
11362 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
11364         * mini.c: always handle the case when mono_jit_init()
11365         is called in a thread different from the main thread,
11366         confusing libgc (bug #77309).
11368 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
11370         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
11372 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
11374         * mini.c: change optimize_branches () to use a single loop
11375         and introduce a new optimization to simplify some range checks.
11377 2006-02-03  Martin Baulig  <martin@ximian.com>
11379         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
11380         and merged with debugger_thread_manager_add_thread().
11381         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
11382         inform the debugger about the main thread.
11384 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11386         * basic.cs: Add test for div.un/rem.un constant folding.
11388 2006-02-03  Neale Ferguson <neale@sinenomine.net>
11390         * cpu-s390x.md: correct int_xor_imm length
11392 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
11394         * generics.2.cs: New test for #77442.
11396         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
11397         #77442.
11399 2006-02-02  Martin Baulig  <martin@ximian.com>
11401         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
11402         <mono/metadata/mono-debug-debugger.h>   
11404         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
11406 2006-02-02  Martin Baulig  <martin@ximian.com>
11408         * debug-debugger.h: New header file for debug-debugger.c.
11410         * debug-debugger.c: Big API cleanup; don't run the managed Main()
11411         function is a separate thread anymore; add support for attaching.
11413 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
11415         * tramp-x86.c: Fix a warning.
11417 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
11419         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
11420         on very large methods.
11422         * aot.c (load_patch_info): Fix a warning.
11424 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
11426         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
11427         mini-ops.h: alu membase optimizations.
11429 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
11431         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
11432         to speedup StringBuilder.
11434 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
11436         * dominators.c (mono_compute_natural_loops): Fix detection of
11437         loop body start blocks.
11439         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
11441 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
11443         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
11444         #75145.
11446 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
11448         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11450 2006-01-25  Martin Baulig  <martin@ximian.com>
11452         * debug-debugger.c: Moved the `MonoDebuggerManager' and
11453         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
11454         started to cleanup this file a little bit.
11456 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
11458         * mini.c: optimize a codepath frequently happening in generics code.
11460 2006-01-23  Martin Baulig  <martin@ximian.com>
11462         * Makefile.am: Only compile debug-debugger.c on supported platforms.
11464         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
11465         functions directly.
11467         * driver.c: debug-debugger.c is only available if
11468         `MONO_DEBUGGER_SUPPORTED' is defined.   
11470 2006-01-23  Martin Baulig  <martin@ximian.com>
11472         * debug-debugger.c: Only enable this on platforms where the Mono
11473         Debugger is working (x86 and x86_64).
11475 2006-01-21  Martin Baulig  <martin@ximian.com>
11477         The Mono Debugger is now using the normal `mono' instead of the
11478         `mono-debugger-mini-wrapper' when executing managed code.
11480         * debug-debugger.c: New file; previously known as
11481         debugger/wrapper/wrapper.c.
11483         * debug-mini.c (mono_init_debugger): Removed.
11485         * driver.c (mono_main): Added new `--inside-mdb' command line
11486         argument which is used when running inside the debugger.
11488 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
11490         * liveness.c (mono_analyze_liveness): Remove some unused data
11491         structures.
11493 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
11495         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
11497 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
11499         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
11500         depends on implementation details of monobitset.
11502         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
11503         Fixes #77271.
11505 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
11507         * liveness.c: Update after monobitset changes.
11509 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
11511         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
11513 2006-01-11 Neale Ferguson <neale@sinenomine.net>
11515         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
11517         * mini-s390x.c: Remove warning messages.
11519 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
11521         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
11523 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
11525         * generics.2.cs: Add ldelem/stelem_any test.
11527 2006-01-10 Neale Ferguson <neale@sinenomine.net>
11529         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
11531 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
11533         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
11534         
11535 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
11537         * generics.2.cs: Reenable vtype tests.
11539         * inssel-x86.brg: Remove an icorrect valuetype rule.
11541 2006-01-06 Neale Ferguson <neale@sinenomine.net>
11543         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
11544         initial support for OP_ABS.
11546 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11548         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
11550 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11552         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
11553         conversion and implement LADD/LSUB.
11555         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
11556         architectures.
11558 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11560         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
11562         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
11563         architectures.
11565 2006-01-05 Neale Ferguson <neale@sinenomine.net>
11567         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
11568         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
11569         (stack walk problem).
11571 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
11573         * aot.c (mono_aot_load_method): Fix a warning.
11575 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11577         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
11579 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
11581         * iltests.il: Add test for #77148.
11583         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
11584         #77148.
11586 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11588         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
11590 2006-01-03  Neale Ferguson <neale@sinenomine.net>
11592         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
11593         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
11595         * basic-long.cs: Add lconv-to-r4/r8 tests.
11597 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
11599         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
11601         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
11602         here as on other archs.
11604 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11606         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
11608 2005-12-29 Neale Ferguson <neale@sinenomine.net>
11610         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
11611         
11612         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
11614         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
11615         instrument_prolog; Add memory_barrier instruction.
11617 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
11619         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
11621 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
11623         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
11625         * aliasing.c inssel.brg: Fix warnings.
11627         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
11628         could skip initialization of some parts of memory.
11630         * mini.c mini-ia64.c: Fix warnings.
11632         * inssel-sparc.brg: Add an implementation of lneg which actually works.
11634 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
11636         * aliasing.c (mono_build_aliasing_information): Add a workaround for
11637         a crash seen on sparc.
11639         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
11640         
11641         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
11643 2005-12-21 Neale Ferguson <neale@sinenomine.net>
11645         * mini-ops.h: Add s390_backchain instruction
11647         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
11649         * cpu-s390.md: Add s390_backchain instruction
11651         * mini-s390.c: Significant ABI changes
11653         * mini-s390.h: Cater for zero length structures
11655 2005-12-20 Neale Ferguson <neale@sinenomine.net>
11657         * mini-s390.c: ABI fixes
11659         * inssel-s390.brg: Remove debug statements
11661         * cpu-s390.md: Fix length of ATOMIC_xx operations
11663 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
11665         * basic-float.cs: Add float<->long conversion tests.
11667 2005-12-16 Neale Ferguson <neale@sinenomine.net>
11669         * mini-s390.c: Fix LOCALLOC processing.
11671         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
11673 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
11675         * iltests.il: Add tests for some opcodes not covered by the other
11676         tests.
11678 2005-12-15 Neale Ferguson <neale@sinenomine.net>
11680         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
11681         register loading for Tail processing; Correct trace output.
11683         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
11685         * cpu-s390.md: Correct size of jmp instruction. 
11687 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11689         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
11691 2005-12-13 Neale Ferguson <neale@sinenomine.net>
11693         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
11694           Bring s390 up to current level.
11696 2005-12-12  Zltan Varga  <vargaz@gmail.com>
11698         * generics.2.cs: Disable the newly added tests as they do not work yet.
11699         
11700         * generics.2.cs: Add valuetype tests.
11702 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
11704         * basic-long.cs: Add i4->u8 test.
11706         * objects.cs: Add tests for JIT intrinsic.
11708         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
11709         optimizations lost by a mistake.
11711 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
11713         * basic-long.cs: Remove a test moved to objects.cs.
11715         * arrays.cs: Add more array tests.
11717 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
11719         * arrays.cs: Add new tests for multi-dimensional arrays.
11721 2005-12-06  Raja R Harinath  <rharinath@novell.com>
11723         * Makefile.am (test_sources2): Add generics.2.cs.
11724         (EXTRA_DIST): Add test_sources2.
11726 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
11728         Support for boxing and unboxing nullable types as well as the
11729         isinst operation on nullables, per the CLI ammendment.
11731         * inssel.brg (CEE_ISINST): Special case for nullable
11733         * mini.c (handle_unbox_nullable): new method
11734         (handle_box): Special case for nullable types
11735         (mono_method_to_ir): Call handle_unbox_nullable in correct
11736         places.
11738         * generics.2.cs: New test suite
11740         * Makefile.am: Support for regression tests with generics.
11742 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
11744         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
11745         allocated to registers. Fixes #76800.
11747 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
11749         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
11751 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
11753         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
11754         of platforms.
11756 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
11758         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
11759         objects.cs.
11761         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
11762         
11763         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
11764 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
11766         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
11767         single precision before storing to a single precision location.
11769 2005-11-28  Raja R Harinath  <rharinath@novell.com>
11771         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
11773 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
11775         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
11776         correct files.
11778         * basic.cs: Remove test_0_byte_compares test which was moved to
11779         objects.cs a long time ago.
11781 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
11783         * aliasing.c: Fixed aliasing issue on 64 bit archs.
11785 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
11787         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
11788         handlers are called.
11790         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
11791         throwing code.
11793          * mini-ia64.c: Add support for the throw->branch exception 
11794         optimization.   
11796         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
11798 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
11800         * mini.c: Enabled "fastpath" deadce :-)
11801         
11802 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
11804         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
11805         alias analysis pass to support it.
11806         * mini.h: Likewise.
11807         * ssa.c: Likewise.
11808         * liveness.c: Likewise (liveness computation can use aliasing
11809         information to be more accurate).
11810         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
11811         moreover made so that "--compile-all" uses the given optimization
11812         flags and not the default ones.
11813         * aliasing.c: Alias analysis (new file).
11814         * aliasing.h: Likewise.
11815         * Makefile.am: added "aliasing.c" and "aliasing.h".
11816         
11817 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
11819         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
11820         OP_L opcodes.
11822 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
11824         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
11825         fp >= end_of_stack exit condition, as it is not needed, and it might
11826         become true for fp eliminated frames.
11828 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
11830         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
11831         coded offsets.
11833 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
11835         * mini-arm.c: fixed alignment of doubles/longs to match
11836         the C ABI (bug #76635).
11838 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
11840         * aot.c: fix compilation with --enable-minimal=aot.
11842 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
11844         * mini-arm.c: fixed compatibility with the new
11845         floating point emulator package for compares.
11847 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
11849         * mini.c : reverted sig->pinvoke changes (r51396-51397).
11851 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
11853         * mini-exceptions.c (print_stack_frame): Output to stderr.
11854         (mono_handle_native_sigsegv): Ditto.
11856 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
11858         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
11859         OP_LCONV_TO_OVF_I implementation.
11861         * mini-amd64.c: Add support for the throw->branch exception 
11862         optimization.
11864         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
11865         when the catch clause catches a more general exception, i.e. Object.
11867 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
11869         * cpu-ia64.md: Remove unused opcodes.
11871         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
11872         specific defines for architectures defining USE_SIGACTION.
11874         * mini-ia64.c: Fix some warnings.
11876         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
11877         version seemed to skip a frame.
11879 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
11881         * mini.c: Clean up the usage of sig->pinvoke flag. Now
11882         only calls which are made to native code use this flag.
11884 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
11886         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
11887         varargs methods as well.
11888         
11889         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
11890         which have save_lmf set. Reorganize methods prologs a bit.
11892         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
11893         debugger to the proper place.
11895 2005-10-29  Martin Baulig  <martin@ximian.com>
11897         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
11898         when running inside the debugger until the debugger has support
11899         for it.
11901 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
11903         * mini.h: Fix a warning.
11905 2005-10-24  Miguel de Icaza  <miguel@novell.com>
11907         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
11908         we expose publicly, this returns the string.
11910 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
11912         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
11913         with fp elimination.
11915 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
11917         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
11918         native stacktrace using the glibc 'backtrace' function if available.
11920 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
11922         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
11924         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
11925         handle SIGSEGVs received while in native code.
11927         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
11928         code, call mono_handle_native_sigsegv which will abort the runtime
11929         after printing some diagnostics, instead of converting it into a
11930         confusing NullReferenceException.
11932 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
11934         * cpu-pentium.md: Remove unused opcodes.
11936 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
11938         * mini-amd64.h (MonoLMF): Add rsp field.
11940         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
11941         the lmf too.
11943 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
11945         * mini-codegen.c (get_register_spilling): Fix some warnings.
11947 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
11949         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
11950         elimination during exception handling. Enable fp elimination by
11951         default.
11953         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
11954         elimination.
11956 2005-10-16  Martin Baulig  <martin@ximian.com>
11958         * mini-exceptions.c
11959         (mono_debugger_run_finally): New public method for the debugger.
11961 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
11963         * debug-mini.c (mono_debug_init_method): Fix warning.
11965         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
11966         the 'exname' parameter const to fix some warnings.
11968 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
11970         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
11971         introduced by the previous patch.
11973 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
11975         * basic-float.cs: Add test for precision of float arithmetic.
11977         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
11978         when loading/storing single values from/to memory.
11980         * mini.c (mono_jit_compile_method_with_opt): Create the function
11981         pointers in the correct domain.
11983 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
11985         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
11986         introduced by previous patch.
11987         
11988         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
11989         when out_filter_idx is NULL.
11991         * mini-exceptions.c: Don't run filter clauses twice during exception
11992         handling. Fixes #75755.
11994 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
11996         * aot.c: Add support for ldflda wrappers.
11998         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
11999         #75902.
12001 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
12003         * mini.c, mini.h: do not consider exception handlers blocks when
12004         setting up interface variables.
12006 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
12008         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
12010 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
12012         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
12013         causes a regression.
12015         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
12017 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
12019         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
12020         of the OP_P definitions.
12022         * TODO: Add a proposal for dealing with the CEE/OP mess.
12024         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
12025         optimizations from the x86 port.
12027         * cpu-amd64.md: Ditto.
12029         * basic.cs basic-long.cs: Add tests.
12031 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
12033         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
12034         Patrik Torstensson's implementation of my exception-handling
12035         optimization idea, when the exception object is not used
12036         (bug #62150).
12038 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
12040         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
12041         of the mul_imm optimizations from the old jit.
12043 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
12045         * mini.c, liveness.c: patch by Patrik Torstensson and
12046         Zoltan Varga to improve performance in methods with
12047         exception clauses.
12049 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
12051         * driver.c: Remove 'Globalization' entry from --version.
12053 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
12055         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
12056         there is a profiler interested in JIT events.
12058         * aot.c: Load profile files produced by the AOT profiling module, and
12059         reorder methods based on the profiling info. Add a 'method_order' table
12060         to the AOT file to make mono_aot_find_jit_info work with the reordered
12061         methods.
12063         * mini.h: Bump AOT file version info.
12065 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
12067         * mini-arm.h: work around what looks like a gcc bug when optimizations
12068         are enabled.
12070 2005-09-28  Raja R Harinath  <rharinath@novell.com>
12072         * Makefile.am (AM_CFLAGS): Don't use += to append inside
12073         conditionals.  Use ...
12074         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
12076 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
12078         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
12079         to determine the amount of memory to copy when passing valuetypes.
12081         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
12082         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
12084 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
12086         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
12087         information about aot.
12089 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
12091         * *.c: Replace the use of {Enter,Leave}CriticalSection with
12092         macros. This will allow a deadlock debugger to easily be plugged
12093         in.
12095 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
12097         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
12099 2005-09-27  Raja R Harinath  <rharinath@novell.com>
12101         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
12102         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
12103         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
12104         ($(arch_built)) [CROSS_COMPILING]: Error out.
12106 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
12108         * aot.c: Add support for the no_special_static flag for classes.
12110 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
12112         * Reapply reverted patches.
12114         * *: Revert r50174 as well.
12116         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
12118 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
12120         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
12122 2005-09-23  Miguel de Icaza  <miguel@novell.com>
12124         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
12125         part of the SIG_HANDLER_SIGNATURE.  
12127 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
12129         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
12130         statistics.
12132         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
12133         introduced by previous patch.
12135 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
12137         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
12138         saved registers too.
12140         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
12141         upon the information returned by get_call_info ().
12142         
12143         * mini-x86.c (add_float): Fix stack size calculation.
12144         (mono_arch_call_opcode): Rewrite this so it works based up the
12145         information returned by get_call_info ().
12146         (mono_arch_get_this_vret_args): Ditto.
12148 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
12150         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
12151         in cinfo to determine the registers which need to be used.
12153 2005-09-20  Miguel de Icaza  <miguel@novell.com>
12155         * driver.c (mono_main): Add --server and --desktop flags. 
12157 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
12159         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
12160         registers as global registers.
12162         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
12163         longer needed with the new register allocator.
12165         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
12167         * cpu-ia64.md: Remove unused opcodes.
12168         
12169         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
12170         
12171 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
12173         * cpu-amd64.md: Remove unused opcodes.
12175         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
12176         needed with the new register allocator.
12178         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
12179         reg-reg moves.
12181 2005-09-16  Raja R Harinath  <rharinath@novell.com>
12183         * Makefile.am (check-local): Don't invoke semdel-wrapper.
12185 2005-09-16  Martin Baulig  <martin@ximian.com>
12187         * exceptions-amd64.c
12188         (throw_exception): Don't call mono_debugger_throw_exception() if
12189         we're a rethrow - see the FIXME in the code.
12191 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
12193         * mini.c (mono_init_exceptions): This only works on some architectures.
12194         
12195 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12197         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
12198         on ia64.
12200         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
12202         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
12203         now in mini-exceptions.c.
12205 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
12207         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
12208         now in mini-exceptions.c.
12210 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
12212         * exceptions-x86.c: Applied patch from Patrik Torstensson 
12213         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
12215         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
12216         code into mini-exceptions.c. Add some assertions to it.
12218 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
12220         * aot.c (emit_section_change): Applied patch from "The Software Team" 
12221         (<software@solmersa.com>). Fix as errors on windows.
12223 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12225         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
12226         method info into the LMF.
12228 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12229         
12230         * mini-ia64.c: Add proper unwind info for method epilogs.
12232         * exceptions-ia64.c: Add some code to help debugging.
12233         
12234         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
12236         * mini-exceptions.c: Fix warning.
12238 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
12240         * mini.c: Really fix build.
12242         * mini-x86.c mini-amd64.c: Fix build.
12244 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
12246         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
12248         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
12249         some Interlocked methods as intrinsics.
12251         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
12252         for Thread methods as well.
12254         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
12256         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
12258         * mini-ia64.c mini-x86.c mini-amd64.c 
12259         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
12260         OP_MEMORY_BARRIER.
12261         
12262         * mini.c (mono_init_exceptions): Fix build breakage.
12264 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
12266         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
12267         of instructions. Use the new ia64_unw_op macros for emitting unwind
12268         info.
12270         * mini.c (mono_init_exceptions): Initialize exception handling
12271         related trampolines at startup.
12273 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
12275         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
12277 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
12279         * mini.c: Handle type loading errors gracefully during compilation and
12280         throw the appropriate exception.
12282 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
12284         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
12285         for the mono binary.
12287 2005-09-09  Martin Baulig  <martin@ximian.com>
12289         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
12290         the release.
12292 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12294         * mini-arm.h: use emulation for conv.r.un for the release.
12296 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
12298         * mini-arm.c, objects.cs: more fixes and tests for them.
12300 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12302         * mini-arm.c: align structures to at least 4 bytes to be able
12303         to keep our current optimized memcpy.
12305 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
12307         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
12309 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12311         * mini.c: ignore SIGPIPE.
12313 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
12315         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
12317         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
12319 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
12321         * mini.h: Add prototype for mono_allocate_stack_slots_full.
12323 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
12325         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
12326         exception handling support.
12327         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
12328         patch by Brian Koropoff <briank@marakicorp.com>).
12330 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
12332         * mini.c: revert another 'optimization' which breaks when
12333         items on the eval stack need to be saved at a basic block end
12334         (bug #75940).
12336 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
12338         * jit-icalls.c: for arrays, ensure we always provide
12339         lower bounds.
12341 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
12343         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
12344         
12345         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
12347 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
12349         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
12350         arguments in their original register.
12352 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
12354         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
12355         memset/memcpy.
12357         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
12358         when ssapre is enabled.
12360         * inssel-long.brg: Fix bug in previous patch.
12362         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
12363         multiplication by a constant.
12365 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
12367         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
12368         icc.
12370         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
12371         saving registers.
12373 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
12375         * inssel-arm.brg: apply changes tested by Brian Koropoff
12376         <briank@marakicorp.com>.
12378 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
12380         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
12381         
12382 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
12384         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
12385         to the same register if dreg is just a base register.
12386         (print_ins): Improve printing of membase opcodes.
12388         * inssel-x86.brg: Add optimized ldind(reg) rules.
12390         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
12392 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
12394         * mini.c: when running under valgrind, set the stack bottom for
12395         the GC at the actual approximate stack for the app (fixes running
12396         mono with valgrind).
12398 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
12400         * mini.c: do no break at the first valuetype to init found
12401         (fixes bug #75791).
12403 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
12405         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
12407 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
12409         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
12411 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
12413         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
12415 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12417         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
12419         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
12420         code.
12422         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
12423         code.
12425         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
12426         methods.
12428 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
12430         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
12432 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12434         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
12435         in the tail recursion optimization.
12437         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
12438         debug info into the assembly file.
12440         * iltests.il: Add test for filter regions.
12442         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
12443         initial stack of filter regions. Fixes #75755.
12445 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
12447         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
12448         stack requirements.
12450 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
12452         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
12453         the check for an already compiled method on non-ia64 platforms.
12454         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
12455         proper domain.
12457         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
12459         * inssel-x86.brg: Add some optimized call rules.
12461 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
12463         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
12464         method here.
12466         * mini.h mini-trampolines.c: Pass the trampoline argument to 
12467         mono_arch_patch_delegate_trampoline.
12469         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
12471         * mini-trampolines.c: Fix build.
12473         * mini-amd64.h: Add delegate trampolines.
12475         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
12477         * inssel-amd64.brg: Add optimized call rules.
12478         
12479         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
12481         * inssel-ia64.brg: Add optimized ldind(reg) rules.
12483 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
12485         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
12486         change.
12488         * mini-ia64.c: Remove LMF fixmes.
12490         * mini-ia64.h: Remove most fields from LMF.
12492         * inssel-ia64.brg (stmt): Fix unaligned access errors.
12494         * mini-trampolines.c: Add support for IA64 function descriptors.
12496         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
12497         for IA64 function descriptors.
12499 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
12501         * tramp-arm.c: patch the vtable for virtual calls. Added
12502         support code to register/unregister the LMF.
12503         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
12504         more LMF work.
12506 2005-08-19  Dick Porter  <dick@ximian.com>
12508         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
12509         bit value if needed.
12511 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
12513         * mini.c (mini_get_method): Move handling of wrapper data here.
12515         * mini.c (mono_method_to_ir): Add support for dynamic methods.
12517         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
12518         virtual.
12520         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
12521         bblock->code does not remain empty.
12523 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
12525         * arrays.cs: Add regression test for #75832.
12527         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
12528         rules. Fixes #75832.
12530         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
12531         instruction scheduling.
12533 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
12535         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
12537 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
12539         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
12541         * mini-codegen.c: Fix VC build.
12543         * cpu-pentium.md: Increase length of atomic_exhange_i4.
12545 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12547         * mini.h: fix signature for mono_register_opcode_emulation.
12549 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
12551         * mini.c: Get rid of most of the helper_sig_... constants using
12552         mono_create_icall_signature ().
12554 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
12556         * jit-icalls.c (helper_ldstr): New helper function.
12558         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
12560         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
12561         throw, load the string using a helper call instead of creating a string object.
12563         * aot.c: Update after LDSTR changes.
12565         * mini.h: Bump AOT file version.
12566         
12567         * aot.c: Save class size info into the AOT file. Print more statistics during
12568         compilation.
12570         * mini.h: Bump AOT file version.
12572         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
12573         ordering of disasm cases. Fixes #74957.
12575 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
12577         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
12578         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
12579         the generic code needed for the ARM port.
12581 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
12583         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
12584         inssel-arm.brg: more ARM features and fixes.
12586 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
12588         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
12589         ARM port work in progress.
12591 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
12593         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
12595         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
12597         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
12599         * inssel.brg (mini_emit_memset): Add support for unaligned access.
12601         * *-ia64.*: Ongoing IA64 work.
12602         
12603         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
12605 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
12607         * TODO: Remove out-of-data todo stuff.
12609         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
12610         dead code.
12612         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
12614         * mini.h: Bump corlib version.
12616 2005-07-27  Martin Baulig  <martin@ximian.com>
12618         * mini-codegen.c
12619         (create_copy_ins): Added `const unsigned char *ip' argument; set
12620         `copy->cil_code' from it.
12622 2005-07-27  Martin Baulig  <martin@ximian.com>
12624         * mini-exceptions.c (mono_handle_exception): Don't call
12625         mono_debugger_handle_exception() for filters.
12627 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
12629         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
12630         as well.
12632 2005-07-26  Martin Baulig  <martin@ximian.com>
12634         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
12636         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
12637         helper_compile_generic_method() if the method is actually virtual
12638         and non-final.
12640 2005-07-26  Martin Baulig  <martin@ximian.com>
12642         * mini.c
12643         (trampoline_code): Renamed to `mono_trampoline_code' and made it
12644         public; this is now accessed directly by the debugger.
12645         (mono_generic_trampoline_code): Removed.
12647         * debug-mini.c
12648         (mono_debug_init_method): Also add interncalls and wrappers.
12650 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
12652         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
12654 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
12656         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
12658 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
12660         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
12662 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
12664         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
12665         getting TLS offsets on AMD64 too.
12667 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
12669         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
12671 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
12673         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
12674         inssel-arm.brg, mini-arm.h: ARM port work in progress.
12676 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
12678         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
12680         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
12681         to mini.c.
12683         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
12684         mono_sparc_is_virtual_call ().
12685         
12686         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
12688         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
12689         trampoline parameters.
12691         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
12692         
12693         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
12694         to mono_arch_get_vcall_slot_addr.
12696         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
12697         trampoline code.
12699         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
12701 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
12703         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
12705 2005-07-19  Martin Baulig  <martin@ximian.com>
12707         * exceptions-amd64.c (throw_exception): Call
12708         mono_debugger_throw_exception() here like we're doing it on i386.
12710 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
12712         * mini-ia64.c: Add optimized TLS access support.
12714 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
12716         * mini-exceptions.c: Ongoing IA64 work.
12718         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
12720         * mini.c: Use the default optimization set when embedding. Fixes
12721         #75194.
12723 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
12725         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
12726         of trampolines to a separate file.
12728         * mini-trampolines.c: New file.
12730         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
12731         separate file.
12732         
12733         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
12734         amd64/ia64 code.
12736         * mini-codegen.c: Fix cygwin build.
12738 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
12740         * mini.c: Add some minor changes needed by the IA64 port.
12742         * *-ia64.*: Ongoing IA64 work.
12744 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
12746         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
12747         trampolines into arch-independent and arch-dependent parts.
12749         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
12751 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
12753         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
12755         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
12756         the xp-regalloc-branch for amd64.
12758         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
12759         xp-regalloc-branch for x86.
12761 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
12763         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
12765 2005-07-06  Martin Baulig  <martin@ximian.com>
12767         * mini.c
12768         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
12769         (mono_jit_runtime_invoke): Likewise.
12771 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
12773         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
12774         on x86 too.
12775         
12776         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
12777         without loading their metadata. Reorganize the file format so exception handling+
12778         debug info is kept separate from normal method info. Create MonoJitInfo 
12779         structures for methods lazily.
12781         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
12782         loading metadata.
12783         (x86_class_init_trampoline): Patch AOT class init trampolines too.
12785         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
12787         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
12788         in AOT code.
12790         * mini.h: Bump AOT file version.
12792 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
12794         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12796 2005-07-01  Raja R Harinath  <rharinath@novell.com>
12798         * Makefile.am (check-local): Call semdel-wrapper.
12800 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
12802         * mini-x86.c: Revert the last change as it seems to break the build..
12804 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
12806         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
12807         
12808         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
12810 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
12812         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
12813         outside of the macro, so strange stuff doesn't happen with gcc4
12814         (NEW_AOTCONST_TOKEN): Likewise.
12816 2005-06-28  Martin Baulig  <martin@ximian.com>
12818         * mini.c (mini_class_is_system_array): New static method; use this
12819         instead of `klass->parent == mono_defaults.array_class' everywhere
12820         since this also works for the new generic array class.
12822 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
12824         * inssel.brg: Remove warnings.
12826 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
12828         * mini-ia64.c: Ongoing IA64 work.
12830         * basic-float.cs: Add float->i1 conversion test.
12832         * iltests.il: Add conv.u4 test.
12834 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
12836         * inssel-long.brg: Fix bug caused by last change.
12838 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
12840         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
12841         BSDs.  Allows the x86 JIT to work on OSX86
12843 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
12845         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
12846         u4->i8 conversion.
12848         * mini-ia64.c: Ongoing IA64 work.
12850 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
12852         * mini-ia64.c: Ongoing IA64 work.
12854         * driver.c: Clean up jit_code_hash as well when using --regression.
12856         * inssel-long.brg: Fix long->i4/u4 conversion rules.
12858         * basic-long.cs: Add tests for long->u4 conversion.
12860 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
12862         * mini.c: Take mono_get_domainvar out of macros. This makes sure
12863         that we do not depend on undefined C behavior: the order stuff
12864         gets evaluated within an expression. Fixes mono when compiled on
12865         GCC 4.
12867 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
12869         * *-ia64.*: Ongoing IA64 work.
12871         * aot.c: Lower memory usage while loading AOT methods.
12873         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
12875         * mini.h: Bump AOT file format version.
12877 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
12879         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
12881 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
12883         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
12884         not on callee assembly). Fixed some comments.
12886 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
12888         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
12889         it gets proper disassembly.
12890         (emit_method_info): Remove some dead code.
12892         * mini.c (mini_method_compile): Allways allocate the GOT var in
12893         mono_method_to_ir for emulating opcodes.
12895 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
12897         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
12898         before freeing the code memory. Fixes #74990.
12900         * objects.cs: Add regression test for #74992.
12902         * liveness.c: Extend live ranges of arguments to the beginning of the
12903         method. Fixes #74992.
12905         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
12906         so it points into the faulting instruction.
12908 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
12910         * jit-icalls.c (mono_imul_ovf): Add exception handling.
12912         * *-ia64.*: Ongoing IA64 work.
12914         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
12916 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
12918         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
12920         * *-ia64.*: Ongoing IA64 work.
12922 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
12924         * basic-long.cs: Add tests for add/sub.ovf.
12926         * basic.cs: Add tests for sub.ovf.
12928         * *-ia64.*: Ongoing IA64 work.
12930 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
12932         * *-ia64.*: Ongoing IA64 work.
12934         * basic.cs: Add conv.ovf.i4.un test.
12936 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
12938         * mini.c: (remove_block_if_useless) Fixed bug 75061.
12939         
12940 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12942         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
12944 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
12946         * *-ia64.*: Ongoing IA64 work.
12948 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12950         * trace.[ch]:
12951         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
12953 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
12955         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
12957 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
12959         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
12961         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
12962         of a call is callable by a near call.
12964 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
12966         * mini-ia64.c: Ongoing IA64 work.
12968 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
12970         * genmdesc.c: Make the generated array non-static.
12972         * inssel-long.brg: Fix LSHR_IMM rule.
12974         * *-ia64.*: Ongoing IA64 work.
12976         * *-ia64.*: Ongoing IA64 work.
12978 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
12980         * *-ia64.*: Ongoing IA64 work.
12982         * *-ia64.*: Ongoing IA64 work.
12983         
12984         * mini-ia64.c: Ongoing IA64 work.
12986         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
12988 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
12990         * objects.cs basic-calls.cs: Move some tests to objects.cs.
12991         
12992         * objects.cs basic-long.cs: Move some tests to objects.cs.
12994 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
12996         * *-ia64.*: Ongoing IA64 work.
12998         * iltests.il: Add a new test.
13000         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
13001         newobj. Fixes #75042.
13003 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
13005         * *-ia64.*: Ongoing IA64 work.
13006         
13007         * *-ia64.*: Ongoing IA64 work.
13008         
13009         * *-ia64.*: Ongoing IA64 work.
13011         * basic.cs objects.cs: Move tests accessing static variables as well.
13013         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
13015 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
13017         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
13019         * driver.c: Always print failed tests.
13021         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
13022         frame pointer.
13024         * *ia64*: Ongoing IA64 work.
13026 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
13028         * basic.cs: Add tests for add.ovf. Fix warnings.
13030 2005-05-18  Miguel de Icaza  <miguel@novell.com>
13032         * driver.c (mono_main): Avoid crash if no argument is passed to
13033         --break;  Do not use g_error, but f_printf.   And fix all other
13034         ocurrences of the same crash.
13036 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
13038         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
13039         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
13040         Fixes #74742.
13042 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
13044         * *-ia64.*: Add beginnings of IA64 backend.
13046         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
13048 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
13050         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
13051         Fixes #74925.
13053         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
13055         * mini-amd64.c: Fix a warning.
13057 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
13059         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
13060         in float_neg. Fixes #74897.
13062         * mini-amd64.c (emit_call): Fix another near call bug.
13064 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
13066         * declsec.c: Keep the appdomain information in the structure. Added a 
13067         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
13068         value gets overwritten).
13069         * declsec.h: Set the default MonoArray for the the stack to 6. Added
13070         an MonoAppDomain member to MonoSecurityFrame.
13071         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
13072         used in the stack walk. Now use a MonoArray which grow (double) when
13073         it gets full.
13075 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
13077         * mini.c: Re-enabled runtime cleanup, since running threads should
13078         now properly stop when exiting.
13080 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
13082         * mini-codegen.c: New file contaning the arch-independent local
13083         register allocator. Not used by any architectures yet.
13085         * mini.h linear-scan.c: Merge some changes from the 
13086         mini-xp-local-regalloc branch.
13088 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
13090         * mini-amd64.c (emit_call): Fix calls to native functions when the
13091         runtime is compiled as a shared library. Fixes #74756.
13093         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
13094         on a literal field. Fixes #74751.
13096 2005-04-25  Raja R Harinath  <rharinath@novell.com>
13098         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
13100 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
13102         * objects.cs: Add missing null casting test.
13104 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
13106         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
13107         in wrapper methods. Also rename 'address' variable to 'offset'.
13109 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
13111         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
13112         warnings.
13113         
13114         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
13116         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
13117         work on windows.
13119 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
13121         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
13123 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
13125         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
13126         just the last bytes.
13128 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
13130         * aot.c (mono_compile_assembly): Fix warning.
13132         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
13133         by the _MSC_VER stuff.
13135 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
13137         * inssel-long.brg: Fix #74588.
13139         * cpu-amd64.md: Fix #74591.
13141         * iltests.il: Add new regression tests.
13143 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
13145         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
13146         valuetype.
13148 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
13150         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
13152         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
13153         from Bill Middleton <flashdict@gmail.com>.
13155 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
13157         * arrays.cs: Add new regression test. Fix warnings.
13159 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
13161         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
13162         and leakage in CKFINITE.
13164         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
13165         this to a null op since it is called on amd64 too.
13167         * exceptions-amd64.c (get_throw_trampoline): Align stack.
13169         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
13170         body since this is not used on amd64.
13171         
13172         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
13174         * mini-amd64.c: Remove obsolete fixmes.
13176         * mini.c (print_method_from_ip): Fix debugging support.
13178 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13180         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
13181         so that expressions that don't give much gain are not reduced.
13182         * ssapre.h: Likewise.
13184 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
13186         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
13188         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
13190         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
13192 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
13194         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
13196         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
13198 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
13200         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
13201         stack touching.
13203         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
13205         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
13207         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
13209         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
13210         MONO_ARCH_USE_SIGACTION. Fixes #74252.
13212         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
13214         * mini-x86.c: Fix up stack overflow handling.   
13216         * exceptions.cs: Add new regression test.
13218 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
13220         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
13221         mono_jit_thread_attach.
13223         * mini.c (mono_method_to_ir): Verify called method is not abstract.
13225 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13227         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
13228         avoid calling constructors using callvirt.
13230         * inssel.brg: Fix #74073.
13232 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
13234         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
13235         compilation with non-GCC compilers.
13236         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
13237         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
13239 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
13241         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
13242         klass->interface_offsets (will likely fix bug#74073).
13244 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
13246         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
13248 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
13250         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
13251         to amd64_div_reg_size ().
13252         
13253         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
13255 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
13257         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
13259 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13261         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
13263 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
13265         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
13266         
13267         * mini.c (mono_precompile_assembly): Load and precompile referenced
13268         assemblies as well. Fixes #74015.
13270 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
13272         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
13274 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
13276         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
13277         a lot of checks and (anyway) permissions cannot work until corlib is 
13278         loaded.
13280 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
13282         * mini-ppc.c: fixed ABI issue on sysv/ppc.
13284 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
13286         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
13287         calls (fixes bug#72824).
13289 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13291         * mini.c: fix tail recursion elimination (see test in bug#73936).
13293 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
13295         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
13296         some fp functions in sse2 mode.
13298 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
13300         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
13302 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
13304         * mini.h mini.c: Add mono_get_jit_tls_key ().
13306         * mini-x86.c: Enable fast TLS support on windows.
13308 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
13310         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
13311         * mini.c: Check for p/invoke method when generating code. If a
13312         p/invoke method, or it's class, isn't decorated with [Suppress
13313         UnmanagedCodeSecurity] then generate code to call System.Security.
13314         UnmanagedDemand (only if the security manager is active).
13316 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13318         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
13319         last change as it seems to cause strange crashes.
13320         
13321 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13323         * *.c: handle unsafe function pointers where needed.
13325 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
13327         * mini.c (mono_jit_free_method): Remove the fixme too.
13329 2005-03-15  Miguel de Icaza  <miguel@novell.com>
13331         * mini.c: As discussed, make the code actually free the delegate
13332         thunk now, to enable the debugging of delegate problems, use
13333         MONO_DEBUG=1 when running Mono. 
13335         This takes also care of parts of the leaks as seen by Joe.
13337 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
13339         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
13340         thread_tls_offset calculation.
13342 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
13344         * declsec.c: Reworked linkdemand checks for icall. The previous code
13345         was using the declaration code (untrusted) and didn't work as expected
13346         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
13347         specific case.
13349 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
13351         * iltests.il: Add new localloc test.
13353         * mini-amd64.c: Handle large stack allocations the same way as on
13354         windows if stack overflow handling is working.
13355         
13356         * mini-amd64.c: Allocate the signal stack using mmap.
13358         * mini.c (sigsegv_signal_handler): Fix reading of context.
13360         * mini-exceptions.c: Fix up stack overflow handling.
13362         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
13364         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
13366         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
13368         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
13370         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
13371         tramp_init functions as they are no longer needed.
13373 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
13375         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
13376         
13377         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
13379         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
13380         
13381         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
13382         support that now.
13384         * mini-ops.h: Add OP_LMUL_IMM.
13386         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
13387         long mul/div opcodes as intrinsic.
13389         * mini-amd64.c (emit_call): Handle the case when the callee might be
13390         an AOT method.
13392 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
13394         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
13395         extra safe.
13396         
13397         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
13399         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
13401 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
13403         * mini.c (mono_codegen): Don't leak here, to help people running
13404         monogrind.
13406 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
13408         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
13409         conversions in sse2 mode.
13411         * basic-float.cs: Add regression test.
13412         
13413         * mini-amd64.c: Reenable sse2.
13415 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13417         * mini-amd64.c: Disable sse2 until some regressions are fixed.
13419 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
13421         * driver.c: Copyright text should include 2005.
13422         
13423 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
13425         * cpu-amd64.md (load_membase): Fix more max lengths.
13427 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
13429         * cpu-amd64.md (load_membase): Fix max length.
13431         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
13433         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
13435         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
13436         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
13438         * basic-float.cs: Add rounding regression test.
13440         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
13442 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
13444         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
13445         structures in registers for pinvoke wrappers.
13447 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
13449         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
13451 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
13453         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
13454         wrapper to mono_jit_thread_attach.
13456         * mini.c (mini_jit_thread_attach): New jit icall.
13458         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
13459         native->managed wrappers.
13461         * exceptions.cs: Add new regression test.
13463         * mini.c (optimize_branches): Check regions in the cbranch to throw
13464         block case as well. Fixes #73242.
13466 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
13468         * mini.c: thread safety fixes.
13470 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
13472         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
13473         patching stuff, since delegates use jump trampolines so there is
13474         no caller.
13476         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
13477         jump trampolines.
13478         
13479         * tramp-amd64.c: Fix build.
13481         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
13482         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
13484         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
13485         Rename this to mono_arch....
13486         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
13488         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
13490         * mini-amd64.c (emit_call): If both the caller and the callee is
13491         guaranteed to have 32 bit addresses, emit a normal call.
13493         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
13495         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
13496         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
13497         method_ptr inside delegates.
13499 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
13501         * mini.c (mono_jit_free_method): Free the method info even if the native code is
13502         invalidated. Fixes #73001.
13504         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
13506         * mini-x86.c: Only use stdcall for pinvokes on windows.
13508 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
13510         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
13511         * mini-x86.c: remove unreliable __thread var offset detection,
13512         use the correct accessors and enable by default.
13514 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
13516         * mini.c (mono_jit_free_method): Fix memory leak.
13518 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
13520         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
13522 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
13524         * cpu-amd64.md: Fix lengths of atomic opcodes.
13526 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
13528         * driver.c: try to not imply using ICU is any good.
13530 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
13532         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
13533         functions as inline ops.
13535         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
13536         some Interlocked functions as inline ops.
13538         * mini.c (move_basic_block_to_end): Fix bug in last patch.
13540         * mini.h (MonoBasicBlock): Reorganize fields a bit.
13542         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
13544         * mini.c: Add support for OP_NOT_TAKEN.
13546         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
13547         structures in registers for pinvoke wrappers.
13549         * mini-amd64.c: Fix warnings.
13551 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
13553         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
13555         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
13557         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
13558         address instead of loading the address from it.
13560         * mini-x86.c: Add support for returning small structs in registers
13561         on Win32. Fixes part of #70864.
13562         
13563 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
13565         * trace.c (get_token): Improve error checking.
13567 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
13569         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
13571 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
13573         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
13574         it can be reused for MonoClass.
13575         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
13576         _LINKDEMAND.
13578 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
13580         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
13581         instead of a MonoReflectionMethod. The method information wasn't used
13582         when displaying SecurityException details (but will be now).
13584 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
13586         * Makefile.am : windows build fix.
13588 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
13590         * iltests.il: Add new regression test.
13592         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
13593         #72522.
13595 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
13597         * mini.c: Moved linkdemand check into helper function check_linkdemand
13598         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
13599         LDFTN, LDVIRTFTN).
13601 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
13603         * declsec.c: Added statistics counter for different kinds of 
13604         LinkDemands.
13605         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
13606         (and commented) declaration.
13607         * mini.c: Added statistics counter for security Demand code 
13608         generation. Added display of security statistics.
13610 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
13612         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
13613         Fix compilation errors under gcc-2.95.
13615 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
13617         * mini.c, driver.c: Use the new jit trampoline hashtable
13619 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13621         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
13623 2005-02-11  Martin Baulig  <martin@ximian.com>
13625         * debug-mini.c (mono_debug_close_method): Free the line number array.
13627 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
13629         * aot.c: Break up large methods into smaller ones. Share GOT slots for
13630         icalls.
13632         * mini.h: Bump AOT file format version. 
13634 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
13636         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
13637         APTC and P/Invoke.
13638         * declsec.h: Added macros to get/set lazyly initialized security 
13639         informations about assemblies. Added new enum for different type of
13640         possible LinkDemand violation. Added function to check LinkDemands.
13641         * mini.h: Added a field to MonoCompile to hold any security violation
13642         detected when JITting a method (so it can be thrown later).
13643         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
13644         and CEE_CALLVIRT. Added code to throw exception at the end of
13645         mini_method_compile (note: the exception is unhandled right now).
13647 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
13649         * mini.c, jit-icalls.c: use the managed implementation of
13650         memset for initobj and memset, to avoid managed <-> unmanaged
13651         transitions.
13653 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
13655         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
13656         optimization if it would need a GOT var.
13658         * basic.cs: Add tests for constant propagation and switch statements.
13660         * ssa.c: Fix out-of-range constant propagation and switch statements.
13662 2005-02-09    <vargaz@freemail.hu>
13664         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
13666 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
13668         * cpu-amd64.md (load_membase): Fix max length of load_membase.
13670 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
13672         * mini.c: update to new signature of mono_class_get_allocation_ftn().
13674 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
13676         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
13677         arithmetic operations.
13679 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
13681         * mini-ppc.c: add a workaround for broken user code that
13682         DllImports vararg functions with non-vararg signatures.
13684 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
13686         * mini.c (mono_jit_compile_method_inner): Add detection and a 
13687         meaningfull error message for assemblies written in Managed C++.
13689         * tramp-amd64.c mini-amd64.h: Add support for 
13690         create_trampoline_from_token ().
13692         * aot.c mini-x86.c abcremoval.c: Applied patch from
13693         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
13695 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
13697         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
13698         which takes a MonoImage/token as parameter instead of a MonoMethod.
13700         * aot.c: Use the new trampoline for initializing vtables.
13702         * aot.c: Add support for ldfld/stfld_remote wrappers.
13704         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
13705         rules for compare <MEM>, IMM.
13707         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
13709         * aot.c: Handle inherited finalizers correctly.
13711 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
13713         * inssel.brg (stmt): Add a missing _setup_... ().
13715         * aot.c: Save some parts of the class state to the AOT file and use it
13716         to recompute that state when a class is initialized.
13718         * mini.c: Install AOT hooks into the runtime.
13720         * mini.h: Bump AOT file format version.
13721         
13722         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
13723         Fixes #72148.
13725         * iltests.il: Add new test.
13727 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
13729         * mini.c: fix typo.
13731 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
13733         * mini.c: setup the statistical profiler in the thread attach
13734         callback to cope with the new single thread code.
13736 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
13738         * mini-ppc.c: ensure we have enough room for the profiler
13739         calls (fixed bug#72084).
13741 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
13743         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
13744         it.
13746 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13748         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
13750 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13752         * ssapre.c: Fixed an issue with down safety (this allows IronPython
13753         to succesfully execute parrotbench).
13754         * ssapre.h: Likewise.
13756 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
13758         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
13759         variable for stores to method arguments (fixes a SSAPRE issue).
13761 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13763         * mini.c: handle value types in dup, fixes gen-112.cs.
13765 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
13767         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
13768         sequence for calls in dynamic methods to avoid thunks.
13770 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
13772         * mini.c: correctly remove dynamic methods from the hashtable.
13774 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13776         * driver.c: Disabled SSAPRE until fix the bug that appears
13777         in IronPython's parrotbench.
13779 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
13781         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
13783         * mini.c (mono_method_to_ir): Revert the previous change.
13784         
13785         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
13786         when AOT compiling.
13788         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
13789         mono_jit_info_table_find () etc. when running under valgrind.
13791         * inssel.brg: Fix warnings.
13793         * mini-exceptions.c: Fix warnings.
13795 2005-01-31  Martin Baulig  <martin@ximian.com>
13797         * driver.c (compile_all_methods_thread_main): Don't try to compile
13798         generic methods or anything which has type parameters.
13800 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
13802         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
13804         * TestDriver.cs: Add --verbose flags.
13806         * graph.c ssa.c: Fix 64 bit warnings.
13807         
13808         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
13809         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
13810         Fix 64 bit warnings.
13812         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
13813         variable not spotted by gcc.
13814         
13815         * mini-amd64.c inssel-amd64.brg: Applied patch from  
13816         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
13817         X86_COMPARE_MEMBASE opcodes.
13819         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
13821 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
13823         * *: MonoMethod->signature might be NULL now. You *MUST* use
13824         mono_method_signature.
13826 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13828         * driver.c (compile_all_methods_thread_main): Compile the methods
13829         without invoking cctors.
13831 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
13833         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
13834         * basic-calls.cs: test for the above.
13836 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
13838         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
13839         MonoJitInfo changes.
13841 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
13843         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
13844         eagerly if it contains dynamic methods.
13845         
13846         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
13848         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
13849         trace, it is now computed by an icall from trace_ips.
13850         
13851         * mini-exceptions.c: Fix a warning.
13853 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
13855         * mini-exceptions.c: don't bother getting stack trace info if
13856         it's not going to be used.
13858 2005-01-27  Raja R Harinath  <rharinath@novell.com>
13860         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
13861         ssapre-mini-ops.h.
13863 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
13865         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
13867         * aot.c: Avoid calling mono_method_get_header () if not needed.
13869         * mini.h: Bump AOT file format version.
13870         
13871         * mini.c (mono_emit_native_call): Allocate a GOT var here.
13873         * mini.c (mono_print_tree): Print more info for calls.
13875 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
13877         * declsec.h: Remove warning by adding missing include for marshal.h
13879 2005-01-26  Martin Baulig  <martin@ximian.com>
13881         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
13882         `ip' twice.
13884 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
13886         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
13887         flags.
13889         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
13891         * aot.c (mono_compile_assembly): Fix a warning.
13893 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
13895         * declsec.c: Look for security attributes on the original MonoMethod 
13896         (and not the wrapped one). This fix permissions on icalls.
13898 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
13900         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13902         * mini.c (mono_allocate_stack_slots): Add a fixme.
13904         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
13906 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
13908         * inssel.brg: optimize casts of sealed types (more
13909         optimizations waiting for fixes in remoting).
13911 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
13913         * inssel.brg (stmt): Add another dummy rule.
13915         * driver.c: Fix warnings.
13917         * driver.c (mono_main): If running under valgrind, instruct glib to use
13918         the system allocation functions so valgrind can track the memory
13919         allocated by the g_... functions.
13921         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
13923         * mini-ops.h: Add OP_DUMMY_STORE opcode.
13925         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
13927         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
13928         variables in try regions.
13930         * mini.c (mini_method_compile): Don't disable optimizations on large
13931         methods when AOT compiling.
13933         * mini.c (mono_allocate_stack_slots): New arch independent method to 
13934         allocate stack slots. Not yet used.
13936 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
13938         * debug-mini.c (mono_debug_close_method): Plug some leaks.
13940 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
13942         * mini-ppc.c: make the branch info relative as the code
13943         buffer can be reallocated.
13945 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
13947         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
13948         * driver.c: Removed the AOT/security restriction. Now initialize the
13949         security manager (in metadata) if --security is used.
13950         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
13951         rather than the pointer to declarative security, when AOT is used.
13953 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
13955         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
13956         basic blocks, reduced intrinsic exception throwing code size.
13958 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
13960         * driver.c (mini_usage): Reorder the usage screen.
13962 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
13964         * mini.c (mono_resolve_patch_target): Fix warning.
13966 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
13968         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
13969         previous patch.
13971         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
13973         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
13974         breaks the amd64 build.
13976         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
13977         register allocation. Fixes #71454.
13979         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
13981         * arrays.cs: Add new regression test.   
13983 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13985         * ssapre.c: Turned usage of snprintf to GString.
13986         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
13987         (I left it on by mistake in my previous commit).
13989 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
13991         * mini.c, cfold.c, basic-calls.cs: preserve side effects
13992         on cond branch optimization (fixes bug# 71515).
13994 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
13996         * abcremoval.c: Fixed bug 71062.
13997         * abcremoval.h: Likewise.
13999 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
14001         * mini.c: Added a new functionality to optimize_branches, the removal
14002         of useless basic blocks, and fixed some problem in the removal of
14003         critical edges; some utility functions added for both purposes.
14004         * ssapre.c: Added complex expression support, and fixed bug 70637.
14005         * ssapre.h: Likewise.
14006         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
14007         enabled in SSAPRE.
14008         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
14009         * driver.c: Re-enabled SSAPRE.
14011 2005-01-19  Martin Baulig  <martin@ximian.com>
14013         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
14014         the result of mono_get_method_constrained().
14016 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
14018         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
14019         manager.
14021 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
14023         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
14024         be detected.  Fixes #59296.
14026 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
14028         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
14029         which can happen. Fixes #71361.
14031 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
14033         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
14034         manager.
14036 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
14038         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
14039         appdomain-unload.exe to fail.
14040         
14041         * mini.c: Fix some memory leaks.
14043 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
14045         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
14046         Fixed bug and sped up some codepaths.
14048 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
14050         * mini.c: Fix some memory leaks.
14052         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
14053         conversion.
14055         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
14057         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
14058         #71320.
14060         * iltests.il: Add regression test for #71320.
14062 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
14064         * mini.c (mono_codegen): Fix installation of profiler hooks.
14066         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
14068 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
14070         * mini.h, mini.c, cfold.c: optimize access to enum
14071         readonly fields, too. Eval conditional branches if possible
14072         to perform unreachable code removal in more cases.
14074 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
14076         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
14078         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
14079         code manager.
14081         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
14082         WinXP DEP. Fixes #71244.
14084 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
14086         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
14088 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
14090         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
14092 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
14094         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
14095         changes.
14097         * mini.h: Bump AOT version.
14099         * mini.h (MonoCompile): Change exvar to a hash table.
14101         * mini.c: Allocate a separate exvar for each handler block.
14103         * mini.c: Get rid of the computation of filter_lengths, its not needed.
14105         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
14106         ex var with the pending exception and only throw if the two are equal.
14107         Fixes #68552.
14108         
14109         * exceptions.cs: Add tests for rethrow and nested catch clauses.
14111         * mini-x86.c: Fix warnings.
14113         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
14114         used by all the ports now.
14116         * aot.c: Add write-symbols and save-temps options.
14118 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
14120         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
14122 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
14124         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
14125         operations.
14127         * tramp-s390.c: Check vtable slot belongs to the domain.
14129         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
14130         as per other platforms.
14132         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
14134 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
14136         * driver.c: we don't run the Main() code in a subthread anymore.
14138 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
14140         * mini.c: added experimental rtc support in the statistical
14141         profiler: if the user has the permission, more accurate statistics
14142         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
14143         The MONO_RTC value must be restricted to what the linux rtc allows:
14144         power of two from 64 to 8192 Hz.
14146 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
14148         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
14150 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
14152         * mini-ppc.c: better icache flush for smp.
14154 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
14156         * mini-amd64.c (emit_move_return_value): Fix memory leak.
14158         * mini-x86.c (get_call_info): Add the get_call_info () code from the
14159         amd64 port, not yet used.
14161 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
14163         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
14164         a struct type.
14166 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
14168         * driver.c: Added --security option to activate the security manager.
14169         Right now this will allow code generation for declarative demands and
14170         is disabled when AOT is specified.
14171         * mini.c: Add code generation for declarative security demands.
14172         * mini.h: Add mono_use_security_manager as an extern gboolean.
14174 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
14176         * aot.c (mono_compile_assembly): Speed up compilation a bit by
14177         emitting more dense assembly code.
14179         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
14180         exception throwing stuff.
14182 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
14184         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
14185         dead code.
14187         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
14188         left in by mistake.
14190         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
14191         fixed.
14193         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
14195         * tramp-*.c: Only patch vtable slots if the object is in the current
14196         domain. Fixes appdomain-unload.exe.
14198         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
14199         
14200         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
14201         x86 branch.
14203 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14205         * mini.c (reverse_branch_op): New helper function.
14207         * mini.c (optimize_branches): Run the new optimization only on 
14208         platforms which support it. Also reverse all kinds of branches.
14210         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
14212         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
14213         a throw statement.
14215         * mini.c (optimize_branches): Reverse not-equals branches if the false
14216         bblock is a throw. This happens a lot of time with argument checking in
14217         corlib.
14219         * mini.c (mono_codegen): Add support for placing basic blocks after
14220         the function epilogue.
14222         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
14223         function epilogue.
14224         
14225 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
14227         * mini.c (setup_stat_profiler): Only set this up if the platform
14228         supports ITIMER_PROF.
14230 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
14232         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
14233         previous patch.
14235         * inssel.brg: Fix a warning.
14237 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
14239         * mini.c: added support for statistical profiler 
14240         (run with: --profile=default:stat).
14242 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
14244         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
14246         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
14248         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
14249         related to global registers from the amd64 port.
14251 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
14253         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
14255         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
14256         with global registers.
14257         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
14259         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
14261 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
14263         * debug-mini.c (encode_value): Fix off-by-one.
14265         * aot.c (encode_value): Likewise.
14267         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
14269 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
14271         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
14272         AOT.
14274         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
14275         
14276         * aot.c (emit_method_info): Increase size of temp buffer.
14278         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
14279         the AOT case.
14281 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
14283         * aot.c (emit_method_info): Fix build.
14284         
14285         * aot.c: Further rework of the AOT file format to reduce the size of
14286         the method info data.
14288         * mini.h: Bump AOT file format version.
14290 2004-12-27  Martin Baulig  <martin@ximian.com>
14292         * mini.c (mini_get_method): New static method; call
14293         mono_get_method_full() and mono_get_inflated_method().
14294         (mono_method_to_ir): Use mini_get_method() instead of
14295         mono_get_method_full(). 
14297 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
14299         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
14301 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
14303         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
14305         * inssel-amd64.brg: Add some optimization rules.
14307 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
14309         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
14310         standard not GC'd stuff is fine.
14312 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
14314         * aot.c: Rework the AOT file format to get rid of most of the global
14315         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
14317         * mini.h: Bump AOT file format version.
14318         
14319 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
14321         * mini.h: Bump AOT file format version.
14323         * aot.c (mono_aot_is_got_entry): New function to determine if an 
14324         address is inside a GOT.
14326         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
14328         * cpu-pentium.md: Increase the maximum size of some instructions which
14329         might involve a got access.
14330         
14331         * mini.c (get_method_from_ip): Another debug helper function.
14333         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
14334         when got var accesses are created during the decompose phase.
14336         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
14338         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
14339         argument mini_compile_method and to MonoCompile, and use this to
14340         determine whenever a given method is compiled for AOT. This allows the
14341         other methods compiled during AOT compilation to be free of AOT stuff,
14342         so the backends does not need to add special support for them by
14343         creating a fake GOT etc.
14345         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
14346         longer needed.
14348 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14350         * mini.c (mono_method_to_ir): It turns out that some of the
14351         x-appdomain wrappers are lax with types, so just ignore this for
14352         all wrappers.
14354         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
14355         at the vtable->klass. If it is non-shared code we can just use the
14356         vtable.
14358 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
14360         * mini-ppc.c: access MonoDomain from tls, too.
14362 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
14364         * declsec.c: Removed unused variable (and related warning ;-)
14366 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
14368         * iltests.il: New test for LDELEMA on an array of ref types.
14370         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
14371         all ldelema's on reftypes.
14372         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
14373         it was the wrong place to put it.
14375         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
14376         register to pop to make this cleaner, at the request of Paolo.
14378 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14380         * mini-ops.h (OP_GETHASHCODE): New op.
14382         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
14384         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
14385         operation.
14387         For a microbenchmark, this reduces the cost of Hashtable.get_Item
14388         by 25%.
14389         
14390         * mini-x86.c (mono_arch_output_basic_block): Rather than
14392         add ebp, 4
14394         Emit
14396         pop edx
14398         The first is 3 bytes while the second is 1. This saves 36 kb on
14399         mscorlib, quite a big saving. When bootstraping mcs, I was able to
14400         see a small boost because of icache locality.
14402         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
14404 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
14406         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
14407         started code sharing with the generic code.
14409 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
14411         * mini-ppc.c, cpu-g4.md: added code for direct access to
14412         tls data slots.
14414 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
14416         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
14417          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
14418         to OP_TLS_GET.
14420 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
14422         * declsec.c|h: Added functions to cache the declarative stack modifiers
14423         in MonoJitInfo and to create a security frame from a MonoJitInfo 
14424         structure.
14425         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
14426         created. Register internal calls for System.Security.SecurityFrame::
14427         _GetSecurityFrame and _GetSecurityStack.
14428         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
14429         the definitions for the new stack walk/callback mechanism.
14430         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
14431         first security frame for LinkDemands and InheritanceDemands) and
14432         GetSecurityStack for Demands. Both use the new mono_walk_stack code
14433         from lupus.
14434         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
14435         walk initialization (lupus).
14437 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
14439         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
14440         idiom.
14441         (handle_loaded_temps): Do not create a temporary variable for
14442         things that we know are temps. They will never be modified.
14443         (mono_spill_call): Set MONO_INST_IS_TEMP
14444         (mono_emulate_opcode): ditto
14445         (emit_tree): ditto
14446         (mono_method_to_ir.CEE_DUP): ditto
14448 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
14450         * mini.c (type_to_eval_stack_type): Make this handle the void type
14451         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
14452         (emit_tree): use ip_in_bb to special case some common idioms
14453         Update all callers to pass in the IP.
14454         (mono_method_to_ir): Make CEE_CALL* do the above as well.
14456         This gives us a nice 2% speedup in mcs bootstrap.
14458         * mini-x86.c (peephole_pass): Peephole pass to make
14459         mov  [foo], eax
14460         push [foo]
14462         into
14464         mov [foo], eax
14465         push eax
14467         * mini.c (ip_in_bb): new method.
14468         (mono_method_to_ir): use this method rather than doing the hash
14469         lookup ourselves.
14471         * linear-scan.c (mono_linear_scan): When expiring actives, you
14472         don't need to keep around variables that expire on this
14473         instruction. This makes it so that:
14474              a = b + 1
14475         will turn into:
14476              store (ebx add (ebx, 1))
14477         which will become
14478              add ebx, 1
14480 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
14482         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
14483         combination to avoid doing two copies. Fix up problems with previous
14484         patch.
14486         * mini.c: Fix 64 bit warnings.
14488         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
14490 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
14492         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
14493         changes from the x86 code.
14495         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
14497 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
14499         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
14500         throwing code to reduce its size, unify the AOT and non-aot code and 
14501         get rid of relocations in the AOT case.
14503         * mini-x86.h mini.c exceptions-x86.c 
14504         (mono_arch_get_throw_corlib_exception): New arch specific function to 
14505         raise corlib exceptions which doesn't require relocations in the 
14506         caller.
14508         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
14510 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
14512         * mini.c (mono_emit_method_call): Only allocate the got var when it is
14513         needed.
14515         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
14516         in the AOT case.
14518 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14520         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
14521         with add function when used from Inc/dec atomic 
14522         functions. Re-enabled optimization on x86.
14523         * mini-ops.h: renamed atomic_add functions to
14524         allow _add to match the Interlocked::Add and
14525         _add_next to match Interlocked::Inc/Dec.
14527 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
14529         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
14530         linking of BBs to the end BB, and enabled SSAPRE also with
14531         consprop and copyprop (which was prevented by that bug).
14533 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14535         * mini-x86.c: disabling the Interlocked optimizing code. 
14537 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14539         * aot.c (load_aot_module): Move reading of got_addr after the AOT
14540         file version check.
14541         
14542 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
14544         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
14545         interlocked optimization due lack of support on x86, rewrote 
14546         exchange to take into account that base may be in eax.
14547         
14548         xsp works again; activated Interlocked optimizing code.
14549         
14550 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
14552         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
14554 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
14556         * mini-ops.h: Add new opcodes.
14558         * mini.h: Add new patch types. Add got_var to MonoCompile.
14560         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
14561         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
14562         make it work with all kinds of patchable code.
14564         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
14565         address of the GOT, and referencing entries in the GOT.
14567         * mini.c: Add code to load the GOT address if needed by an opcode.
14569         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
14570         independent AOT code on the x86 using an elf-style Global Offset Table.
14572 2004-12-14  Raja R Harinath  <rharinath@novell.com>
14574         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
14576 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14578         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
14579         when running xsp.
14581 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
14583         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
14584         of Interlocked:Increment/Decrement/Add as inline ops.
14585         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
14587 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
14589         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
14590         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
14592 2004-12-12  Duncan Mak  <duncan@ximian.com>
14594         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
14595         again. `patch_info->table_size' is no longer valid after Zoltan's
14596         commit #37636.
14598 2004-12-12  Martin Baulig  <martin@ximian.com>
14600         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
14601         if we are the "real" method, ie. not an inlined method inside it.
14603 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
14605         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
14606         before we look in the special fields table. This fixes
14607         ../tests/thread-static-init.cs.
14609 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14611         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
14612         for Array get_Rank and get_Length. Fixes bug #70465.
14614 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
14616         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
14617         separate structure to reduce the size of MonoJumpInfo.
14619 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
14621         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
14623 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
14625         * mini.c (mini_get_inst_for_method): Changed to allow ports
14626         to return a MonoInst instead of opcode 
14627         (renamed mini_get_opcode_for_method to better reflect the new functionality)
14628         
14629         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
14630         Allow ports to return a created MonoInst instead of op-code, will enable
14631         new optimizations.
14632         (renamed mini_get_opcode_for_method to better reflected the functionality)
14634 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
14636         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
14638 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
14640         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
14641         Fixes #69985.
14643 2004-12-08  Martin Baulig  <martin@ximian.com>
14645         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
14646         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
14648 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
14650         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
14651         correctly.
14653         * exceptions.cs: Disable some tests which depend on properties of x86 fp
14654         arithmetic.
14656 2004-12-08  Raja R Harinath  <rharinath@novell.com>
14658         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
14660 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
14662         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
14663         bug introduced by the previous patch.
14665 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14667         * mini-ppc.c, objectc.cs: handle large structs passed by value
14668         (fixes bug #69972).
14670 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
14672         * mini-ppc.c: OP_ARGLIST implementation from
14673         Geoff Norton  <gnorton@customerdna.com>.
14675 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
14677         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
14678         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
14680 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
14682         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
14684 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14686         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
14687         support.
14689 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
14691         * mini-sparc.c: Zero out localled-ed memory.
14693         * iltests.il: Add tests for zeroing out localloc-ed memory.
14695 2004-12-04  Martin Baulig  <martin@ximian.com>
14697         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
14698         mono_method_get_signature_full().       
14700 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
14702         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
14703         and some utility functions (always for SSAPRE), integrated SSAPRE.
14704         * mini.h: Likewise.
14705         * driver.c: Added ssapre option.
14706         * ssa.c: Small fix on OP_ARG handling.
14707         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
14708         * Makefile.am: Likewise.
14710 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
14712         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
14713         now in the xp code.
14715         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
14716         icall.
14718 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14720         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
14721         
14722         * cpu-s390.md : Increase instruction length of oparglist.
14724         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
14726 2004-11-30  Martin Baulig  <martin@ximian.com>
14728         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
14729         virtual generic methods.  We call a special helper_compile_generic_method()
14730         icall to retrieve the method from the vtable, inflate and compile
14731         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
14733         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
14735 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
14737         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
14739 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
14741         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
14742         Fixes #69929.
14744 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
14746         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
14747         platforms with PIC aot.
14749 2004-11-28  Martin Baulig  <martin@ximian.com>
14751         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
14752         Fixes gen-112.cs.
14754 2004-11-28  Martin Baulig  <martin@ximian.com>
14756         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
14757         the result of mono_type_get_underlying_type() to check whether
14758         we're byref.
14760 2004-11-26  Martin Baulig  <martin@ximian.com>
14762         * mini.c
14763         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
14764         in the g_assert().
14766 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
14768         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
14769         the same way as the other arguments so they won't get clobbered.
14771         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
14772         calls through R11 since it is clobbered by the trampoline code.
14774 2004-11-26  Raja R Harinath  <rharinath@novell.com>
14776         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
14777         pick up in-tree mscorlib.dll.
14779 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
14781         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
14783         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
14784         runtime data/code are now stored in a table similar to the GOT in ELF. 
14785         This allows the code itself to be position independent.
14787         * aot.c: Fix loading of referenced assemblies after the lazy assembly
14788         loading changes.
14790         * aot.c: Attach ELF type (object/function) directives to all global
14791         symbols.
14793         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
14795         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
14797         * mini-amd64.h: Turn on PIC AOT code.
14799         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
14800         returning the offset within an OP_AOTCONST instruction where the GOT
14801         offset needs to be added.
14803         * mini.h: Bump AOT file format version.
14805 2004-11-25  Martin Baulig  <martin@ximian.com>
14807         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
14808         uninflated generic methods.
14810 2004-11-25  Martin Baulig  <martin@ximian.com>
14812         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
14814 2004-11-24  Martin Baulig  <martin@ximian.com>
14816         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
14817         original klass (this only applies for generic instances).
14819 2004-11-24  Martin Baulig  <martin@ximian.com>
14821         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
14822         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
14823         that array).
14825 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
14827         * mini.c (mono_method_to_ir): Disable inlining for methods containing
14828         localloc. Fixes #69678.
14830         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
14831         
14832 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
14834         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
14835         used SSE registers on pinvoke calls. Fixes #69774.
14837 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
14839         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
14840         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
14842 2004-11-23  Raja R Harinath  <rharinath@novell.com>
14844         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
14845         Refer directly to the mcs/ tree.
14847 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14849         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
14850         Check if a trampoline for a synchronized method is required. 
14852 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
14854         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
14855         with localloc if needed. Throe arithmetric exception in
14856         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
14857         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
14859 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
14861         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
14862         types before switching on type.  Fixes #69622.
14864 2004-11-19  Raja R Harinath  <rharinath@novell.com>
14866         * Makefile.am (check-local): New.  Integrate into 'make check'.
14867         (MCS,RUNTIME): Define using in-tree mono and mcs.
14868         (ILASM): New.
14869         (%.exe): Use $(ILASM).
14871 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
14873         * mini-ppc.c: adjust initial prolog size (bug #69691).
14875 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
14877         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
14878         #69664.
14880 2004-11-17  Raja R Harinath  <rharinath@novell.com>
14882         * Makefile.am (clean-local): Rename from 'clean'.
14884 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14886         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
14887         to mono_arch_is_int_overflow. 
14888         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
14889         SIGFPE events.
14891 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
14893         * declsec.c|h: New files to support declarative security attributes.
14894         Added function to check if a method has (applicable) security.
14895         * mini.c|h: Add check for declarative security attributes in
14896         mono_method_check_inlining.
14897         * Makefile.am: Added declsec.c and declsec.h to the build.
14899 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
14901         * mini.c, mini.h: update to keep dynamic code info per-domain.
14903 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
14905         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
14906         (mini_init): Get rid of it from here too.
14908 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
14910         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
14911         implemented OP_RETHROW (patch by Geoff Norton
14912         <gnorton@customerdna.com>).
14914 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
14916         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
14917         between appdomains.  Fixes appdomain-unload on PPC.
14919 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
14921         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14922         mini-exceptions.c: handle the new wrapper types.
14923         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
14924         token value as a MonoClass* when compiling a wrapper.
14925         mono_jit_create_remoting_trampoline now takes an additional
14926         MonoRemotingTarget parameter.
14927         
14928 2004-11-10  Martin Baulig  <martin@localhost>
14930         * mini.c (mono_method_to_ir): Use `generic_container->context'
14931         rather than creating a new one.
14933 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14935         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
14937         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
14939 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
14941         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
14942         the experimental aot cache stuff.
14944 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
14946         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
14947         mini-exceptions.c: update to exception clause structure changes.
14949 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14951         * exceptions-x86.c (throw_exception): Fix warnings.
14953         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
14954         for OP_RETHROW.
14956 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
14958         * exceptions-sparc.c (get_throw_exception): Really fix this.
14960 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
14962         * tramp-*.c: we no longer support icalls without wrappers, so
14963         a bit of code can be removed here
14965 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
14967         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
14968         patch.
14970         * cpu-sparc.md: Add op_rethrow.
14972         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
14974         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
14976         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
14977         * mini-ops.h: Add OP_RETHROW.
14979         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
14981         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
14983 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
14984         
14985         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
14986         Makes the output much easier to read
14988 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
14990         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
14991         prevents another huge leak when compiling with ssa. Secondly, the
14992         performance of doing this rather than freeing the lists is much
14993         better. GList does a lock every time you allocate a list link,
14994         so that it can use a memory pool. So, it is better to just use
14995         a memory pool of our own.
14996         
14997         * ssa.c, linear-scan.c: replace g_list_remove_link with
14998         g_list_delete.  The remove one does not free the GList, so we were
14999         leaking memory. On -O=all --compile-all with corlib, this cut down
15000         3 MB of allocations.
15002 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
15004         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
15006         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
15008         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
15009         into a new function mono_create_jit_trampoline ().
15011 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
15013         * trace.c (get_spec): Allow tracing of classes without a namespace.
15015 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
15017         * mini.c: Fix pointer overwrite in mini_method_compile.
15019 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
15021         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
15022         The darwin ABI needs some special handling for 1 and 2 byte structs
15023         Lets use lbz/lhz instead of lwz everywhere.
15024         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
15025         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
15026         Use stb/sth for the former, and put the latter always on stack instead of in
15027         argument registers.
15029 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
15031         * trace.c (is_filenamechar): Add '_'.
15033 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
15035         * mini-s390.c: Fix prolog length to allow for large trace requirements.
15037         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
15039 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
15041         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
15042         depends on libmonogc. Fixes #68805.
15044 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
15046         * mini.c (mono_jit_free_method): Provide extra information for
15047         this error.  Currently this leaks, but will be turned into a
15048         developer option in the future.
15050 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
15052         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
15054 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
15056         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
15057         boundary. Fixes reading of PATCH_INFO_R4 and R8.
15058         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
15060 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
15062         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
15063         trampolines for AOT code.
15065 2004-10-22    <vargaz@freemail.hu>
15067         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
15068         constructed types. Fixes #68136.
15070 2004-10-21  Martin Baulig  <martin@ximian.com>
15072         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
15073         if it returns true, unwind the stack to the call instruction.
15075 2004-10-21    <vargaz@freemail.hu>
15077         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
15079         * mini.h: Bump AOT version number.
15081         * objects.cs: Add another test for unbox trampolines.
15083         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
15084         valuetype methods.
15086 2004-10-20    <vargaz@freemail.hu>
15088         * driver.c: Add SHARED to the set of optimizations tested.
15090         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
15092         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
15093         used by CEE_NEWARR.
15095         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
15097 2004-10-20  Martin Baulig  <martin@ximian.com>
15099         * mini-exceptions.c (mono_handle_exception): Call
15100         mono_debugger_handle_exception() to tell the debugger about
15101         catch/finally clauses.
15103 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
15105         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
15107         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
15108         #68447.
15110 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
15112         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
15113         methods as their native size, fixed bug #57543, #57545.
15114         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
15115         This saves a temporary register and mullw call down into 1 (minor perf
15116         increase for cases like sum = sum * 5;  This use to translate into:
15117             li r11,5
15118             mullw r28,r28,r11
15119         It now translates to
15120             mulli r28,r28,5
15122 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
15124         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
15125         #68388.
15127 2004-10-11  Martin Baulig  <martin@ximian.com>
15129         * mini.c (mono_method_to_ir): If we're a generic method, get the
15130         MonoGenericContainer from our MonoMethodNormal and create a
15131         MonoGenericContext from it.
15133 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
15135         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
15137         * basic-long.cs: Add test for checked i8->i2 cast.
15139 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15141         * inssel-ppc.brg: added a couple of speedup rules.
15143 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
15145         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
15146         to speed up rebuilds.
15148 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15150         * mini-s390.c: Minor fix to OP_OR_IMM.
15152 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
15154         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
15155         better. Fixes appdomain-unload.exe on sparc.
15157 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
15159         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
15160         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
15161         see bug 67324.
15163 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
15165         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
15167 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
15169         * mini.c: Always generate a field read/write wrapper for members
15170         of the class MarshalByRefObject since the actual instance could
15171         be a CBO.
15173 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
15175         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
15177 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
15179         * driver.c mini.h trace.c: Move the setting of the main assembly into
15180         a separate function called mono_trace_set_assembly () and call it after
15181         actually loading the main assembly. Fixes #66872.
15183 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
15185         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
15186         using the code manager.
15188 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
15190         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
15192 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
15194         * cpu-amd64.md: Fix bug in previous patch.
15195         
15196         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
15197         #66650.
15199 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
15201         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15202         mini-exceptions.c: updates for changed stack walk interface.
15204 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15206         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
15208 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
15210         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
15212 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
15214         * driver.c (mini_regression_list): Do not call mono_assembly_close 
15215         since assemblies can't be unloaded.
15216         
15217 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15219         * cpu-amd64.md: Fix more instruction lengths.
15221         * cpu-amd64.md: Fix lengths of some instructions.
15223 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
15225         * inssel.brg: Make the array ldelema check aot friendly.
15227 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
15229         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
15231         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
15233 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
15235         * mini-x86.c: Fix build.
15237         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
15238         mono_type_get_underlying_type () helper function to simplify code.
15239         
15240 2004-09-09  Martin Baulig  <martin@ximian.com>
15242         * mini-amd64.c: Don't access `type->data.klass' directly, call
15243         mono_class_from_mono_type() instead since the type may be a
15244         generic instance.
15246 2004-09-09  Martin Baulig  <martin@ximian.com>
15248         * mini-amd64.c (get_call_info): Fix support for generic instances.
15249         (add_valuetype): Use mono_class_from_mono_type() to get the class
15250         since we can be a generic instance.
15252 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
15254         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
15256 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
15258         * liveness.c: reset spill costs on each scan: bug 62107
15260 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
15262         * exceptions-sparc.c (mono_arch_find_jit_info): remove
15263         unnecessary line that doesn't compile
15265 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
15267         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
15268         trampolines, make them call an error function so people can fix their
15269         code.
15271 2004-09-06  Martin Baulig  <martin@ximian.com>
15273         * mini.c (mono_method_to_ir): When initializing locals, handle a
15274         generic instances like a valuetype if it's a valuetype and like a
15275         class if it's a class.
15277 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15279         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
15280         stack. Fixes #64674.
15282         * exceptions.cs: Add test for unwinding of call arguments.
15284 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
15286         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
15287         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
15288         set the carry/borrow flag). The sparc and s390 implementations
15289         can now use optimized versions (and simplify the code). ppc bugfixes.
15291 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
15293         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
15295 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
15297         * inssel-amd64.brg: Remove leftover 32 bit rule.
15299         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
15301 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
15303         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
15304         mono_arch_find_jit_info functions into a new function. Fix a memory
15305         leak.
15307         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
15308         refactored code.
15309         
15310 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15312         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
15313         as well.
15314         
15315         * exceptions.cs: Add array size tests.
15317         * mini.c: Allocate a separate icall wrapper for each arity of 
15318         mono_array_new_va. Fixes #59509.
15320         * exceptions.cs: Add testcase for 64578.
15322         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
15324         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
15325         
15326 2004-09-02  Martin Baulig  <martin@ximian.com>
15328         * mini.c (mono_method_to_ir): When initializing the locals, call
15329         handle_initobj() on the generic instance itself, not its
15330         underlying type.
15332 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
15334         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
15335         MonoJitInfo for dynamic methods.
15337         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
15339         * mini.c: Add support for freeing JIT data for dynamic methods.
15340         
15341 2004-09-01  Martin Baulig  <martin@ximian.com>
15343         * mini-x86.c (is_regsize_var): Added support for generic
15344         instances.
15345         (mono_arch_emit_prolog): Make this compile again, use
15346         `x86_push_imm_template (code)'.
15348 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
15350         * mini-x86.c: make all push_imm instructions that get
15351         patched always emit the long form
15353 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
15355         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
15356         in a per-domain hash.
15358         * mini-amd64.c (merge_argument_class_from_type): Handle generic
15359         types.
15361 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
15363         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
15364         work.
15365         
15366         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
15367         work.
15369         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
15370         Beginnings of SSE2 support.
15372         * exceptions.cs: Add more tests for checked int<->uint casts.
15374 2004-08-28  Martin Baulig  <martin@ximian.com>
15376         * mini-x86.c (mono_arch_instrument_epilog): Added support for
15377         generic instances.
15379         * mini.c
15380         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
15381         Handle generic instances recursively.
15383 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15385         * iltests.il: test for conv.u8 on a constant
15387 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15389         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
15390         LCONV_x4 (shrun_32 (membase)).
15392 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
15394         * inssel-x86.brg: c&p rules for push/setret of long
15396 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15398         * inssel-x86.brg: c&p rules for compare (base, regvar) and
15399         compare (regvar, base)
15401         * inssel-x86.brg: more burg love
15403         * inssel.brg: more cleanup
15405         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
15407 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
15409         * basic-long.cs, basic-calls.cs: new tests for optimization.
15411 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
15413         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
15414         patch.
15416 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15418         * mini-amd64.c (read_tls_offset_from_method): Add another case.
15419         
15420 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
15422         * inssel.brg (mini_emit_memcpy): use 
15423         NO_UNALIGNED_ACCESS to disable memcpy optimization
15425 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
15427         * mini-amd64.c: Handle generic types in various places.
15429         * mini.c (mono_method_to_ir): Handle generic types in init locals.
15431 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
15433         * mini.c (handle_box): Fix warning.
15435         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
15437         * mini-amd64.h: Enable the emit_state optimization.
15439         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
15441         * mini-amd64.c: Add some new 64 bit peephole opts.
15443         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
15445         * cpu-amd64.md: sreg1 of div instructions must be %rax.
15447         * mini-amd64.c: Register allocator fixes.
15449         * mini.c: Add an optimization to emit_state to avoid allocation of new
15450         registers on some platforms.
15452 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
15454         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
15456         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
15457         allocation. Fixes #63085.
15459         * basic-long.cs: Add new regression test.
15461         * mini-amd64.c: Register allocator improvements.
15463 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
15465         * mini-amd64.c (read_tls_offset_from_method): Add another code
15466         sequence.
15468         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
15469         instruction sequence for nullifying class init trampolines.
15471         * objects.cs: Add new regalloc test.
15473         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
15475 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15477         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
15478         
15479         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
15480         arguments.
15482         * driver.c: Fix profiling after TLS changes.
15483         
15484         * driver.c (mono_main): Set mono_stats.enabled if needed.
15486         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
15487         CEE_BOX.
15489 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
15491         * mini-x86.c: use a 1 op rather than a 2 op tls access
15492         instruction -> faster.
15494 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
15496         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
15497         x86 backend.
15499 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
15501         * exceptions-sparc.c (throw_exception): fix typo
15503 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
15505         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
15506         set tree->dreg correctly with tls. Allow any
15507         register to be used.
15509         * mini-x86.c (read_tls_offset_from_method): add new code
15510         generation pattern seen with GCC.
15513 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15515         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
15516         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
15517         exceptions-sparc.c: fix some performance issues in exception
15518         handling and setting of the stack trace for exceptions that were
15519         already thrown.
15521 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15523         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
15524         x86 backend.
15525         
15526         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
15527         registers.
15529 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
15531         This patch inlines tls access, when possible.
15532         
15533         * mini.h: new arch functions for TLS intrinsics.
15534         All platforms updated with a stub.
15536         * mini.c: use the new intrinsics
15538         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
15539         arch specific intrinsic for tls variables
15541 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
15543         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
15544         under windows.
15546 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15548         * mini.c: thread local allocation
15550 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
15552         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
15554         * Makefile.am: Link against the static version of libmonogc.
15555         
15556         * Makefile.am: Link the static versions of the convenience libraries
15557         into the mono executable.
15559         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
15561 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
15563         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
15564         on integer overflow.
15566         * mini-amd64.c: Reorganize function call code.
15568         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
15570 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15572         * inssel-x86.brg: use xor eax,eax.
15573         
15574         * basic.cs: new tests
15576 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15578         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
15579         in exception throwing code.
15580         
15581 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15583         * inssel-x86.brg: use xor esi,esi.
15585 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15587         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
15588         can trace methods compiled during mini_init () too.
15590         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
15591         CEE_CONV_U4.
15593 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
15595         * Makefile.am: static link on x86 (r=zoltan)
15597 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
15599         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
15600         code since it causes some programs to fail.
15602 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
15604         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
15606 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
15608         * mini.c: ovfops_op_map - add STACK_OBJ case for
15609         CONV_I 
15610         * basic.cs: add test_0_pin_string as test
15611         case for above.
15613 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
15615         * Makefile.am: build C# if srcdir != builddir
15617 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15619         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
15620         fall-through blocks.
15622 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15624         * driver.c: enable loop by default again and include abcrem in -O=all.
15626 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
15628         * iltests.il: Add some localloc tests.
15630         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
15632         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
15633         Fixes #62574.
15635         * inssel-amd64.brg: Add some optimizations.
15637         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
15638         for gcc-3.4.
15640         * Makefile.am: Statically link mono against libmono on AMD64.
15641         
15642         * mini-amd64.c inssel-amd64.brg: Optimizations.
15644 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
15646         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
15648         * tramp-amd64.c: Patch calling code in trampolines.
15650 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
15652         * mini-amd64.c: pinvoke struct passing fixes.
15654 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
15656         * mini-sparc.c: redo change, make mono_arch_cpu_init call
15657         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
15659 2004-08-05  Duncan Mak  <duncan@ximian.com>
15661         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
15662         CEE_LDELEM_ANY.
15664 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15666         * mini-amd64.c (emit_move_return_value): Move return value for normal
15667         calls too.
15669 2004-08-05  Martin Baulig  <martin@ximian.com>
15671         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
15672         `type->type'; just modify `type' itself when dealing with enums
15673         and generic instances.
15674         (check_call_signature): Make `simple_type' a `MonoType *'.
15676 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15678         * mini.c: Use OP_PADD to add offsets to addresses.
15680         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
15682 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
15684         * mini-sparc.c (mono_arch_emit_epilog): fix check
15685         for folding last op into restore instruction
15687 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
15689         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
15690         helper methods using the code manager.
15691         
15692         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
15694         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
15696 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15697         
15698         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
15699           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
15701         * mini-s390.c: fix tail processing
15703 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
15705         * mini-ppc.c: mul.ovf.un exception name fix.
15707 2004-08-03  Martin Baulig  <martin@ximian.com>
15709         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
15710         instances; before jumping to `handle_enum', also modify `ptype'.
15712 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
15714         * cpu-sparc.md: fcall maximal length too small.
15716 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
15718         * mini-amd64.c mini.h: Add initial support for passing/returning 
15719         structures to/from pinvoked methods.
15721 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
15723         * mini-ppc.c: reg allocator fix.
15725 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
15727         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
15729         * inssel.brg: Optimize memset on 64 bit machines.
15731         * mini-amd64.c: Fix some vararg cases.
15733 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
15735         * mini-s390.c: Corrected macro in emit_float_to_int
15737         * s390-abi.cs: Tests to exercise the s390 ABI
15739 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15741         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
15742         caller saved regs.
15744         * basic.cs: Add a test for add.ovf.un.
15746 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
15748         * mini-sparc.c: add case for OP_IDIV_UN
15750 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15752         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
15753         
15754         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
15756 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
15758         * basic.cs: regression tests.
15760         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
15761         regressions.
15763 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
15765         * basic.cs: Add a new test.
15767         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
15768         and AOT. Various fixes and optimizations.
15770         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
15772 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
15774         * mini-ppc.c: make sure temp regs are not used for global reg
15775         allocation.
15777 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
15779         * cpu-sparc.md: conv_i8 fix for 64bits
15781         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
15783 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
15784         
15785         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
15786         add opcode for cmp BYTE PTR [eax], imm.
15788         * inssel.brg: Make memcpy and memset takes bases.
15790 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
15792         * *-amd64.*: More AMD64 work.
15793         
15794 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
15796         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
15797         add a compare-not-equal opcode.
15798         
15799 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
15801         * mini.c: Use mono_init_from_assembly instead of mono_init.
15802         
15803 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
15805         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
15807         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
15809         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
15811         * inssel.brg: 64 bit fixes.
15813         * mini.h (MonoCallInst): Add some AMD64 specific data.
15815         * mini.h: Add some OP_P opcodes.
15817 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
15819         * basic.cs: tests for 61797 and 61740
15821 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
15823         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
15824         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
15826 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
15828         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
15830         * *-amd64*.*: Ongoing AMD64 work.
15832 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
15834         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
15836         * *-amd64*: Ongoing AMD64 work.
15838         * mini-arch.h: Add AMD64 support.
15840         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
15842         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
15844         * mini-ops.h: Add new opcodes.
15846         * Makefile.am: Add AMD64 support.
15848         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
15849         rules into the inssel-long*.brg files.
15851         * *-amd64.*: Add beginnings of AMD64 backend.
15853 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
15855         * mini.c (print_dfn): commenting out the code that prints
15856         the cil. With -O=deadce, this makes -v -v crash.
15857         
15858         * cpu-pentium.md: make checkthis have a length of 2
15860 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
15862         * mini-sparc.h: fix implementations of __builtin
15863         functions for Sun compiler for V9.
15865 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
15867         * mini.c: use the new stelem.ref wrapper
15868         * exceptions.cs, arrays.cs: new stelem.ref tests
15870 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15872         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
15873         new XSP should work with these changes).
15875 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
15876         
15877         * inssel-{long32,x86,}.brg: trivial optimizations.
15878         
15879 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
15881         * mini.c: load value when emitting box operation in
15882         constrained calls.
15884 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
15886         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
15887         is one byte shorter than cmp DWORD PTR [eax], 0.
15889 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
15891         * inssel-ppc.brg: arguments on the stack are always
15892         relative to the stack pointer (spotted by Neale Ferguson).
15894 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
15896         * exceptions-x86.c: delay appending the method name to the trace until
15897         after mono_jit_info_table_find is called, as this gets the real
15898         MonoMethod.
15900 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
15902         * aot.c: register roots
15904 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15906         * aot.c : I could just use PLATFORM_WIN32 flag.
15908 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15910         * aot.c : Reverting the previous fix. This time it broke linux build.
15912 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
15914         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
15916 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
15918         * mini.c (handle_stack_args): Remove some more debugging code.
15919         
15920         * mini.c (handle_stack_args): Remove debug output left in by mistake.
15922         * driver.c mini.h aot.c: Allow additional options to be specified with
15923         --aot and pass them to mono_compile_assembly.
15925         * aot.c: Add experimental code to AOT compile all loaded assemblies
15926         on demand and save the code into a cache in the filesystem.
15928         * aot.c: Add support for more wrapper methods.
15929         
15930         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
15931         58863.
15933         * cpu-*.md: Remove removed opcodes.
15935         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
15936         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
15937         related icalls to marshal.c.
15939 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
15941         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
15943         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
15945         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
15947 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
15948         * liveness.c: If liveness is recomputated we need to reset the information
15949         for each variable. This way, if the liveness range has been narrowed
15950         by optimizations that happened after the last computation, we can return
15951         a smaller range.
15952         
15953         For example, if you have
15954         
15955         {
15956                 int i = 0;
15957                 
15958                 // Tons of code that does not affect i
15959                 
15960                 i = foo ();
15961                 ...
15962         }
15963         
15964         i = 0 is dead code and will be removed by SSA. However, when
15965         linear scan gets to the code, i will still appear to be live
15966         throughout the entire block. This prevents good register allocation.
15968 2004-07-06  Martin Baulig  <martin@ximian.com>
15970         * debug-mini.c (mono_debug_init_method): Allow
15971         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
15972         (mono_debug_add_icall_wrapper): New method.
15974         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
15976 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
15978         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
15979         optimization.
15981 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
15983         * aot.c (mono_aot_load_method): Fix loading of debug info.
15985 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
15987         * aot.c: Add logging support.
15989 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
15991         * mini.h: Add prototype for mono_print_method_from_ip.
15993         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
15995         * inssel.brg: 64 bit fixes.
15997         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
15998         inssel-long32.brg.
16000         * Makefile.am: Add SPARC64 support.
16002 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
16004         * aot.c: Fix alignment problems on 32 bit platforms.
16006 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
16008         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
16009         SPARC64.
16011         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
16012         problems.
16014         * mini.h: Bump AOT file version. Some 64 bit fixes.
16016 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
16018         * inssel-sparc.brg: Add new rule to avoid register moves.
16020         * inssel.brg: Add ldind_to_load_membase helper function.
16022 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
16024         * mini.c: OffsetToStringData intrinsic.
16025         
16026 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
16028         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
16030         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
16031         regression tests.
16033         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
16034 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16036         * mini.c: reinstated mono_compile_get_interface_var()
16037         on x86, too, since the change breaks the Gtk# build there as well.
16039 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16041         * driver.c: remove loop from the default optimizations: it seems to
16042         interact badly with some of the other options (see bug #60613).
16044 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
16046         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
16047         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
16049 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
16051         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
16052         vararg-using methods.
16054 2004-06-21  Martin Baulig  <martin@ximian.com>
16056         * mini/mini-exceptions.c
16057         (mono_handle_exception): Added `gpointer original_ip' argument.
16058         After calling mono_unhandled_exception(), call
16059         mono_debugger_unhandled_exception() and if that returns true,
16060         restore the context and return.
16062 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
16064         * mini-ppc.c: prefer the use of relative branches so
16065         they won't need to be patched in aot code (patch from Patrick Beard).
16067 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16069         * aot.c: patch from Patrick Beard to make the output assembly
16070         more correct for the MacOSX assembler. Small tweak to
16071         generate sane images on Linux/PPC, too.
16073 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16075         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
16076         case until bug #59509 is fixed (shows up in #60332).
16078 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16080         * mini.c: make sure the needed wrappers are compiled, too, with
16081         precomp.
16083 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
16085         * driver.c: remove NPTL reference in --version output.
16087 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16089         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
16090         generate valid assembly for the Mach-O assembler.
16092 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16094         * driver.c: don't include abcrem in the all optimization specifier
16095         since it slows down jit compilation too much for now.
16097 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
16099         * mini.c: use BIGMUL only if both operands have the same signage.
16100         * iltests.il: Test for bug 60056. (errors related to signage in
16101         BIGMUL).
16103         r=lupus.
16105 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
16107         * mini.c, aot.c: memory leak fixes.
16109 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16111         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
16113 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
16115         * Makefile.am: remove the -static hack completely, it links in
16116         statically glib as well.
16118 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
16120         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
16121         * exceptions.cs: make it compile with new mcs/csc.
16123 2004-06-03 Massimiliano Mantione <massi@ximian.com>
16124         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
16125         and added relevant test case.
16127 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16129         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
16130         regressions in gtk-sharp.
16132 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
16134         * exceptions.cs: New regression tests.
16136         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
16138 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
16140         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
16142 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
16144         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
16146         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
16148 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
16150         * mini.c (mono_jit_runtime_invoke): Init class in this
16151         method instead of trusting mono_jit_compile_method to
16152         do the work (because wrappers can be in object class)
16154 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
16156         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
16158         * basic-long.cs: New regression test.
16160 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
16162         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
16163         and div/rem checks.
16165 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
16167         * Makefile.am: fix miguel's change to build mono statically against
16168         libmono (track build dependencies).
16170 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
16172         * cfold.c: Some glib versions do not have G_MININT32.
16174 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
16176         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
16177         with precision of tan, atan, sin and cos, and implemented related
16178         regressions tests (fixes bug 54467, but one new problem appeared and
16179         is not fixed yet).
16181 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
16183         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
16185         * exceptions.cs: Add test for constant folding && division by zero.
16187         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
16188         since driver.c is in libmono too, so the optimization was useless.
16190         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
16191         variable to driver.c so the compiler can emit more efficient code to
16192         access them.
16194 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16196         * Makefile.am: don't distribute generated inssel.[ch] files.
16198 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
16200         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
16201         into the default appdomain. Fixes #58707.
16203         * jit-icalls.c: Remove the broken approximation for truncl, doing
16204         no conversion is better.
16206         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
16207         Fixes #58863.
16209 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16211         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
16212         of the mcrxr instruction which is not available on some processors
16213         even if it's documented to be. Implement add and sub overflow correctly
16214         (still not complete for long unsigned). Speed up icalls a bit.
16216 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
16218         * mini.c (mono_jit_compile_method_with_opt): Make sure that
16219         we run .cctor in the current domain instead of target_domain.
16220         
16221         Fixes bug #58558, .cctor not being called in -O=shared.
16223 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16225         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
16227 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
16229         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
16230         which can be done with an imm8, do it that way.
16231         (mono_arch_output_basic_block): ditto for a jmp
16232         (mono_arch_emit_prolog): Computate maximum offset of a label.
16234 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
16236         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
16237         now tries to allocate prefered physical reg's for virtual
16238         regs. This reduces the number of emited spills/loads with
16239         20-30% on our core assemblies.
16241 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16243         * jit-icalls.c: truncl() is not needed and trunc() is
16244         the correct thing to do anyway (bug #58287).
16246 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
16248         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
16249         if available.
16251 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
16253         * driver.c: enable loop optimizations by default.
16255 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
16257         * mini-x86.c: fix calc of max loop size when aligning loops start.
16259 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
16261         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
16262         the stack.
16264 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
16266         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
16267         should set carry.
16269         * basic-long.cs: Add tests for add/subtract of immediates with carry.
16271         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
16272         
16273         * mini.c (inline_method): Allways inline some wrappers even if the cost
16274         is too large. Fixes #58785.
16276         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
16277         
16278 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
16280         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
16281         (crichton@gimp.org). Beginning of support for sparc/linux.
16283         * mini-sparc.c: Optimize retrieval of LMF address.
16285 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
16287         * exceptions-ppc.c:  handle alloca in methods with clauses.
16289 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
16291         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
16293 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
16295         * mini.c: Delegate most of the abort signal work to 
16296           mono_thread_request_interruption, which also handles Stop and Suspend
16297           states.
16299 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
16301         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
16302         supports the save/restore lmf opcodes.
16304 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
16306         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
16307         by gcc-3.4 as well.
16309         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
16311 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16313         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
16314         methods which contain array accesses.
16316         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
16317         boundaries. Fixes #58537.
16319         * iltests.il: Add regression test for #58537.
16321 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16323         * mini-x86.c (mono_arch_local_regalloc): Last part of
16324         fix for bug #58633 (releasing register to early).
16326 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
16328         * basic-long.cs: Add new regression test.
16330 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
16332         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
16333         register too early on the chain.
16335 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
16337         * mini.c (create_helper_signature): Use a helper function to reduce
16338         the code which needs to be written. Also set the calling convention of
16339         icalls on windows. Fixes #57840.
16341 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
16343         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
16344         exceptions-ppc.c: added helper function to get the instruction address
16345         from a signal handler context.
16347 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16349         * helpers.c: use g_get_tmp_dir. Invokes happyness 
16350         from gonzalo.
16352 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16354         * helpers.c: Add new env variable to pass args to objdump.
16355         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
16357 2004-05-17  Radek Doulik  <rodo@ximian.com>
16359         * Makefile.am (common_sources): added abcremoval.h so it get
16360         disted and daily mono packages on go-mono.com will build again
16362 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
16364         * abcremoval.c: Fixed coding style, added copyright header.
16366         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
16368         * mini.h: Added prototype for abc removal main function.
16370         * build_relations_propagation_table.pl: Added copyright header.
16372 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16374         * basic-long.cs: reg test for complex ceq_long bug.
16376 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
16378         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
16379         reg in long and clob case (bug #58343). Fixed/added comments.
16381 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
16383         * mini.c (mono_jit_runtime_invoke): Follow new convention
16384         of calling the invoke method with an function pointer.
16386 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
16388         * ChangeLog: Fix author of memory leak patch.
16390 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
16392         * Makefile.am: fix make dist as well...
16395 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
16397         * cfold.c: Made so that conversions from pointer to int4 are no-ops
16398         on archs where pointers are 4 bytes long.
16400         * Makefile.am: Added abcremoval.c source file.
16402         * abcremoval.c: Added abcremoval.c.
16404         * abcremoval.h: Added abcremoval.h.
16406         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
16408         * inssel.brg: Enabled bounds check removal.
16410         * mini.c: Added support for abcrem optimization.
16412         * mini.h: Added abcrem optimization label.
16414         * driver.c: Added support for abcrem optimization.
16416         * propagated_relations_table.def: Added propagated_relations_table.def.
16418 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
16420         * mini.c, cfold.c: fix style.
16422 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16424         * mini.c: handle issue with the low-level implementation of
16425         some long opcodes (bug #54209).
16427 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
16429         * basic.cs: test for my new cmov stuff.
16431 2004-05-13      Patrik Torstensson
16433         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
16434         opt and added peephole documentation.
16436 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
16438         * tramp-ppc.c: rewrote the generic trampoline code.
16440 2004-05-11      Patrik Torstensson
16442         * mini-x86.c: optimize long shl/shr asm code (one less branch)
16444 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
16446         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
16448         * mini.h mini.c dominators.c: Applied patch from Derek Woo
16449         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
16451         * mini.c: Add new icalls for AsAny marshalling.
16453 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
16455         * tramp-ppc.c, mini-ppc.c: more cleanups.
16457 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16459         * mini.c: no warnings.
16461 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16463         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
16465 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
16467         * mini.c: In the thread abort signal handler, if the thread is in the
16468         process of being stoped, don't throw the Abort exception, just stop the
16469         thread.
16471 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
16473         * tramp-ppc.c: removed old code.
16475 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16477         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
16478         do some simple speed optimizations on ppc.
16480 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
16482         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
16483         and large offsets in load/store.
16485 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16487         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
16488         it causes regressions.
16490 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
16492         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
16493         support.
16495 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
16497         * jit-icalls.c: remove warnings.
16498         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
16499         speedups for unsafe code.
16501 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
16503         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
16505 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
16507         * basic-calls.cs: Add new regression test.
16509         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
16510         more portable.
16512         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
16514         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
16515         is no longer used.
16517 2004-05-06      Patrik Torstensson
16519         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
16520         long reg allocation in any reg (not only eax:edx) and implemented 
16521         long shl/shr ops in asm instead of helpers.
16523 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
16525         * mini-sparc.h: Fix warnings.
16527         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
16528         stack.
16530         * mini-exceptions.c (mono_handle_exception): Call the filter in a
16531         separate statement for clarity.
16533         * mini-sparc.c: Update status.
16535 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
16537         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
16538         here.
16540 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16542         * inssel-ppc.brg: another small pre-release workaround:
16543         we don't do overflow detection for long_sub_un.
16545 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16547         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
16548         (also works around a weird ppc bug: 57957).
16550 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
16552         * tramp-ppc.c: trampoline fixes.
16554 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
16556         * mini-ppc.c: fixed typos.
16558 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
16560         * mini-ppc.c, exceptions-ppc.c: more code saves registers
16561         at the top of the stack. Fixed typos. Use a frame registers
16562         for all the methods with exception clauses.
16564 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16566         * exceptions-ppc.c: restore fp registers.
16568 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
16570         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
16571         order from the stack top (moved the stack room to save the
16572         return value for trace after the param area). Fixed corruption
16573         in restoring registers on unwind.
16575 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
16577         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
16579 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16581         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
16582         and prolog/epilog for methods that use it. Allow
16583         enough param area room for varargs methods. Fix miguel's
16584         breakage in exception handling.
16586 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
16588         * Makefile.am: run genmdesc only on current arch.
16590 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16592         * exceptions-x86.c:
16593         * mini-x86.h: fix the build on windows.
16595 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
16597         * 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.
16599         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
16601         * mini-exceptions.c: New file.
16602         
16603         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
16604         Move some parts of the x86 exception handling code to an 
16605         arch-independent file so it can be shared with other ports.
16607 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
16609         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
16611 2004-04-26  David Waite  <mass@akuma.org>
16613         * driver.c: remove comma from end of enumeration declaration
16615 2004-04-26  Jackson Harper  <jackson@ximian.com>
16617         * driver.c: parse config file before loading first assembly. This
16618         allows the user gac to be enabled/disabled. 
16619         
16620 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
16622         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
16623         simpler mechanism: we do not care what is encoded initially
16624         (branch absolute or relative), we care about the code and its
16625         target.  I kept the old code for reference for now.
16627         The new code tries first to determine if the jump is anywhere in
16628         the -/+32 absolute meg range, if it succeeds, it encodes using the
16629         absolute branch;  If not, it tried to find something in the
16630         relative range, if not, it uses the handle_thunk code. 
16632 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
16634         * exceptions-ppc.c: use the correct ip register on macosx.
16636 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
16638         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
16640 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
16642         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
16643         Raise exception on integer divide by zero by hand since the hw
16644         doesn't support it. Handle NaNs in FP compares.
16646 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
16648         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
16649         code reducing duplication between the platforms and enabled
16650         signal exception handling (on linux for now).
16652 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
16654         * exceptions-ppc.c: more macosx support.
16656 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
16658         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
16660 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
16662         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
16664 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
16666         * iltests.il: more tests.
16668 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16670         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
16671         vars as well.
16673 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
16675         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
16677 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
16679         * liveness.c: Mark variables as volatile in all basic blocks reachable
16680         from exception clauses.
16682 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
16684         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
16685         inlining.
16687 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
16689         * iltests.il, basic.cs: more tests for regalloc.
16691 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
16693         * iltests.il: Some tests for register allocation modifications
16694         I have locally.
16696 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
16698         * exceptions.cs: Add regression test for bug #56782.
16700         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
16701         original stack trace if an exception is rethrown. Fixes #56782. Oh,
16702         the beauty of fixing the same thing in 5 different files...
16704 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
16706         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
16707         methods.
16709 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
16711         * mini.c: Add support for STRWLPARRAY marshalling convention.
16713 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
16715         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
16716         to init the context to setup the regs pointer).
16718 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
16720         * exceptions-ppc.c: more exceptions work.
16722 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
16724         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
16725         not allowed.
16727 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
16729         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
16730         can use the memory directly.
16732         * cpu-pentium.md: Update documentation from a post from Zoltan. 
16734         add x86_add_membase, x86_sub_membase, x86_mul_membase
16736 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
16738         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
16739         GENERAL_REGS they were also hardcoded for all PPC ports.
16741         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
16743         Remove hard-coded limit for floating point registers, use
16744         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
16746         Notice that in MacOS X calling conventions you can fit a lot more
16747         floating point values in registers, so I should update the PInvoke
16748         test to excercise the passing of floating point values on the
16749         stack (currently broken).
16750         
16751 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
16753         * tramp-ppc.c (create_trampoline_code): Added
16754         JUMP_TRAMPOLINE_SIZE. 
16755         (ppc_magic_trampoline): Follow the pattern from
16756         x86_magic_trampoline: if code is set to zero, return. 
16757         (create_trampoline_code): Always pass MonoMethod to the jump
16758         trampoline, before it was passing a null.
16759         (mono_arch_create_jump_trampoline): Implement the jump stub, could
16760         share the code with mono_arch_create_jit_trampoline. 
16762         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
16763         implemented.
16764         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
16765         implemented.  
16767         * cpu-g4.md: Added length for jmp instruction, the worst case
16768         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
16769         for save_lmf).
16771 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
16773         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
16775 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
16777         * mini.c: Only set bblock->real_offset when adding a new bblock, and
16778         before each IL instruction.
16780         * mini.c (CEE_BOX): Fix warnings.
16782 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16784         * mini.c: removed a few unused vars and extra whitespace.
16786 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
16788         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
16789         checks.
16790         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
16791         index.
16792         (OP_GETCHR): use the above
16793         (CEE_LDELEMA): use the above.
16795         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
16796         version of the generic impl.
16797         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
16798         (CEE_LDELEMA): use the above.
16800 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
16802         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
16803         Fixes #56317.
16805         * iltests.il: Added new regression test for #56317.
16807 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
16809         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
16810         under NetBSD. Fixes #56450.
16812         * liveness.c (update_gen_kill_set): Fix previous patch.
16814 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16816         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
16818 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
16820         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
16821         ldsfld and ldsflda.
16823         * inssel-sparc.brg: Add more optimizations.
16825         * mini-sparc.c: Replace multiply/divide with shifts if possible.
16827 2004-04-01  Martin Baulig  <martin@ximian.com>
16829         * mini.c (handle_box): New static function; moved the
16830         implementation of CEE_BOX here.
16831         (mono_method_to_ir): Added `constrained_call' variable.
16832         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
16833         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
16834         mono_method_get_constrained() to get the method.
16836 2004-04-01  Martin Baulig  <martin@ximian.com>
16838         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
16839         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
16840         (mono_method_to_ir): We don't need these macros anymore since
16841         mono_class_get_full() already takes care of it. 
16843 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16845         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
16846         use @function (as doesn't accept #function here) and check the return
16847         value of system and stop if fails.
16849 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16851         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
16853 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
16855         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
16857         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
16859         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
16860         #56223.
16862         * basic-long.cs: Add test for negation of Int64.MinValue.
16864 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
16866         * mini-sparc.c: Update status.
16868         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
16870         * exceptions-sparc.c: Fix return value in filters.
16872         * inssel-sparc.brg: Fix register allocation in some rules.
16874 2004-03-28  Martin Baulig  <martin@ximian.com>
16876         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
16877         if neccessary.  
16879 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
16881         * mini-x86.c (mono_arch_patch_code): Fix warnings.
16882         
16883         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
16884         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
16885         remove unused conv_u4 opcode.
16887         * mini-x86.c: Remove valgrind workaround since it slows down things
16888         even when mono is not run under valgrind.
16890 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
16892         * mini-sparc.c: Update status.
16894         * inssel-sparc.brg: Add some optimizations.
16896         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
16897         future delay slot filling. Add support for varargs, tail calls and JMP.
16899         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
16900         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
16902         * inssel.brg: Fix register allocation in OP_ARGLIST.
16904         * inssel.brg: Fix warnings.
16906 2004-03-25  Martin Baulig  <martin@ximian.com>
16908         * mini.c (inflate_generic_field): Removed.
16909         (mini_get_method): Removed, use mono_get_method_full(),
16910         (mini_get_class): Removed, use mono_class_get_full().
16911         (mono_method_to_ir): Pass our generic context to
16912         mono_field_from_token().        
16914 2004-03-25  Martin Baulig  <martin@ximian.com>
16916         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
16917         of a `MonoMethod *'.
16918         (mini_get_method): Take a `MonoGenericContext *' instead
16919         of a `MonoMethod *'.
16920         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
16921         a new local variable called `generic_context' which holds the
16922         current `MonoGenericContext *'; use it to lookup things.
16924 2004-03-24  Martin Baulig  <martin@ximian.com>
16926         * mini.c (mini_get_class): New static method; if we're inside a
16927         generic instance, inflate the class if neccessary.
16928         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
16930 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
16932         * iltests.il: New regression test for #55976.
16934         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
16935         #55976.
16937 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
16939         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
16940         output.
16942 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
16944         * liveness.c: Consider SSA stores as well as loads when making vars
16945         volatile.
16947         * exceptions.cs: New regression tests for register allocation.
16948         
16949 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
16951         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
16952         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
16953           domain lock only to protect puntual access to data structures.
16954           Added access lock for sighash, jit_icall_hash_name, 
16955           jit_icall_hash_addr and domain->code_mp.
16957 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
16959         * driver.c: Print SIGSEGV handling method.
16961         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
16963         * mini.c (setup_jit_tls_data): Handle case when this is called
16964         multiple times for a thread.
16966         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
16967         is different from fbxx_un. Fixes #54303. Also use constants instead of
16968         magic numbers in a lot of places.
16970 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
16972         * exceptions.cs: Fix cctor test when --regression is used.
16974 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
16976         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
16977         for Linux/ppc.
16979 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
16981         * inssel-ppc.brg: fixed register assignments for some rules.
16983 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
16985         * exceptions.cs: Add test for exceptions in static constructors.
16987         * mini.c (mono_jit_compile_method_with_out): Move the calling of
16988         static constructors outside the domain lock. Fixes #55720.
16990 2004-03-17  Martin Baulig  <martin@ximian.com>
16992         * mini.c (get_generic_field_inst): Removed, this'll never happen.
16993         (inflate_generic_field): Take the `MonoMethod *' instead of the
16994         `MonoClass *' and added support for generic method.
16995         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
16996         have a `field->parent->gen_params', only inflate the field if it's
16997         an open constructed type.
16999 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
17001         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
17002         exception object instead of the preconstructed ones.
17004 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17006         * mini.c: reverted changed to sigsegv_signal_handler commited
17007         accidentally in the previous patch.
17009 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17011         * mini.c:
17012         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
17013         running --aot with an old assembly.
17015 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
17017         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
17018         point values.
17020         * mini-sparc.c: Add support for v9 branches with prediction.
17022 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
17024         * mini.c (mini_init): #warning is GNUC only
17026         * mini-sparc.h: implement __builtin_frame_address
17027         and __builtin_return_address for Sun C compiler
17029 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
17031         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
17033 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
17035         * basic-calls.cs: Add test for unaligned byref long argument passing.
17037         * mini-ops.h: Add sparcv9 compare and branch instructions.
17039         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
17040         v9 instructions if we have a v9 cpu.
17042         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
17043         registers for global allocation.
17045         * exceptions-sparc.c: Fixes.
17046         
17047 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
17049         * liveness.c (mono_analyze_liveness): Optimized version.
17051         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
17053         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
17054         sparc work.
17056         * basic-float.cs basic-calls.cs: New regression tests.
17058 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
17060         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
17061         sigaltstack implementation.
17063         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
17064         
17065         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
17066         stuff if SIGSEGV_ON_ALTSTACK is not defined.
17068 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
17070         * mini.c: Fix warnings.
17071         
17072         * mini.c (mono_resolve_patch_target): New function which contains the
17073         arch independent part of the patching process.
17075         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
17076         patching code to a separate function.
17078 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
17080         * mini.c (add_signal_handler): ifdef out on Windows
17082 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
17084         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
17085         cpu-sparc.md: Add exception handling support + other fixes.
17087         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
17088         typed GC detection in --version.
17090         * basic.cs exceptions.cs: New regression tests.
17092         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
17093         the arch specific code can store data during a compilation.
17095         * mini-ops.h: Add OP_SETFRET.
17097         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
17098         function, register a separate icall for each arity, so the icalls can
17099         get a wrapper.
17100         
17101         * mini.c (mono_print_tree): Print negative offsets in a more readable
17102         form.
17103         
17104         * mini.c: Make signal handling work on sparc.
17105         
17106         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
17108         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
17110         * jit-icalls.c: Emulate truncl by aintl on solaris.
17112         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
17114 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
17116         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
17118 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
17120         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
17121         a MarshalByRef type, inline a method that performs the check, taking into
17122         account that the object can be a proxy. Also implemented tow new opcodes:
17123         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
17124         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
17125         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
17127 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
17129         * mini-ppc.c: if a relative branch displacement is too big
17130         but it points to and area reachable with an absolute branch, 
17131         avoid the thunks.
17133 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
17135         * mini.c: optimize small copies in cpblk.
17137 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
17139         * basic-calls.cs basic-float.cs: New regression tests.
17141         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
17142         negative offsets from %fp. Implement localloc. Fix local register 
17143         allocation. Fix the case when the this argument needs to be saved to
17144         the stack. Implement some missing opcodes.
17146 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
17148         * mini.c (mini_method_compile): Reenable global regalloc in methods
17149         with exception handlers.
17151         * linear-scan.c (mono_varlist_sort): Fix warning.
17153         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
17155         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
17156         regalloc costs.
17158         * liveness.c: Make all variables uses in exception clauses volatile, to
17159         prevent them from being allocated to registers. Fixes #42136.
17161 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
17163         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
17164         causes regressions.
17166         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
17167         argument to mono_arch_regalloc_cost.
17169         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
17170         precisely.
17172 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
17174         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
17175         Make the cost of allocating a variable to a register arch dependent.
17177         * basic-calls.cs: Fix compilation of tests.
17178         
17179         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
17180         helper function to cut back on the number of #ifdefs needed.
17182         * mini-ppc.c: Fix compilation.
17184         * basic-calls.cs: New regression tests.
17186         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
17188         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
17189         of l0 since that is callee saved.
17191         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
17192         to virtual calls.
17194         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
17195         of delay instruction.
17197         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
17199         * mini.h (MonoCallInst): Add 'virtual' flag.
17201         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
17203 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
17205         * *.cs: New regression tests.
17207         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
17208         work.
17210         * mini.c (mono_runtime_install_handlers): Fix build.
17212         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
17213         'signal_stack_size' members.
17215         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
17216         alternate signal stack.
17218         * exceptions-x86.c: Add stack overflow handling.
17220         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
17221         functions to arch independent code.
17223         * mini.c (mono_print_tree): Print more detailed info for load_membase
17224         opcodes.
17225         
17226 2004-02-23  Martin Baulig  <martin@ximian.com>
17228         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
17230 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
17232         * mini-x86.c: fixed reg allocation for div/rem.
17234 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
17236         * driver.c (mono_main): Report some configuratio options on --version.
17238 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
17240         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
17241         low in the address space. Correctly flush memory in thunks where we
17242         output native code.
17244 2004-02-20  Martin Baulig  <martin@ximian.com>
17246         * mini.c (mini_get_method): New static method; inflate all generic
17247         methods and methods in open generic instances.
17248         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
17249         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
17251 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17253         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
17255         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
17257 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
17259         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
17261         * mini-sparc.c (flushi mono_arch_output_basic_block): make
17262         it compile using Sun's compiler.
17264 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
17266         * 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.
17268         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
17270 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
17272         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
17273         code.
17274         * mini-ppc.c: handle calls outside of the allowed range with thunks
17275         allocated using the code manager.
17276         * tramp-ppc.c: use the code manager to hold generated native code.
17277         Fixed the magic trampoline to just patch vtable entries.
17279 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
17281         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
17282         independent file.
17284 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
17286         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
17287         PPC.
17289         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
17290         if we have a working __thread implementation.
17292         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
17293         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
17295 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
17297         * mini-x86.c: Fix compilation under gcc 2.
17298         
17299 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
17301         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
17302         contains a call to the wrapped function.
17304         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
17305         OP_<CALL>_IMM opcodes, and use them under X86.
17306         
17307         * mini.c (mono_jit_find_compiled_method): Fix warning.
17309         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
17311         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
17313         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
17314         functionality to mini.c.
17316         * mini.c (mono_create_jump_trampoline): New function to create a jump
17317         trampoline. Return a compiled method instead of a trampoline if it
17318         exists. Add a cache for jump trampolines.
17320         * mini.c (mono_jit_find_compiled_method): New function to return a
17321         compiled method if it exists.
17323         * mini-x86.c: Call mono_create_jump_trampoline instead of 
17324         mono_arch_create_jit_trampoline.
17326         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
17327         a jump trampoline. Fixes #52092.
17328         
17329 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
17331         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
17332         which is not up-to-date. Add check_corlib_version () instead.
17334         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
17335         have to call it.
17336         
17337         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
17338         since newer valgrind versions do not need it.
17340         * mini.c (mono_jit_compile_method_with_opt): New helper function to
17341         compile a method with a given set of optimizations.
17343         * mini.c: Compile icall wrappers on-demand instead of at startup.
17345         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
17346         wrapper for an icall.
17348 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
17350         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
17351         #54063.
17353         * iltests.il: Add test for non-empty stack before switch instruction.
17355 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
17357         * mini.c: Add support for new stringbuilder marshalling conventions.
17359         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
17361 2004-02-01  Martin Baulig  <martin@ximian.com>
17363         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
17364         in `ginst->mtype_argv'.
17366 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
17368         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
17369         facilitate grepping.
17371 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
17373         * mini.c: fixed buglet in initobj generic implementation for references.
17375 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
17377         * Makefile.am: make the version script conditional.
17378         * jit-icalls.c: handle missing truncl().
17380 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
17382         * exceptions.cs: Add more tests for double->int conversion.
17384         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
17385         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
17387 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
17389         * driver.c: make --verbose --version emit an error
17390         if the loaded corlib doesn't match the runtime version.
17392 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
17394         * mini-ppc.h: export ppc_patch().
17395         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
17396         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
17397         on par or better than on MacOSX.
17399 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
17401         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
17402         mono_lookup_pinvoke_call.
17404         * mini-x86.c: Under windows, the default pinvoke calling convention is
17405         stdcall. Fixes #52834.
17407         * mini.c (optimize_branches): Add an upper bound to the number of
17408         iterations to prevent infinite loops on strange loops. Fixes #53003.
17410 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
17412         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
17413         and ISINST. Fixes #52093.
17415         * objects.cs (test_0_vector_array_cast): New tests.
17416         
17417 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
17419         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
17420         checking in Array.Set ().
17422         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
17423         #52590.
17425         * object.cs (test_0_multi_array_cast): New regression test.
17427 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
17429         * exceptions-ppc.c: fix build on Linux/PPC.
17431 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
17433         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
17434         running under valgrind.
17435         (x86_magic_trampoline): Fix build bustage.
17437         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
17438         negative values as well. This is needed for the encoding of the line number
17439         info, since sometimes the line numbers are not in increasing order.
17441 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
17443         * cpu-pentium.md (localloc): Increase the size of the localloc 
17444         instruction since it is a loop under Win32.
17446         * debug-mini.c (record_line_number): Get rid of unneccesary memory
17447         allocation.
17449 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
17451         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
17452         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
17453         Max Horn (max@quendi.de). Fix file names in comments.
17455 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
17457         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
17458         avoid stack overflow.
17459         (replace_usage): Avoid uninitialized variable warnings.
17461         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
17462         and taking the address of valuetype variables.
17464 2004-01-03  Patrik Torstensson
17466         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
17467         for other purposes than FP later on.
17469 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
17471         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
17472         of tail calls.
17474 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
17476         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
17478 2003-12-30  Patrik Torstensson <p@rxc.se>
17480         * mini-x86.h: Decreased number of availiable fp regs.
17481         Solves corner cases with FP spilling.
17483 2003-12-23  Patrik Torstensson <p@rxc.se>
17485         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
17486         for floating point stack tracking / spilling on x86. 
17487         Fixes bug #49012.
17488         
17489         * basic-float.cs: added float mul overflow test.
17491 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
17493         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
17495 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17497         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
17498         supports for cond branches that overflow the immediate
17499         overflow offset. mcs can compile simple programs.
17501 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
17503         * exceptions-ppc.c: exception handling support wip:
17504         finally handlers get run on exception.
17506 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
17508         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
17509         profiling.
17511 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17513         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
17514         initial support for stack walking and unwinding.
17516 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
17518         * driver.c (mono_main): Make corlib-out-of-sync message more 
17519         descriptive. Also remove verify_corlib call.
17521 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17523         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
17524         not overlap with other call's arguments, too.
17526 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
17528         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
17529         move to arch-specific code the choice of arch-specific
17530         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
17531         * mini.c: ensure emulation calls will not interleave
17532         with other calls.
17534 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
17536         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
17537         the magic trampoline stack frame is dropped before executing
17538         the new method.
17540 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
17542         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
17543         and integer to fp conversions. Added support for overflowing
17544         arguments on the stack. Reserve a couple more registers as temps.
17545         Added support for aot compilation (as output still needs to be
17546         tweaked, though).
17548 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17550         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
17551         Don't overwrite return register in some corner cases.
17553 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
17555         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
17556         static constructors when AOT compiling.
17558         * driver.c (mono_main): Call mono_check_corlib_version.
17560 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17562         * cpu-g4.md, basic.cs: fixed div target register.
17564 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
17566         * mini-ppc.c, basic.cs: shl_imm fix with test.
17568 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17570         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
17571         structures by value. Misc fixes.
17572         * objects.cs: more tests.
17574 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
17576         * mini-ppc.c: lconv.ovf.i implemented.
17578 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17580         * mini.c:
17581         (mini_init): don't error out if someone already called g_thread_init.
17583 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
17585         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
17586         to be any type per the spec. Fix abnormal memory usage when
17587         the same object is repeatedly thrown.
17589 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
17591         * mini.c: check for overruns in IL code.
17593 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
17595         * TODO: Add/remove some todo entries.
17597 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
17599         * driver.c (mono_main): Call mono_verify_corlib.
17601 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
17603         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
17604         This has been moved to mini.c
17605         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
17606         type being casted is marshalbyref it could be a proxy, so instead of
17607         emitting the type check code, emit a call to a runtime method that will
17608         perform the check by calling CanCastTo if needed.
17610 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
17612         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
17613         methods with large stack frames under Win32.
17615 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
17617         * Makefile.am: Distribute regression tests.
17619         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
17620         at the end instead of inserting each variable into the sorted list.
17622         * linear-scan.c (mono_varlist_sort): New helper function.
17623         
17624 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
17626         * mini.c: ensure arguments and locals are within bounds.
17628 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
17630         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
17631         related fixes.
17633 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
17635         * mini.c (mono_cprop_copy_values): Fix crash.
17637         * aot.c: Set verbosity back to 0.
17638         
17639 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17641         * regalloc.c: complete memory leak fix by Laurent Morichetti
17642         (l_m@pacbell.net).
17644 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
17646         * driver.c (main_thread_handler): Revert the previous patch.
17648         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
17649         under valgrind.
17651         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
17652         memory from the memory pool.
17654         * driver.c (main_thread_handler): Turn on all optimizations when
17655         --aot is used.
17657         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
17658         an array for better performance.
17660         * regalloc.c (mono_regstate_assign): Fix memory leak.
17662         * debug-mini.c (mono_debug_serialize_debug_info): New function to
17663         serialize the debug info.
17665         * debug-mini.c (mono_debug_add_aot_method): New function to load the
17666         debug info from the serialized representation.
17668         * aot.c: Save debug info into the generated file and load it when 
17669         loading a method.
17671         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
17673 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17675         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
17676         More FP-related fixes.
17678 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
17680         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
17681         and register allocation buglet. Hello world now runs.
17683 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
17685         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
17686         * tramp-ppc.c: fixed class init trampoline.
17687         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
17689 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17691         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
17692         mini.c: more ppc changes/fixes.
17694 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
17696         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
17697         Also optimize the case when the arguments are the same in the caller 
17698         and in the callee.
17700         * iltests.il: Add tests for tail calls with valuetype arguments.
17702 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17704         * mini-ppc.c: fixes for struct return type.
17706 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
17708         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
17709         mono_spillvar_offset() to arch-specific code.
17711 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
17713         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
17715 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
17717         * exceptions-x86.c: Fix stack space leaks.
17718         
17719         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
17720         registers from the lmf if the method has save_lmf set.
17722 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
17724         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
17725         of icall wrappers into InvokeInDomain, since these are now per-domain.
17727 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
17729         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
17730         make some opcode emulation and intrinsic ops enabled/disabled 
17731         according to the architecture. More fixes.
17733 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
17735         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
17737 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
17739         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
17740         arch-specific handling for 'this' and struct return type to
17741         arch-specific code.
17743 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17745         * aot.c: prevent divide by zero error when reporting (it happened with
17746         Accessibility.dll).
17748 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
17750         * mini.h (inst_switch): Remove unused macro.
17752 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17754         * aot.c:
17755         (load_aot_module): free 'info->methods' and 'info' properly. No more
17756         "free(): invalid pointer blah" messages when you have an old aot
17757         compiled assembly.
17759 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
17761         * jit-icalls.c, mini.c: Added support for context static fields.
17763 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
17765         * mini.c (mono_method_blittable): Methods which set LastError are not 
17766         blittable either. Fixes #51108.
17767         
17768 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
17770         * mini.c: flush icache.
17771         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
17773 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
17775         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
17777 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
17779         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
17780         safe on IA32.
17782         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
17783         vararg calls.
17785         * inssel.brg (CEE_MKREFANY): Fix AOT case.
17787 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
17789         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
17790         instruction when the result is discarded.
17792         * iltests.il (test_0_div_regalloc): New regression test.
17794         * arrays.cs: Fix compilation error.
17796 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
17798         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
17799         float rules to inssel-x86.brg: sane architectures with FP registers
17800         don't need to implement these rules.
17802 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
17804         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
17806 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
17808         * mini.h, inssel-long32.brg: fixed endianess issues in int64
17809         implementation of 32 bit systems.
17811 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
17813         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
17814         (Jeroen Zwartepoorte).
17816 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
17818         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
17819         the caller and the callee matches.
17820         
17821         * mini.c (mono_method_to_ir): Add comment.
17823         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
17824         signbit is missing on some platforms.
17826 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
17828         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
17830         * mini.c (setup_jit_tls_data): Call the new function.
17831         
17832         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
17834         * mini-x86.c: Add experimental support for fast access to the lmf
17835         structure under NPTL/Linux 2.6.x.
17837 2003-11-06  Martin Baulig  <martin@ximian.com>
17839         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
17840         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
17841         the debugger.
17843 2003-11-02  Martin Baulig  <martin@ximian.com>
17845         * mini.c (inflate_generic_field): New static method.
17846         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
17847         generic instance and the field is declared in a generic type, call
17848         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
17850 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
17852         * mini.h mini.c (mono_method_same_domain): New function to return
17853         whenever the caller and the callee are in the same domain.
17855         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
17857 2003-10-30  Martin Baulig  <martin@ximian.com>
17859         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
17860         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
17861         method parameters.
17862         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
17863         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
17865 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
17867         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
17868         propagation.
17870         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
17871         object here, so it is in the correct appdomain etc.
17873 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
17875         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
17876         already done.
17877         (mono_method_to_ir): Avoid freeing the type created returned from
17878         mono_type_create_from_typespec, since it is put into an internal cache
17879         by the function. Fixes pointer.exe.
17881         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
17882         trampolines for icalls and pinvokes as well. Fixes #33569.
17884 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
17886         * mini.c: Update after appdomain changes.
17888         * mini.c (mono_jit_compile_method_inner): Allways compile native
17889         method wrappers in the root domain, since there can only be one
17890         instance of them, whose address is stored in method->info.
17892 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
17894         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
17895         environment variable. Instead detect automatically whenever running
17896         under valgrind using the magic macro RUNNING_ON_VALGRIND from
17897         valgrind.h.
17899 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
17901         * trace.c, trace.h: New files that implement the new trace option
17902         parsing. 
17904         * driver.c: Document new --trace options.
17906         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
17907         mini-x86.c: Apply:
17909         -       if (mono_jit_trace_calls)
17910         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
17912         * mini.h: prototypes.
17913         
17914 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
17916         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
17918         * mini.c inssel.brg: Implement typedefbyref opcodes.
17920         * mini.c (mono_jit_compile_method): Remove unused local variable.
17922         * mini.c (mono_jit_compile_method_inner): Ditto.
17923         
17924 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
17926         * tramp-x86.c (x86_class_init_trampoline): Fix build.
17927         
17928         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
17930 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
17932         * mini.c (mono_no_aot): Remove unused global variable.
17934         * mini.c: Thread safety fixes.
17936 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
17938         * mini.c (mono_create_class_init_trampoline): Add a lock around
17939         class_init_hash_addr.
17941         * arrays.cs (test_0_newarr_emulation): Add new regression test for
17942         #30073.
17944         * mini.c: Decompose the NEWARR instruction before decomposing its
17945         arguments. Fixes #30073.
17947 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
17949         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
17950         convention.
17952 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
17954         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
17956         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
17958         * driver.c: Add support for compiling icall wrappers to --compile.
17960 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
17962         * inssel.brg: The empty value in class->interface_offsets is -1, not
17963         0. Fixes #49287.
17965 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
17967         * objects.cs: New test for 'is' operator on an array of interfaces.
17969 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17971         * tramp-ppc.c: update trampoline code to support jumps
17972         and class initialization.
17974 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
17976         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
17978         * inssel.brg (OP_UNBOXCAST): Fix #46027.
17980         * inssel.brg (OP_UNBOX): Remove unused rule.
17982         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
17983         region instead of one for each method. Fixes #47813.
17985 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
17987         * exceptions.cs (test_0_nested_finally): New regression test for
17988         nested exception handlers.
17990         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
17992         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
17994         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
17995         inlining.
17997         * mini.c (mono_method_check_inlining): Make the inlining limit 
17998         configurable by an environment variable.
17999         
18000         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
18002         * mini.h: Bump AOT file version.
18004         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
18005         token, store the image along with the token, since the token might not 
18006         refer to the same image as the method containing the relocation, 
18007         because of inlining.
18009 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
18011         * mini.c (mono_precompile_assemblies): New function to compile
18012         all methods in all loaded assemblies.
18014         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
18016         * regalloc.h regalloc.c (MonoRegState): Change the type of 
18017         iassign and fassign to int*, since they can contain large negative
18018         values if the register is spilled. Also added some comments. Fixes
18019         #45817.
18021         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
18022         under Win32. Fixes #42964.
18024 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
18026         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
18028         * aot.c: Added support for AOT compiling methods which contain calls
18029         to wrappers. Currently, only remoting-invoke-with-check wrappers are
18030         handled.
18031         
18032         * driver.c (compile_all_methods): Run the compilation in a thread
18033         managed by mono. Fixes #44023.
18035         * mini.c (mono_codegen): Print full method name in verbose output.
18037         * mini-x86.c (mono_arch_patch_code): Fix warning.
18038         
18039         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
18040         jumps, since the method we are jumping to might be domain-specific.
18042         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
18044 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18046         * inssel.brg: string chars are unsigned.
18048 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
18050         * TODO: New todo item.
18052         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
18053         which calls mono_runtime_class_init and patches the call site to
18054         avoid further calls.
18055         (mono_arch_create_class_init_trampoline): New arch specific function 
18056         to create a class init trampoline.
18057         (create_trampoline_code): Generalized so it can create
18058         class init trampolines as well.
18060         * mini.c (helper_sig_class_init_trampoline): New helper variable.
18061         (mono_create_class_init_trampoline): New function to create and cache
18062         class init trampolines.
18063         (mono_find_class_init_trampoline_by_addr): New function to lookup the
18064         vtable given the address of a class init trampoline. Used by the
18065         patching process.
18066         (mono_codegen): Generate a call to a trampoline instead of
18067         mono_runtime_class_init in LDSFLD[A].
18068         (mono_codegen): Add relocations for the new trampoline.
18069         
18070         * mini.h mini-x86.c aot.c: Added a new relocation type: 
18071         MONO_PATCH_INFO_CLASS_INIT.
18073         * mini.h: Bump AOT version number.
18075         * aot.c: Create a copy of the loaded code instead of using the original
18076         so methods which call each other will be close in memory, improving
18077         cache behaviour.
18078         
18079         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
18080         patch since it breaks the regression tests.
18081         
18082         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
18083         for the register saving instruction sequence since the 
18084         frame_state_for function in glibc 2.3.2 don't seem to detect it.
18086 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
18088         * TODO: Fix todo item && remove another.
18090 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
18092         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
18093         previous checkin.
18095         * aot.c: Moved the check for MONO_LASTAOT into the initialization
18096         function of the module.
18098         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
18099         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
18100         --no-aot command line option.
18102 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
18104         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
18105         by Bernie Solomon (bernard@ugsolutions.com).
18107         * inssel.brg: Refactor the interface offset table related code into
18108         its separate functions and add support for the AOT case.
18110 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
18112         * aot.c (mono_aot_get_method_inner): Fix memory leak.
18113         
18114         * aot.c: Added mono_aot_verbose variable and made all debugging
18115         output depend on the value of this variable.
18117         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
18118         method_label and info_label.
18120         * mini.h mini-x86.c aot.c: Added a new relocation type 
18121         MONO_PATCH_INFO_IID for klass->interface_id.
18123         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
18124         the MonoJitInfo structure.
18126         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
18127         a non-root appdomain in shared mode.
18129 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18131         * aot.c: make aot loader less verbose. Remove free of unused variable.
18133 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
18135         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
18137         * .cvsignore: Added *.dll.
18139         * mini.c (mono_print_tree_nl): New function callable while debugging.
18141         * mini.c (mono_print_code): Export this.
18143         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
18144         patched code.
18146 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
18148         * mini.h (MonoCompile): Added 'jit_info' field.
18150         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
18151         the cfg structure, since it is needed by the AOT compiler.
18153         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
18155         * aot.c: A major rewrite. Changes include:
18156         - save exception tables for methods which have them.
18157         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
18158         to g_module_symbol.
18159         - reworked the file format so it is now much smaller and needs
18160         fewer relocation entries.
18161         
18162 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
18164         * aot.c (load_aot_module): Fix build bustage on platforms without
18165         Boehm GC.
18167 2003-09-04  Martin Baulig  <martin@ximian.com>
18169         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
18171 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
18173         * TODO: Some new optimization ideas.
18175         * aot.c: Move AOT module loading logic here from mono_assembly_open.
18177         * aot.c: Save the optimization flags used to compile the code into
18178         the AOT module.
18180         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
18181         support emitting domain specific code.
18182         
18183         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
18184         no longer domain neutral. It can be made domain neutral by compiling 
18185         with --optimize=shared.
18187         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
18188         between appdomains.
18190         * driver.c mini.h mini.c: New --no-aot debugging option which disables
18191         loading of AOT code.
18193         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
18194         
18195         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
18196         if there is no domain neutrality information.
18198 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
18200         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
18201         format version into the generated library.
18203         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
18204         callee method into the caller since one of them could be shared.
18206         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
18207         system exceptions from AOT code now works.
18209         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
18210         method if it is domain neutral and the callee is not.
18212         * graph.c (cfg_emit_one_loop_level): Fix warning.
18214 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
18216         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
18217         last checkin.
18219 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
18221         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
18222         is needed  by code which is executed before mono_runtime_init ().
18223         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
18224         
18225         * mini.c (mono_thread_abort): Fix warning.
18226         (mono_jit_compile_method): Call static constructor in the AOT case too.
18228         * aot.c (mono_compile_assembly): Fix warning.
18230 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18232         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
18234 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
18236         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
18238         * cpu-pentium.md: Fix the length of call opcodes so they include the
18239         ESP restoring instruction. Fixes #47968.
18241 2003-08-28  Martin Baulig  <martin@ximian.com>
18243         * mini-x86.c (mono_arch_call_opcode): Added support for
18244         MONO_TYPE_GENERICINST.
18246         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
18248 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
18250         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
18251         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
18253         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
18254         metadata_section.
18256 2003-08-26  Martin Baulig  <martin@ximian.com>
18258         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
18259         when reporting an error, set this to the actual error location.
18260         (mono_method_to_ir): Report the correct error location if
18261         get_basic_blocks() returned an error.
18263 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
18265         * mini.c (mono_type_blittable): OBJECT is not blittable.
18266         (mono_method_blittable): Methods which have marshalling descriptors
18267         are not blittable either. Fixes #47842.
18269 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
18271         * driver.c mini.c: Use an environment variable instead of a global 
18272         variable. Also fix the build.
18274         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
18275         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
18276         reporting this. 
18278         * driver.c mini.c: Added --with-valgrind option to turn off some
18279         code which prevents mono from running under valgrind.
18281         * mini.c (mono_emit_call_args): Fixed warning.
18283         * mini.c (mono_emulate_opcode): Fixed warning.
18285 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18287         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
18288         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
18289         regalloc.c, regalloc.h: specify available registers in arch-specific
18290         code and support floats in the regallocator (patch by Laurent Morichetti 
18291         <l_m@pacbell.net>)
18293 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18295         * mini.c: mono_thread_current() can be called only after
18296         mono_runtime_init(): rearrange code to not call it early on.
18298 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18300         * mini.c: allocate jump tables in the code mempools.
18302 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18304         * mini.c, mini.h: make sure per-thread data allocated by the jit is
18305         freed.
18307 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
18309         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
18310         12 to 16.  This fixes bug #47453.
18313 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
18315         * mini-ppc.c: fixed indexed load and unsigned compares.
18317 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
18319         * mini.c: reenabled installation of handler for
18320           thread abort signal.
18322 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18324         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
18325         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
18326         until it's fixed and actually useful.
18328 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18330         * inssel-long32.brg: couple more opcodes implemented.
18332 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18333         
18334         * mini-sparc.c: Even more opcodes implemeted.
18336 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
18338         * mini-sparc.c: More opcodes implemented.
18340 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
18342         * mini-sparc.c: More opcodes implemented.
18344 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
18346         * inssel-sparc.brg: Add some needed rules.  Direct
18347         copy from PPC.
18348         * Makefile.am: Use inssel-sparc.brg
18349         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
18350         an assert happy for now.
18352 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
18354         * mini-sparc.c: Fixed compile errors.
18355         * exceptions-sparc.c: Same.  We now produce a mono binary 
18356         on sparc-linux.  Yea.
18358 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
18360         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
18361         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
18362         They compile, but do not work.
18364 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18366         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
18367         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
18368         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
18369         (ct@gentoo.org).
18371 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18373         * mini.c: more opcodes implemented and better support for generics.
18375 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18377         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
18378         * mini.c, mini.h: first cut at generics support: some new instructions 
18379         added and changed the behaviour of some of the existing ones.
18381 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
18383         * mini.c: Removed definition of metadata_shared mutex here.
18385 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18387         * mini-x86.c: make vararg calls work for instance methods.
18389 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
18391         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
18392         returns the arguments in a separte list, now.
18394 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18396         * aot.c, mini.c: updates for array type representation changes.
18398 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
18400         * mini.c: register function to perform jit shutdown.
18402 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18404         * mini.c: use a faster allocator if possible.
18406 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
18408         * aot.c: some cleanups and portability changes.
18410 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18412         * mini.c: use faster allocation for CEE_BOX if possible.
18414 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18416         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
18417         Moved inlined mempcy code to its own function so that is can be
18418         reused. Added an inline memset function as well (optimized initobj).
18419         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
18421 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
18423         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
18425 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
18427         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
18428         arch code can setup the cpu for CLR execution, if needed.
18429         We use it on x86 to set the precision of FP operations.
18431 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
18433         * mini.c: disable some optimizations if we can guess they'll cost too
18434         much for a given method.
18436 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18438         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
18439         
18440 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
18441         * mini.h mini.c mini-x86.c: Added instruction level coverage 
18442         info collection support.
18444 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18446         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
18447         is now implemented in the profiling API. Get rid of a couple of
18448         unnecessary global variables.
18450 2003-06-15  Nick Drochak <ndrochak@gol.com>
18452         * basic-long.cs: tests for negative values for bigmul, and unsigned.
18453         * cpu-g4.md: add op_bigmul and op_bigmul_un
18454         * cpu_pentium.md: add op_bigmul_un
18455         * inssel-long32.brg: add rule for unsigned bigmul
18456         * mini-ops.h: define OP_BIGMUL_UN
18457         * mini-x86.c: THE BUG: handle (un)signed properly
18458         * mini.c: choose unsigned opcode if needed.
18459         This set of patches fixes bug #44291
18461 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
18463         * mini.c (optimize_branches): improved to handle all kinds of
18464         conditional branches.
18466 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18468         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
18469         don't raise exceptions.
18471 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18473         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
18474         to arch-specific files.
18476 2003-06-09  Martin Baulig  <martin@ximian.com>
18478         * Makefile.am (libs): Added $(LIBGC_LIBS).
18480 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
18482         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
18483         and OP_ATAN (fixes bug#44293).
18485 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
18487         * Makefile.am, mini-x86.c: rename cpu description array to
18488         pentium_desc, since some compilers define the 'pentium' preprocessor
18489         symbol.
18491 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
18493         * mini.c (mini_select_instructions): add explicit branch if the
18494         following block is not the false target of a conditional branch -
18495         we need this with any optimization that reorder or remove bblocks
18497         * mini.c (optimize_branches): bug fixes
18499 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
18501         * mini.c (mono_method_to_ir): inline static readonly fields
18503         * ssa.c (fold_tree): start cfold support for long (very simple
18504         cases only)
18506         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
18508 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
18510         * inssel.brg: fixed memcpy (bug #44219).
18512 2003-06-05  Dick Porter  <dick@ximian.com>
18514         * driver.c: Set the glib log levels to not abort if g_message
18515         recurses.
18517         g_set_prgname() has to happen before mini_init() so that the
18518         process handle gets the info.
18519         
18520 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18522         * driver.c: add intrins to the default optimizations to get wider
18523         exposure.
18525 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
18527         * mini.h: some large basic blocks will overflow a 16-bit
18528         integers for symbolic registers.
18530 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18532         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
18533         (mono_arch_output_basic_block): fix bug 43499 
18535 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18537         * mini.c: kill duplicated definition of mono_debug_format.
18539 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
18541         * mini-x86.c, arrays.cs: fixed register allocation bug.
18543 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
18545         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
18547         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
18549 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18551         * mini.c:
18552         (print_method_from_ip): also print source location information if
18553         available.
18555 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
18557         * mini.c (mono_find_block_region): bug fix in region code
18558         (mini_method_compile): enable removing unreachable code again, but
18559         only in methods without exception clauses.
18561 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
18563         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
18564         Implemented arglist opcode and handling of TypedReference type.
18565         Fixed x86 call convention when a structure is returned.
18566         Minimal support for calling static vararg methods.
18568 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
18570         * mini.c (mini_method_compile):  always remove unreachable code,
18571         because the code in them may be inconsistent  (access to dead
18572         variables for example).
18574 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
18576         * driver.c, debug-mini.c: warning fixes.
18578 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
18580         * Makefile.am, jit.h, mini.h: install header for embedding mono.
18582 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
18584         * mini.c: thread-static fields are registered in mono_class_vtable(),
18585         so ensure the function is called before checking for them.
18587 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
18589         * mini.c (optimize_branches): fix for bug 43586
18591         * jit-icalls.c (mono_llmult_ovf): added an additional check for
18592         overflow (fixes Bug #43639)
18594 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18596         * mini.c, objects.cs: allow the use of stobj for primitive types.
18598 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18600         * mini.c: be less strict about argument checking until we support
18601         running the verifier.
18603 2003-05-27  Nick Drochak <ndrochak@gol.com>
18605         * basic-long.cs: tests for (ulong)int * (ulong)int also
18606         * mini.c: use the same trick for (ulong)int * (ulong)int
18608 2003-05-27  Nick Drochak <ndrochak@gol.com>
18610         * basic-long.cs: add regression test for (long)int * (long)int
18611         * cpu-pentium.md: add op_bigmul specification
18612         * inssel-long32.brg: add OP_BIGMUL rule
18613         * mini-ops.h: add OP_BIGMUL
18614         * mini-x86.c: register allocator: handle case where src1 needs to be
18615         in EAX.
18616         * mini.c: substitute special BIGMUL opcode in the tree for 
18617         (long)int * (long)int
18619 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
18621         * jit-icalls.c: call the type ctor on field access if needed.
18623 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18625         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
18626         to a method (including results of ldelema, bug#43207).
18628 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
18630         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
18631         colors to show exception handler blocks.
18633         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
18634         (fix for pinvoke7.cs).
18636 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18638         * mini.h, mini.c: ensure correct initialization order for types that
18639         require it. Prepare for lazy compilation of jit icall wrappers.
18640         Provide a name for opcode emulation to reduce unneeded mallocing.
18642 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
18644         * mini-x86.c: better register restoring code and profiling
18645         support for tail calls.
18647 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
18649         * mini.h, driver.c: prepare for leaf methods optimization.
18651 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18653         * mini.c: get targets of branches before converting a method.
18655 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
18657         * mini.c (optimize_branches): added some experimental code (disbaled) 
18659 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
18661         * mini.c (optimize_branches): fix branch to branch optimization 
18663         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
18665         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
18667         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
18669         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
18670         if needed.
18672 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
18674         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
18675         enable use of interface variables again.
18677         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
18678         I1 to registers because there is no simply way to sign extend 8bit
18679         quantities in caller saved registers on x86.
18681         * inssel-float.brg: set costs of some rules to 2 so
18682         that monobure always select the arch. specific ones if supplied,
18683         regardless of the order we pass the files to monoburg.
18685 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18687         * mini.c, mini-x86.c: since the magic trampoline for jumps
18688         can't patch the code directly, we do it as soon as the
18689         method gets compiled.
18691 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
18693         * mini-x86.c, mini.h: introduce a new patching method
18694         to support CEE_JMP and tail calls.
18695         * mini.c: obey tail.call. Don't precompile methods target
18696         of CEE_JMP.
18697         * tramp-x86.c: new trampoline code to handle methods
18698         reached through a jump.
18700 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
18702         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
18703         bit values to registers
18705 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
18707         * mini.c (mono_compile_get_interface_var): share interface
18708         variables if possible.
18710 2003-05-16  Martin Baulig  <martin@ximian.com>
18712         * debug-mini.c (mono_init_debugger): New function to initialize
18713         the debugger.  This is not in the debugger since it needs to
18714         access some of mini's internals.
18716 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
18718         * mini.c (mono_method_to_ir): inlining fixes/cleanups
18720 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
18722         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
18723         for value type handling.
18725 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
18727         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
18728         (mono_method_check_inlining): enable inlining of all kinds of wrappers
18730 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
18732         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
18733           the constructor through a proxy.
18735 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18737         * jit-icalls.c, inssel.brg: fixes to array element address
18738         calculations.
18740 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
18742         * mini-x86.c (is_regsize_var): allocate pointer to registers
18744 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18746         * driver.c: fixed typo, added intrins to the set of optimizations
18747         tested with regressions.
18749 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
18751         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
18752         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
18753         test case.
18755 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
18757         * inssel.brg: remove some common pop instructions without side effects
18759 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
18761         * inssel-x86.brg: fixed thinko in int to double conversions.
18763 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
18765         * mini.c, jit-icalls.c: added runtime thread-static variable support.
18767 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
18769         * inssel-long32.brg: two more missing instructions.
18771 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
18773         * mini.c (mono_emit_call_args): set the cil_code for all arguments
18774         if not already set.
18776 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
18778         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
18779         correctly.
18781         * basic-float.cs: Added tests for negative zero.
18783 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
18785         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
18786         a couple of missing operations for long casts, with test cases.
18788 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18790         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
18792 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
18794         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
18795         code size estimation.
18797 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
18799         * mini.c (mono_jit_create_remoting_trampoline): make it work with
18800         abstract methods (fix bug 42542)
18802         * aot.c: add ability to handle array types
18803         
18804 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
18806         * mini.c: Call the _specific versions of the object allocation
18807         functions if possible.
18809 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
18811         * driver.c: call setlocale ().
18813 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
18815         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
18816         windows build.
18818 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
18820         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
18822         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
18823         wrappers (fix bug 42122)
18825 2003-05-04  Martin Baulig  <martin@ximian.com>
18827         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
18829         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
18830         s/mini_set_defaults/mono_set_defaults/g.
18832 2003-05-04  Martin Baulig  <martin@ximian.com>
18834         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
18836 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
18838         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
18839         (reported by Don Roberts).
18841 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
18843         * mini.c: temporarily work around two bugs for this release.
18845 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
18847         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
18848         that contains -export-dynamic and it makes using the ld script
18849         useless.
18850         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
18852 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
18854         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
18855         specific cpu.
18857 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
18859         * mini.c: make sure leave calls all the needed finally blocks,
18860         even when the target jumps out of multiple exception clauses.
18862 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
18864         * ldscript, Makefile.am: add linker script to reduce the number of
18865         exported symbols (should also fix the issues with libwine defining
18866         some of the same symbols in io-layer).
18868 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
18870         * driver.c (mini_main): Avoid assertion when no file name is given on 
18871         the command line.
18873 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
18875         * driver.c: added --version/-V command line option.
18876         Added the inline optimization in the regression tests.
18878 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
18880         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
18881         to the type in the method signature (fixes bug#42134).
18883 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
18885         * mini.c: when inlining, check this is not null only when needed (bug #42135).
18887 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
18889         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
18891 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18893         * driver.c: fixed bug #42100.
18895 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
18897         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
18899 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
18901         * mini.c: moved most of the code required to do inlining to its own
18902         function so it can be reused. Inline also ctors if appropriate.
18904 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
18906         * Makefile.am: Link with -export-dynamic so shared libs loaded by
18907         the runtime can call mono API functions.
18909 2003-04-27  Martin Baulig  <martin@ximian.com>
18911         * debug-mini.c (mono_debug_init_method): Added
18912         `guint32 breakpoint_id' argument; if the method has a breakpoint,
18913         send a notification to the debugger.
18915         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
18916         running in the Mono Debugger, just pass the breakpoint number to
18917         mono_debug_init_method().
18919         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
18921 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
18923         * mini.c: allow some more unsafe compares.
18925 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
18927         * mini-x86.c, Makefile.am: make distcheck works (partially from
18928         a patch by Richard Lee <r.h.lee@attbi.com>).
18929         * regset.c, regset.h: removed, they are unused.
18931 2003-04-25  Dick Porter  <dick@ximian.com>
18933         * driver.c: Usage reports the name as 'mono' not 'mini'
18934         * exceptions-x86.c: Build and run on freebsd
18936 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
18938         * Makefile.am: install the program with the 'mono' name and
18939         the library as libmono instead of mini and libmini.
18941 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
18943         * driver.c: provide the APIs for the embedding interface of the old jit.
18945 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
18947         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
18949 2003-04-23  Martin Baulig  <martin@ximian.com>
18951         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
18953         * driver.c: Added `--debug' command line argument to enable
18954         debugging support.
18956 2003-04-23  Martin Baulig  <martin@ximian.com>
18958         * debug.[ch]: Removed.  The code is now in
18959         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
18961         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
18962         last six months.
18964 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
18966         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
18968 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
18970         * mini.c:
18971         (mini_cleanup): moved mono_runtime_cleanup call after the call to
18972         mono_domain_finalize.
18973         (mini_method_compile): use mono_method_profile* if the the option is
18974         enabled.
18976 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
18978         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18979         methods with their wrapper.
18981         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
18982         methods with their wrapper.
18984         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
18985         their wrapper.
18987         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
18988         wrapper.
18990         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
18991         methods.
18993 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
18995         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
18997 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
18999         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
19000         of the mempool. This is slightly faster and uses less memory
19002 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
19004         * mini.c: avoid O(n) allocation for variables.
19006 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
19008         * mini.c: handle items on the stack after inlining methods.
19010 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
19012         * mini.c: make the method->opcode optimization dependent
19013         on MONO_OPT_INSTRINS and do it lazily.
19015 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
19017         * driver.c: print overall results at the end of regression run.
19019 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
19021         * inssel.brg: don't overwrite symbolic registers.
19023 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
19025         * inssel-x86.brg: fix conversion from long to float.
19027 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
19029         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
19031 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
19033         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
19035         * driver.c: Added --print-vtable option as in the old JIT.
19037 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
19039         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
19041 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
19043         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
19045 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
19047         * mini.c regalloc.c regalloc.h: Fix memory leak.
19049 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
19051         * aot.c (mono_aot_get_method): register all used strings
19053 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
19055         * mini.c: always intern strings references with ldstr at compile time.
19057 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
19059         * Makefile.am: add BUILT_SOURCES.
19061 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
19063         * driver.c: give a better error message when the assembly to execute
19064         doesn't have an entry point.
19066 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
19068         * Makefile.am: added hack for automake
19070         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
19071         correct sematics.
19073         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
19075 22003-04-07  Martin Baulig  <martin@ximian.com>
19077         * Makefile.am: Added Makefile.am.
19079         * debugger-main.c: Removed, this is now in the debugger where it
19080         belongs.
19082         * mini.pc.in: Call this package `mini' for the moment.