2008-12-03 Zoltan Varga <vargaz@gmail.com>
[mono-project.git] / mono / mini / ChangeLog
blob16fb6cf68d7fdf2a3d890b43d343c20475ffa604
1 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
3         Backport of r120543.
4         
5         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
6         diagnose an assertion failure.
8 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
10         Backport of r120273.
11         
12         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
14 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
16         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
17         and not 4.1. 
19         Backported from trunk.
21 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
23         * mini-amd64.h: Change the monitor fastpath defines to check for
24         !PLATFORM_WIN32 so they work on *bsd too.
26 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
28         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
30 2008-11-10  Mark Probst  <mark.probst@gmail.com>
32         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
33         space for stdcall.  Fixes regressions on Win32.
35 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
37         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
38         bblocks.
39         (linear_scan): Remove an assert which doesn't seem to be needed.
41         * local-propagation.c (mono_local_deadce): Avoid a call to
42         MONO_DELETE_INS which would screw up the instruction linking.
44         * mini.c (mono_decompose_op_imm): Make this work with globalra.
46         * regalloc2.c: Upgrade to work the current JIT code.
48 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
50         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
51         case.
53         * aot-runtime.c: Remove some dead code.
55         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
56         consistency.
57         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
59         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
60         trampolines using sscanf since atoi doesn't work on large unsigned values.
62         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
63         Initialize code_size.
65 2008-11-08  Mark Probst  <mark.probst@gmail.com>
67         * method-to-ir.c (mini_emit_inst_for_method): Make
68         Interlocked.CompareExchange work for Int arguments on 32 bit
69         archs, as well.
71 2008-11-07  Mark Probst  <mark.probst@gmail.com>
73         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
75 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
77         * main.c Fix MSVC build.
79         Contributed under MIT/X11 license.
81 2008-11-06  Mark Probst  <mark.probst@gmail.com>
83         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
84         alignment larger than 8 bytes are aligned correctly, too.
86         * mini.c: Honor the min_align field of MonoClass when laying out
87         the stack.
89 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
91         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
93         * aot-compiler.c (emit_plt): Fix a warning.
94         
95         * aot-compiler.c: Implement ARM support in the binary writer.
97 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
99         * basic-simd.cs: Add test for getter with byref arg.
100         Fix the naming of a few tests.
101         Add missing checks to a test.
103 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
105         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
107         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
108         most of the full-aot support for monitor enter/exit trampolines.
110         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
111         enter/exit trampoline creation functions.
113         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
114         make dist.
116 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
118         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
119         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
120         implement the needed functionality without adding crap to the runtime.
122 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
124         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
125         non-x86 builds.
127         * mini.c (mono_build_date): New global version holding the build date in
128         string format.
129         
130         * Makefile.am (buildver.c): Generate a file containing the build date.
132         * main.c: Set the build date from the generated file.
134         * mini.c (mono_get_runtime_build_info): New helper function returning build
135         information in a string format.
136         
137         * driver.c (mono_main): Print the build date in --version.
139         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
140         file when the bind-to-runtime-version option is used.
142 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
144         * simd-intrinsics.c: Fix bug when using getters and byref args. 
146 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
148         * simd-methods.h: Rename prefetch methods.
150         * simd-intrinsics.c: Same.      
152 2008-11-05  Mark Probst  <mark.probst@gmail.com>
154         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
155         sizes.
157 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
159         * aot-compiler.c: Use the bundled elf header files instead of depending on
160         the system one.
161         
162         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
163         mempool.
165         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
166         on every call.
168 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
170         * cpu-x86.md: Add store nta ops.
172         * mini-ops.h: Same.
174         * mini-x86.c: Same.
176         * mini.h: Add an enum for simd prefetch modes.
178         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
179         of store. Use the changed code to support store nta.
181         * simd-intrinsics.c: Add prefetch ops for all vector types.
183 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
185         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
186         threads.
187         
188         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
189         names.
191         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
192         trampolines.
194 2008-11-04  Mark Probst  <mark.probst@gmail.com>
196         * mini-x86.c: Fixed commit.
198 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
200         * aot-compiler.c (emit_plt): Align the plt section only on x86.
202 2008-11-04  Mark Probst  <mark.probst@gmail.com>
204         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
205         and MONITOR_EXIT, for the ASM fastpaths.
207         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
208         available.
210         * mini.c, patch-info.h: Signature and patch infos for
211         Monitor.Enter/Exit trampolines.
213         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
215         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
216         Monitor.Enter/Exit ASM fastpath for Linux.
218 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
220         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
222         * objects.cs: Add a new test.
223         
224         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
226         * aot-runtime.c (load_method): Run class initialization in the PLT case even
227         if MONO_LOG_LEVEL is set.
229         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
231         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
233         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
234         
235         * aot-compiler.c: Change the relocation code to use virtual addresses instead
236         of file offsets. Align the sections belonging to the data segment to 
237         PAGESIZE.
239 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
241         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
242         elf.h. Port it to amd64.
244 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
246         * driver.c: Enable SIMD by default.
248 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
250         * cpu-x86.md: Add prefetch op.
252         * mini-ops.h: Same.
254         * mini-x86.c: Same.
256         * mini.h: Add an enum for simd prefetch modes.
258         * simd-methods.h: Add prefetch function names.
260         * simd-intrinsics.c: Add prefetch ops for all vector types.
262 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
264         * aot-compiler.c (emit_bytes): Speed this up a little.
266 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
268         * aot-compiler.c: Add JIT time etc. statistics.
269         
270         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
272         * mini.h (MonoCompile): Add 'got_offset' field.
274         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
275         method_got_offsets array.
277         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
278         wrappers.
280         * aot-compiler.c (compile_method): Add generic method instances referenced
281         by the method to the list of methods to be compiled, this is required so if
282         A<T> references B<T>, and another assembly references A<int>, then it will
283         also get a copy of B<int>.
285         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
286         when checking for monitor enter/exit.
288 2008-10-30  Mark Probst  <mark.probst@gmail.com>
290         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
291         for Monitor.Enter and Monitor.Exit if enabled.
293         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
294         Solaris.
296 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
298         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
299         of an OP_MOVE. Fixes #440046.
301         * basic-long.cs: Add a new test.
303 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
305         * mini.h: Add synchronization note for the managed counter-part.
307         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
308         returns the simd caps of the current cpu.
310 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
312         * basic-simd.cs: Remove Console.WriteLine.
314 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
316         * basic-simd.cs: New tests for Vector2ul.
318 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
320         * simd-intrinsics.c: Add new vector type Vector2ul.
322 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
324         * basic-simd.cs: New tests for Vector2l.
326 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
328         * cpu-x86.md: Add long version of most packed int ops.
330         * mini-ops.h: Same.
332         * mini-x86.h: Same.
334         * simd-intrinsics.c: Add new vector type Vector2l.
336 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
338         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
340         * simd-methods.h: Remove SN_op_BitwiseXor.
342 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
344         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
345         alignment.
347 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
349         * basic-simd.cs: Test for Vector2d.
351         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
352         value.
354 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
356         * cpu-x86.md: Add double version of all packed float ops.
358         * mini-ops.h: Same.
360         * mini-x86.h: Same.
362         * simd-intrinsics.c: Add new vector type Vector2d.
364         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
366         * simd-methods.h: Add Duplicate.
368 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
370         * basic-simd.cs: Test for packing with signed saturation.
372 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
374         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
375         found in the TYPESPEC table.
377 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
379         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
380         too.
382         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
384         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
385         instead of the RVA, since the RVA can be changed by tools like the cil 
386         stripper.
388         * method-to-ir.c (mono_method_to_ir2): Ditto.
390         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
391         (deserialize_variable): Ditto.
393 2008-10-25  Martin Baulig  <martin@ximian.com>
395         * debug-mini.c (write_variable): Use
396         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
398 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
400         * cpu-x86.md: Add unsigned variants of packd and packw.
402         * mini-ops.h: Same.
404         * mini-x86.h: Emit the right instruction for packd and packw.
405         Add unsigned variants of packd and packw.
407         * simd-intrinsics.c: Packd and packw were used in place of their
408         unsigned variants. Change that.
409         Add intrinsics for (Signed)PackWithSignedSaturation.
411         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
413 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
415         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
417 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
419         * mini-ops.h: Remove dword packed add/sub with saturation ops.
421         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
423         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
424         sse instructions.
426         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
428 2008-10-24  Mark Probst  <mark.probst@gmail.com>
430         * method-to-ir.c, mini.c: Special casing for the synchronized
431         wrapper for the ldtoken+GetTypeFromHandle case.
433 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
435         * mini.c (mono_replace_ins): Move this to branch-opts.c.
437         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
438         created/split bblocks.
440 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
442         * mini-ops.h: Add packed signed mul high.
443         
444         * cpu-x86.md: Same.
446         * mini-x86.c (mono_arch_output_basic_block): Same.
448         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
450         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
452 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
454         * basic-simd.cs: Tests for Vector16sb.
456 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
458         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
460 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
462         * mini-ops.h: Add packed signed min, max and compare greater.
463         
464         * cpu-x86.md: Same.
466         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
467         saturation.
469         * simd-methods.h: Add CompareGreaterThan.
471         * simd-methods.h: Remove CompareEquals.
473         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
475         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
477         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
478         CompareEqual.
480 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
482         * basic-simd.cs: Fix tests due to change in the API.
484 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
486         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
488 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
490         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
492         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
493         inst_offset as this has invalid values for LDADDR.
495 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
497         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
499         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
501 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
503         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
504         for accessing field->data.
506 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
508         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
510 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
512         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
514         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
516 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
518         * dominators.c (mono_compute_natural_loops): Allocate GList enties
519         from the cfg mempool.
521 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
523         * basic-simd.cs: Tests for new methods in Vector8us.
525 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
527         * mini-ops.h: Add multiply and store high.
528         
529         * cpu-x86.md: Same.
531         * mini-x86.c (mono_arch_output_basic_block): Same.
533         * simd-methods.h: Same.
535         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
536         and CompareEqual.
538 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
540         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
541         mono_class_setup_vtable ().
543         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
544         mono_class_get_vtable_entry () for accessing klass->vtable.
546         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
548         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
549         found.
551         * method-to-ir.c (mono_save_token_info): Don't save references made from
552         wrappers.
554         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
555         of generic instances.
557         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
559 2008-10-19  Mark Probst  <mark.probst@gmail.com>
561         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
562         OP_JMP depends on the method signature.  Calculate it properly.
564 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
565         
566         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
567         called directly.
569         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
570         instances.
571         (emit_extra_methods): Add another table mapping method indexes to 
572         offsets in the extra_method_info table.
574         * mini.h: Bump AOT file format version.
575         
576         * aot-runtime.c: Merge most of the code from mono_aot_get_method
577         and mono_aot_get_method_from_token () into one function.
579 2008-10-19  Mark Probst  <mark.probst@gmail.com>
581         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
582         separate counter.
584 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
586         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
587         methods.
589         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
590         disable_aot.
592         * mini.c (mono_patch_info_equal): Compare the generic context as well.
594         * mini.h: Bump aot file format version.
596         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
597         AOT file can contain native code for methods which are not in the METHOD
598         table. Generate code for non-sharable generic instances of generic methods
599         found in the METHODSPEC table.
600         
601         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
602         encoding generic type handles.
604         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
605         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
607         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
608         macros + MONO_ADD_INS.
610         * mini.c (mono_jump_info_token_new2): New function which takes a generic
611         context as well.
613         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
615         * mini.h: Bump aot file format version.
617         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
619 2008-10-17  Mark Probst  <mark.probst@gmail.com>
621         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
622         platforms, with definable stack alignment value.  Set to 16 now
623         for all platforms.
625         * mini.c, mini.h, driver.c: Command line option for disabling
626         stack alignment.
628 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
630         * basic-simd.cs: Tests for new methods in Vector4ui.
632 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
634         * mini-ops.h: Add packed int shuffle.
635         
636         * cpu-x86.md: Same.
638         * mini-x86.c (mono_arch_output_basic_block): Same.
640         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
641         extract mask, max, min, shuffle.
643         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
645 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
647         * basic-simd.cs: Tests for new methods in Vector8us.
649 2008-10-17  Mark Probst  <mark.probst@gmail.com>
651         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
652         RuntimeTypeHandle, not a TypedReference.
654 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
656         * simd-intrinsics.c: remove relocations.
658 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
660         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
661         optimizations from the x86 backend.
663 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
665         * simd-methods.h, simd-intrinsics.c: debloat method names and
666         prepare for no relocations.
668 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
670         * mini-ops.h: Add packed min/equal and sum of absolute differences.
671         
672         * cpu-x86.md: Same.
674         * mini-x86.c (mono_arch_output_basic_block): Same.
676         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
677         extract mask, max, min and sum of absolute differences.
679         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
680         method name.
682 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
684         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
685         Renamed one test for consistency.
687 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
689         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
690         fix to the code that deal with other blocks.
692 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
694         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
696 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
698         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
699         that deals with vreg interference. Explicitly check for OP_LDADDR to be
700         able to process the source reg.
702 2008-10-16  Martin Baulig  <martin@ximian.com>
704         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
706         * inssel.brg: Add `OP_HARD_NOP'.
708         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
710         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
711         `OP_HARD_NOP' instruction when running inside the debugger.
713         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
714         `OP_HARD_NOP' instruction when running inside the debugger.
716 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
718         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
719         now works. The issue with the regalloc tripping up no longer
720         happens.
722         * simd-intrinsics.c (load_simd_vreg): Same.
724 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
725         
726         * basic-simd.cs: Tests for new Vector8ui methods.
728 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
730         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
731         only for type. This fixes crashes where MonoInst::klass is checked
732         for ops of type != VTYPE or OBJ.
734         * simd-intrinsics.c (load_simd_vreg): Same.
736 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
738         * mini-ops.h: Add ops for packed shuffle/max/avg and
739         extract mask.
740         
741         * cpu-x86.md: Same.
743         * mini-x86.c (mono_arch_output_basic_block): Same.
745         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
746         extract mask.
748         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
749         to emit extract mask op.
751         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
752         to emit word shuffles.
754 2008-10-15  Mark Probst  <mark.probst@gmail.com>
756         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
757         the largest alignment needed by a variable, but at least
758         sizeof(gpointer).
760 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
762         * basic-simd.cs: Tests for the fixes in the last commit.
764 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
766         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
767         no longer handles STACK_PTR input.
769         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
771         * simd-intrinsics.c (load_simd_vreg): New function that works like 
772         get_simd_vreg   but handles STACK_PTR input.
774         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
775         as the input can be an arbitrary pointer.
777         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
778         LDADDR local optimization directly otherwise use a store op.
780 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
782         * basic-simd.cs: Tests for dup low and dup high.
784 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
786         * mini-ops.h: Add dup low and dup high ops.
787         
788         * cpu-x86.md: Same.
790         * mini-x86.c (mono_arch_output_basic_block): Same.
792         * simd-intrinsics.c (vector4f_intrinsics): Same.
794 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
796         * basic-simd.cs: Tests for recently added functionality.
798 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
800         * mini-ops.h: Add remaining sse1 fp ops.
801         
802         * cpu-x86.md: Add remaining sse1 fp ops.
804         * mini-x86.c (mono_arch_output_basic_block): Same.
806         * mini.h: Add enum for simd FP compare conditions.
808         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
810         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
811         so the backed can generate the appropriate op.
813 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
814         This patch squeese one more byte from the SimdIntrinsc struct.
816         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
817         a a shift amount intead of simply or'ing it.
819         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
821         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
822         byte so we can have an aditional flags field without increasing struct size.
824         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
825         against the simd_supported_versions bitmask.
827         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
829 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
831         * mini.c: remove rawbuffer code (the only use here is unsafe because
832         it takes locks during signal handling and the kernel now provides much
833         better info in proc/pid/smaps these days).
835 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
837         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
838         OP_X86_PUSH_OBJ. Fixes #434620.
840         * objects.cs: Add a test.
841         
842 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
844         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
845         that the packuswb/packusdw don't work with unsigned numbers for what
846         would be negative numbers in signed format.
848         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
849         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
851         * mini-ops.h: Add doubleword forms of many ops and packing ones.
853         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
855         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
857         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
859         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
860         add more ops.
862         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
863         version as the enum in mini.h.
865         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
866         for sse3 ops, check the simd_version field if present. This way the code
867         works with all versions of sse.
869 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
871         * simd-intrinsics.c: Fixed intrinsic name typo.
873         * mini.h: Added missing simd exported function.
875         * basic-simd.cs: Added tests for Vector4ui.
876         Fixed broken test for Vector16b.
878 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
880         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
881         the max length to 64.
883 2008-10-10  Mark Probst  <mark.probst@gmail.com>
885         * method-to-ir.c: Only do the fast virtual generic method call for
886         non-wrapper methods.
888         * mini.h, mini-trampolines.c: The new generic virtual remoting
889         trampoline handles virtual method calls via the vtable (as done by
890         the fast virtual generic method calls) to remoting proxies.
892         * mini.c (mono_jit_create_remoting_trampoline): For generic
893         methods reate a generic virtual remoting trampoline.
895         * mini-amd64.h: Enable fast virtual generic method calls again.
897 2008-10-10  Mark Probst  <mark.probst@gmail.com>
899         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
900         restore registers when doing tail calls.
902 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
904         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
905         Vector4ui.
907 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
909         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
911 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
913         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
915 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
917         * basic-simd.cs: Retrofit for API changes.
919 2008-10-10  Mark Probst  <mark.probst@gmail.com>
921         * mini-ppc.c: Handle integer stack arguments for tail calls.
923 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
925         * optflags-def.h: Removed sse3 optimization.
927         * driver.c: Same.
929         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
930         sse3.
932         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
934         * mini.h: Added enumeration with simd versions.
936         * simd-intrinsics.c (emit_intrinsics): Use the new static var
937         for detecting SSE3.
939         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
941         * mini.c (mini_init): Call mono_simd_intrinsics_init.
943 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
945         * basic-simd.cs: Added tests for Vector8u and Vector16u.
947         * basic-simd.cs: Fixed test naming.
949 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
951         * mini-ops.h: Added ops for packed and saturated math, shifts
952         and packing/unpacking.
954         * cpu-x86.md: Added descriptors for the above ops.
956         * mini-x86.c: Added code to emmit the above ops.
958         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
960 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
962         * aot-compiler.c (compile_method): Enable AOT for generic code.
964         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
966 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
968         * mini.c: add a workaround for a common screwup that ends up blamed
969         to mono (other processes blocking signal delivery).
971 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
973         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
974         in the LDFLD/STFLD opcodes. Fixes #432673.
976         * iltests.il.in: Add a new test.
978 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
980         * mini-arm.c: attach the thread in unmanaged->managed transitions
981         using delegates (bug #433148).
983 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
985        * basic-simd.cs: Use new ShuffleSel constants.
987 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
989         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
991         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
992         only disable simd intrinsics if no sse2 is detected.
994         * optflags-def.h: Added sse3.
996         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
997         is disabled.
999 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1001         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
1002         when adding delegate-invoke wrappers.
1004 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1006         * Makefile.am: Reenable the simd tests.
1008 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
1010         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
1011           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
1012           other vreg is allocated to that hreg.
1014         Contributed under MIT/X11 license.
1016 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1018         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
1019         yet checked in.
1021 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1023         * basic-simd.cs: New test suite for SIMD intrinsics.
1025         * Makefile.am: Added new tests.
1027 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1029         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
1031         * mini-ops.h: Same.
1033         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
1035         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
1036         using SSE2 aware opcodes.
1038         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
1039         is enabled, this code path is only reachable if conversion ops are emmited after
1040         mono_method_to_ir.
1042         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
1044         This optimization saves 6 bytes per conversion against the old version.
1046 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1048         * aot-compiler.c (compile_method): Don't skip methods referencing 
1049         generic methods without a corresponding entry in token_info_hash, since
1050         encode_method_ref () can handle all generic methods now.
1052         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
1053         generic context is set.
1054         
1055         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
1056         generic sharing of LDTOKEN.
1058 2008-10-06  Mark Probst  <mark.probst@gmail.com>
1060         * mini-amd64.h: Temporarily disabled fast virtual generic method
1061         calls because it breaks the System.Runtime.Remoting tests.
1063 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1065         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
1067         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
1068         so inlining actually works.
1069         (check_inline_caller_method_name_limit): Ditto.
1071 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
1073         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
1074         64 bit safety (from Olaf Hering and Andreas Färber).
1076 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1077         
1078         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
1079         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
1080         unused virtual call support code.
1082         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
1083         
1084         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
1085         which can't use aot trampolines.
1086         (decode_patch): Don't create aot trampolines for methods which can't use
1087         them.
1089         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
1090         use aot trampolines.
1092         * mini.h: Bump AOT image format version.
1093         
1094 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
1096         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
1097         to save_token_info () since cmethod is inflated for constrained calls.
1099         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
1101 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
1103         * Makefile.am: Add build rules for ppc64.
1104         This avoids the build failing at pedump with unresolved symbols
1105         due to lack of arch_sources. Instead it will now fail earlier
1106         due to lack of cpu-ppc64.md.
1108         Contributed under MIT/X11 license.
1110 2008-10-04  Mark Probst  <mark.probst@gmail.com>
1112         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
1113         tail calls.
1115         * iltests.il.in: Add test case for tail call with many arguments.
1117 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1119         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
1120         to the fast virtual generic method code until the aot case is fixed.
1122 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1124         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
1126 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1128         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
1129         thunks.
1131 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1132         
1133         * simd-intrinsics.c: Forgot to add this one.
1135         * mini-codegen.c: Fix macro in case SIMD is not supported.
1137 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1138         
1139         This patch land initial JIT support for simd intrinsics.
1141         * mini-x86.h: Added new define to make --enable_minimal work on x86.
1143         * Makefile.am: Added simd-intrinsics.c
1145         * simd-intrinsics.c: New file with simd instrinsic related
1146         code.
1148         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
1150         * cpu-x86.md: Add simd related instructions.
1152         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
1154         * driver.c: Added two new --regression variants.
1156         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
1158         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
1160         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
1161         extract some complicated logic to helper functions.
1163         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
1165         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
1167         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
1168         the specialized simplification pass.
1170         * method-to-ir.c (mono_spill_global_vars): Use new macro.
1172         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
1174         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
1175         table.
1177         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
1178         if MONO_ARCH_NEED_SIMD_BANK is defined.
1180         * mini-ops.h: Added the new simd ops.
1182         * mini-x86.c: Added mono_arch_xregname.
1184         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
1186         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
1188         * mini-x86.h: Define simd related MONO_ARCH macros.
1190         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
1192         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
1194         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
1195         MONO_CLASS_IS_SIMD to deal with simd related IR.
1197         * mini.h (MonoInst): Added spill_var to the backend union.
1199         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
1201         * mini.h: Added forward declarations of the new simd fuctions.
1203         * optflags-def.h: Added new optimization names SIMD.
1205         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
1207         * regalloc.h: Added support for working with 3 register banks.
1209         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
1211         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
1213 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
1215         * mini-exceptions.c: remove 64 bit related ifdef clutter.
1217 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1219         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
1220         instead of one on 64 bit systems.
1222         * method-to-ir.c: Remove unused includes.
1224 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
1226         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
1227         cfg->used_int_regs, since the two are different on arm.
1229 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1231         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
1232         mono_method_get_vtable_index() to get the vtable index.
1234 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1236         * method-to-ir.c (mono_method_to_ir2): Don't create native
1237         wrappers for array methods, because they're never called (and if
1238         they were called they wouldn't work).
1240 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1242         * method-to-ir.c (mono_method_to_ir2): Array methods are
1243         special-cased and must not be invoked indirectly via the (M)RGCTX
1244         when generic sharing is turned on.  Fixes #431413.
1246 2008-10-01  Mark Probst  <mark.probst@gmail.com>
1248         * method-to-ir.c: When generic sharing is active, call
1249         non-interface virtual generic methods via the standard trampoline.
1251         * mini-trampolines.c: Handle virtual generic shared methods.
1253         * mini.h, mini-x86.c, mini-x86.h: New argument for
1254         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
1255         method thunks and which is the trampoline to call if the lookup
1256         fails.  Enable the virtual generic method thunk for x86.
1258         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
1259         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
1260         argument but assert that it's NULL, because these archs don't yet
1261         implement the virtual generic method thunk.  Changes in the IMT
1262         thunk data structures.
1264 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
1266         * aot-compiler.c (emit_globals): Avoid invalid characters in
1267         the static linking symbol.
1269         * objects.cs: Add a test for the range check optimization. Fix warnings.
1271         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
1272         optimization from the current JIT.
1274         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
1275         later in decompose_array_access_opts () to allow more optimizations.
1277         * method-to-ir.c (mono_handle_soft_float): Rename this to 
1278         mono_decompose_soft_float () for consistency.
1280         * mini-ops.h: Fix arguments of OP_STRLEN.
1282         * method-to-ir.c (save_cast_details): Extract the cast details saving code
1283         into a separate function.
1284         (reset_cast_details): Ditto.
1285         (handle_unbox): Save cast details. Fixes #431254.
1287         * method-to-ir.c: Remove some obsolete FIXMEs.
1289 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1291         * ir-emit.h (alloc_dreg): Write a warning before crashing.
1293 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1295         * mini-codegen.c: More work on macros to make them
1296         ready for multiple regbanks.
1298 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1300         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
1302         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
1304 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1306         * mini-codegen.c (mono_spillvar_offset): Proper support for
1307         multiple regbanks.
1309 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1311         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
1312         the stack overflow changes.
1314 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1316         * mini-codegen.c: Make all bank macros depend on reg_bank.
1318         * mini-codegen.c (mono_local_regalloc): Make free mask
1319         initialization regbank aware.
1321 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1323         * mini-codegen.c (mono_local_regalloc): Extract callee
1324         mask selection to a function and make it regbank aware.
1326 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1328         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
1329         code to deal with many regbanks.
1331 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1333         * mini-codegen.c: More fp->regbank changes.
1335 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1337         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
1338         of a hardcoded constant.
1340 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1342         * method-to-ir.c (type_from_stack_type): Fix typo.
1344 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
1346         * mini-ia64.c (emit_move_return_value): Convert float return values to
1347         double.
1349         * objects.cs: Add a new test.
1350         
1351         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
1352         VARARG methods to fix an assert later.
1354         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
1355         end so it at least compiles.
1357 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1359         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
1361 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
1363         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
1364         optimization to a new function (emit_optimized_ldloca_ir) and enable
1365         it for both ldloca and ldloca_s.
1367 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1369         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
1370         gshared CASTCLASS code.
1372         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
1373         amd64, where the libc stack unwinder encounters stack frames referring to
1374         native code in unmapped memory.
1376         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
1377         sharing.
1379         * generics.cs: Add new test.
1381 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
1383         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
1384         add a check that one of the ARM_FPU_ constants is defined.
1386         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
1387         
1388         * mini-exceptions.c: Fix build on non-altstack platforms.
1390         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
1391         sharing of vtypes.
1393         * ir-emit.h: Add a comment to NEW_PCONST.
1395         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1397         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1399         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1400         after the changes to MonoJitDomainInfo.
1402 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1404         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1406 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1408         * mini-ppc.c: Compiler warning fixes.
1410 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1412         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1413         for pinvokes.
1415 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1417         * exceptions-ppc.c, mini-ppc.h: Compile
1418         mono_arch_handle_altstack_exception() on Darwin, too.
1420 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1422         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1423         work on archs which don't have generic sharing implemented, only
1424         without the vtable_arg.
1426 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1428         * mini.c: Added comment explaining why delegate ctor icall
1429         wrappers are compiled.
1431 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1433         * mini.c: Don't produce trampolines to delegate ctor icall
1434         wrappers but compile them upfront.
1436 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1438         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1439         runtime-set function when going back to managed code. Currently this
1440         is used to set back the protection on the soft ovf pages and/or to
1441         throw the stack overflow exception that happened in unmanaged code.
1443 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1445         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1446         runtime-set function when going back to managed code. Currently this
1447         is used to set back the protection on the soft ovf pages and/or to
1448         throw the stack overflow exception that happened in unmanaged code.
1450 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1452         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1453         the support code for restoring stack protection after stack overflows
1454         that happen in unmanaged code. Don't set the exec permission on the
1455         soft overflow area.
1457 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
1459         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1460         delegate->method_ptr is set. Fixes #428054.
1462 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1464         * tests.cs: Rename to ratests.cs.
1466         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
1467         emit_get_rgctx_... functions.
1469 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1471         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1473 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1475         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1476         before asserting that method is sharable.
1478 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1480         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1481         whether method needs a static RGCTX wrapper used instead of
1482         complex conditions.
1484         * generic-sharing.c, mini.h: A few functions moved to
1485         metadata/generic-sharing.c.
1487 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1489         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1490         Generic code sharing for value types, which essentially means
1491         treating value type methods like static methods.  The RGCTX is
1492         passed in the same way.
1494 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1496         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1497         opcode when creating multi-dimensional arrays of open types.
1499         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1500         open generic types.
1502         * generics.cs: Add a test.
1504         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1506 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1508         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1510         * mini.c (mini_method_compile): Set it when running under the debugger. 
1512         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
1513         vreg optimization if the flag is set.
1515         * driver.c (mono_main): Add --attach= option to pass options to
1516         the attach agent.
1518         * mini.c (sigquit_signal_handler): Start the attach agent.
1520         * ssapre.c: Disable this to save space since it is not yet ported to
1521         linear IR.
1523         * regalloc2.c: Disable this to save space.
1525         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1527 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1529         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1530         the -v option useful again.
1532 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1534         * mini-amd64.c (mono_arch_output_basic_block): Add support for
1535         --break-at-bb.
1537         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1538         arrays of arrays. Fixes #428406.
1540         * method-to-ir.c (mini_emit_castclass): Ditto.
1542         * objects.cs: Add new test.
1543         
1544 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
1546         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1547         was wrong at it choked against target_type_is_incompatible for byref types.
1549 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1551         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
1552         places.
1554 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1556         * mini-exceptions.c: update a few more exceptions-related counters.
1558 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1560         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1561         new functions to allocate from persistent mempools.
1563 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1565         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
1566         multiple register banks in the future.
1568         * mini-codegen.c (mono_local_regalloc): Fix a warning.
1570 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
1572         * mini.c (type_to_eval_stack_type): Remove duplicated function.
1574         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1576         * mini.h: Export type_to_eval_stack_type.
1578         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1579         is only ins->klass of byref types.
1581 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
1583         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
1584         (mini_emit_memcpy2): Ditto.
1586         * mini-amd64.c: Fix a warning.
1588 2008-09-21  Mark Probst  <mark.probst@gmail.com>
1590         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
1591         linking.
1593 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
1595         * method-to-ir.c: Extract stloc micro-optimization to a
1596         function and apply it to all cases.
1598 2008-09-19  Mark Probst  <mark.probst@gmail.com>
1600         * method-to-ir.c: Don't fail generic code sharing in cases we
1601         already support.
1603 2008-09-18  Mark Probst  <mark.probst@gmail.com>
1605         * mini-ppc.c: Handle structs in tailcalls on Darwin.
1607 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1609         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
1610         implementation.
1612 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
1614         * trace.c: make tracing more useful and correct, with per-thread
1615         id and indent info.
1617 2008-09-15  Mark Probst  <mark.probst@gmail.com>
1619         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
1620         doing a method call and the argument is an R4.
1622 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
1624         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
1625         generic methods.
1627 2008-09-13  Mark Probst  <mark.probst@gmail.com>
1629         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
1631 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
1633         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
1634         (MONO_JUMP_TABLE_FROM_INS): Ditto.
1636 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1638         * driver.c: Add a --agent argument (not supported yet) to load managed
1639         agent assemblies before loading the main assembly, similarly to how the
1640         Java VM handles agents.
1642 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1644         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1645         function to do stack layout of local variables.
1647 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1649         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1650         calculation.
1652 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1654         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1655         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1656         JIT if DISABLE_JIT is defined.
1658         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1659         defined.
1661 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1663         * iltests.il.in: Disable the fconv test on PPC (the result is
1664         undefined according to ECMA).
1666 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1668         * iltests.il.in: Enable tail call tests for PPC.
1670         * mini.h: Add variable for storing incoming valuetype argument
1671         addresses for tail calls.
1673         * mini-ppc.c: Implement valuetype arguments and return values for
1674         tailcalls on Linux.
1676 2008-09-09  Mark Probst  <mark.probst@gmail.com>
1678         * mini-ppc.c: Partially implement tail calls (struct arguments and
1679         return values not supported).
1681         * method-to-ir.c: Enable tail calls on PPC.
1683 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
1685         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1686         runtime-invoke wrappers to work around the problem of them getting
1687         assigned to a random class.
1689         * aot-runtime.c (mono_aot_get_method): Ditto.
1690         
1691 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
1693         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1694         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1696 2008-09-07  Mark Probst  <mark.probst@gmail.com>
1698         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1699         until they're implemented properly.
1701         * exceptions-ppc.c: Use arch-independent exception-handling code
1702         instead of custom one.
1704         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1705         for Linear IR.
1707         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1709         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1710         applies when __powerpc__ is defined.
1712 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
1714         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1715         methods to their code to avoid computing the full name of wrappers and
1716         doing a lookup in a string hash table.
1718 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1720         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1721         we identify bblocks before method_to_ir () is ran.
1723         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1724         Also avoid optimizing branches pointing to themselves.
1726         * mini.c (mini_method_compile): Ditto. Fixes #422947.
1728 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
1730         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1732 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1734         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1735         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1736         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1737         'buf'.
1739         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
1740         jumped to the same entry in plt_jump_table.
1742 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
1744         * method-to-ir.c (initialize_array_data): Handle field with RVA from
1745         dynamic images.
1747 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
1749         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1750         other assignment can be if converted. Saves 1.5% on corlib size and fixes
1751         #421807.
1753 2008-08-29  Geoff Norton  <gnorton@novell.com>
1755         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1756         segment, and doesn't properly handle .space as .text.  Fixes
1757         AOT Mach/ARM
1759 2008-08-29  Geoff Norton  <gnorton@novell.com>
1761         * mini.c: Disable the mach exception handler when running on 
1762         ARM
1764 2008-08-29  Geoff Norton  <gnorton@novell.com>
1766         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
1767         globals on Darwin/ARM
1769 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
1771         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
1772         since too many things depend on it. Instead, call 
1773         mono_runtime_set_no_exec ().
1774         
1775         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1776         the new JIT.
1778         * aot-compiler.c: Add an 'asm-only' AOT option.
1780         * mini.c: Avoid initializing the runtime when doing AOT compilation.
1781                 
1782         * aot-compiler.c (compile_method): Disable gshared support for now as it
1783         doesn't yet work.
1785 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1787         * mini-amd64.h : Fix a compiler warning.
1789         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1790           Changed to use a callback function to retrieve the unwind info.
1791           This avoids problems observed when code blocks were removed by
1792           unloading an app domain.
1794         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
1795           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
1796           to work properly.
1798         Contributed under MIT/X11 license.
1800 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1802         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
1803           case to keep the stack aligned to 8.
1805         Contributed under MIT/X11 license.
1807 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
1809         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
1810         avoid repeated linear searches.
1812 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
1814         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
1815         methods it can't handle.
1816         
1817         * aot-compiler.c (add_method): Avoid adding a method twice.
1818         (add_wrappers): Add runtime invoke wrappers for all methods.
1820         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
1821         function to create an aot-compatible version of this trampoline.
1823         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
1825 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
1827         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
1829         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
1830         with a generic sharing failure.
1832         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
1834         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
1835         CEE_RETHROW. Fixes #419634.
1837         * mini.c (mono_method_to_ir): Ditto.
1839         * exceptions.cs: Add a new test.
1840         
1841         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
1842         to mono_type_stack_size_internal () since some callers might not pass in
1843         an rgctx.
1845         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
1846         instrument_prolog. Fixes #419878.
1848         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
1849         doubles in soft float mode volatile.
1851 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
1853         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
1855         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
1856         to handle soft float correctly.
1858         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
1859         the fast path.
1861         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
1863         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
1864         to sp, since the generics catch code requires it.
1866         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
1867         copying.
1869         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
1870         mono_arch_emit_imt_argument ().
1872         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
1874         * mini-arm.c tramp-arm.c: Generic sharing updates.
1876 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
1878         * mini-arm.c: Fix the arm build.
1880         * generic-sharing.c (mini_type_get_underlying_type): New helper function
1881         handling enums, generic instances and generic sharing.
1882         (mini_type_stack_size_full): Ditto.
1884         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
1885         
1886         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
1888         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
1890         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
1891         trampolines.
1893         * mini-arm.c: Various small generic sharing changes.
1895         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
1896         this for x86.
1897         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
1898         custom code.
1900         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
1901         helper function to return a generic class init trampoline.
1903         * method-to-ir.c mini.c: Use it.
1904         
1905         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
1906         arch-specfic function to return a generic class init trampoline.
1908         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
1909         the GENERIC_CLASS_INIT custom code.
1911         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
1912         a fatal error, not a sharing failure.
1914         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
1915         needed.
1917         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
1918         trampoline argument from MONO_ARCH_VTABLE_REG.
1920         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1921         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1922         argument, and pass the vtable in VTABLE_REG.
1924         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
1925         order of the arguments to the C trampoline: pass 'slot' as the trampoline
1926         argument, and pass the vtable in VTABLE_REG.
1927         (mono_arch_create_trampoline_code_full): Remove some special casing for
1928         the rgctx fetch trampoline.
1930         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
1931         Fixes #419273.
1933         * iltests.il: Add a test for it.
1935 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
1937         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
1939         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
1940         no longer needed.
1942         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
1943         use mono_jit_info_table_find () to avoid recursion.
1944         (mono_delegate_trampoline): Add a sync wrapper here.
1946         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
1947         here.
1949         * mini.c (mono_method_to_ir): Ditto.
1950         
1951         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
1952         add_sync_wrapper argument. Don't add a sync wrapper here.
1953         (mono_create_jump_trampoline): Don't add a sync wrapper here.
1955         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
1956         
1957 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1959         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
1960           of nonvolatile registers back from MonoContext to CONTEXT.
1962         Contributed under MIT/X11 license.
1964 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
1966         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
1967           arguments on Winx64 there are only 4 argument registers.  For this
1968           logic to work the last argument must be pulled from the stack.  
1970         Contributed under MIT/X11 license.
1972 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
1974         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
1976         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
1977         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
1978         encode/decode_method_ref ().
1980         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
1982         * aot-runtime.c (decode_patch): Ditto.  
1984         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
1985         MONO_PATCH_INFO_METHOD.
1987         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
1988         MonoGenericJitInfo.
1990         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
1991         MonoGenericJitInfo.
1993         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
1995         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
1996         one from the caller.
1998         * aot-runtime.c (decode_generic_inst): New function to decode and
1999         return a interned generic inst.
2000         (decode_klass_ref): Use it.
2001         (decode_method_ref): Ditto.
2003         * aot-compiler.c (emit_exception_debug_info): Save 
2004         jinfo->has_generic_jit_info too.
2006 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2008         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
2010         * iltests.il.in: Add a test for fconv_to_i.
2012         * liveness.c: Disable the liveness2 pass for now to save space.
2014         * regalloc2.c: Include mempool-internals.h to fix warnings.
2016         * aot-compiler.c (encode_method_ref): Encode the context of generic
2017         instance methods.
2019         * aot-runtime.c (decode_method_ref): Inflate generic methods using
2020         the context saved in the aot file.
2022         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2024         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2026         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
2027         volatile so they won't be optimized away.
2029 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
2031         * ssa.c:
2032         * ssa2.c:
2033         * mini.c:
2034         * regalloc2.c:
2035         * dominators.c: Remove duplicated functions that now are in
2036         mempool-internals.h.
2038 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2040         * aot-compiler.c: Fix warnings.
2042         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
2044         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
2046         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
2047         as the patch type.
2049         * mini.c (mono_resolve_patch_target): Ditto.
2050         
2051         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
2052         (encode_klass_ref): Add support for encoding VARs/MVARs.
2054         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
2056         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
2057         the handling of the got entries into a separate 'decode_got_entry' function.
2058         Add support for RGCTX_FETCH.
2060         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
2061         clobbered by the trampoline code.
2063         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
2064         not clobbered by the indirect calling code.
2066 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2068         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
2069         to fix the build.
2071 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
2073         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
2074         signature using the compilation mempool otherwise we would leak it.
2076 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2078         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
2079         mono_emit_abs_call ().
2081         * patch-info.h: Add GENERIC_CLASS_INIT.
2083         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
2085         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
2086         as their target as a near call.
2088         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
2089         ABS handling code.
2090         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
2092         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
2093         call to a runtime function described by a patch.
2095         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
2096         mono_emit_abs_call, this has the advantage that the ABS handling code in
2097         mono_codegen () can handle them both, and can handle other stuff in the
2098         future without additional code.
2100         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
2101         entry.
2102         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
2103         abs addresses.
2105         * mini.h: Add missing bblock related prototypes.
2107         * mini.h (MonoCompile): Remove unused reverse_inst_list and
2108         reverse_inst_list_len fields.
2110         * mini.c: Refactor this file a bit by moving branch optimizations to 
2111         branch-opts.c.
2113         * method-to-ir.c: Merge generic sharing changes missed earlier.
2115         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
2117         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
2118         shared patches. Process METHODCONST as a shared patch.
2120         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
2121         as it crashes on the 2.0 mscorlib.
2123         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
2124         to cause crashes.
2125         
2126         * aot-compiler.c: Use is_plt_patch () in a few additional places.
2127         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
2128         by IMT.
2130         * aot-compiler.c: Reorganize the got handling code to be a bit more
2131         understandable.
2133 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2135         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
2136         mono_patch_info_equals/hash, and use it to massively simplify
2137         get_plt_index ().
2139         * mini.c (mono_patch_info_hash): Simplify this and add support for
2140         more patch types.
2142         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
2144         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
2145         handling code, since an offset is not enough to identify a trampoline.
2147         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
2149 2008-08-17  Mark Probst  <mark.probst@gmail.com>
2151         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
2153         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
2155         * mini-ops.h: Argument and result types for OVF_CARRY ops.
2157         * decompose.c: PPC decompositions for various ops.
2159         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
2161 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2163         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
2164         call the generic trampoline code using a call, instead of a jump, to
2165         remove some special casing from the generic trampoline code.
2167         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
2168         (mono_codegen): Ditto.
2170         * aot-compiler.c aot-runtime.c: Ditto.
2172         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
2174         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
2175         helper function to find the offset corresponding to a lazy fetch trampoline.
2177         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
2178         when doing generic sharing.
2180         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
2181         places.
2182         
2183         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
2184         mini-trampolines.c to be with the other trampoline creation functions.
2186         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
2187         as it is equal to method->signature in most cases, add a 
2188         mono_emit_method_call_full variant which takes a signature and an imt
2189         argument as well.
2191 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
2193         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
2194         to this function, since it could be computed easily from the method 
2195         argument.
2196         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
2197         more.
2199         * method-to-ir.c mini.c: Remove references to 
2200         compile_generic_method_wo_context.
2202         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
2203         generic method calls.
2204         
2205         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
2206         dimensional non-szarrays.
2208         * mini.c (mini_init): Register mono_array_new_1.
2210         * jit-icalls.c (mono_array_new_1): New jit icall.
2212         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
2213         pointing to the method.
2215         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
2216         method addresses belonging to METHOD_JUMP patches in the 
2217         jump_target_got_slot_hash.
2218         (mono_aot_load_method): Ditto.
2220         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
2221         METHOD_JUMP patches.
2223         * mini.c (mini_create_jit_domain_info): New helper function which 
2224         initializes/frees domain->runtime_info.
2225         (mini_free_jit_domain_info): Ditto.
2226         (mini_init): Install the domain hook functions with the runtime.
2228         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
2229         information maintained by the JIT.
2231         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
2232         insertion into jump_table_hash into mono_codegen (), also implement proper
2233         locking.
2235         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
2236         tail calls, it is already done by the aot code.
2237         
2238         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
2239         mechanism on amd64.
2241         * iltests.il.in: Make the jmp test a bit more complex.
2243         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
2244         generic instances which doesn't have a token.
2246         * aot-runtime.c (decode_method_ref): Ditto.
2247         
2248         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
2249         can handle this case now.
2250         (handle_box): Ditto.
2252 2008-08-15  Geoff Norton  <gnorton@novell.com>
2254         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
2255         debugging check.
2257 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
2259         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
2260         calling generic methods.
2262         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
2264         * aot-runtime.c (decode_patch_info): Ditto.
2266         * mini.c (mono_resolve_patch_target): Ditto.
2267         
2268         * patch-info.h: Add METHOD_RGCTX.
2270         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
2272 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
2274         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
2275         arguments in registers.
2277         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
2278         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
2280         * mini.c (mini_method_compile): Abort aot compilation for generic
2281         methods if generic sharing is disabled.
2282         
2283         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
2284         an mrgctx.
2286         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
2287         requiring an mrgctx.
2289         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
2290         store instructions when converting a vcall to a normal call.
2292         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
2293         mono_arch_find_jit_info.
2295 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
2297         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
2298         avoid calling mono_method_full_name () for every method even if the
2299         env var is not set.
2300         (check_inline_caller_method_name_limit): Ditto.
2302 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2304         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
2305         assemblies in one run.
2307         * aot-compiler.c (mono_compile_assembly): Only print out a count of
2308         skipped methods if it is not 0.
2310         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
2312 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2314         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
2315           MONO_ARCH_HAVE_UNWIND_TABLE.
2317         Contributed under MIT/X11 license.
2319 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2321         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
2322           from default optimizaton list on Winx64.
2324         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
2326         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
2327           the LMF from the MonoJitTlsData structure.
2329         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
2331         Contributed under MIT/X11 license.
2333 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2335         * mini.c (sigsegv_signal_handler): Fix the build.
2337         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
2338         assembly->aot_module.
2340         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
2341         hash table. This simplifies and speeds up a lot of code, and fixes support
2342         for .netmodules.
2344         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
2345         with the runtime.
2347         * mini-exceptions.c: Ditto.
2348         
2349         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
2350         'native_offset' argument, since these are computed in the 
2351         mono_find_jit_info () function.
2353         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
2354         is used by exceptions-ppc.c.
2356         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
2357         mono_arch_find_jit_info ().
2358         
2359         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
2360         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
2361         generic code in mini-exceptions.c.
2363 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
2365         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
2367         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
2368         
2369         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
2370         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
2371         called while holding the loader lock. Fixes #415608.
2372         (mono_aot_get_method_from_token_inner): Ditto.
2374 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2376         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
2377         to reduce differences between this and the generic implementation in
2378         mini-exceptions.c.
2379         (ves_icall_get_frame_info): Ditto.
2381         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
2383         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
2384         longer neccesarry.
2386         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
2387         mono_arch_get_call_filter () and make it non-static, for consistency with the
2388         other architectures.
2390 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
2392         * mini.c:
2393         * local-propagation.c:
2394         * mini-x86.c: Correct the name of arch defines.
2396 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2398         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2399         NO_EMULATE_LONG_SHIFT_OPS define.
2401 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2403         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2404         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2406         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2407         MACH fixes. Merged from the 2.0 branch.
2409         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2411         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2412         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2414         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2416         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2417         mono_marshal_get_native_wrapper () signature changes.
2419 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
2421         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2422         conversion bug under arm.
2424 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2426         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2428         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2429         with overflow checking.
2431 2008-08-05  Marek Habersack  <mhabersack@novell.com>
2433         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2434         to the genmdesc.pl file
2436 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
2438         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2439         arg_array in the soft-float versions of the LOAD/STORE macros.
2441         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2442         implementation.
2444         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2446 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2448         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2449         a float HFA. Fixes #413621.
2451 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
2453         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2454         frame_size to args_size. Fixes build.
2456 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2458         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2459         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2461         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2462         the stack are not unaligned. Fixes #413247.
2463         
2464 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2466         * mini.c: update jitted methods performance counters.
2468 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2470         * mini-exceptions.c: increase the exceptions thrown performance
2471         counter in mono_handle_exception ().
2473 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
2475         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2476         can work with netmodules.
2478 2008-07-28  Geoff Norton  <gnorton@novell.com>
2480         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
2481         regression tests.
2483 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2485         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2486         correct place.
2488 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
2490         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2491           The float param registers and other param registers must be the 
2492           same index on Windows x64.
2494         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
2495           ArgValuetypeAddrInIReg argument case.  Setting the argument
2496           op to OP_VTARG_ADDR (OP_REGOFFSET)).
2498         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
2499           variable computed above as the copy length for arguments of storage
2500           type ArgValuetypeAddrInIReg.
2502         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
2503           ArgValuetypeAddrInIReg argument case.  This case will rely on
2504           mono_arch_emit_outarg_vt to emit the correct code later in the process.
2506         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
2507           a 32 byte stack allocation for all calls.  We will omit the adjustment for
2508           jump and tail call instructoins as they do not follow the typical call behavior.
2510         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
2511           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2512           local variable and pass the local variable by reference to the called method.
2514         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
2515           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
2516           of a struct is passed in a register it must be saved with the other
2517           volatile argument on the stack.
2519         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
2520           frame pointer the stack adjustment value must be saved to the unwind 
2521           info structure.
2523         Contributed under MIT/X11 license.
2525 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2527         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2528         which got lost in the merge.
2530 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2532         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2533         build.
2535         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2536         
2537         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2538         icalls, since they won't be patched.
2540         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2541         different code sequence when running under valgrind to prevent some valgrind
2542         errors.
2544         * iltests.il.in: Add new regression test.
2546         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2547         end with a throw.
2549         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2550         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2552         * iltests.il.in: Add new test.
2554         * aot-compiler.c: Fix some warnings.
2556         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2557         Fixes #412494.
2559 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2561         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2562         (mini_usage_jitdeveloper): Add a missing --wapi option.
2564 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2566         * mini-codegen.c: Simplify the is_fp macros.
2567         (free_up_ireg): Remove, use free_up_reg instead.
2568         (free_up_reg): Fix the fp case.
2570 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2572         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2573         lowered earlier.
2575         * exceptions-x86.c: Merge some changes which seemed to have got lost
2576         in the linear-ir merge.
2578         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2580         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2581         long vreg volatile even if the variable was already created.
2583         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
2584         volatile variables.
2586 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2588         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
2590         * mini.c (mono_jit_compile_method_inner): Add support for 
2591         MONO_EXCEPTION_BAD_IMAGE.
2593         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
2594         mini_method_get_context () returns NULL. Fixes #356531.
2596         * mini.c (mono_method_to_ir): Ditto.
2597         
2598         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
2599         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
2601 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2603         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
2604         in the LDFTN implementation.
2606 2008-07-25  Mark Probst  <mark.probst@gmail.com>
2608         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
2609         code, patch calls to icalls, too, even if they're not in the
2610         shared generic code hash.  Fixes #411962.
2612 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2614         * cpu-x86.md: Increase the length of the fcall opcodes.
2616         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
2617         calls returning floats.
2619         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
2620         on NEWARR.
2621         
2622         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
2623         missed earlier.
2625         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
2626         into the domain->method_code_hash.
2628         * aot-compiler.c: Fix win32 build.
2630         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
2631         
2632         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
2633         gshared NEWARR implementation.
2635         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
2637         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
2638         can be used outside of method_to_ir.
2640         * mini.h (MonoCompile): Add arg_types field.
2642         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
2643         
2644         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2645         the values of the local arg_array and param_types array.
2647 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2649         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2650         got accesses might only get generated later when NEWOBJ is decomposed.
2651         
2652         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2653         looking up the native code of the target method when a delegate is called
2654         for the first time.
2656         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2657         optimization.
2659         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2661         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2662         AOT work on platforms without a working dlsym implementation.
2664         * mini.h: Bump AOT image format version.
2665         
2666 2008-07-24  Mark Probst  <mark.probst@gmail.com>
2668         * mini-exceptions.c: Free a MonoType with
2669         mono_metadata_free_type() instead of g_free().
2671         * aot-runtime.c: Free a MonoType.
2673 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2675         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2676         optimization.
2678         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2679         fp stack on x86.
2681 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
2682         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2683         profiler hook.
2685 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2687         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2688         NEWOBJ calls on valuetypes.
2690         * iltests.il.in: Add new test.
2692         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2694 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2696         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2697         is no longer needed.
2699         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2700         non register sized integer arguments.
2701         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2702         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
2703         emit_memcpy2 ().
2705         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2706         CEE_MONO_RETOBJ.
2707         
2708         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2709         two a binop with different sized arguments is emitted.
2711         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2712         instruction in the ins==NULL case.
2714 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2716         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2718         * mini-x86.c: Fix osx build.
2720         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2721         opcodes as well.
2723         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2724         instruction for non int sized variables.
2726         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2727         implementation.
2729 2008-07-23  Robert Jordan  <robertj@gmx.net>
2731         * method-to-ir.c: Fix MSVC build.
2733 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2735         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2736         a non int sized type, widen it to an int since newer versions of gcc seem to
2737         generate code which needs this.
2739         * ssa2.c abcremoval2.c: Fix warnings.
2741         * *: Merge the Linear IR branch.
2743         The original branch is at trunk/branches/vargaz/mini-linear-il, and
2744         the ChangeLog file there describes all the changes done over the years. 
2745         Further documentation can be found at www.mono-project.com/Linear_IL.
2747 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2749         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2750           The float param registers and other param registers must be the 
2751           same index on Windows x64.
2753         Contributed under MIT/X11 license.
2755 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
2757         * mini.c: Make the previous fix GC safe.
2759 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
2761         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2763 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2765         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2766           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
2767           ArgValuetypeAddrInIReg instead.
2769         Contributed under MIT/X11 license.
2771 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
2773         * mini-codegen.c (get_register_spilling): Fix a warning.
2775 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
2777         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2778         for types which the initialization fails. Raises the provided exception
2779         at the right stop after cleanup.
2781 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
2783         * aot-compiler.c: Free most of the memory allocated during compilation.
2785         * mini.c (mini_parse_debug_options): Fix a leak.
2786         
2787         * mini.c (mini_method_compile): Don't add the method to the jit info tables
2788         during aot compilation.
2790 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
2792         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
2793         it has too much register pressure.
2795 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
2797         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
2799 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2801         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2802         on x86.
2804         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2805         on amd64 similar to the way it is done on arm.
2807         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2809         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
2810         consistency, normalize error messages, avoid loading aot-only modules in
2811         normal mode.
2813         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
2814         for consistency.
2816         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
2818 2008-07-11  Martin Baulig  <martin@ximian.com>
2820         * debug-debugger.h
2821         (MonoDebuggerInfo): Add `interruption_request'.
2823 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2825         * aot-compiler.c (emit_plt): Remove some dead code.
2827         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
2829         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
2830         return the plt info offset belonging to a given plt entry.
2832         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
2833         mono_aot_get_plt_info_offset.
2834         
2835         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
2836         similar to the amd64 code by makeing jumps through a separate jump table 
2837         instead of embedding the jump addresses into the code.
2839 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
2841         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
2842         method.
2844 2008-07-10  Martin Baulig  <martin@ximian.com>
2846         * mini.c (mini_method_compile): Disable generics sharing when
2847         running in the debugger.
2849 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2851         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
2853         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
2854         the local register allocator from running out of registers on x86 when 
2855         using aot.
2857 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
2859         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
2860         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
2861         C4146.
2863         Contributed under MIT/X11 license.
2865 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
2867         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
2868         speed up the assembler.
2870 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2872         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
2873         support.
2875         * mini.c: Move the soft float handling macros a bit earlier, add 
2876         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
2877         place.
2879         * mini.h: Add prototype for mono_arch_fixup_jinfo.
2881         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
2882         read-only to help catch code allocation requests.
2883         
2884         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
2885         and turn it off when using --aot-only or when compiling with --aot=full.
2887         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
2888         jump table for switches from the normal domain mempool, not the code
2889         manager.
2891         * mini-trampolines.c (get_unbox_trampoline): New function to return an
2892         unbox trampoline which handles aot-only mode too.
2894         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
2895         an AOTed unbox trampoline.
2897         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
2899 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2901         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
2902         ""
2904         Contributed under MIT/X11 license.
2906 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
2908         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
2909           the unwind information for the method at the end of the allocated block.
2910           
2911         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
2912           MonoCompileArch to hold the unwind info for SEH on Winx64
2913         
2914         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
2915           frame pointer info for the method being compiled.
2916           
2917         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
2918           the call to mono_exception_from_token.
2919           
2920         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
2921           storing the method prolog information in a format that the Winx64 SEH can understand.  This
2922           information is stored a the end of the method block because it is all 32-bit offset based.
2924         Contributed under MIT/X11 license.
2926 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
2928         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
2930         * wapihandles.c: Fix warnings.
2932         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
2933         mode.
2935         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
2936         mono_jit_compile_method in aot-only mode since that calls the type 
2937         initializer.
2938         
2939         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
2940         get_delegate_invoke_impl in aot-only mode.
2942         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
2944 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
2946         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
2948         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
2949         is on by default.
2951         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
2953         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
2954         init trampoline from the AOT file as well.
2956         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
2957         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
2958         code.
2960         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
2961         mono_init.
2963         * exceptions-amd64.c: Add _full variants for the remaining exception code
2964         creation functions as well, allow emission of relocatable code, remove
2965         caching since that is now done by the caller.
2967         * mini-exceptions.c: Add _full variants for the remaining exception code
2968         creation functions as well, add aot-only support.
2970         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
2971         if we can determine a proper token for them.
2972         (add_wrappers): Add a few more wrappers.
2973         (emit_method_code): Remove some dead code.
2974         (emit_trampolines): Emit exception code too.
2976         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
2978         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
2979         mono_array_new_va which avoids varargs.
2981         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
2983         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
2984         mono_arch_create_specific_trampoline () in all places.
2986         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
2987         a bit so it can be used for other things as well.
2988         
2989         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
2990         on demand as well.
2992         * exceptions-amd64.c: Rename the caching from the exception code creation
2993         functions, it is done by the caller instead.
2994         
2995         * exceptions-amd64.c: Change the signature of the exception code creation 
2996         functions to allow the creation of relocatable code later.
2998         * mini-exceptions.c: Add a set of functions to query the various 
2999         runtime-generated exception functions.
3001         * mini.c mini-exceptions.c: Use the newly added functions instead of the
3002         mono_arch_.. () functions.
3003         
3004 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3006         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
3008         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
3010         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
3011         (mini_get_vtable_trampoline): Ditto.
3013         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
3014         code in the AOT case by returning the code size and a list of relocations to
3015         the caller.
3017         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
3019 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
3021         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
3022           clean the stack.
3024         Contributed under MIT/X11 license.
3026 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3028         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
3029         so the buffer size can be computed correctly. Fixes #404735.
3031         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
3032         normally as cfg->debug_info is already freed.
3034 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
3036         * mini-amd64.c: For calls returning vtypes in registers, don't store
3037         the return address on the stack, instead allocate a separate local for
3038         it. Fixes #404729.
3040 2008-07-05  Mark Probst  <mark.probst@gmail.com>
3042         * mini-trampolines.c, mini.h: Add an argument to
3043         mono_create_jit_trampoline_in_domain() for turning off the adding
3044         of the sync wrapper.
3046         * mini.c: Use the JIT trampoline without sync instead of
3047         ldftn_nosync in static RGCTX invoke wrappers so that the call can
3048         be patched.
3050 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3052         * driver.c: Turn on GSHARED optimization by default.
3054 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
3056         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
3057         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
3059         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
3060         create a variant of the generic trampoline code callable from AOTed trampolines.
3062         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
3063         trampoline code callable from AOTed trampolines.
3065         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
3067 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3069         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
3070         pass-through manner.
3072         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
3073         and don't fail sharing for them anymore.
3075         * mini-exceptions.c: Handle exceptions in shared generic methods.
3077         * generic-sharing.c: When checking the context of a generic
3078         method, also check its class's context.  Don't treat wrappers as
3079         sharable.
3081         * mini-trampolines.c: Some code factored out to
3082         metadata/generic-sharing.c.  Handle the MRGCTX case.
3084         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
3085         we must deal with the method being of another instantiation of the
3086         class.  Add static rgctx invoke wrappers to generic methods.
3088 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3090         * mini.c: Provide all jit infos of generic shared methods with a
3091         generic jit info.
3093         * mini-exceptions.c: Handle the new situation that a generic info
3094         might be available, but not info about the this/vtable/mrgctx
3095         variable.
3097 2008-07-03  Mark Probst  <mark.probst@gmail.com>
3099         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
3100         generic methods.
3102 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
3104         * dominators.c (check_dominance_frontier): Fix a warning.
3106         * mini.h: Add some missing prototypes.
3108         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
3110         * driver.c (mono_jit_init_version): Correct the comments since the first
3111         argument should be the name of the root domain, not a filename.
3113         * aot-runtime.c (make_writable): Error out if this is called while running
3114         with --aot-only.
3115         (load_aot_module): Ditto.
3117         * aot-compiler.c: Really fix the computation of method indexes.
3119         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
3120         optimizations as this is no longer called frequently.
3122         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
3123         method and the invoke impl code and pass it to the delegate trampoline instead of
3124         just the delegate class.
3126 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
3128         * aot-compiler.c: Fixup the computation of method indexes.
3129         (add_wrappers): Create the base methods of the runtime invoke wrappers using
3130         the method builder infrastructure.
3132         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
3133         has no header.
3135         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
3136         mode, load the method right away instead of creating a trampoline.
3138         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
3140         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
3141         some checks a bit.
3143 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
3145         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
3146         (mono_aot_load_method): Use method_index instead of method->token.
3148         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
3149         can handle icalls etc. properly.
3151         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3153         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
3155         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
3156         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
3157         JIT_ICALL_ADDR patch type.
3159         * patch-info.h: Add JIT_ICALL_ADDR patch type.
3161         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
3162         request flag.
3163         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
3165         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
3167 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
3169         * mini.c: Use domain->jit_code_hash_lock for controlling access to
3170         domain->jit_code_hash.
3172 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
3174         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
3176 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
3178         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
3179         get_this_arg_from_call, let it compute it when needed.
3181         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
3182         gsctx from code only when needed.
3184         * mini-trampolines.c (get_generic_context): Rename this to 
3185         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
3186         it can be called by the arch backends.
3188         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
3190 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
3192         * driver.c (mono_main): Add experimental --aot-only command line option.
3194         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
3195         set.
3197 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
3199         * driver.c (DllMain): Remove mono_module_handle.
3201         Contributed under MIT/X11 license.
3203 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
3205         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
3206         for emitting methods which are not in the source assembly. Detect and report
3207         failure of assembling+linking.
3208         
3209         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
3211         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
3213 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
3215         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
3217 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
3219         * mini.h: Remove some obsolete prototypes.
3221         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
3223 2008-06-24  Mark Probst  <mark.probst@gmail.com>
3225         * mini.c (get_object_generic_inst): Variable-sized arrays are not
3226         supported by Visual Studio, so use alloca().
3228 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
3230         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
3231         Fixes #402585.
3233 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3235         * mini.c: Fail sharing of a generic method if it contains an open
3236         catch clause (because we don't pass MRGCTXs yet).
3238 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3240         * mini.c: When compiling a method with generic sharing, insert the
3241         method instantiated with an all-Object generic context into the
3242         jit info table, instead of the context of the first instantiation
3243         of the method we happen to compile.
3245 2008-06-18  Martin Baulig  <martin@ximian.com>
3247         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
3248         `major_version' and `minor_version'.
3250 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3252         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
3253         mono_method_is_generic_sharable_impl() takes an additional
3254         argument specifying whether to treat type variables as reference
3255         types.
3257 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3259         * mini.h: Removed obsolete prototypes.
3261 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3263         * mini.c: Don't fail generic sharing for initobj and sizeof - we
3264         already handle them.
3266 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3268         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
3269         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
3270         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
3271         tramp-x86.c: Added a MonoGenericContext* argument to
3272         mono_arch_get_unbox_trampoline() so that it can call other
3273         functions which require it.
3275 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3277         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
3278         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
3279         mono_arch_get_this_arg_from_call() takes a
3280         MonoGenericSharingContext* as well.
3282 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3284         * mini.c: Factor out code for emitting unbox into emit_unbox() and
3285         implement generic sharing of unbox.
3287 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3289         * mini.c: Don't compute the vtable to determine whether a field is
3290         special static, because it might not work for open types.
3292 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3294         * mini.c: Removed the unused token_type and token_source arguments
3295         from get_runtime_generic_context_ptr().
3297 2008-06-17  Marek Habersack  <mhabersack@novell.com>
3299         * mini.c (ADD_BINOP): fix the build
3301 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
3303         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
3304         a widening op.
3306 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3308         * mini.h: Removed class relations enum that's not used anymore.
3310 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3312         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
3314         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
3315         the lazy fetch trampoline access code.
3317 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
3319         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
3321 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
3323         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
3325         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
3327         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
3329 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3331         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
3332         intrinsics.
3334         * mini-ops.h: Add MIN/MAX_UN opcodes.
3336         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
3337         intrinsics.
3339         * basic-math.cs: Add more min/max tests.
3341         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3343 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3345         * mini.c: Small fix in the prologue of emit_castclass.
3347 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3349         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3351         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
3352         do not work even for unsigned types. Fixes #400014.
3354         * basic-math.cs: Add regression tests for unsigned Min/Max.
3356 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3358         * mini.c: Added additional context_used argument to several
3359         functions, which will be needed for sharing generic methods.  Use
3360         GET_RGCTX macro wherever appropriate.  Declare only one
3361         context_used in mono_method_to_ir().
3363 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3365         * mini.c, generic-sharing.c: Removed generic class relations.
3367         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
3368         functions due to MRGCTX changes.
3370 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3372         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
3373         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
3374         with calculated IMT.
3376         * mini.c: Generic sharing of calls via generic interfaces.
3378         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
3379         generic method with non-constant MonoGenericContext*.  Instead,
3380         the context is taken out of the method itself.
3382 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3384         * mini.c: Generic sharing of ldvirtftn.
3386 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3388         * mini.c: Generic sharing of ldftn.
3390 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3392         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3394 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3396         * mini.c: Generic sharing of the special case of ldtoken followed
3397         by a call to GetTypeFromHandle.
3399 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3401         * mini.c: Generic sharing of box for nullable types.
3403 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3405         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3406         are passed on the stack. Fixes #324807.
3408 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
3410         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3411         for the ArgValuetypeAddrInIReg case.
3413         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
3414         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
3416         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
3417         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
3418         local variable and pass the local variable by reference to the called method.
3419           
3420         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
3421         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3423         Contributed under MIT/X11 license.
3425 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
3427         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3429         * debug-mini.c (mono_debug_print_vars): Release memory after printing
3430         everything.
3432 2008-06-10  Martin Baulig  <martin@ximian.com>
3434         * debug-mini.c
3435         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3437 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
3439         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3440         possible error when no arguments are passed.
3442         Contributed under MIT/X11 license.
3444 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
3446         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3447         where the file name is NULL.
3449 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
3451         * mini.c: Fix s390 build.
3453 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
3455         * trace.c (mono_trace_parse_options): Fix warnings.
3457         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3459 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
3461         * mini.c (remove_block_if_useless): Avoid printing the method name.
3462         
3463         * mini.c: Remove needless setting of ins->cil_code which is now done by 
3464         MONO_INST_NEW.
3466         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3467         LMF. Not yet used.
3469         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3470         translated code after it has been patched.
3472 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
3474         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3475         avoid problems during code patching on SMP systems.
3476         (emit_call): Avoid adding a patch info which is already added by 
3477         emit_call_body.
3478         (mono_arch_emit_exceptions): Ditto.
3480 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
3482         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3483         MONO_TYPE_ISSTRUCT already checks for it.
3485 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
3487         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
3488           structs with floats on Winx64 the float registers are not used.  
3489           The integer registers are always used..
3490         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
3491           only one register will be used and only if the size of the struct 
3492           is 1,2,4, or 8 bytes.
3494         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
3495           to work for Winx64.
3497         Contributed under MIT/X11 license.
3499 2008-06-05  Martin Baulig  <martin@ximian.com>
3501         * debug-debugger.c (debugger_lookup_class): Also call
3502         mono_class_setup_methods() here; we're only called from RTI.
3504 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
3506         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3507         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3508         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3509         Post-process object files and add dtrace-generated object, if necessary.
3511         Contributed under MIT/X11 license.
3513 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3515         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
3516         element class.
3518         * mini.c: Generic sharing for unbox.any and castclass.
3520 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3522         * mini.c: Ignore tailcall prefix in shared generic code and when
3523         doing calls which require a vtable/rgctx argument.
3525 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3527         * mini.c: Don't free the JIT info.
3529         * driver.c: Changes in the JIT info table testing code.
3531 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3533         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
3534         interruption. Fix some warnings.
3536         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3537         interruption_checkpoint.
3539 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3541         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3542         from embedding applications.
3544 2008-06-02  William Holmes  <billholmes54@gmail.com>
3546         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
3547           reserving 32 bytes on the stack when making calls. 
3549         Contributed under MIT/X11 license.
3551 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
3553         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3554         the linear IL branch.
3556         * driver.c: Print out more information for --version on arm.
3558 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
3560         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3561         bb_exit instead, since out of line bblocks might not actually be emitted
3562         out-of-line.
3563         
3564         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3565         maximum epilog size for out of line bblocks if tracing is enabled.
3567         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3569 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
3571         * arrays.cs: Regression tests for allocating arrays with negative sizes.
3573 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
3575         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3576         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
3577         opcodes.
3579 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
3581         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3582         the 'value' to store is a constant.
3584         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
3586         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
3587         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
3589 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
3591         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
3592         for accessing method->generic_container.
3594 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
3596         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
3597         
3598         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
3600         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
3602         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
3603         fails.
3605 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
3607         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
3609         * mini.c: Handle the case when mono_class_vtable () fails.
3611 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
3612         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
3613         the stat profiler.
3615 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3617         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
3618         together with domain sharing.
3620 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3622         * mini.c: Treat callvirts to final methods like non-virtual calls
3623         when doing generic sharing, i.e. look them up in the runtime
3624         generic context.
3626 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3628         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
3629         with computed types (for generic sharing).
3631         * mini.c: Generic sharing for mkrefany and refanyval.
3633 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
3635         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
3636         possible.
3638         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
3639         the generic sharing code.
3640         
3641         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
3642         when needed.
3644 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3646         * mini.h: Remove the declaration of mono_aot_init_vtable ().
3648 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
3650         * driver.c: updated copyright date
3652 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3654         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3655         needed.
3657 2008-05-19  Martin Baulig  <martin@ximian.com>
3659         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3660         pointing to the new `_mono_debug_using_mono_debugger' variable.
3662         * driver.c
3663         (mono_main): Check mono_debug_using_mono_debugger() rather than
3664         the `MONO_INSIDE_MDB' environment variable to check whether we're
3665         inside the debugger.
3667 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
3669         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3670         argument.
3672 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
3674         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3676         * mini.c: Added mini_assembly_can_skip_verification. This
3677         function checks if the assembly requested to skip verification. 
3678         Fixes part of #387274.
3680 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
3682         * mini.c (mini_get_method): Disable the check for open generic classes when
3683         using generic sharing.
3685         * generics.cs: Add a test for #387034.
3687         * mini.c (mini_get_method): Check whenever the method class is an open generic
3688         type, and return NULL in that case, causing a verification error. Fixes
3689         #384123.
3691 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3693         * driver.c (mono_main): Revert r102623. The right
3694         thing to do is to enable the verifier under verifiable
3695         unless a --security flag was passed.
3697         We need this non-trivial behavior for --verify-all otherwise
3698         mcs-compileall won't be able to use it. As it needs everything to
3699         be verified under validil.
3701 2008-05-06  Martin Baulig  <martin@ximian.com>
3703         Fix #383749.
3705         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3706         (mono_debugger_thread_cleanup): Likewise.
3707         (mono_debugger_extended_notification): Likewise.
3709 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3711         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3712         against both inflated and non-inflated methods. We need to check against the
3713         generic definition for cases where the instantiated method is not visible.
3714         We need to check against the inflated types for cases where the instantiation
3715         changes any super type. This fixes #382986.
3717         Note that this doesn't need to be applied to other parts of mono_method_to_ir
3718         that check for visibiliy as generic params only appears as the type subject
3719         of tokens on call opcodes. Field manipulation and ldftn must always
3720         target an exact type.
3722 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3724         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3725         if no related --security flag is passed.
3727 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3729         * mini-arch.h: Prepare support for ppc64.
3731         Contributed under MIT/X11 license.
3733 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3735         * aot-runtime.c: Prepare support for ppc64.
3737         Contributed under MIT/X11 license.
3739 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3741         * mini-ops.h: Prepare support for ppc64.
3743         Contributed under MIT/X11 license.
3745 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
3747         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3749         Contributed under MIT/X11 license.
3751 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
3753         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3754         assemblies, since aot_name is not a full path, causing us to load MS.NET 
3755         assemblies on windows.
3757 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
3759         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3760         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3761         * main.c: Use UTF-8 encoded command line instead of Windows default code
3762         page on Windows to support Unicode.
3763         * driver.c (DllMain): New function for mixed-mode assembly support.
3764         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3765         export __stdcall functions without decoration.
3767         Contributed under MIT/X11 license.
3769 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3771         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3772         saving it very early.
3774 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3776         * mini.h, mini.c: Lots of code for accessing the old RGCTX
3777         deleted.  The only way to access the new RGCTX is via the
3778         trampline.
3780         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3781         vtable instead of the RGCTX to static methods.
3783         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3784         accessing the new RGCTX.
3786         * generic-sharing.c: There is no separation between self, type
3787         arguments and other types in the RGCTX anymore.
3789 2008-04-25  Jonathan Chambers <joncham@gmail.com>
3791         * mini-amd64.c (add_general): Remove previous stack adjustment.
3792         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3793         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3794         for 32 bytes of stack space reserved for all calls.
3795         
3796         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
3797         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
3798         adjustment.
3799         
3800         Code contributed under MIT/X11 license.
3802 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
3804         * mini.c (mini_method_verify): Only verify non-inflated methods, check
3805         against the root definition, peeling out method and type instantiations.
3806         Cache verify success results, code that fails verification is still
3807         checked multiple times.
3809 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
3811         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
3813 2008-04-23  Jonathan Chambers <joncham@gmail.com>
3815         * mini-amd64.c (add_general): Always increment stack on Win64.
3816         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
3817         on Win64.
3818         
3819         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
3820         stack based argument handling on Win64.
3821         
3822         Code contributed under MIT/X11 license.
3824 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
3826         * Makefile.am (version.h): Add support for git-svn.
3828 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
3830         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
3831         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
3832         avoiding allocations and libc functions which might deadlock.
3833         
3834         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
3835         'no-gdb-backtrace' option is set.
3837         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
3839         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
3841 2008-04-21  Martin Baulig  <martin@ximian.com>
3843         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
3844         and `get_lmf_addr'; `notification_address' is no longer a pointer.
3846 2008-04-21  Martin Baulig  <martin@ximian.com>
3848         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
3849         `thread_vtable', `event_handler_ptr' and `event_handler'.
3851 2008-04-21  Martin Baulig  <martin@ximian.com>
3853         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
3854         allows delayed initialization of the `executable_code_buffer' when
3855         attaching.
3857 2008-04-21  Martin Baulig  <martin@ximian.com>
3859         * mini.h (mono_debugger_create_notification_function): Removed.
3860         * tramp-*.c (mono_debugger_create_notification_function): Removed.
3862         * mdb-debug-info64.s
3863         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3865         * mdb-debug-info32.s
3866         (MONO_DEBUGGER__notification_function): Added this in the .text section.
3868         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
3869         currently only works on x86 and x86_64, so don't create it on ppc.
3871 2008-04-21  Martin Baulig  <martin@ximian.com>
3873         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
3875         * mini.c
3876         (mini_method_compile): In the fp elimination check, check
3877         `debug_options.mdb_optimizations' in addition to
3878         mono_debug_using_mono_debugger().       
3880         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
3881         disable some JIT optimizations which are only disabled when
3882         running inside the debugger.
3883         Added `--help-debug' option to describe the debugging options.
3884         (parse_debug_options): New static function to parse the `--debug'
3885         options, so we can easily add more stuff in future.
3887 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
3889         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
3890         the method has no body.
3892 2008-04-19  Jonathan Chambers <joncham@gmail.com>
3894         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
3895         assembly is not allowed in MSVC 64-bit compiler. 
3896         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
3897         as we get floating point exceptions everywhere.
3898         
3899         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
3900         correctly align arguments for call to throw_exception.
3901         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
3902         
3903         Code contributed under MIT/X11 license.
3905 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
3907         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
3909 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
3911         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
3913         * mini-amd64.c (NEW_INS): Set cil_code.
3915         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
3916         from mini-amd64.c so all debugger related logic is in one place.
3918         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
3919         later won't have a random ip assigned to them.
3921 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
3923         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
3924         the arch specific function initializes code_size.
3925         (mono_create_delegate_trampoline): Ditto.
3927         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
3928         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
3929         platforms.
3931         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
3932         running under the debugger.
3934         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
3935         debugger.
3937         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
3938         debugger. Also move the disabling of optimizations here from driver.c.
3939         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
3940         debugger.
3942         * mini.h (MonoCompile): Add a few new flags.
3944 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
3946         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
3947         so the cil_code field of created MonoInst's is properly set.
3948         (mini_select_instructions): Ditto.
3950         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
3951         (MONO_INST_NEW_CALL): Ditto.
3953         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
3954         in many places so the ins->cil_code field is properly initialized.
3956         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
3957         place.
3959 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
3961         * mini.c (mini_method_compile): Print a different message when compiling a 
3962         shared method.
3963         
3964         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
3965         > 1.
3967 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3969         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
3970         SSE2 instructions.
3972         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
3973         
3974 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
3976         * mini.c (handle_stack_args): Make this return void since its return value was
3977         never used. Also set cfg->unverifiable for invalid IL instead of calling
3978         G_BREAKPOINT ().
3980 2008-04-10  Mark Probst  <mark.probst@gmail.com>
3982         * mini.c: Make sure "this" is live in catch clauses with type
3983         variables in shared generic code.
3985 2008-04-08  Mark Probst  <mark.probst@gmail.com>
3987         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
3988         generic_class_is_reference_type() to ensure the proper behaviour
3989         when sharing generic code and the type in question is a type
3990         argument.
3992 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
3994         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
3995         race conditions when printing thread dumps. Fixes #377738.
3997 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
3998         
3999         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
4000         shows up when both MonoInst arguments can cause aliasig.
4001         There is likely no way in the current JIT to trigger this problem, but
4002         it showed up in the development of generics sharing, when in a new
4003         opcode both args of an OP_GROUP can be aliases (addresses of a local).
4004         When the generics sharing code will be committed, its tests will be
4005         valid also for this bug.
4007 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4009         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
4010         PATCH_INFO_METHOD.
4012         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
4013         NULL.
4015 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
4017         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
4018         use a more detailed exception message for InvalidCastException.
4020         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
4022         * driver.c (mono_main): Add --debug=casts option to turn on better 
4023         InvalidCastException message details.
4025         * mini.c (mini_get_debug_options): New helper function to return the address of
4026         the debug_options variable.
4028         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
4029         the jit_tls TLS variable.
4031         * mini.c (mono_jit_tls): New TLS variable.
4033         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
4034         option is used.
4036 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
4038         * mini.h: Removed verifer related stuff. This code was moved to verify.c
4040         * mini.c: Removed verifer related stuff, code moved to verify.c.
4042         * driver.c: Using code from verify.c instead of mini.c.
4044 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
4046         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
4047         longer valid.
4049 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
4051         * mini.c (check_for_method_verify): Enabling verification of
4052         corlib if mono_verify_all is set. Bugs in the verifier preventing that
4053         have been fixed.
4055 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
4057         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
4058         caller saved registers as well.
4059         
4060         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
4061         saved registers as well.
4063 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
4065         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
4067         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
4068         code.
4070 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
4072         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
4073         to get_call_info.
4074         (get_call_info): Take a gsctx argument instead of 'cfg'.
4076 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
4078         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
4079         mono_verify_all is set.
4081         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
4083         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
4085 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
4087         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
4088         an exception.
4090         * driver.c mini.c mini.h: Add a --verify-all development option to test the
4091         verifier and the code generated by the compiler.
4093 2008-03-25  Mark Probst  <mark.probst@gmail.com>
4095         * mini.c: Generic sharing of the non-nullable case of the box
4096         instruction.
4098 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
4100         * inssel.brg: Fix the build.
4102         * iltests.il.in: Add a test for lconv.ovf.u8.un.
4104 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
4106         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
4107         Array:Address. Fixes #372410.
4109         * iltests.il.in: New tests for readonly prefix.
4111 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
4113         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
4114         mini-trampolines.c.
4116         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
4117         mini-exceptions.c.
4119         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
4120         
4121         * mini.c (mono_decompose_op_imm): New helper function.
4123         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
4124         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4125         return value.
4127         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4128         mono_arch_output_basic_block. Fix warnings.
4130         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
4131         for now.
4133 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
4135         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
4136         since the extra frame is now detected automatically inside the loop.
4138         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
4139         opts which are now in mono_peephole_ins ().
4140         
4141         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
4143         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
4144         frames and skip duplicate managed-to-native frames. Fixes #367665.
4146         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4147         opts which are now in mono_peephole_ins ().
4148         (mono_arch_peephole_pass_2): Ditto.
4150         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
4152         * mini-codegen.c (mono_peephole_ins): New helper function containing the
4153         arch independent peephole optimizations.
4155         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4156         opts which are now in mono_peephole_ins ().
4158         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
4159         
4160         * mini-s390.c (mono_arch_output_basic_block): Fix build.
4162         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
4163         pattern.
4165         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
4166         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
4167         opcode. 
4169 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
4171         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
4172         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4173         return value.
4175         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4176         mono_arch_output_basic_block. Fix warnings.
4178 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4180         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4181         conv.ovf.u.un.
4183 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4185         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4186         conv.ovf.u.un.
4188         * iltests.il: Add new tests.
4190 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
4192         * mini.c: Removed Windows version macros.
4194 2008-03-20  Mark Probst  <mark.probst@gmail.com>
4196         * generic-sharing.c: Put reflection types in the extensible part
4197         of the runtime generic context.
4199         * mini.c: Generic sharing of the GetTypeHandle special case of the
4200         ldtoken instruction.
4202 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4204         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
4206         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
4207         
4208         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
4209         consistency with the other version on the linear IR branch.
4211         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
4213         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
4215         * iltests.il.in: Add new tests.
4217 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
4219         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
4221         * iltests.il.in: Add new tests.
4223 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4225         * mini.c: Two variables with the same name were declared in
4226         nesting contexts and one wasn't initialized.  Fixed.
4228 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4230         * mini.c: Generic sharing of the initobj instruction.
4232 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4234         * mini.c: make the test to optimize ldtoken from typeof() more
4235         precise.
4237 2008-03-18  Mark Probst  <mark.probst@gmail.com>
4239         * mini.c: Generic sharing of the initobj instruction for reference
4240         types.
4242 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4244         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
4245         the mono_breakpoint_clean_code() code to perform bound checks.
4247 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
4249         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
4250         mono_arch_patch_callsite() to include the start of the managed method
4251         to be able to perform bound checks.
4253 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4255         * mini.c: Generic sharing for the isinst instruction.
4257 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4259         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4260         inssel-long32-mips.brg: Added opcodes for doing indirect calls
4261         with the runtime generic context argument.
4263         * mini.c: Share calls to several types of unsharable methods by
4264         putting the address of the method code in the runtime generic
4265         context and doing an indirect call.
4267         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4268         to switches.
4270 2008-03-16  Mark Probst  <mark.probst@gmail.com>
4272         * generic-sharing.c: Change due to a change in the runtime genric
4273         context API.
4275 2008-03-15  Martin Baulig  <martin@ximian.com>
4277         * tramp-x86.c
4278         (mono_arch_nullify_class_init_trampoline): Add call to
4279         mono_breakpoint_clean_code() to make things work when running
4280         inside the debugger.
4282         * tramp-amd64.c
4283         (mono_arch_nullify_class_init_trampoline): Add call to
4284         mono_breakpoint_clean_code() to make things work when running
4285         inside the debugger.
4287 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4289         * inssel-long.brg (reg): Fix 64 bit build.
4291 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4293         * mini.c, mini.h: Share static generic code by passing it an
4294         implicit argument pointing to the runtime generic context.
4296         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4297         inssel-long32-mips.brg: New opcodes for calling shared static,
4298         which need to be passed the runtime generic context.
4300         * mini-amd64.c, mini-x86.c: Save the runtime generic context
4301         argument on the stack in the prologue if needed.  New function for
4302         finding the runtime generic context argument from the registers
4303         saved by the trampoline.
4305         * mini-amd64.h, mini-x86.h: Specify which register to use for the
4306         runtime generic context argument.
4308         * tramp-amd64.c: Also restore the register used for the runtime
4309         generic context argument.
4311         * mini-trampoline.c: Resolve shared static calls by consulting the
4312         runtime generic context via the new argument.
4314         * generic-sharing.c: Add an argument to sharability-checking
4315         functions that specifies whether type variables should be treated
4316         as sharable type arguments.
4318         * inssel-x86.brg: Removed a superfluous, buggy rule.
4320         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4321         to switches.
4323 2008-03-14  Martin Baulig  <martin@ximian.com>
4325         * debug-debugger.c (main_thread_handler): Call
4326         mono_runtime_run_main() without sending any notifications.
4328         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
4330 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4332         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
4334 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4336         * tramp-x86.c: Fixed register restore offsets in the trampoline
4337         code for ECX and EDX.
4339 2008-03-12  Geoff Norton  <gnorton@novell.com>
4341         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
4342         different ucontext_t implementations.
4343         * exceptions-arm.c: Use the above defines to get exceptions working on 
4344         iPhone (based on a patch by Luke Howard lukeh@padl.com)
4345         * mini-arm.c: Implement iPhone icache support (based on a patch by
4346         Luke Howard lukeh@padl.com)
4348 2008-03-12  Mark Probst  <mark.probst@gmail.com>
4350         * mini.c: Enable generic sharing of calls to non-static
4351         non-interface non-generic non-value-type methods.
4353         * mini-trampolines.c: Resolve calls from shared generic code.
4355 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
4357         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
4359         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
4361 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
4363         * mini.c: some fixes for the AOT compiler.
4365 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4367         * cpu-amd64.md: Add clob:1 to some float opcodes.
4369 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
4371         * mini.h: Added MiniVerifierMode enumeration.
4373         * mini.c: Added mini_verifier_set_mode to control
4374         the usage of the new verifier.
4376         * mini.c (mono_method): Integrated the new verifier.
4378         * driver.c: Extended --security option with validil and
4379         verifiable options to activate the new verifier.
4381 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4383         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
4384         optimization to ctors taking 0 or 2 arguments too.
4386         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
4387         a bit.
4389         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
4391         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4393 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
4395         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4396         non-aot case as well.
4398         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4400         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4401         changes.
4403         * aot-compiler.c (encode_patch): Ditto.
4405         * mini.h (G_MININT32): Fix the definition of this.
4407 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
4409         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4411         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4413 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4415         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
4416         methods returning vtypes in registers.
4417         (mono_arch_allocate_vars): Ditto.
4419         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4421         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
4423         * generics.cs: Add a test from the linear IR branch.
4425         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4427         * mini.c (inline_method): Cache failed inline attempts.
4429 2008-03-04  Mark Probst  <mark.probst@gmail.com>
4431         * mini.c: For shared methods of generic classes put the location
4432         of "this" into the MonoGenericJitInfo.
4434         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4435         register out of a MonoContext by register number.  Add the generic
4436         sharing context as an argument to mono_arch_find_this_argument().
4438         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4439         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4440         for new arch function.
4442         * mini-exception.c: Handle open exception clauses in shared
4443         generic code.
4445         * mini-trampolines.c: Supply additional argument to
4446         mono_arch_find_this_argument().
4448 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4450         * Makefile.am (regtests): Run the bench.exe tests last.
4452 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
4454         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4455         a bit.
4457 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
4459         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4460         with MS.
4462         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4463         
4464         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4466         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4467         whose class has no cctor.
4469         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4471 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
4473         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4474         unverified.
4476 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
4478         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4479         to be in sync with the code on the linear IR branch.
4481         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4483         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4485 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
4487         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4489         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4491         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4493         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4495         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4496         
4497         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4498         body.
4500 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
4502         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4503         OP_LOADR4_MEMBASE emission.
4505         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4506         (mono_spillvar_offset_float): Ditto.
4508         * mini-mips.c (mono_arch_emit_prolog): Ditto.
4510         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
4511         emission.
4513         * basic-long.cs: Add regression tests for them.
4515         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
4516         use.
4517         (mono_arch_allocate_vars): Fix representation of single-precision float
4518         argument.
4519         (mono_arch_output_basic_block): Ditto.
4521         * inssel-mips.brg: Ditto, remove duplicate items.
4523         * mini-mips.c (emit_load_volatile_arguments): New function to handle
4524         arguments of tail calls as on other platforms.
4525         (mono_arch_output_basic_block): Handle tail calls.
4527         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4528         register.
4530         * objects.cs (test_5_pass_static_struct): Add test for it.
4532         Contributed under MIT/X11 license.
4534 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
4536         * Makefile.am: Use gmcs for compiling the regression tests.
4538         * *.2.cs *.2.il: Rename to *.cs and *.il.
4540 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
4542         * regalloc.h: Make the vassign array smaller.
4544         * mini.c (mini_method_compile): Remove an unused field in cfg.
4546         * mini-codegen.c: Add a bunch of micro optimizations.
4548 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
4550         * regalloc.h: Remove some unused fields.
4552 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
4554         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4556         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4558 2008-02-22  Mark Probst  <mark.probst@gmail.com>
4560         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4562         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4563         trampoline: Fetch an entry from the runtime generic context.  If
4564         it's NULL, jump to the actual trampoline to fill the runtime
4565         generic context.  Otherwise, return it.
4567         * mini.c: Call the lazy fetch trampoline to get entries out of the
4568         runtime generic context.
4570         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4571         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4572         tramp-sparc.c: Stubs for the lazy fetch trampoline.
4574 2008-02-21  Mark Probst  <mark.probst@gmail.com>
4576         * mini.c: Fetch data out of the extensible part of the runtime
4577         generic context instead of calling a helper function.
4579         * generic-sharing.c: Some functions moved into
4580         metadata/generic-sharing.c.  Helper function for fetching other
4581         types now checks and asserts against extensible rgctx (just for
4582         debugging purposes - the helper function isn't called anymore
4583         unless for debugging).
4585 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4587         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
4588         for tail calls up to the point that the tests in iltests.exe run. Also add a
4589         dummy CKFINITE implementation.
4590         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
4591         needed for trampoline LMF frames.
4593         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
4594         trampoline LMF frames.
4596 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
4598         * mini.c (inline_method): clean any pending loader error when inlining fail.
4599         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
4601 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4603         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
4605         * aot-runtime.c (decode_patch_info): Ditto.
4607         * mini.c (mono_resolve_patch_target): Ditto.
4608         
4609         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
4610         icall wrappers.
4612         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
4613         
4614         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
4615         if it references an icall address.
4617 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
4619         * cpu-s390x.md: Remove some more unused opcodes.
4620         
4621         * cpu-s390x.md: Remove some unused opcodes.
4623         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
4624         mono_op_imm_to_op ().
4626         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
4627         instead of a switch statement.
4628         
4629         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
4630         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
4632         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
4633         
4634         * mini-codegen.c: Remove unused mono_regstate2_... functions.
4636         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
4637         -1.
4639 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
4641         * driver.c (mono_main): Improve error reporting when an assembly cannot be
4642         opened. Fixes #362607.
4644         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4646         * iltests.il.in: Add a test for static methods in interfaces.
4648 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
4650         * genmdesc.c (build_table): Fix a crash on older glib versions.
4652         * cpu-sparc.md: Remove some unused opcodes.
4653         
4654         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
4655         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4657         * cpu-amd64.md: Remove some unused opcodes.
4659         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4660         like the other opcodes.
4662 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
4664         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4666         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4668         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4669         variables 'cfg' instead of 'm' for consistency.
4671         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4673         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4674         argument holding the vtype return address, to avoid the ambigious use of
4675         cfg->ret for this purpose.
4677         * mini.c (NEW_RETLOADA): Use vret_addr if set.
4679         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4680         
4681         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4682         new mono_print_ins () function which only takes one argument.
4684 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
4686         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4687         macro arguments.
4689 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
4691         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4693         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4695         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
4696         opcodes and other small changes.
4698         * mini-ops.h: Add some new opcodes from the linear IR branch.
4700         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4702         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4703         opcodes, use the REG_MEMBASE opcodes instead.
4704         
4705         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4706         opcodes, use the REG_MEMBASE opcodes instead.
4707         
4708         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4709         linear IR branch.
4711         * mini.c (mono_op_imm_to_op): New helper function.
4713         * mini-ops.h: Add some opcodes from linear IR branch.
4715 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
4717         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
4718         <tsv@solvo.ru>.
4720 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
4722         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
4723         OP_ICONV_TO_R4/R8.
4725         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4727 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
4729         * aot-compiler.c (emit_method_code): Add an assert.
4731         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4732         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4733         methods.
4735 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
4737         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
4738         some load/store opcodes so they are consistent. 
4739         (mono_arch_emit_prolog): Simplify some code.
4741         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4743         * objects.cs: Add tests for large argument offsets on ARM.
4745         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
4746         stack offsets. Fixes #359651.
4748         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4750         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4752         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4754         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4756         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4758         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4759         rid of CEE_CONV_R_UN.
4761         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4763 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
4765         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4767         * mini.c (mono_normalize_opcodes): Add some more opcodes.
4769         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4771         * cpu-amd64.md: Remove some unused opcodes.
4773         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4775         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4777         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
4778         arch specific functions for its parts. Call the peephole pass after local
4779         regalloc so the prolog can compute a more accurate max_offset.
4780         
4781         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4782         the corresponding OP_I/OP_L opcodes.
4784         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4786         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4788 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4790         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4791         as they are handled in mini.c.
4793         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4794         
4795         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
4796         case since it is handled in mini.c.
4798         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
4800         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
4802         * *.c: Use the new opcodes in the IR and back end code.
4804         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
4806         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
4808 2008-02-06  Mark Probst  <mark.probst@gmail.com>
4810         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
4811         an assert because it has a race condition.
4813 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4815         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
4817         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
4819         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
4821         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
4822         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
4824 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
4826         * cpu-amd64.md (move): Correct the maximum size of move.
4828 2008-02-05  Mark Probst  <mark.probst@gmail.com>
4830         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
4831         the generic class init trampoline to return quickly if the class
4832         is already inited.
4834 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
4836         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
4837         issues where an 32 bit callsite cannot be patched by a 64 bit address.
4839 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
4841         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
4842         branch.
4844 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
4846         * objects.cs: Add some soft-float tests.
4848         * mini.c: Fix a couple more soft-float issues.
4850         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
4852         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
4853         avoid a REX prefix.
4855 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
4857         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
4858         exception happens while compiling a virtual method.
4860 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
4862         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
4863         
4864         * mini-sparc.c: Fix build.
4866         * mini-sparc.c (get_call_info): Add support for generic sharing.
4868         * mini-exceptions.c: Add a FIXME.
4870 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
4872         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
4873         altstack handling code.
4875         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
4876         
4877         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
4879         * mini-s390.c: Add support for generic sharing.
4881         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4882         Fix CAS on s390.
4883         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4885         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
4887         * mini-s390x.c: Add support for generic sharing.
4888         
4889         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
4890         Fix CAS on ia64.
4891         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
4893         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
4894         can be used since it takes a 16 bit signed immediate.
4896         * inssel-s390x.brg: Fix OP_SETRET.
4898         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
4900         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
4902         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
4904         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
4906         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
4907         in one place.
4909         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
4910         stuff.
4912         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
4913         of the unused mono_arch_patch_delegate_trampoline stuff.
4915 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
4917         * basic-long.cs: Move the fp related tests to basic-float.cs.
4919         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
4921         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
4923         * basic-calls.cs: Add a test for proper float argument passing.
4925         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
4926         if the context corresponds to an exception received through a signal.
4928         * exceptions.cs: Add a test for nullref handling at the start of a try
4929         clause.
4931         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
4933         * jit-icalls.c (mono_break): New JIT icall.
4935         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
4937         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
4939 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
4941         * cpu-*.md: Get rid of unused opcodes.
4943         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
4945         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
4946         by all platforms.
4948         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
4949         define.
4951         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
4952         the arch independent trampoline code in mini-trampolines.c.
4954         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
4956         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
4958         * mini-s390.h: Remove an unused define.
4959         
4960         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
4961         the arch independent trampoline code in mini-trampolines.c.
4963         * mini-arm.c (mono_arch_emit_prolog): Fix build.
4965 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
4967         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
4969         * mini-s390.c (mono_arch_emit_prolog): Fix build.
4971         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
4973         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
4975         * cpu-amd64.md: Use smaller sizes for int opcodes.
4977         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
4979         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
4980         objects.cs.
4982         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
4983         debugging.
4985         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
4986         instead of though a pointer to save an indirection when accessing elements of
4987         the array.
4989         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
4990         some typos.
4991         (NOT_IMPLEMENTED): New helper macro.
4992         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
4993         of a bb.
4995         * *.c: Use the new helper macro.
4997 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
4999         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
5001 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
5003         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
5004         stack slots.
5006 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
5008         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
5009         profiling is enabled.
5010         
5011         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
5012         the end.
5013         (mono_arch_emit_prolog): Add more first bblock optimizations.
5015         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
5016         in order if possible.
5017         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
5018         bblock, since the arguments are still in their original registers.
5020         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
5022 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
5024         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
5025         as well.
5027         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
5028         offset 0.
5030         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
5032         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
5033         process async exceptions received while in unmanaged code.
5035         * mini.c (mini_init): Install a callback with the runtime which will be called
5036         when a thread receives an async exception while in unmanaged code.
5038         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
5040         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
5042 2008-01-16  Wade Berrier  <wberrier@novell.com>
5044         * cpu-g4.md:
5045         * cpu-arm.md:
5046         * cpu-s390x.md:
5047         fix build
5049 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5051         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
5052         compilation with sun cc.
5054         * cpu-*.md: Fix the build.
5056         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
5058         * mini-amd64.h: Add some comments to the MonoLMF structure.
5060         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
5061         
5062         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
5063         in the LMF structure if possible. This saves two instructions in the
5064         managed->native wrappers.
5066         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
5068 2008-01-16  Mark Probst  <mark.probst@gmail.com>
5070         * generic-sharing.c: New type argument lookup code which uses the
5071         runtime generic context template.
5073 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
5075         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
5077         * mini-arm.c (add_general): Fix arm eabi parameter passing.
5078         (mono_arch_output_basic_block): Fix localloc implementation.
5080         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
5082         * mini-ia64.c (peephole_pass): Fix ia64 build.
5084         * mini-amd64.c (peephole_pass): Fix a warning.
5085         
5086         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
5087         at a constant offset from sp/fp.
5089         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
5090         instead of obtaining it from *lmf in the managed method case.
5092 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
5094         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
5096 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
5098         * mini.h (MonoInstList): New type.
5099         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
5100         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
5101         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
5102         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
5103         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
5104         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
5105         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
5106         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
5107         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
5108         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
5109         MONO_INST_LIST_FOR_EACH_ENTRY,
5110         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
5111         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
5112         mono_inst_list_first, mono_inst_list_last,
5113         mono_inst_list_next, mono_inst_list_prev): New instruction
5114         list handling interfaces.
5115         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
5116         list head 'ins_list'.
5117         (MonoInst): Replace next pointer with list head 'node'.
5118         (MonoCallInst): Make 'out_args' a MonoInstList.
5119         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
5120         (MonoCompile): Delete reverse_inst_list and
5121         reverse_inst_list_len.
5122         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
5123         mono_arch_lowering_pass, mono_arch_local_regalloc,
5124         mono_arch_output_basic_block, mono_arch_emit_prolog):
5125         Convert to new instruction lists.
5126         (insert_after_ins): Delete.
5127         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
5128         instruction lists.
5129         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
5130         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
5131         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
5132         mono_emulate_opcode, mono_emit_load_got_addr,
5133         inline_method, mono_method_to_ir, mono_print_bb_code,
5134         print_dfn, decompose_pass, nullify_basic_block,
5135         replace_out_block_in_code, remove_block_if_useless,
5136         merge_basic_blocks, move_basic_block_to_end,
5137         try_unsigned_compare, optimize_branches, mono_print_code,
5138         mini_select_instructions, remove_critical_edges): Likewise.
5139         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
5140         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
5141         mono_arch_output_basic_block, mono_arch_emit_prolog):
5142         Likewise.
5143         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
5144         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5145         mono_arch_output_basic_block): Likewise.
5146         (inst_list_prepend, insert_after_ins): Delete.
5147         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
5148         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
5149         instruction lists.
5150         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
5151         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
5152         mono_arch_emit_prolog): Likewise.
5153         * cfold.c (mono_constant_fold): Likewise.
5154         * liveness.c (visit_bb, mono_analyze_liveness,
5155         optimize_initlocals): Likewise.
5156         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
5157         * graph.c (mono_draw_code_cfg): Likewise.
5158         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
5159         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
5160         mono_ssa_cprop): Likewise.
5161         * abcremoval (get_relations_from_previous_bb, process_block):
5162         Likewise.
5163         * local-propagation (mono_cprop_invalidate_values,
5164         mono_local_cprop_bb): Likewise.
5165         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
5166         peephole_pass, mono_arch_output_basic_block,
5167         mono_arch_emit_prolog): Likewise.
5168         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
5169         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5170         mono_arch_emit_prolog): Likewise.
5171         (insert_after_ins): Delete.
5172         * aliasing.c (print_code_with_aliasing_information,
5173         mono_build_aliasing_information, mono_aliasing_deadce):
5174         Convert to new instruction lists.
5175         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
5176         peephole_pass, NEW_INS, mono_arch_lowering_pass,
5177         mono_arch_local_regalloc, mono_arch_output_basic_block):
5178         Likewise.
5179         (insert_after_ins): Delete.
5180         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
5181         peephole_pass, mono_arch_output_basic_block): Convert to
5182         new instruction lists.
5183         * mini-codegen (InstList, inst_list_prepend,
5184         insert_after_ins): Delete.
5185         (insert_before_ins, get_register_force_spilling,
5186         get_register_spilling, free_up_ireg, free_up_reg,
5187         create_copy_ins, create_spilled_store, alloc_int_reg,
5188         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
5189         to new instruction lists.
5190         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
5191         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5192         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
5193         (insert_after_ins): Delete.
5194         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
5195         mono_arch_local_regalloc, mono_arch_output_basic_block,
5196         mono_arch_call_opcode): Convert to new instruction lists.
5197         (insert_after_ins): Delete.
5198         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
5199         peephole_pass, mono_arch_output_basic_block,
5200         mono_arch_emit_prolog): Convert to new instruction lists.
5202 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
5204         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
5206         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
5207         Fixes #353182.
5209         * Makefile.am (version.h): Make this work with non-bash shells.
5211 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
5213         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
5215 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
5217         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
5218         the InitializeArray optimization.
5220 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
5222         * mini.c driver.c: Don't include os/gc_wrapper.h.
5224 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
5226         * mini.c (print_jit_stats): Print GC statistics if available.
5228 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
5230         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
5232 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
5234         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
5236 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
5238         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
5239         
5240         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5242         * driver.c (mono_main): Ditto.
5244 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
5246         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
5248         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
5249         in the vtable can't be encoded.
5250         (compile_method): Ditto.
5252 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
5254         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
5255         defined.
5257         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
5258         lmf->rbp.
5260         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
5261         the top LMF entry belongs to the current method.
5263         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
5265 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
5267         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
5268         
5269         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
5271         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
5273         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
5275         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
5277         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
5278         implementation.
5280         * basic-float.cs: Add an ulong->double cast test.
5282 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
5284         * mini.c (mono_method_to_ir): Fix a warning.
5286 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
5288         * mini-ops.h: Add OP_SWITCH.
5290         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
5291         CEE_SWITCH in back-end code, use OP_SWITCH instead.
5293 2007-12-11  Geoff Norton  <gnorton@novell.com>
5295         * mini-s390x.c: Minor change to the MAX() define to allow
5296         it to compile with other gcc versions.
5298 2007-12-11  Geoff Norton  <gnorton@novell.com>
5300         * cpu-s390x.md:
5301         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
5303 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5305         exceptions-arm.c (mono_arch_get_restore_context): Restore
5306         the frame pointer.
5308         exceptions-arm.c (throw_exception): Save the frame pointer.
5309         This is a partial fix for #323747. Only the client side is
5310         fixed.
5312 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5314         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
5315         was using an unrelated variable to log the class which
5316         needed the cctor to be called. This was crashing on arm.
5318 2007-12-09  Robert Jordan  <robertj@gmx.net>
5320         * mini-x86.c (mono_arch_emit_epilog):
5321         Consider all kinds of 64-bit types. Fixes #323114.
5323 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
5325         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
5327 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5329         * mini-amd64.c (peephole_pass): Add a missing instruction check.
5331 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5333         * mini.c: run type ctor before allocating an object, not only
5334         when running it's constructor method (fixes at least part of bug #342507).
5336 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5337         
5338         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
5339         
5340         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
5341         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
5342         function.
5344         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
5345         mono_generic_class_init_trampoline () the same as it is done with the other
5346         trampolines.
5348         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
5349         aot-runtime.c aot-compiler.c: Implement AOT support.    
5351 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5353         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
5354         build for archs which don't have the vtable trampoline defined
5355         yet.
5357 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5359         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
5361         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
5363         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
5365         * tramp-<ARCH>.c: Use the new helper function.
5367 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5369         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
5370         trampoline call, which takes a vtable argument.
5372         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
5373         OP_TRAMPCALL_VTABLEs like other calls.
5375         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
5376         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
5377         call.  Implemented a support function which fetches the vtable
5378         from a register set.
5380         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
5381         Implemented a generic class init trampoline, using the
5382         OP_TRAMPCALL_VTABLE opcode.
5384         * mini.c: Implemented static field access when sharing generic
5385         code.  This implies initing the class using the new
5386         OP_TRAMPCALL_VTABLE call.
5388 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5390         * mini.c: Don't compile methods with sharing enabled if their
5391         classes are disabled for sharing.
5393 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5395         * inssel.brg: Add a missing sign extension to the GETCHR and array access
5396         opcodes. Fixes #346563.
5398         * objects.cs: Add a new test.
5400         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5402         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5403         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5405 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5407         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5409 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
5411         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5412         code stream.
5414 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
5416         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5418         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
5419         optimization in the AOT case.
5420         
5421 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
5423         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5424         
5425         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5427         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5429         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5431         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5432         is created by the inlined delegate ctor.
5434         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
5436         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5438 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
5440         * cpu-x86.md: Fix the length of ckfinite.
5442 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
5444         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5445         
5446         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5447         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5449         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5451         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
5452         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5454 2007-11-28  Martin Baulig  <martin@ximian.com>
5456         * mini-x86.c
5457         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5458         after creating the trampoline.
5460 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
5462         * aot-runtime.c (load_aot_module): Check runtime version if needed.
5464         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5465         the same version.
5467         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5468         instead of the calling method to help AOT.
5470         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5472 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
5474         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5475         is defined.
5477 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
5479         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5480         
5481         * aot-compiler.c (compile_method): Correct check for generic method definitions.
5482         (encode_method_ref): No need to handle generic method definitions specially.
5484         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5486         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
5487         decode_klass_info.
5489         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5490         encode_klass_info.
5491         (compile_method): Enable generic sharing.
5493 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
5495         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5496         (mini_method_compile): Add preliminary support for AOTing shared generic code.
5498         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5499         generic code.
5501         * mini-trampolines.c: Fix a warning.
5503         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5504         NEW_PCONST.
5505         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5506         (generic_class_is_reference_type): Remove unused function.
5508         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5509         in the generic vtable trampoline case.
5511         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
5512         
5513         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
5514         return an AOT method based on a vtable slot.
5516         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
5518         * mini.c (mini_get_vtable_trampoline): Export this.
5520 2007-11-22  Martin Baulig  <martin@ximian.com>
5522         * debug-debugger.h
5523         (MonoDebuggerInfo): Move `debugger_version' up.
5525 2007-11-22  Martin Baulig  <martin@ximian.com>
5527         * mini-amd64.c
5528         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5530         * mini-trampolines.c
5531         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5532         after compiling the method.
5534 2007-11-20  Martin Baulig  <martin@ximian.com>
5536         * debug-mini.c
5537         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5538         (mono_debugger_remove_breakpoint): Likewise.
5539         (mono_debugger_check_breakpoints): Likewise.
5541         * debug-debugger.c: Implement the new breakpoint interface here.
5543 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
5545         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5546         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5548         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
5550 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
5552         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5554         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5555         mini.c.
5557         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5558         mini.c.
5560         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5561         returning a vtype in a register.
5563         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5564         here from the arch specific code.
5566         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5567         mini.c.
5569         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5570         (mono_arch_emit_prolog): Increment maximum prolog size.
5572         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5573         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5575         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
5576         MonoGenericSharingContext.
5578         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
5579         MonoGenericSharingContext. Allocate memory from the cfg mempool.
5581 2007-11-15  Mark Probst  <mark.probst@gmail.com>
5583         * mini.c, mini.h, generic-sharing.c: Functions for producing code
5584         which extract fields out of the runtime generic context.  Full
5585         sharing of the NEWARR opcode.
5587 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5589         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
5590         --enable-minimal=ssa.
5592 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
5594         * mini-trampolines.c (mono_delegate_trampoline): Update after 
5595         mono_marshal_get_delegate_invoke () signature change.
5597 2007-11-13  Mark Probst  <mark.probst@gmail.com>
5599         * mini.c: Removed the shared context in favor of the generic
5600         sharing context.  Allocate the MonoJitInfo structure with room for
5601         the generic sharing context if it's needed.
5603         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
5604         domain-internals.h now.
5606         * mini-x86.c: Pass the generic sharing context to get_call_info ().
5608         * generic-sharing.c: Several changes for working without a shared
5609         context and instead operating on open types instead.
5611 2007-11-12  David S. Miller  <davem@davemloft.net>
5613        * inssel-sparc.brg: Fix double instruction emit.
5615 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
5617         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
5618         Get/Set/Address methods.
5619         
5620         * mini.c debug-debugger.c mini-trampolines.c: Update after 
5621         mono_marshal_get_delegate_invoke signature change.
5623 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5625         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
5626         This can happens with dynamic methods. Fixes the other bug in #322722.
5628 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5630         * tramp-arm.c (mono_arch_patch_callsite): Support patching
5631         BX call sequence.
5633         * mini-arm.c (arm_patch): Implement patching of BX call
5634         sequence. Fixes one of the bugs in #322722.
5636 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
5638        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
5639        under Linux.  We only need to flush every 32-byte cache line.    
5641 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
5643         * mini.c:
5644         move_basic_block_to_end: Add branches when needed, eventually creating
5645         a new BB.
5646         optimize_branches: added a parameter that tells if it's ok to create
5647         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5648         and avoid calling move_basic_block_to_end when it's not ok.
5649         Fixes bug 318677.
5651 2007-11-07  Mark Probst  <mark.probst@gmail.com>
5653         * mini.c: Abort inlining call to InitializeArray if something
5654         looks wrong.  Let the icall handle it, which now has proper safety
5655         checks.
5657 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5659         * mini.c (mono_spill_call): add support for soft-float.
5661         * mini.c (mono_method_to_ir): add support for soft-float
5662         to inlined functions that return float.
5664         * mini.c (mono_method_to_ir): add support for soft-float
5665         to cee_stsfld opcode on float fields.
5667 2007-11-05  Geoff Norton  <gnorton@novell.com>
5669         * mini-x86.h: Fix the structure access for X86 Leopard.
5672 2007-11-05  Martin Baulig  <martin@ximian.com>
5674         * mini-trampolines.c
5675         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5676         after compiling the method to notify the debugger.
5678 2007-11-05  Martin Baulig  <martin@ximian.com>
5680         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5682 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
5684         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5685         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5687 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
5689         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5690         native-to-managed wrappers.
5691         
5692 2007-11-01  Geoff Norton  <gnorton@novell.com>
5694         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
5695         members.
5697 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5699         * mini.c, mini-x86.c: when getting back from unmanaged code
5700         to managed via a marshaled delegate we also need to set the
5701         right domain.
5703 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5705         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5706         for amd64.
5708 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5710         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5711         let the debugger or other external agents to tell the JIT when
5712         a sw breakpoint has been inserted in the code that the JIT needs
5713         to be able to inspect.
5715 2007-10-31  Martin Baulig  <martin@ximian.com>
5717         * debug-debugger.h
5718         (MonoDebuggerInfo): Remove `runtime_class_init'.
5720 2007-10-30  Martin Baulig  <martin@ximian.com>
5722         * debug-mini.h
5723         (mono_debugger_thread_created): Added `MonoThread *' argument.
5724         (mono_debugger_extended_notification): New public method.
5725         (mono_debugger_trampoline_compiled): New public method.
5727         * debug-mini.c
5728         (MonoDebuggerThreadInfo): Added `thread' and
5729         `extended_notifications' fields.
5731         * debug-debugger.c
5732         (debugger_executable_code_buffer): New static variable.
5734         * debug-debugger.h
5735         (MonoDebuggerInfo): Added `executable_code_buffer',
5736         `executable_code_buffer_size', `breakpoint_info_area',
5737         `breakpoint_table' and `breakpoint_table_size'.
5739 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
5741         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5742         that IP  either is an unused value or the vtable pointer. IMT 
5743         calls use vtable + offset now. Reduced by almost half the size
5744         of IMT entries.
5746 2007-10-26  Jonathan Chambers <joncham@gmail.com>
5748         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5749         defines to access param registers. Replace long usage with
5750         gsize as sizeof(long) != sizeof(void*) on Win64.
5752         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5753         on Win64. Fix intrinsic, use _AddressOfReturnAddress
5754         instead of non-existant _GetAddressOfReturnAddress.
5756         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
5757         param registers. Save/restore %rdi and %rsi in MonoLMF.
5759         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
5760         param registers. Modify (throw_exception) signature to take 
5761         %rdi and %rsi on Win64. 
5763         Code is contributed under MIT/X11 license.
5765 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5767         * helpers.c: unlink debugging output files.
5769 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
5771         * mini.c: Move mono_create_ftnptr () to object.c.
5773 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5775         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5776         optional. This function can now be used to disassemble code generated
5777         outside the JIT such as trampolines and IMT thunks.
5779         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5781         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5782         vtable pointer from a ldr instruction.
5784         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5785         new IMT call sequence.
5787         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5788         call sequence for interface invocations.
5790         * mini-arm.c (mono_arch_emit_imt_argument): added, required
5791         for imt support. This function is empty since IMT on ARM requires no
5792         special handling on the IR side.
5794         * mini-arm.c (mono_arch_find_imt_method): added, required for
5795         imt support.
5797         * mini-arm.c (mono_arch_find_this_argument): added, required
5798         for imt support.
5800         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
5801         a ldr instruction to load a value stored in the code stream.
5803         * mini-arm.c (mono_arch_build_imt_thunk):added, required
5804         for imt support.
5807 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
5809         * mini.c (mini_init): Install the jump trampoline callback.
5811 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5813         * mini-trampolines.c: handle synchronized methods with the common
5814         vtable trampoline (bug #335601).
5816 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
5818         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
5820         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
5821         64 bit platforms.
5823         * mini-ia64.h mini-ia64.c: Add support for IMT.
5825         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
5826         prolog. Fixes #331958.
5828 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
5830         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
5832 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5834         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
5835         trampoline.
5837 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5839         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
5840         trampoline.
5842 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
5844         * mini-x86.c, mini-x86.h: x86 support for the common vtable
5845         trampoline.
5847 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
5849         * mini-trampolines.c: changed the magic rampoline to understand
5850         the common vtable trampoline method: the method to invoke is
5851         determined by the vtable displacement of the call.
5853 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
5855         * mini.c, mini.h: register the common vtable trampoline if the
5856         architecture supports it.
5858 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5860         * cpu-amd64.md: use the correct max length for tls_get.
5862 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
5864         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
5865         CEE_STELEM_ANY. Fixes #333696.
5867 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
5869         * exceptions-x86.c: provide more graceful handling of the case where
5870         we followed a bogus function pointer from managed code (bug #332866).
5872 2007-10-11  Mark Probst  <mark.probst@gmail.com>
5874         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
5875         replaces the generic_shared flag and will carry more information
5876         in the future.
5878         * generic-sharing.c: Added mini_type_stack_size() which allows
5879         allows open types if given a generic sharing context.
5880         mini_get_basic_type_from_generic() takes a
5881         MonoGenericSharingContext* instead of a MonoCompile* now.
5883         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
5884         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
5885         mini-sparc.c, mini-x86.c: Trivial changes required by the two
5886         changes above.  Just passing arguments through to the right
5887         places.
5889 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
5891         * mini-arm.c: unify the call emission to emit_code_seq().
5893 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
5895         * tramp-arm.c: reduced the trampoline size.
5897 2007-10-10  Mark Probst  <mark.probst@gmail.com>
5899         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
5900         variable handling out of arch-specific code.
5902 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
5904         * mini-arm.c: implemented fast delegate dispatch.
5906 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5908         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
5909         that fp elimination is turned off if the space required by locals is too
5910         big. Fixes #331958.
5912 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
5914         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
5915         ARM to the new style trampoline.
5917 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
5919         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
5921         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
5923 2007-10-09  Martin Baulig  <martin@ximian.com>
5925         * debug-debugger.h
5926         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
5927         `field_info_offset_offset'.     
5929 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
5931         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
5932         removed more internal usage of the r11 register and made it available
5933         to the register allocator.
5935 2007-10-08  Mark Probst  <mark.probst@gmail.com>
5937         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
5938         when sharing generics and treat type variables as references.
5940 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
5942         * mini-ppc.c: started removing the internal uses of register r11
5943         to eventually allow the register allocator to manage it as an
5944         additional available register.
5946 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
5948         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
5950 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
5952         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
5953         specific trampolines as they are not performance critical as a jump
5954         target (maybe align as before only for AOT code?). This saves about
5955         200 KB of native code on x86 for monodevelop startup.
5957 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
5959         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
5960         monodevelop startup.
5962 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
5964         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
5966         * mini-sparc.h mini-sparc.c: Implement IMT support.
5968         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
5969         its smaller and doesn't clobber sparc_g1.
5971         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
5973 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
5975         * mini-ppc.c: optimized the size of the IMT thunks a bit.
5977 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
5979         * mini-ppc.c: implemented fast delegate invocation.
5981 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
5983         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
5985 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
5987         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
5988         code to the new style trampoline in preparation for IMT support.
5990 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
5992         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
5993         systems already. This also reduces the specific trampiline sizes and
5994         prepares for the use of r12 as the IMT identifier register.
5996 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
5998         * mini-mips.h: endianess fix (simplified from a patch by
5999         Thomas Kunze <thommy@tabao.de>, bug #323737).
6001 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6003         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
6004         to access ucontext fields and enable netbsd support
6005         (partially from Magnus Henoch <mange@freemail.hu>).
6007 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6009         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
6010         use the preprocessor from the CPP env var if it is set.
6012 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6014         * mini-trampolines.c: fixed an assertion and moved it earlier in the
6015         code, before interface_offset gets used.
6017 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
6019         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
6020         mono_class_setup_vtable () before accessing klass->vtable.
6022 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
6024         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
6025         hackish.
6027 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6029         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
6030         IMT slots (this saves hundreds of KB of memory in programs like
6031         IronPython and Monodevelop).
6033 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6035         * mini.c: print the delegate counter.
6037 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
6039         * mini-x86.c: make it easier to enable the debugging code for IMT
6040         slots.
6042 2007-09-28  Martin Baulig  <martin@ximian.com>
6044         * debug-debugger.h
6045         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
6046         `mono_method_klass_offset' and `mono_method_token_offset'.
6048 2007-09-20  Mark Probst  <mark.probst@gmail.com>
6050         * mini.c: First generics sharing implementation.  Can only share
6051         in very simple cases.  If sharing doesn't work it falls back to
6052         dedicated compilation.
6054         * mini.h: Flag in MonoCompile to specify whether generic
6055         compilation is shared.  Flags enum for marking which generic inst
6056         of a context is used.  Prototypes for helper functions.
6058         * generic-sharing.c: Helper functions for generic method sharing.
6060         * optflags-def.h: Optimization flag (gshared) for enabling generic
6061         method sharing added.
6063         * Makefile.am: generic-sharing.c added.
6065 2007-09-19 Daniel Nauck <dna@mono-project.de>
6067         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
6069 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
6070         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
6071         fixes bug 325507.
6073 2007-09-19  Martin Baulig  <martin@ximian.com>
6075         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
6076         mono_debug_cleanup() is now part of mono_cleanup().
6078 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
6080         * driver.c (mono_main): Fix a warning.
6082 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
6084         * aot-compiler.c: Optimize various parts when processing large assemblies.
6085         Fixes ##325568.
6087         * mini.c (mono_patch_info_hash): Improve hash function.
6089 2007-09-14  Jonathan Chambers <joncham@gmail.com>
6091         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
6092         
6093         Code is contributed under MIT/X11 license.
6095 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6097         * mini.c (mini_init): Fix a leak.
6099         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
6101 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6103         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
6105 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6107         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
6109 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
6111         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
6112         variance tests.
6114         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
6116         * mini.c (handle_alloc): Enable managed allocators in AOT code.
6118         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
6120         * aot-runtime.c (decode_patch_info): Ditto.
6122 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6124         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
6125         static case. Cache delegates in architecture specific code, 
6126         based on number of parameters.
6127         
6128         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
6129         in architecture specific code, based on number of parameters.
6130         
6131         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
6132         caching happen in architecture specific code now.
6133         
6134         Code is contributed under MIT/X11 license.
6136 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6138         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
6139         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
6140         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
6142         Code is contributed under MIT/X11 license.
6144 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6145         * mini.c: (mono_thread_abort) Fixed bug #82416.
6147 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6149         * mini.: hook the new managed GC allocation feature into the JIT.
6151 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6153         * mini.c: implementation for the new runtime tls opcode.
6155 2007-09-11  Martin Baulig  <martin@ximian.com>
6157         * debug-debugger.h
6158         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
6159         `mono_method_inflated_offset'.
6161 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
6163         * driver.c mini.h mini.c: Add a new devel command line option for injecting
6164         async exceptions into a method.
6166         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
6167         purpose of testing whenever the unwinder works at every instruction.
6169 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
6171         * mini.c: check accessibility of method used in ldftn (fixes
6172         bug #82635).
6174 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
6176         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
6178         * inssel.brg: Fix a warning.
6180 2007-09-03  Martin Baulig  <martin@ximian.com>
6182         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
6183         now takes the `main_method' as argument.
6185 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
6187         * cpu-sparc.md (endfilter): Add missing src1:i argument.
6189 2007-08-30  Jonathan Chambers <joncham@gmail.com>
6191         * driver.c: include the cil-coff.h header on Windows.
6192         
6193         Code is contributed under MIT/X11 license.
6195 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6197         * mini.c, driver.c: don't include the cil-coff.h header.
6199 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6201         * mini.c: flag places that needs fixes fo soft-float support.
6203 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
6205         * mini.h, inssel-float.brg: fix soft-float constant loads on big
6206         endian systems (partially from Dean Jenkins, bug #81924).
6208 2007-08-28  Mark Probst  <mark.probst@gmail.com>
6210         * mini.c (check_linkdemand): Remove embedded reference object in
6211         call to LinkDemandSecurityException.
6212         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
6213         with an IntPtr instead of a reference object.
6215 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
6217         * mini.c (handle_initobj): Handle alignment properly.
6219         * inssel.brg (mini_emit_memset): Ditto. 
6221         * inssel.brg (mini_emit_memcpy): Ditto. 
6223         * inssel-sparc.brg: Ditto.              
6225         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
6227 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
6229         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
6230         exceptions raised in unmanaged code. Fixes part of #82594.
6232 2007-08-24  Mark Probst  <mark.probst@gmail.com>
6234         * mini.c (mono_method_to_ir), declsec.c
6235         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
6237 2007-08-22  Martin Baulig  <martin@ximian.com>
6239         * debug-mini.h
6240         (MonoDebuggerThreadInfo): New typedef.
6241         (mono_debugger_thread_table): New global variable.
6242         (mono_debugger_thread_created): New public function.
6243         (mono_debugger_thread_cleanup): New public function.
6245         * debug-debugger.h
6246         (MonoDebuggerInfo):
6247         - removed `get_current_thread' and `lookup_assembly'.
6248         - removed `data_table'.
6249         - added `thread_table'.
6251         * mini.c
6252         (mono_thread_start_cb): Call mono_debugger_thread_created().
6253         (mono_thread_attach_cb): Likewise.
6254         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
6255         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
6256         initial domain.
6258         * driver.c (mono_main): Move mono_debug_init() up, before calling
6259         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
6261 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6263         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
6264         together when passing several arguments of type double (gives a small
6265         speedup and saves a few bytes of generated code).
6267 2007-08-20  Jb Evain  <jbevain@novell.com>
6269         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
6271 2007-08-20  Jb Evain  <jbevain@novell.com>
6273         * mini.c (mono_method_to_ir): throw MethodAccessException
6274         and FieldAccessException instead of InvalidProgramException.
6276 2007-08-20  Mark Probst  <mark.probst@gmail.com>
6278         * mini.c: CoreCLR security checks.
6280         * mini.h: Removed MonoSecurityMode (moved to
6281         metadata/security-manager.h) and mono_security_mode global var
6282         (replaced by set/get functions in security-manager.h).
6284         * driver.c: Added "core-clr-test" security mode for testing.  Used
6285         set-function for setting security mode.
6287 2007-08-17  Mark Probst  <mark.probst@gmail.com>
6289         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
6290         the new jit_info_table.
6292         * driver.c: Test code for the new jit_info_table (enabled by the
6293         define MONO_JIT_INFO_TABLE_TEST).
6295 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
6297         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6298         detection of call <REG> instruction sequence. Fixes build on freebsd.
6300 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
6302         * mini-exceptions.c: Fix a warning.
6304 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
6306         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
6307         stack overflow handling code on amd64 too.
6309         * mini-exceptions.c (mono_setup_altstack): Make this use 
6310         mono_thread_get_stack_bounds ().
6312         * mini-x86.h: Disable sigaltstack on solaris x86.
6314 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
6316         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
6318 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
6320         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
6322 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
6324         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
6326         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
6328 2007-08-03  Neale Ferguson <neale@sinenomine.net>
6330         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
6331         due to alignment.
6333 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6335         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
6336         to be emitted (bug #82281).
6338 2007-08-01  Martin Baulig  <martin@ximian.com>
6340         Merged the `debugger-dublin' branch.
6342         * debug-debugger.h (MonoDebuggerInfo):
6343         Removed the `old_*' compatibility entries.
6344         Added `debugger_version' and `data_table'.
6345         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
6346         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
6348         * debug-mini.c
6349         (MiniDebugMethodBreakpointInfo): Add `address_list'.
6350         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
6351         instead of a `gconstpointer'.
6352         (mono_debugger_insert_method_breakpoint): Return a
6353         `MonoDebugMethodAddressList *'.
6355 2007-06-28  Martin Baulig  <martin@ximian.com>
6357         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6359 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
6361         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
6362         __builtin_frame_address () since it is broken on older gcc versions.
6364 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6366         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
6367         on the stack overflow handling and made the managed stack overflows
6368         catchable in most cases using soft guard pages.
6369         * exceptions-x86.c: added code to restore the protection in the soft
6370         guard pages at the end of exception handling.
6372 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
6374         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
6376 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6378         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
6379         exception handling.
6381 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6383         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
6384         signal handling support until it has been ported to the new mechanism.
6385         * mini.c: fixed stack overflow detection and use the new
6386         architecture code  to handle signals on the altstack.
6388 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6390         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
6391         stack overflows on the alt stack.
6393 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6395         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6396         stack overflows on the alt stack.
6398 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6400         * exceptions-ppc.c: cleanup preparing for altstack support.
6402 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6404         * exceptions-arm.c: cleanup preparing for altstack support.
6406 2007-07-27  Mark Probst  <mark.probst@gmail.com>
6408         * mini.c (print_jit_stats): Output hazard pointer stats.
6410 2007-07-26  Mark Probst  <mark.probst@gmail.com>
6412         * driver.c, mini.c: Replaced security mode flags with a single
6413         enum variable.
6415 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6417         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6419 2007-07-25  Mark Probst  <mark.probst@gmail.com>
6421         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6422         (which doesn't do anything yet) for activating Core CLR
6423         (Silverlight) security.
6425 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6427         * mini-codegen.c: work around a possible gcc bug on arm.
6429 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6431         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6432         message for platforms that don't support AOT compilation.
6434 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6436         * mini.h, mini.c, driver.c: temporary smcs hack.
6438 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6440         * mini-arm.h, mini-arm.c: arm EABI fixes.
6442 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
6444         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6445         case.
6447         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6448         trampolines taking a method argument.
6450         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6452         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6453         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6455         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6456         JIT compilation throws an exception. Fixes #82050.
6458 2007-07-19  Mark Probst  <mark.probst@gmail.com>
6460         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6461         with the MONO_EXCEPTION_ defines.
6463 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
6465         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6466         #82117.
6467         
6468         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6469         the cause of an assertion.
6471 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6473         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6474         removed.
6476 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
6478         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6479         assert. Should fix #82103.
6481 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
6483         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6484         here too. Fixes #82095.
6486         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6487         addresses.
6489         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6491         * mini-amd64.h: Enable IMT for amd64.
6492         
6493         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6495 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
6497         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6499 2007-07-12  Mark Probst  <mark.probst@gmail.com>
6501         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6502         as soon as check_linkdemand sets an exception_type.
6504 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6506         * mini-x86.c: fixed offsets for IMT call sequence.
6507         * mini-x86.h: enable IMT again.
6509 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6511         * trace.c (mono_trace_enter_method): Decode MonoType too.
6513         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
6515         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
6517         * mini-amd64.c: Add preliminary IMT implementation.
6518         
6519 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6521         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6522         understand the new IMT-base interface invocation (thanks to
6523         Daniel Nauck for the report and the remote debugging session).
6525 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6527         * mini-x86.c: size and speed optimizations for the IMT bsearch.
6529 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6531         * Makefile.am (aotcheck): Make this actually use the AOTed code.
6533 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6535         * mini-trampolines.c: implement AOT IMT support.
6536         * mini-x86.h: enable IMT support for wider testing.
6538 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6540         * inssel.brg (emit_imt_argument): Add aot support here.
6542         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6544 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6546         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6547         of the IMT implementation, partially from massi, with my
6548         implementation of the bsearch sequence. Disabled by default until
6549         the AOT code is implemented.
6551 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6553         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6555         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6557 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6559         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6560         arch-independent IMT JIT code from Massimiliano
6561         Mantione (massi@ximian.com) with small cleanups from me.
6563 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6565         * Makefile.am: fix svn invocation to get the svn revision to be
6566         independent of the local language (build fix).
6568 2007-07-09  Mark Probst  <mark.probst@gmail.com>
6570         * mini.c (inline_method): Reset cfg->exception_type if the
6571         inlining is aborted.  Fixes: 82049.
6573 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6575         * mini.c: remove assert from exception handling code when exception_ptr
6576         is not set.
6578 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6580         * mini.c (mono_codegen): Add an assert.
6582         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
6583         enter and leave code.
6584         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
6586 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6588         * mini-ppc.c: fixed memory corruption for localloc(0)
6589         (bug #81852).
6591 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6592         
6593         * mini.c: Fix warnings.
6595 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6597         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
6598         to emit better double->int conversions.
6600 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6602         * mini.c: the provided Min/Max optimizations are valid for unisgned
6603         ints.
6605 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
6607         * 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
6609 2007-06-28  Miguel de Icaza  <miguel@novell.com>
6611         * mini.c (mono_running_on_valgrind): Add support for reporting the
6612         method and  its boundaries to valgrind.
6614 2007-06-28  Martin Baulig  <martin@ximian.com>
6616         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6618 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
6620         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
6622         * generic.2.cs: Add new test case.
6624 2007-06-25  Martin Baulig  <martin@ximian.com>
6626         Merged the `debugger-dublin' branch.
6628         * debug-mini.c
6629         (mono_debugger_insert_method_breakpoint): New public method.
6630         (mono_debugger_remove_method_breakpoint): Likewise.
6631         (mono_debugger_check_breakpoints): New static method.
6632         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
6634         * debug-debugger.h (MonoDebuggerInfo):
6635         Renamed (to keep backward compatibility in the vtable):
6636         `insert_breakpoint' -> `old_insert_breakpoint'.
6637         `remove_breakpoint' -> `old_remove_breakpoint'.
6638         `create_string' -> `old_create_string'.
6639         `lookup_class' -> `old_lookup_class'.
6640         `lookup_type' -> removed; changed into a dummy field.
6641         `lookup_assembly' -> `old_lookup_assembly'.
6642         Added (same functionality, but different signature):
6643         `create_string', `lookup_class', `lookup_assembly'
6644         Added new:
6645         `get_method_addr_or_bpt', `remove_method_breakpoint',
6646         `runtime_class_init'.
6648         * debug-debugger.c: Merged the `debugger-dublin' branch.
6650 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
6652         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6653         well.
6654         (peephole_pass): Likewise.
6656 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6658         * driver.c: hopefully make setaffinity work also for ancient
6659         versions of linux.
6661 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
6663         * driver.c : win32 build fix.
6665 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6667         * driver.c: check for the MONO_NO_SMP env var and bind to a single
6668         processor if it is set.
6670 2007-06-21  Martin Baulig  <martin@ximian.com>
6672         * debug-mini.h: New file.
6674         * debug-mini.c
6675         (mono_debugger_insert_breakpoint_full): Moved here from
6676         ../metadata/mono-debug-debugger.c.
6677         (mono_debugger_remove_breakpoint): Likewise.
6678         (mono_debugger_breakpoint_callback): Likewise.
6680 2007-06-15  Raja R Harinath  <rharinath@novell.com>
6682         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6683         changes in MonoGenericClass.
6685 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
6687         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6689 2007-06-14  Raja R Harinath  <rharinath@novell.com>
6691         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6692         removal of MonoGenericMethod.
6694 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6696         * mini-exceptions.c: hooks for the exception events profiling API.
6698 2007-06-14  Randolph Chung  <tausq@debian.org>
6700         * Makefile.ma: Add hppa target.
6701         * mini-arch.h: Include mini-hppa.h
6702         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6703         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6704         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6706 2007-06-14  Randolph Chung  <tausq@debian.org>
6708         * inssel.brg: Add rules for "chained" compare-branch operations so that
6709         a single compare op can affect multiple branches.  Adjust cost for
6710         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6711         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
6712         cost for some rules so that they can more easily be overridden by
6713         per-arch rules (with fixes from lupus).
6714         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6716 2007-06-13  Randolph Chung  <tausq@debian.org>
6718         * mini-ops.h: Reorder branch ops so that they match the order of the
6719         corresponding CEE_* ops.  The code expects them this way.
6720         Add new ops for HPPA target.
6721         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6723 2007-06-13  Randolph Chung  <tausq@debian.org>
6725         * mini-exceptions.c: Handle cases where the stack grows towards
6726         larger addresses.
6727         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6729 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6731         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6732         counter.
6733         * driver.c: explain where a non-matching corlib is found.
6735 2007-06-13  Mark Probst  <mark.probst@gmail.com>
6737         * mini.c (print_jit_stats): Output dynamic code allocation stats.
6739 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
6741         * mini-exceptions.c: Generate a method profile leave event during
6742         an exception to ensure that the profiler gets notified.
6744 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
6746         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
6747         branch.
6749         * cpu-amd64.md: Add long_and/or/xor opcodes.
6751 2007-06-06  Wade Berrier  <wberrier@novell.com>
6753         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6754         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
6755         length of instruction shr_imm (expected 8, got 10)
6757 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
6759         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6761 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6763         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6764         MonoInternalHashTable again (fixed bug in the internal hash table
6765         code).
6767 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6769         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6770         Have to figure out what makes it crash the SWF regression.
6772 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
6774         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6776 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6778         * mini.c: optimize out the type check when storing null in a
6779         reference array.
6781 2007-06-04  Mark Probst  <mark.probst@gmail.com>
6783         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6784         MonoInternalHashTable.
6786 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6788         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6789         signed integer methods.
6791 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6793         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
6794         permanently since the current approach doesn't work.
6796 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6798         * inssel.brg (stmt): Only call delegate->invoke_impl if 
6799         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
6801 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6803         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
6804         the sreg2==rdx case.
6805         
6806         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
6807         account if it contains a rex prefix.
6808         (peephole_pass): Handle OP_FMOVE as well.
6810 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6812         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
6813         as it causes regressions.
6815 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
6817         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
6818         static case as well.
6820         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
6822         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6823         (mono_arch_get_this_arg_from_call): Ditto.
6825         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
6827         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
6828         invoke_impl field.
6830         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6831         (mono_arch_get_this_arg_from_call): Ditto.
6833         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
6834         
6835         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
6836         try to create optimized invoke code and use that for further invocations. 
6837         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
6839         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
6841 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
6843         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
6844         sealed classes or methods.
6845         *devirtualization.cs: tests for the new optimization
6847 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
6849         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
6850         by the update_volatile () function.
6852 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
6854         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
6855         require it.
6857         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
6859 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
6861         * mini.c: Add configure checks for header files.
6862         * mini-x86.c: Add configure checks for header files.
6863         * trace.c: Add configure checks for header files.
6864         * aot-runtime.c: Add configure checks for header files.
6865         * aot-compiler.c: Add configure checks for header files.
6866         * driver.c: Add configure checks for header files.
6867         * mini-codegen.c: Add configure checks for header files.
6868         
6869         Code is contributed under MIT/X11 license.
6871 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
6873         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
6874         icompare_imm -128 + op_iclt. Fixes #81703.
6876 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
6878         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
6880 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6882         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
6883         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
6884         so that all isinst checks now use "interface_bitmap".
6886 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
6888         * cpu-amd64.md (jmp): Fix a warning.
6890         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
6892         * basic.cs: Add new regression test.
6894         * basic.cs: Remove test which is now in basic-long.cs.
6896         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
6898         * basic-long.cs: Add new test.
6899         
6900 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
6902         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
6904 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
6906         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
6908         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
6909         places.
6910         
6911         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
6912         throwing code a bit.
6914         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
6915         the exception throwing code a bit.
6917         * mini-x86.c (get_call_info): Allocate result from a mempool.
6919 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
6921         * aot-compiler.c (find_typespec_for_class): Fix the assert.
6923         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
6925         * mini.h (MonoCompile): Add 'token_info_hash' field.
6927         * mini.c: Save token->method associations during compilation so the AOT 
6928         compiler can use it.
6929         
6930         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
6931         which reference generic classes and methods.
6933 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
6935         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
6937         * aot-compiler.c (compile_method): Fix a typo in a comment.
6939         * aot-runtime.c (decode_cached_class_info): Skip generic types.
6941         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
6942         everything generic.
6944         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
6946 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
6948         * mini.h (MonoCompile): Add 'args' field.
6950         * mini.c (mono_compile_create_vars): Store variables representing the arguments
6951         into cfg->args.
6953         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
6955 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
6957         * mini.c (mono_compile_get_interface_var): Remove this unused function.
6959         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
6961         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
6962         opcodes for some opcodes.
6964         * mini.h *.brg *.c: Use the new opcodes.
6966 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
6968         * mini.h: Bumped aot revision.
6970         * inssel.brg: modified code generation of type checks for interfaces
6971         to use the new "MonoClass.interface_bitmap" instead of the old
6972         "MonoClass.interface_offsets".
6974 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
6976         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
6978 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
6980         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
6981         64 bit platforms.
6983 2007-04-27  Neale Ferguson <neale@sinenomine.net>
6985         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
6987 2007-04-27  Wade Berrier  <wberrier@novell.com>
6989         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
6990         mini.h) to fix build.
6992 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
6994         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
6995         
6996         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
6997         causes the corlib unit tests to fail.
6999 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
7001         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
7003         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
7005         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
7006         opcodes to the comparison relations.
7008         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
7009         opcodes to their types.
7010         
7011         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
7013         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
7014         it in cfg->arch.cinfo.
7016         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
7018         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
7019         cfg->cil_offset_to_bb.
7021 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
7023         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
7024         created becase of initlocals.
7026 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
7028         * mini-alpha.c cpu-alpha.md: More alpha port work from 
7029         Sergey Tikhonov <tsv@solvo.ru>.
7031 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
7033         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
7035 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
7037         * cpu-s390.md (break): Correct the length of break instruction.
7039 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7041         * mini.c: fix a couple of soft-float issues and comments.
7043 2007-04-15  Miguel de Icaza  <miguel@novell.com>
7045         * trace.c (is_filenamechar): - is also a filename char.
7047 2007-04-15  Neale Ferguson <neale@sinenomine.net>
7049         * mini-s390.c: Correct checking for enum type in return value processing.
7051 2007-04-14  Raja R Harinath  <rharinath@novell.com>
7053         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
7054         (version.h): Makefile is in the build directory.
7056 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
7058         * mini-amd64.h: fix for assertion failure on Solaris/amd64
7060 2007-04-11  Martin Baulig  <martin@ximian.com>
7062         * mini.c (can_access_member): Fix handling of generic classes;
7063         fixes #81259.
7065 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
7067         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
7069 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
7071         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
7073 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7075         * mini-codegen.c: make sure the right spill amount is
7076         used for fp or integer registers (fixes the float_sub_spill() on ppc).
7078 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
7080         * mini-ppc.c: fixes for the fp_branch_nan test.
7082 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
7084         * basic.cs: Comment out new test which still fails on ia64.
7086 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7088         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
7090 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7092         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
7094 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
7096         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
7097         on 64 bit machines. Fixes part of #80738.
7099         * basic.cs: Add regression test.
7101 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7103         * inssel.brg basic.cs: Revert previous change to fix build.
7105         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
7106         platforms.
7107         
7108         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
7110         * basic.cs: Add new regression test.
7112 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7114         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
7115         many arguments.
7117 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7119         * cpu-s390x.md: Correct length of break instruction.
7121 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7123         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
7124         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
7126 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
7128         * *.c: Begin WIN64 port.
7129         * mini.c:  Use correct register in profiler.
7130         * mini-amd64.c: No inline assembly on Win64.
7131         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
7132         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
7133         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
7134         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
7135         mono_arch_ip_from_context for Win64.
7136         
7137         Contributed under MIT/X11 license.
7139 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
7141         * exceptions-amd64.c (seh_handler): Ditto.
7143         * exceptions-x86.c (seh_handler): Fix a memory leak.
7145 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
7147         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
7148         mini-s390x.c: fixed peephole optimizations to deal
7149         correctly with 1 and 2 byte reload avoidance.
7151 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
7153         * cpu-s390.md, cpu-s390x.md: update localloc length.
7155 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7157         * cpu-g4.md: added missing descriptions.
7159 2007-03-14  Miguel de Icaza  <miguel@novell.com>
7161         *  Makefile.am: Add support so the tail tests are not executed on
7162         PowerPC as that is a known limitation of the PowerPC port.
7164 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7166         * runmdesc.bat:  Move to msvc directory.
7167         
7168 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7170         * runmdesc.bat:  Run executable that was produced by the current
7171         target and sent via an argument.
7172         
7173 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
7175         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
7176         #81102.
7178         * generics.2.cs: Add regression test.
7180 2007-03-09  Wade berrier  <wberrier@novell.com>
7182         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
7184 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
7186         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
7187         AOT code depends on this.
7189 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7191         * mini.c: more precise tracking of types in the eval stack
7192         (part of fix for bug #81044).
7194 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
7196         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
7198         * aot-compiler.c (encode_patch): Remove an obsolete comment.
7200 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
7202         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
7204         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
7206 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
7208         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
7209         a pointer on 64 bit systems. Fixes #80190.
7211         * iltests.il: Add new regression test.
7213 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7215         * mini.c: inline a constant for Environment.IsRunningOnWindows.
7217 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
7219         * trace.c: Remove an erroneous alignemnt check when tracing.
7220           Fixes --trace on OSX86.
7222 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7224         * mini-$(arch).h: initialize SP in context for all the archs.
7226 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
7228         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
7229         regressions in the thread tests.
7231 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
7233         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
7234         - fixed implementation of LOCALLOC opcode
7235         - implemented non-un compare for floats
7236         - code cleanup
7237         - implementation of FDIV and CKFINITE opcodes
7238         - fixes for latest mono updates
7239         - additional arch opcodes
7241 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7243         * Makefile.am: simplify and merge rules for cross-compilation.
7245 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
7247         * local-propagation.c: Actually *apply* the fix for bug 80591...
7249 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7251         * mini-exceptions.c: backuot part of the last change
7252         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
7254 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
7255         * inssel.brg: Fix bug 59286.
7258 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
7260         * mini-exceptions.c: patch from Zoltan to correctly check for
7261         stack boundaries (using the stack register, not the frame register),
7262         fixes bugs #80724, #79717.
7264 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
7266         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
7267         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
7269         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
7270         presence of frame pointer elimination.
7272 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
7273         
7274         * mini-x86.h: NetBSD UCONTEX_REG defines.
7276 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
7278         * inssel-amd64.brg: Fix amd64 build.
7280 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
7282         * mini.h: remove extern to workaround what looks likes gcc bug 26905
7283         on amd64.
7285 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
7287         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
7288         ends.
7290         * mini-<ARCH>.c: Use mono_is_regsize_var ().
7292 2007-01-30 Mark Mason <mason@broadcom.com>
7294            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
7295            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
7296            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
7297            beginning support for CEE_JMP [not quite working yet]
7298            * tramp-mips.c: LMF handling now works
7299         
7300 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
7302         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
7304         * mini.h (NULLIFY_INS): New macro.
7306 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7308         * mini.c: statistical profiler fix for windows, patch
7309         from Tor Lillqvist (tml@novell.com).
7311 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
7312         * local-propagation.c: Fix bug 80591.
7314 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7316         * Makefile.am: put back the --export-dynamic option as with
7317         the previous gmodule flags (thanks to Robert Jordan).
7319 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
7321         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
7323         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
7324         simplify and speed up the local register allocator. Also rename some fields
7325         like iassign->vassign.
7326         
7327         * regalloc.c: Remove some functions which are no longer used since their
7328         inlined version is in mini-codegen.c.
7329         
7330         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
7332         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
7334 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
7336         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
7337         narrowing. Fixes #80622.
7339         * iltests.il: Add new regresssion test. 
7341 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7343         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
7344         debug-debugger.c, debug-debugger.h: warning fixes.
7345         * driver.c: updated copyright year and made it fit in one line.
7347 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
7349         * aot-runtime.c: updated to use mono-dl instead of gmodule.
7351 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
7353         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
7355         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
7357         * iltests.il: Add new test for bug #80507.
7359 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7361         * mini-arm.h: use soft-float also on vfp for now.
7363 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7365         * mini.c: fix some more soft-float issues.
7367 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
7369         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
7371 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
7372         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
7373         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
7374         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
7376 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
7378         * mini-arm.c: typo fix.
7380 2007-01-23  Neale Ferguson <neale@sinenomine.net>
7382         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
7384 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
7386         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
7387         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
7389         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
7391         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
7393         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7394         
7395         * inssel.brg: Fix a warning.
7397         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7399         * abcremoval.c ssa.c ssapre.c: Update after this change.
7400         
7401         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7403         * dominators.c (df_set): Use mono_bitset_union_fast.    
7405 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7407         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7408         mini-codegen.c: reduce relocations and memory usage for the cpu
7409         description.
7411 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
7413         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7415         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7416         to reduce their size.
7418 2007-01-19 Mark Mason <mason@broadcom.com>
7420         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7421         * mini-mips.c: more configuration macros, support long conditional branches, additional
7422         asserts, fix epilog instrumentation.
7423         * mini-mips.h: use standard stack walk
7424         * cpu-mips.md: increase size of div, rem and conditional branches
7425         
7426 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7428         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7429         to cpu spec data.
7431 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
7433         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7434         (compile_method): Ditto.
7436         * aot-runtime.c (decode_klass_info): Ditto.
7438         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7439         needed by the code generated by inssel.brg. Also fix a warning.
7441 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7443         * mini.c: deal with enums that become genericinsts by
7444         being nested in a generic class (bug #79956).
7446 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7448         * mini.c: match the generic definition to check for
7449         private access with generic types (bug #78431).
7451 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7453         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7454         to make life easier for people cross-compiling that insist on not
7455         using scratchbox.
7457 2007-01-17 Mark Mason <mason@broadcom.com>
7459         * inssel-long.brg: patch to deal with mips missing flags
7460         * inssel-long32-mips.brg: implement overflow checks
7461         * insset-mips.brg: implement overflow checks
7462         * mini-mips.h: implement conditional exception handling
7463         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7464           Remove unused code, minor cleanups.
7465         * exceptions-mips.c: minor cleanups
7466         * mini-ops.h: add mips conditional exception ops
7467         * cpu-mips.md: add mips conditional exception ops
7469         
7470 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7472         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7473         to deal with mips missing of flags.
7475 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7477         * exceptions-ppc.c: execute fault handlers.
7479 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7481         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7483 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7485         * mini.c: handle also floating point values in initialize_array.
7487 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7489         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7490         array initialization and make it conditional on the intrins option.
7492 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7494         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7495         relocations and put the patch info names close to the enum definition.
7497 2007-01-15 Mark Mason <mason@broadcom.com>
7499         * basic.cs, exceptions.cs: break up large tests to increase debugability.
7501 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7503         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7505 2007-01-12  Raja R Harinath  <rharinath@novell.com>
7507         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7509 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7511         * Makefile.am: distribute the mips sources.
7513 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7515         * mini-codegen.h: handle bug #80489 here, by excluding ecx
7516         directly.
7518 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
7520         * cpu-x86.md: back out for now as this triggers other regressions.
7522 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7524         * cpu-x86.md: force src1 and dest regpair for long shift instructions
7525         to eax:edx, so ecx can't get allocated to them (bug #80489).
7527 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7529         * mini.c, mini-exceptions.c: enabled running fault handlers
7530         (bug #80469).
7532 2007-01-03  Miguel de Icaza  <miguel@novell.com>
7534         * driver.c: If nothing fail, do not use the string "failed",
7535         because it makes it very annoying to view test result logs on the
7536         web. 
7538 2006-12-30  Miguel de Icaza  <miguel@novell.com>
7540         * debug-debugger.c (mono_debugger_main): Rename "main" to
7541         "main_method" to prevent a warning.
7543         Remove a warning for unused field.
7545 2006-12-28  Martin Baulig  <martin@ximian.com>
7547         * debug-debugger.c
7548         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7550 2006-12-22  Martin Baulig  <martin@ximian.com>
7552         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7553         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7554         seperate `.mdb_debug_info' section, so we can access it from the
7555         debugger even if the binary is stripped.
7557         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7558         from the `.mdb_debug_info' here to prevent the linker from
7559         removing that section.
7561         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7562         mdb-debug-info64.s.
7564 2006-12-19  Robert Jordan  <robertj@gmx.net>
7566         * mini-x86: enable the code to return small structures in
7567         registers for FreeBSD as well. Fixes bug #80278.
7568         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7570 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7572         * mini-x86.c: align the stack when calling the profiler
7573         function instrumenting the prolog (on OSX).
7575 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7577         * mini.c: emit a break opcode where Debugger.Break () is called.
7579 2006-12-13  Miguel de Icaza  <miguel@novell.com>
7581         * mini.c (mono_method_to_ir): Provide useful information on this
7582         assert, to prevent others from debugging like I did.
7584 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7586         * mini.c: enable code which was incorrectly commented
7587         (bug #80235).
7589 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7591         * mini-x86.c: enable on OSX, too, the code to return small
7592         structures in registers.
7594 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7596         * mini-x86.c: remove the use of the dynamic code manager here, too.
7598 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7600         * mini.h, debug-debugger.c, tramp-*.c: fixed 
7601         mono_debugger_create_notification_function() to use
7602         mono_global_codeman_reserve () instead of a dynamic code manager.
7604 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
7606         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
7607         ves_array_element_address() jit icall and use a generated
7608         managed method instead (which is about 4 times faster for a rank 3
7609         array access).
7611 2006-11-29  Mark Mason  <mason@broadcom.com>
7613         * basic-calls.cs: additional tests for passing
7614         structures as function arguments.
7616 2006-11-29  Mark Mason  <mason@broadcom.com>
7618         * mini-mips.h: disable custom exception handling
7619         * mini-mips.c: throw/rethrow should use jalr to call
7620         exception stubs.  Fixed bug with passing structures
7621         by value. More support for tracing floating point
7622         functions.
7624 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7626         * mini.c: fixed typo in the soft-float ldind.r4 handling
7627         (bug #80086).
7629 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7631         * mini.c, mini.h, driver.c: added --runtime command line
7632         option to select a different runtime than the autodetected one.
7633         * jit.h: added API for embedders to initialize with a specific
7634         runtime version.
7636 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7638         * mini.c: handle also boxing of r4 values (bug #80024).
7640 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7642         * mini-ppc.c: force indirect calls until we reserve
7643         enough address space for all the generated code.
7645 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7647         * exceptions-arm.c: workaround bugs in the libc definition
7648         of struct ucontext.
7650 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7652         * inssel.brg: fixes from me and Mark Mason.
7654 2006-11-23  Dick Porter  <dick@ximian.com>
7656         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7657         semaphore display now we've fixed the initial value
7659 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7661         * inssel.brg: partially revert the last change to fix the build.
7663 2006-11-21  Mark Mason  <mason@broadcom.com>
7665         * inssel.brg: Add and use compare-and-branch macros to support
7666         architectures that do not have condition code registers (ie. MIPS).
7667         * *-mips.{c,brg,md}: Fix copyright statements
7669 2006-11-20  Mark Mason  <mason@broadcom.com>
7671         * Makefile.am: remove mini-codegen.c from list of MIPS sources
7672         * mini.c: Allow GET_CONTEXT to be specified by the arch port
7673         * mini.h: Added declaration for mono_print_ins()
7674         * mini-codegen.c: added ins_spec initializer for MIPS
7675         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7676         vreg to be virtual and hreg to be non-virtual.
7677         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7678         is not yet working/implemented correctly.
7679         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7680         non-static, fixup calls to print_ins() from other parts in the file.
7682 2006-11-20  Mark Mason  <mason@broadcom.com>
7684         * basic-calls.cs: added tests for passing structures as arguments
7685         to calls.
7687 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7689         * inssel-long32.brg: optimize signed division by power of two.
7691 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7693         * mini-arm.c: added support for interworking with thumb code
7694         (mono must be still be built using the ARM instruction encoding).
7696 2006-11-19  Miguel de Icaza  <miguel@novell.com>
7698         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7699         verifier has different rules for it.   Fixes a few verifier issues
7700         in the test suite.
7702         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7703         at the end, so people know what happened.
7705 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7707         * brach-opts.c: in optimize_exception_target() make sure we
7708         are in a catch clause (fixes bug #79871).
7710 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7712         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7713         more soft-float support fixes.
7715 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7717         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7718         that are passed half on the stack and half in registers.
7720 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7722         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7723         more mips integration work from Mark E Mason 
7724         <mark.e.mason@broadcom.com>.
7726 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7728         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7729         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7730         tramp-mips.c: added sources for the mips port, not
7731         integrated in the build yet. Contributed by
7732         Mark E Mason <mark.e.mason@broadcom.com>.
7734 2006-11-14  Neale Ferguson <neale@sinenomine.net>
7736         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7738 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7740         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7741         put the soft-float rules in its own file since it seems to
7742         break s390 compilation.
7744 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7746         * mini-arm.c: fixed wrnings.
7748 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7750         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7751         inssel-arm.brg: ARM support for soft-float.
7753 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7755         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7756         loads and stores of 32 bit fp values.
7758 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
7760         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7762         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7763         works. Fixes #79852 and #79463.
7765 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7767         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7768         more soft-float support WIP and fixes.
7770 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7772         * mini-arm.c: some VFP updates.
7774 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7776         * mini-exceptions.c: 0 is a valid local var offset in some
7777         architectures, don't assert (bug #78508).
7779 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7781         * exceptions-arm.c: fixed off by one error in stack walk code.
7783 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7785         * mini.h, mini.c: more precise tracking of type load exceptions.
7787 2006-11-03  Robert Jordan  <robertj@gmx.net>
7789         * Makefile.am: [WIN32] Add monow.exe target.
7790         * driver.c: [WIN32] Don't detach the console when debugging.
7791         Fixes bug #79797.
7792         
7793 2006-10-30  Miguel de Icaza  <miguel@novell.com>
7795         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
7797 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
7799         * aot-compiler.c (emit_method_info): Add a case missed earlier.
7801         * driver.c (mini_regression): Fix --regression with AOT.
7803         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
7805 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
7807         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
7809         * mini-sparc.h: Don't use sigaction on sparc/linux.
7811         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
7813         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
7815         * mini-exceptions.c: Add proper include files for getpid ().
7817 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
7819         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
7820         address instead of a MonoJitInfo* to avoid decoding the exception info for the
7821         method.
7823         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
7824         name cache to reduce its size.
7826         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7828 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
7830         * mini-x86.c: Save/restore the current LMF structure more efficiently using
7831         the mono_lmf TLS variable.
7833         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
7834         trampoline lmf frames.  
7836         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
7838 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
7840         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
7841         the mono_lmf TLS variable.
7843         * mini-exceptions.c: Access the LMF structure through accessors.
7845         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
7846         variable instead of in jit_tls->lmf.
7848         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
7849         
7850         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
7851         trampoline lmf frames.
7853         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
7855 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
7857        * mini.c trace.c mini-x86.c: Revert these too.
7858         
7859        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
7860        signature change.
7862 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
7864         * genmdesc.c: removed now dead code.
7866 2006-10-09  Robert Jordan <robertj@gmx.net>
7868         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
7870 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
7872         * mini.h: do not leave gaps in the opcode values.
7874 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
7876         * jit-icalls.h: flag functions as internal here, too.
7878 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
7880         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
7881         functions with the internal attribute.
7883 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
7885         * aot-compiler.c: fclose the file descriptor in the profile read loop.
7887 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
7889         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
7890         for soft-float.
7892 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
7894         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
7895         tail calls as on other platforms.
7897         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
7899         * iltests.il: Add a few tailcall tests.
7901 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7903         * driver.c: fix loop for old compilers (bug #79521).
7905 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
7907         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
7909         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
7911         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
7912         metadata without any code.
7914         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
7915         more precise debugging information using gdb.
7917 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
7919         * inssel-ia64.brg: Make the helper methods static.
7921 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7923         * inssel-x86.brg: make the helper methods static.
7925 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
7927         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
7929 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
7931         * mini.c: updates for monoburg changes.
7932         * inssel.brg: make a few helper functions static as they should.
7934 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
7936         * Makefile.am: Move mini-codegen.c to common_sources.
7938 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
7940         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
7941         instructions.
7942         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
7943         mini-ppc.h: port to use the common local register allocator.
7945 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7947         * mini.h: Remove the comment too then.
7949 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
7951         * mini.h: put back backend.data which is to be used shortly and
7952         doesn't increase the size of MonoInst. If any 64 bit arch aligned
7953         pointers on 4 byte boundaries it'd have much bigger issues running
7954         and you can ifdef it out anyway.
7956 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7958         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
7959         MonoInst size by 4 bytes on 64 bit machines.
7961 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
7963         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
7964         replacement with more meaningful field names. Arch maintainers, please
7965         check the assigned names are good enough for your arch.
7967 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
7969         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
7970         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
7972 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
7974         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
7975         relocations and memory requirements, put the optimization flags
7976         definitions in their own file.
7978 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
7980         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
7982         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
7984 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
7986         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
7988 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
7990         * inssel.brg: use the correct function to get the size of an item
7991         in an array, given an element class.
7992         * aot-compiler.c: do not access class->class_size directly.
7994 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
7996         * mini.h, debug-mini.c: added a debugging function to print
7997         info about local variables and arguments in a jitted method.
7999 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
8001         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8003         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
8005 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8007         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
8008         inner and outer loops when passing vtypes.
8010 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
8012         * mini-ppc.c: take into account the cpu errata for cache flushing
8013         which caused some random errors (bug #79381).
8015 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8017         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
8018         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
8020 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
8022         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
8023         loaded.
8025         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
8026         freebsd ports tree.
8028         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
8029         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
8031         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
8032         displacement.
8034 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
8036         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
8038 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
8040         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
8041         macro does not have to be changed during debugging.
8043         * 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>.
8045         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
8047         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
8048         
8049         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
8050         MONO_ARCH_NO_EMULATE_MUL is defined.
8052         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
8054         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
8056         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
8058         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
8059         
8060 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
8062         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
8063         stuff to mini-exceptions.c where it is used.
8065         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
8066         setup code, the real one is in mini-exceptions.c.
8068         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
8069         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
8070         some changes from the freebsd ports tree.
8072         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
8073         constants.
8074         
8075         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
8077 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
8079         * mini.c: on Linux, check for /proc to be mounted
8080         (bug# 79351, novell bug#201204).
8082 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
8084         * mini.c: handle cases where pthread_attr_getstack() behaves
8085         incorrectly (bug #78096).
8087 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
8089         * mini-arm.c: support larger stack frames (bug #79272).
8091 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
8093         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
8095         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
8096         tokens.
8098         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
8099         mono_class_from_name () to find a class from its name.
8101         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
8103 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
8105         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
8107 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
8109         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
8111 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
8113         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
8114         callinfo->trampoline.
8116         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
8117         fixes #79271.
8118         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
8119         future.
8121 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
8123         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
8125 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
8127         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
8128         stats.method_trampolines, it is already done by the generic trampoline code.
8130         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
8131         
8132 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
8134         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
8136         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
8138         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
8140         * mini.c (print_jit_stats): Print mscorlib mempool size too.
8141         
8142         * mini.c (print_jit_stats): Print new stats.
8144         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8146 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
8148         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
8149         Address on two dimensional arrays. Fixes #78729.
8151         * mini.h (MonoCompile): Add a 'skip_visibility' field.
8153         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
8154         a method.
8156         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
8158         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
8159         #79130.
8160         
8161         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
8162         a race condition.
8163         (mini_get_ldelema_ins): Ditto.
8165 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
8167         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
8168         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
8169         Fixes #79213.
8171 2006-08-29 Neale Ferguson <neale@sinenomine.net>
8173         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
8174         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
8176         * exceptions-s390x.c: Cosmetic change.
8178         * tramp-s390.c: Fix warning.
8180         * cpu-s390.md: Correct length of mul_imm.
8182 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8184         * aot-compiler.c: added binary writer with ELF backend
8185         implementation (only on Linux/x86 for now).
8187 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8189         * Makefile.am: Don't run net 2.0 AOT tests.
8191         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
8192         (mono_compile_assembly): Skip net 2.0 assemblies as well.
8194         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
8196 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8198         * aot-compiler.c: simplified and refactored the asm-writing code
8199         to allow different backends.
8201 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8203         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8205         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
8206         little. Share patches of type TYPE_FROM_HANDLE as well.
8208         * mini.c (mono_patch_info_equal): New helper function.
8209         (mono_patch_info_hash): Ditto.
8211         * aot-compiler.c (emit_method_code): Fix s390 build.
8213         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
8214         is not handled because it is stored as a flag and not as a type ctor. Fixes
8215         #79016.
8217 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
8219         * aot-compiler.c: Fix computation of GOT slot statistics.
8220         
8221         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
8222         Also remove support for not PIC AOT.
8224         * mini.h: Bump AOT file format version.
8226         * objects.cs: Add a test for #78990.
8228         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
8229         (peter.dettman@iinet.net.au). Fixes #79087.
8231         * basic-long.cs: Add a test for the above.
8233 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
8235         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
8236         
8237         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
8238         code somewhat.
8240 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
8242         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
8243         exceptions.
8245 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
8247         * mini.c: Don't verify COM proxy invoke calls
8248         
8250 2006-08-10  Dick Porter  <dick@ximian.com>
8252         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
8253         which process is holding semaphores locked.
8255 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
8257         * mini-ia64.c mini-amd64.c: Fix #79027.
8259         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
8261         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
8263         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
8264         implicit arguments in a vararg call. Fixes #79027.
8266 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
8268         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
8269         (mono_get_array_new_va_signature): Ditto.
8271 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
8273         * aot-runtime.c: Call init_plt lazily.
8275         * inssel-long.brg: Fix unsigned long->int conversion.
8277         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
8279         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
8280         that most data is now in the .rss/.data section.
8282 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
8284         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
8286         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
8288         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
8290         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
8292         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
8293         virtual call. Fixes #79010.
8295         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
8296         and use the result as the this argument in the real call.
8298         * generics.2.cs: Add a new test for #79010.
8299         
8300 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
8302         * mini-x86.c: Fix a warning.
8304         * aot-compiler.c: Add a bunch of statistics.
8306         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
8308 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
8310         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
8312 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
8314         * 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>.
8316 2006-07-13  Miguel de Icaza  <miguel@novell.com>
8318         * mini.c (mono_method_to_ir): Obtain the original method in the
8319         CIL stream and use this to perform validation.
8321         Fixed: #78816
8323 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
8325         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
8326         (mono_arch_call_opcode): Ditto.
8328         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
8329         #78826.
8331         * mini.c (mono_patch_info_dup_mp): New helper function.
8332         
8333         * aot-compiler.c (compile_method): Fix some of the memory allocated during
8334         compilation. Fixes #78827.
8336 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
8338         * declsec.c: Use original security informations for
8339           MONO_WRAPPER_MANAGED_TO_MANAGED.
8341 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
8343         * mini.c: Allow Com Interop methods/classes and
8344         don't verify COM wrapper calls
8345         
8347 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
8349         * inssel-long32.brg: Fix long->i4 checked conversion.
8351         * exceptions.cs: Add a test for the above.
8353 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
8355         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
8357         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
8358         leaks.
8360         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
8361         #78775.
8363 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
8365         * mini.c: Fix solaris/x86 exception handling.
8367         * Makefile.am: Get rid of $(ICU_LIBS).
8369 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
8371         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
8372         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
8373         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
8375         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
8377         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
8378         this function causes a SIGSEGV.
8380 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
8382         * mini.c: Remove unused solaris/x86 includes.
8384 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
8386         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
8388 2006-06-20  Jb Evain  <jbevain@gmail.com>
8390         * cpu-g4.md: fix max length of start_handler instruction.
8392 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
8393         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8395 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
8396         * ssa.c: Fixed bug 78653 for SSA based deadce.
8397         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8398         MonoInst.flags, used in SSA based deadce.
8399         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8400         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8402 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8404         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8405         it can end up using non executable memory on ppc64 systems
8406         running ppc32 userspace (fix from Johannes Berg).
8408 2006-06-14  Dick Porter  <dick@ximian.com>
8410         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8411         4.1.1
8413 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
8414         * mini.c: Made so that inline is locally disabled if it would
8415         trigger a .cctor, because too many apps depend on this behavior
8416         (which seems to be also the one of the MS CLR).
8418 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
8420         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8421         No idea why this worked before.
8423         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8424         which branch to outer exception clauses since they could skip the
8425         inner finally clauses. Fixes #78633.
8427         * exceptions.cs: Add a test for the above.
8429         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8430         Fixes #78629.
8432         * iltests.il: Add a test for the above.
8434 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
8436         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8437         after the end of a try bblock, to prevent asserts in mini_method_compile ().
8439         * iltests.il: Add a test for the above.
8441 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
8443         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8444         
8445         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8446         methods as instrinsics.
8448 2006-06-09  Wade Berrier <wberrier@novell.com>
8450         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8451         (simple-cee-ops.h ssapre-mini-ops.h)
8453 2006-06-09  Neale Ferguson <neale@sinenomine.net>
8455         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8456         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8457         instruction).
8458         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8459         * cpu-s390x.md: Fix max. length values for a couple of instructions.
8461 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
8463         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8465 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
8467         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8468         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8469         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8470         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8471         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8472         of opcodes, so that bug 78549 should not happen again.
8473         * ssapre.c: Updated to use the renamed files.
8475 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
8477         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
8478         in OP_ATOMIC_EXCHANGE_I4.
8480 2006-06-07  Wade Berrier <wberrier@novell.com>
8482         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
8483         in mono_debugger_create_notification_function)
8485 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
8487         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8488         
8489         * mini.c (type_from_stack_type): Disable some changes which do not
8490         seem to work.
8492         * driver.c: Reenable opts.
8494         * mini.h (MonoStackSlot): New structure to keep track of the verification state
8495         of the evaluation stack.
8496         
8497         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8498         evaluation stack trace at entry to the bblock.
8500         * mini.c (merge_stacks): New function to perform verification of stack merges.
8501         Turned off by default.
8503         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8504         STACK_MP.
8505         
8506 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
8508         * local-propagation.c: Fixed bug 78549.
8510 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
8512         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
8514 2006-06-02  Miguel de Icaza  <miguel@novell.com>
8516         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
8517         tramp-arm.c, tramp-ia64.c
8518         (mono_debugger_create_notification_function): Update signature to
8519         new signature and use new protocol for creating the notification
8520         function.  
8522         Should fix the build.
8524 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
8526         * exceptions-ppc.c (mono_jit_walk_stack)
8527         (ves_icall_get_frame_info): Fix the build
8529 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
8531         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8533 2006-05-31  Raja R Harinath  <rharinath@novell.com>
8535         * il2tests.2.il: New file for generics CIL tests.  Add test for
8536         #78019.
8537         * Makefile.am: Update.
8539         Fix #78019
8540         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8541         to nullable types.
8543 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
8545         * aliasing.c: Fixed bug 78311.
8547 2006-05-29  Martin Baulig  <martin@ximian.com>
8549         * mini-exceptions.c (mono_find_jit_info): When computing the
8550         native offset, check whether we're actually inside the method's
8551         code; call mono_debug_print_stack_frame() to format the frame.
8552         (ves_icall_System_Exception_get_trace): Call
8553         mono_debug_print_stack_frame() to format the stack frame.
8554         (ves_icall_get_trace): Update to the new debugging API.
8555         (mono_jit_walk_stack_from_ctx): Likewise.
8556         (ves_icall_get_frame_info): Likewise.
8558         * mini.c (get_method_from_ip): Use the new debugging API.
8559         (mono_print_method_from_ip): Likewise.
8561         * exceptions-ppc.c
8562         (mono_jit_walk_stack): Use the new debugging API.
8563         (ves_icall_get_frame_info): Likewise.   
8565 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
8567         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8569 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
8571         * mini.c: Added "limitator" to inline for debugging.
8573 2006-05-24  Martin Baulig  <martin@ximian.com>
8575         * debug-debugger.c (mono_debugger_init): Create a private,
8576         malloc()-based code manager for the notification function and
8577         intentionally leak it on exit.  This fixes the crash-on-exit race
8578         condition.
8580         * tramp-amd64.c
8581         (mono_debugger_create_notification_function): Added
8582         `MonoCodeManager *' argument.
8584         * tramp-x86.c
8585         (mono_debugger_create_notification_function): Added
8586         `MonoCodeManager *' argument.
8588 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
8590         * aliasing.c: Fixed 64 bit issue.
8591         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8592         default since all known bugs are fixed (one more time!).
8594 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8596         * mini.c: write barrier support.
8598 2006-05-23  Martin Baulig  <martin@ximian.com>
8600         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
8601         check at the top of the file.
8603 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
8605         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
8606         reverting changes without reason and without changelog entries.
8608 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
8610         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
8611         to a few opcodes. Fixes #78439.
8613         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
8614         consistency with other archs.
8616         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
8618 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8620         * debug-debugger.c: fix the build.
8622 2006-05-17  Martin Baulig  <martin@ximian.com>
8624         * debug-debugger.c
8625         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
8626         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
8627         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
8628         (debugger_attach): Call GC_mono_debugger_add_all_threads().
8630 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
8632         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
8634 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
8636         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
8637         MONO_TYPE_GENERICINST.
8638         
8639         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
8640         MONO_TYPE_GENERICINST.
8642 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
8644         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8645         #78325.
8647 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
8649         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8650         mempool.
8651         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8653 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
8655         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8656         mono_trace_cleanup ().
8658         * iltests.il: Fix problem with the newly added test.
8660         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8661         due to register constraints, free up the previous hreg. Fixes #78314.
8663         * iltests.il: Add new test for #78314.  
8665         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8666         Interlocked.Add. Fixes #78312.
8668         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8669         
8670 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
8672         * inssel.brg (mini_emit_virtual_call): Fix a warning.
8674 2006-05-05  Martin Baulig  <martin@ximian.com>
8676         * debug-mini.c (mono_debug_open_block): New method.
8678         * mini-amd64.c
8679         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8680         the beginning of each basic block.
8682         * mini-x86.c
8683         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8684         the beginning of each basic block.
8686 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8688         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8689         default until I understand why they break the build on amd64.
8691 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
8693         * mini.c (mini_cleanup): Call mono_cleanup ().
8695         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8696         errors.
8698 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8700         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8701         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8702         default since all known bugs are fixed, and I cannot reproduce bug
8703         77944... I'm asking Matt Hargett to test again after this commit.
8705 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
8707         * mini-codegen.c: Fixed typo that thrashed inline.
8709 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
8711         * dominators.c (compute_dominators): Avoid using a worklist since
8712         it is not correct in some cases. Instead, iterate over all bblocks as
8713         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8715 2006-04-28  Miguel de Icaza  <miguel@novell.com>
8717         * mini.c (mono_jit_compile_method_inner): Use
8718         mono_prepare_exception_from_error that resets the value
8719         internally.
8721 2006-04-27  Miguel de Icaza  <miguel@novell.com>
8723         * mini.c: Move the mini_loader_error_to_exception to metadata. 
8724         
8725 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8727         * aliasing.c: Fixed bug 78210.
8729 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8731         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8732         default until all their problems (or the ones they trigger) are fixed.
8734 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
8736         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8737         
8738         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8739         as loaded only after resolving patches since that could invoke the same method.
8741         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8743         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8744         functions.
8746         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8747         AOT loader.
8749         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8750         stack.
8752         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8753         made from AOT code through the PLT table.
8755         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8756         holding the plt offset when a call is made to the aot plt trampoline.
8757         
8758 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8760         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
8761         amd64 AOT support.
8763         * Makefile.am (common_sources): Fix build breakage.
8765         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8766         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8767         intra-assembly calls if possible.
8768         
8769         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8771         * mini-trampolines.c: Handle PLT entries.
8773         * mini.c: Avoid creating a GOT var for calls.
8775         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8776         from mscorlib code.
8778         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8779         from mscorlib code.
8781         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8782         AOT code.       
8784         * mini.h: Bump AOT file format version.
8785         
8786         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8787         covers more cases.
8789 2006-04-25  Martin Baulig  <martin@ximian.com>
8791         * driver.c: Disable copyprop, consprop and inline when running
8792         inside the debugger.
8794 2006-04-25  Martin Baulig  <martin@ximian.com>
8796         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
8797         with `get_current_thread' and added `detach'.
8798         (MonoDebuggerMetadataInfo): Added `thread_size',
8799         `thread_tid_offset', `thread_stack_ptr_offset' and
8800         `thread_end_stack_offset'.
8802 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8804         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
8805         aot-runtime.c.
8807         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
8808         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
8810         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
8812         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
8814         * aot.c: Add support for ADJUSTED_IID.  
8816 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
8818         * aot.c (emit_method_order): Don't align method_order_end.
8820         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
8821         the interface ID changes.
8823 2006-04-21  Dick Porter  <dick@ximian.com>
8825         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
8826         cleaning up a thread.  Fixes the new part of bug 77470.
8828 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
8830         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
8831         to managed wrapper.
8832                      
8833 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
8835         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
8836         
8837         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
8838         SIGSEGV. Fixes #78072.
8840         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
8841         unregister our SIGABRT handler.
8843 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
8845         * mini.c: Disabled inline where it can alter the call stack in a
8846         way visible from managed code.
8847         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
8848         default.
8850 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
8852         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
8853         on other platforms. Fixes #78089.
8855 2006-04-13  Martin Baulig  <martin@ximian.com>
8857         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
8858         determine whether we're inside the debugger.
8860         * debug-debugger.h
8861         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
8863 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
8865         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
8866         handler clauses. Fixes #78024.
8868         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
8869         in the CALL_MEMBASE opcodes. Fixes #78088.
8870         (mono_arch_get_vcall_slot_addr): Ditto.
8872 2006-04-10  Martin Baulig  <martin@ximian.com>
8874         * debug-debugger.c: The thread handling code has now been moved
8875         into ../metadata/threads.c.
8877 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8879         * driver.c (mono_main): Fix --with-gc=none build.
8881         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
8882         (mono_spillvar_offset_float): Ditto.
8883         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
8884         hreg, not when its !global, since on ia64, there is a third category: stacked
8885         registers.      
8887 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
8889         * mini.c: set MonoInst->klass for load field address and a few other
8890         places.
8892 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
8894         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
8896 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
8898         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
8899         the branch opt changes.
8901 2006-04-06  Dick Porter  <dick@ximian.com>
8903         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
8904         
8905         * wapihandles.c (mini_wapi_seminfo): 
8906         * driver.c (mono_main): Add semaphore info option
8908 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
8910         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
8911         branch optimization changes. Fixes #78009.
8913 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8915         * mini.c: ignore accessibility of methods in managed->native wrappers.
8917 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
8919         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
8920         
8921         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
8923 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
8925         * mini.c: Modify the branch optimizations to preserve the invariant that
8926         the entries inside the in_bb and out_bb arrays are unique.
8927         (mono_unlink_bblock): Avoid creation of new arrays.
8929 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
8931         * mini.c (mono_unlink_bblock): Fix regression caused by previous
8932         change (#77992).
8934 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
8936         * mini.c (optimize_branches): Remove the "optimizations" in
8937         the cbranch1/cbranch2 -> branch cases which were causing several
8938         problems in the past. Fixes #77986.
8940 2006-03-31  Chris Toshok  <toshok@ximian.com>
8942         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
8943         default optimizations :(
8945 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
8947         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
8948         branch.
8950 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
8952         * local-propagation.c: Added comments to structs and removed
8953         "Mono" prefixes from local tree mover types.
8955 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
8957         * Makefile.am (arch_sources): Define this for each architecture so 
8958         libmono_la_SOURCES is defined in one place.
8960 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
8962         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
8963         from handles/.
8965 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
8967         * driver.c: print the GC name supplied by configure.
8969 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
8971         * local-propagation.c: Added tree mover, and moved here all the
8972         local propagation code from mini.c
8973         * mini.c: Added support for treeprop, and moved all the local
8974         propagation code to local-propagation.c
8975         * mini.h: Added support for treeprop
8976         * driver.c: Added support for treeprop, enabled consprop, copyprop,
8977         treeprop, inline and deadce by default
8978         * Makefile.am: Added local-propagation.c
8980 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
8982         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
8984 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
8986         * debug-debugger.c: make it compile without the Boehm GC.
8988 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8990         * mini.c: fixed issue with mismatch when an icall is registered
8991         with multiple names but same address.
8993 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
8995         * declsec.c, mini-exceptions.c: use write barrier to set reference
8996         fields of managed objects.
8998 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9000         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
9001         (can_access_internals): Fix a warning.
9003         * mini.c (print_method_from_ip): Rename this to 
9004         mono_print_method_from_ip so it gets exported.
9006         * trace.c: Deal with strings inside StringBuilder's containing garbage
9007         and fix memory leaks. Fixes #77848.
9009 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9011         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
9012         fixes #77787.
9014 2006-03-16 Neale Ferguson <neale@sinenomine.net>
9015         
9016         * mini-s390.c: Remove OP_X86_TEST_NULL.
9018 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9020         * mini.c: use the correct GetHashCode() for the moving collector.
9022 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
9024         * liveness.c: Regalloc spill cost tuning.
9026 2006-03-15 Neale Ferguson <neale@sinenomine.net>
9027         
9028         * mini-s390x.h: Correct S390_LONG macro.
9030         * mini-s390x.c: Cleanup unused code.
9032 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
9034         * jit-icalls.h: New file.
9036         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
9037         icalls and include that instead of including jit-icalls.c.
9039         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
9040         OP_X86 opcodes.
9042 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
9044         * mini.c: when checking for member accessibility, also check for
9045         friend assemblies and for explicit interface implementations.
9047 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
9049         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
9051         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
9053         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9054         common cases are done first.    
9056         * mini-ops.h: Only define platform specific opcodes on the given platform.
9058         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
9059         branch.
9060         
9061 2006-03-14  Martin Baulig  <martin@ximian.com>
9063         Revert Paolo's change from r57348:
9065         * mini.h: don't use gboolean for bitfields.
9066         * mini.c: verifier changes for fields and methods accessibility.
9068 2006-03-13  Neale Ferguson <neale@sinenomine.net>
9070         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
9072         * mini-s390x.c: Fix conv_r_un.
9074         * cpu-s390, cpu-s390x.md: Fix lengths.
9076 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9078         * mini.c: nested types have access to all the nesting
9079         levels, not just the enclosing types.
9081 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9083         * mini.c: added a few more verification checks.
9085 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
9087         * liveness.c: Merge optimizations from the linear-il branch.
9089 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9091         * mini-ia64.c (emit_call): Add a comment.
9093         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
9095         * tramp-ia64.c: Fix some warnings.
9097 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9099         * mini.h: don't use gboolean for bitfields.
9100         * mini.c: verifier changes for fields and methods accessibility.
9102 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9104         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
9105         lazy icall wrapper changes.
9107         * dominators.c: Replace all the dominator algorithms with faster
9108         ones from the linear-il branch.
9110         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
9111         the mempool.
9113         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9114         common cases are done first.
9116         * mini-amd64.c: Fix some warnings.
9118         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
9119         from the mempool.
9121         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
9122         added code.
9124         * mini.h: Add a missing prototype.
9126 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
9128         * mini.c: Compile icall wrappers lazily.
9130         * mini-codegen.c: Use printf instead of g_print since its much faster.
9132         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
9133         function.
9135         * mini.c (optimize_branches): Cache the negative result from 
9136         remove_block_if_useless ().
9138         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
9139         Also fix some bblock linking issues.
9141         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
9142         assembly files.
9144         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
9146         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
9147         accessed fields first, for better cache behavior.
9148         
9149 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9151         * mini.c: speedup IList<T> array accesses.
9153 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
9155         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
9156         inline_costs counter. Fixes #77190.
9158 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
9160         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
9161         trace messages. Fixes #77706.
9163 2006-03-04  Martin Baulig  <martin@ximian.com>
9165         * tramp-amd64.c, tramp-x86.c
9166         (mono_debugger_create_notification_function): Use
9167         mono_global_codeman_reserve() to allocate a buffer at runtime and
9168         return it.
9170         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
9172         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
9173         notification function at runtime and then call `initialize' in the
9174         `MONO_DEBUGGER__debugger_info' vtable.
9176 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
9178         * iltests.il: Fix a visibility problem.
9180 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9182         * driver.c, mini.c: add hooks for the counters API.
9184 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9186         * driver.c: show disabled options.
9188 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9190         * linear-scan.c: always use cost-driven selection.
9192 2006-02-28  Raja R Harinath  <rharinath@novell.com>
9194         * jit-icalls.c (helper_compile_generic_method): Revert change from
9195         2006-02-24.
9197 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
9199         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
9201 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
9203         * inssel.brg: style fixes, mostly to force the updated monoburg
9204         to run for people using svn.
9206 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9208         * mini.c: match monoburg changes.
9210 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9212         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
9213         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
9214         declaration in the header file.
9216 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9218         * helpers.c: reduce relocations and mem usage.
9220 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9222         * mini.h, mini-codegen.c: disable logging features if
9223         requested by configure.
9225 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
9227         * mini.c: tiny verifier changes.
9229 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9231         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
9232         cpu-pentium.md: stack alignment changes for osx/x86,
9233         partially from Geoff Norton <gnorton@customerdna.com>.
9235 2006-02-24  Raja R Harinath  <harinath@gmail.com>
9237         * jit-icalls.c (helper_compile_generic_method): Update to changes
9238         in metadata/class.c.
9240 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
9241         
9242         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
9243         
9244         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
9245         interface calls with large offsets.
9247 2006-02-23  Raja R Harinath  <rharinath@novell.com>
9249         * jit-icalls.c (helper_compile_generic_method): Document the
9250         special-case we depend on so that we can inflate the method twice
9251         with the same context with no bad side-effects.
9253 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9255         * mini-x86.c, mini-amd64.c: fix for case when xen support
9256         is disabled.
9258 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9260         * mini-x86.c, mini-amd64.c: generate code to access tls items
9261         in a faster way for Xen systems.
9263 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9265         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
9266         updates and compilation fixes for the OSX/x86 port, mostly from
9267         Geoff Norton <gnorton@customerdna.com>.
9269 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9271         * inssel.brg: faster interface call implementation
9272         to sync with the interface_offsets MonoVTable changes.
9274 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9276         * mini.c: more verification checks.
9278 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
9280         * mini.c: added a few more verification checks.
9282 2006-02-17      Neale Ferguson <neale@sinenomine.net>
9284         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
9285         facility on the processor and use it if available.
9287 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9289         * driver.c, aot.c, mini.c: throw exception if the IL code is
9290         invalid or unverifiable.
9292 2006-02-17  Raja R Harinath  <rharinath@novell.com>
9294         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
9295         m.StructField.
9297 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
9299         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
9301 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9303         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
9304         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
9305         handling of instantiated generic valuetypes.
9307 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
9309         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
9310         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
9311         instead.
9313         * generics.2.cs: Revert the nullable reftypes tests.
9315 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
9317         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
9318         using __builtin_frame_address (1) as it doesn't work in the presence
9319         of optimizations. Hopefully fixes #77273.
9321         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
9322         -> generics.cs change as it doesn't work with some automake versions.
9324 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9326         * mini.c: handle systems that sue a different way to
9327         retrieve the stack address of the current thread.
9329 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
9331         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
9332         it specially in the makefile.
9334         * generics.2.cs: Add tests for nullable reference types.
9336 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9338         * mini.c: always handle the case when mono_jit_init()
9339         is called in a thread different from the main thread,
9340         confusing libgc (bug #77309).
9342 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
9344         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
9346 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9348         * mini.c: change optimize_branches () to use a single loop
9349         and introduce a new optimization to simplify some range checks.
9351 2006-02-03  Martin Baulig  <martin@ximian.com>
9353         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
9354         and merged with debugger_thread_manager_add_thread().
9355         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
9356         inform the debugger about the main thread.
9358 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9360         * basic.cs: Add test for div.un/rem.un constant folding.
9362 2006-02-03  Neale Ferguson <neale@sinenomine.net>
9364         * cpu-s390x.md: correct int_xor_imm length
9366 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9368         * generics.2.cs: New test for #77442.
9370         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
9371         #77442.
9373 2006-02-02  Martin Baulig  <martin@ximian.com>
9375         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
9376         <mono/metadata/mono-debug-debugger.h>   
9378         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
9380 2006-02-02  Martin Baulig  <martin@ximian.com>
9382         * debug-debugger.h: New header file for debug-debugger.c.
9384         * debug-debugger.c: Big API cleanup; don't run the managed Main()
9385         function is a separate thread anymore; add support for attaching.
9387 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
9389         * tramp-x86.c: Fix a warning.
9391 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
9393         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9394         on very large methods.
9396         * aot.c (load_patch_info): Fix a warning.
9398 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9400         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9401         mini-ops.h: alu membase optimizations.
9403 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9405         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9406         to speedup StringBuilder.
9408 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
9410         * dominators.c (mono_compute_natural_loops): Fix detection of
9411         loop body start blocks.
9413         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9415 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
9417         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9418         #75145.
9420 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
9422         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9424 2006-01-25  Martin Baulig  <martin@ximian.com>
9426         * debug-debugger.c: Moved the `MonoDebuggerManager' and
9427         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9428         started to cleanup this file a little bit.
9430 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9432         * mini.c: optimize a codepath frequently happening in generics code.
9434 2006-01-23  Martin Baulig  <martin@ximian.com>
9436         * Makefile.am: Only compile debug-debugger.c on supported platforms.
9438         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9439         functions directly.
9441         * driver.c: debug-debugger.c is only available if
9442         `MONO_DEBUGGER_SUPPORTED' is defined.   
9444 2006-01-23  Martin Baulig  <martin@ximian.com>
9446         * debug-debugger.c: Only enable this on platforms where the Mono
9447         Debugger is working (x86 and x86_64).
9449 2006-01-21  Martin Baulig  <martin@ximian.com>
9451         The Mono Debugger is now using the normal `mono' instead of the
9452         `mono-debugger-mini-wrapper' when executing managed code.
9454         * debug-debugger.c: New file; previously known as
9455         debugger/wrapper/wrapper.c.
9457         * debug-mini.c (mono_init_debugger): Removed.
9459         * driver.c (mono_main): Added new `--inside-mdb' command line
9460         argument which is used when running inside the debugger.
9462 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
9464         * liveness.c (mono_analyze_liveness): Remove some unused data
9465         structures.
9467 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
9469         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9471 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
9473         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9474         depends on implementation details of monobitset.
9476         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9477         Fixes #77271.
9479 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
9481         * liveness.c: Update after monobitset changes.
9483 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
9485         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9487 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9489         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9491         * mini-s390x.c: Remove warning messages.
9493 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
9495         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9497 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
9499         * generics.2.cs: Add ldelem/stelem_any test.
9501 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9503         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9505 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
9507         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9508         
9509 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
9511         * generics.2.cs: Reenable vtype tests.
9513         * inssel-x86.brg: Remove an icorrect valuetype rule.
9515 2006-01-06 Neale Ferguson <neale@sinenomine.net>
9517         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
9518         initial support for OP_ABS.
9520 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9522         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9524 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9526         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
9527         conversion and implement LADD/LSUB.
9529         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9530         architectures.
9532 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9534         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9536         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9537         architectures.
9539 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9541         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
9542         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
9543         (stack walk problem).
9545 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
9547         * aot.c (mono_aot_load_method): Fix a warning.
9549 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9551         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9553 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9555         * iltests.il: Add test for #77148.
9557         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9558         #77148.
9560 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9562         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9564 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9566         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9567         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9569         * basic-long.cs: Add lconv-to-r4/r8 tests.
9571 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9573         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9575         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9576         here as on other archs.
9578 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9580         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9582 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9584         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
9585         
9586         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
9588         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
9589         instrument_prolog; Add memory_barrier instruction.
9591 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
9593         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
9595 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
9597         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
9599         * aliasing.c inssel.brg: Fix warnings.
9601         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
9602         could skip initialization of some parts of memory.
9604         * mini.c mini-ia64.c: Fix warnings.
9606         * inssel-sparc.brg: Add an implementation of lneg which actually works.
9608 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
9610         * aliasing.c (mono_build_aliasing_information): Add a workaround for
9611         a crash seen on sparc.
9613         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
9614         
9615         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
9617 2005-12-21 Neale Ferguson <neale@sinenomine.net>
9619         * mini-ops.h: Add s390_backchain instruction
9621         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
9623         * cpu-s390.md: Add s390_backchain instruction
9625         * mini-s390.c: Significant ABI changes
9627         * mini-s390.h: Cater for zero length structures
9629 2005-12-20 Neale Ferguson <neale@sinenomine.net>
9631         * mini-s390.c: ABI fixes
9633         * inssel-s390.brg: Remove debug statements
9635         * cpu-s390.md: Fix length of ATOMIC_xx operations
9637 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
9639         * basic-float.cs: Add float<->long conversion tests.
9641 2005-12-16 Neale Ferguson <neale@sinenomine.net>
9643         * mini-s390.c: Fix LOCALLOC processing.
9645         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9647 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
9649         * iltests.il: Add tests for some opcodes not covered by the other
9650         tests.
9652 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9654         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
9655         register loading for Tail processing; Correct trace output.
9657         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9659         * cpu-s390.md: Correct size of jmp instruction. 
9661 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9663         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9665 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9667         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9668           Bring s390 up to current level.
9670 2005-12-12  Zltan Varga  <vargaz@gmail.com>
9672         * generics.2.cs: Disable the newly added tests as they do not work yet.
9673         
9674         * generics.2.cs: Add valuetype tests.
9676 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
9678         * basic-long.cs: Add i4->u8 test.
9680         * objects.cs: Add tests for JIT intrinsic.
9682         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9683         optimizations lost by a mistake.
9685 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
9687         * basic-long.cs: Remove a test moved to objects.cs.
9689         * arrays.cs: Add more array tests.
9691 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
9693         * arrays.cs: Add new tests for multi-dimensional arrays.
9695 2005-12-06  Raja R Harinath  <rharinath@novell.com>
9697         * Makefile.am (test_sources2): Add generics.2.cs.
9698         (EXTRA_DIST): Add test_sources2.
9700 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
9702         Support for boxing and unboxing nullable types as well as the
9703         isinst operation on nullables, per the CLI ammendment.
9705         * inssel.brg (CEE_ISINST): Special case for nullable
9707         * mini.c (handle_unbox_nullable): new method
9708         (handle_box): Special case for nullable types
9709         (mono_method_to_ir): Call handle_unbox_nullable in correct
9710         places.
9712         * generics.2.cs: New test suite
9714         * Makefile.am: Support for regression tests with generics.
9716 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
9718         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9719         allocated to registers. Fixes #76800.
9721 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9723         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9725 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
9727         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
9728         of platforms.
9730 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
9732         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9733         objects.cs.
9735         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9736         
9737         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9738 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9740         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9741         single precision before storing to a single precision location.
9743 2005-11-28  Raja R Harinath  <rharinath@novell.com>
9745         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9747 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
9749         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9750         correct files.
9752         * basic.cs: Remove test_0_byte_compares test which was moved to
9753         objects.cs a long time ago.
9755 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
9757         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9759 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
9761         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9762         handlers are called.
9764         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9765         throwing code.
9767          * mini-ia64.c: Add support for the throw->branch exception 
9768         optimization.   
9770         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9772 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9774         * mini.c: Enabled "fastpath" deadce :-)
9775         
9776 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9778         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9779         alias analysis pass to support it.
9780         * mini.h: Likewise.
9781         * ssa.c: Likewise.
9782         * liveness.c: Likewise (liveness computation can use aliasing
9783         information to be more accurate).
9784         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9785         moreover made so that "--compile-all" uses the given optimization
9786         flags and not the default ones.
9787         * aliasing.c: Alias analysis (new file).
9788         * aliasing.h: Likewise.
9789         * Makefile.am: added "aliasing.c" and "aliasing.h".
9790         
9791 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
9793         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9794         OP_L opcodes.
9796 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
9798         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
9799         fp >= end_of_stack exit condition, as it is not needed, and it might
9800         become true for fp eliminated frames.
9802 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
9804         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
9805         coded offsets.
9807 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
9809         * mini-arm.c: fixed alignment of doubles/longs to match
9810         the C ABI (bug #76635).
9812 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
9814         * aot.c: fix compilation with --enable-minimal=aot.
9816 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
9818         * mini-arm.c: fixed compatibility with the new
9819         floating point emulator package for compares.
9821 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
9823         * mini.c : reverted sig->pinvoke changes (r51396-51397).
9825 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
9827         * mini-exceptions.c (print_stack_frame): Output to stderr.
9828         (mono_handle_native_sigsegv): Ditto.
9830 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9832         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
9833         OP_LCONV_TO_OVF_I implementation.
9835         * mini-amd64.c: Add support for the throw->branch exception 
9836         optimization.
9838         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
9839         when the catch clause catches a more general exception, i.e. Object.
9841 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
9843         * cpu-ia64.md: Remove unused opcodes.
9845         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
9846         specific defines for architectures defining USE_SIGACTION.
9848         * mini-ia64.c: Fix some warnings.
9850         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
9851         version seemed to skip a frame.
9853 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9855         * mini.c: Clean up the usage of sig->pinvoke flag. Now
9856         only calls which are made to native code use this flag.
9858 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
9860         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
9861         varargs methods as well.
9862         
9863         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
9864         which have save_lmf set. Reorganize methods prologs a bit.
9866         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
9867         debugger to the proper place.
9869 2005-10-29  Martin Baulig  <martin@ximian.com>
9871         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
9872         when running inside the debugger until the debugger has support
9873         for it.
9875 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
9877         * mini.h: Fix a warning.
9879 2005-10-24  Miguel de Icaza  <miguel@novell.com>
9881         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
9882         we expose publicly, this returns the string.
9884 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
9886         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
9887         with fp elimination.
9889 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
9891         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
9892         native stacktrace using the glibc 'backtrace' function if available.
9894 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
9896         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
9898         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
9899         handle SIGSEGVs received while in native code.
9901         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
9902         code, call mono_handle_native_sigsegv which will abort the runtime
9903         after printing some diagnostics, instead of converting it into a
9904         confusing NullReferenceException.
9906 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
9908         * cpu-pentium.md: Remove unused opcodes.
9910 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
9912         * mini-amd64.h (MonoLMF): Add rsp field.
9914         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
9915         the lmf too.
9917 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
9919         * mini-codegen.c (get_register_spilling): Fix some warnings.
9921 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
9923         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
9924         elimination during exception handling. Enable fp elimination by
9925         default.
9927         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
9928         elimination.
9930 2005-10-16  Martin Baulig  <martin@ximian.com>
9932         * mini-exceptions.c
9933         (mono_debugger_run_finally): New public method for the debugger.
9935 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
9937         * debug-mini.c (mono_debug_init_method): Fix warning.
9939         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
9940         the 'exname' parameter const to fix some warnings.
9942 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
9944         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
9945         introduced by the previous patch.
9947 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
9949         * basic-float.cs: Add test for precision of float arithmetic.
9951         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
9952         when loading/storing single values from/to memory.
9954         * mini.c (mono_jit_compile_method_with_opt): Create the function
9955         pointers in the correct domain.
9957 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
9959         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
9960         introduced by previous patch.
9961         
9962         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
9963         when out_filter_idx is NULL.
9965         * mini-exceptions.c: Don't run filter clauses twice during exception
9966         handling. Fixes #75755.
9968 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
9970         * aot.c: Add support for ldflda wrappers.
9972         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
9973         #75902.
9975 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
9977         * mini.c, mini.h: do not consider exception handlers blocks when
9978         setting up interface variables.
9980 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
9982         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
9984 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
9986         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
9987         causes a regression.
9989         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
9991 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
9993         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
9994         of the OP_P definitions.
9996         * TODO: Add a proposal for dealing with the CEE/OP mess.
9998         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
9999         optimizations from the x86 port.
10001         * cpu-amd64.md: Ditto.
10003         * basic.cs basic-long.cs: Add tests.
10005 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
10007         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
10008         Patrik Torstensson's implementation of my exception-handling
10009         optimization idea, when the exception object is not used
10010         (bug #62150).
10012 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
10014         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
10015         of the mul_imm optimizations from the old jit.
10017 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
10019         * mini.c, liveness.c: patch by Patrik Torstensson and
10020         Zoltan Varga to improve performance in methods with
10021         exception clauses.
10023 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
10025         * driver.c: Remove 'Globalization' entry from --version.
10027 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
10029         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
10030         there is a profiler interested in JIT events.
10032         * aot.c: Load profile files produced by the AOT profiling module, and
10033         reorder methods based on the profiling info. Add a 'method_order' table
10034         to the AOT file to make mono_aot_find_jit_info work with the reordered
10035         methods.
10037         * mini.h: Bump AOT file version info.
10039 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
10041         * mini-arm.h: work around what looks like a gcc bug when optimizations
10042         are enabled.
10044 2005-09-28  Raja R Harinath  <rharinath@novell.com>
10046         * Makefile.am (AM_CFLAGS): Don't use += to append inside
10047         conditionals.  Use ...
10048         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
10050 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
10052         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
10053         to determine the amount of memory to copy when passing valuetypes.
10055         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
10056         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
10058 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
10060         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
10061         information about aot.
10063 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
10065         * *.c: Replace the use of {Enter,Leave}CriticalSection with
10066         macros. This will allow a deadlock debugger to easily be plugged
10067         in.
10069 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
10071         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
10073 2005-09-27  Raja R Harinath  <rharinath@novell.com>
10075         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
10076         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
10077         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
10078         ($(arch_built)) [CROSS_COMPILING]: Error out.
10080 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
10082         * aot.c: Add support for the no_special_static flag for classes.
10084 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10086         * Reapply reverted patches.
10088         * *: Revert r50174 as well.
10090         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
10092 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10094         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
10096 2005-09-23  Miguel de Icaza  <miguel@novell.com>
10098         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
10099         part of the SIG_HANDLER_SIGNATURE.  
10101 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
10103         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
10104         statistics.
10106         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
10107         introduced by previous patch.
10109 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
10111         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
10112         saved registers too.
10114         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
10115         upon the information returned by get_call_info ().
10116         
10117         * mini-x86.c (add_float): Fix stack size calculation.
10118         (mono_arch_call_opcode): Rewrite this so it works based up the
10119         information returned by get_call_info ().
10120         (mono_arch_get_this_vret_args): Ditto.
10122 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
10124         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
10125         in cinfo to determine the registers which need to be used.
10127 2005-09-20  Miguel de Icaza  <miguel@novell.com>
10129         * driver.c (mono_main): Add --server and --desktop flags. 
10131 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
10133         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
10134         registers as global registers.
10136         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
10137         longer needed with the new register allocator.
10139         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
10141         * cpu-ia64.md: Remove unused opcodes.
10142         
10143         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
10144         
10145 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
10147         * cpu-amd64.md: Remove unused opcodes.
10149         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
10150         needed with the new register allocator.
10152         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
10153         reg-reg moves.
10155 2005-09-16  Raja R Harinath  <rharinath@novell.com>
10157         * Makefile.am (check-local): Don't invoke semdel-wrapper.
10159 2005-09-16  Martin Baulig  <martin@ximian.com>
10161         * exceptions-amd64.c
10162         (throw_exception): Don't call mono_debugger_throw_exception() if
10163         we're a rethrow - see the FIXME in the code.
10165 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
10167         * mini.c (mono_init_exceptions): This only works on some architectures.
10168         
10169 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10171         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
10172         on ia64.
10174         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
10176         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
10177         now in mini-exceptions.c.
10179 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
10181         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
10182         now in mini-exceptions.c.
10184 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10186         * exceptions-x86.c: Applied patch from Patrik Torstensson 
10187         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
10189         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
10190         code into mini-exceptions.c. Add some assertions to it.
10192 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
10194         * aot.c (emit_section_change): Applied patch from "The Software Team" 
10195         (<software@solmersa.com>). Fix as errors on windows.
10197 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10199         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
10200         method info into the LMF.
10202 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10203         
10204         * mini-ia64.c: Add proper unwind info for method epilogs.
10206         * exceptions-ia64.c: Add some code to help debugging.
10207         
10208         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
10210         * mini-exceptions.c: Fix warning.
10212 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10214         * mini.c: Really fix build.
10216         * mini-x86.c mini-amd64.c: Fix build.
10218 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10220         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
10222         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
10223         some Interlocked methods as intrinsics.
10225         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
10226         for Thread methods as well.
10228         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
10230         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
10232         * mini-ia64.c mini-x86.c mini-amd64.c 
10233         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
10234         OP_MEMORY_BARRIER.
10235         
10236         * mini.c (mono_init_exceptions): Fix build breakage.
10238 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
10240         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
10241         of instructions. Use the new ia64_unw_op macros for emitting unwind
10242         info.
10244         * mini.c (mono_init_exceptions): Initialize exception handling
10245         related trampolines at startup.
10247 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
10249         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
10251 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
10253         * mini.c: Handle type loading errors gracefully during compilation and
10254         throw the appropriate exception.
10256 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
10258         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
10259         for the mono binary.
10261 2005-09-09  Martin Baulig  <martin@ximian.com>
10263         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
10264         the release.
10266 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10268         * mini-arm.h: use emulation for conv.r.un for the release.
10270 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10272         * mini-arm.c, objects.cs: more fixes and tests for them.
10274 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10276         * mini-arm.c: align structures to at least 4 bytes to be able
10277         to keep our current optimized memcpy.
10279 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
10281         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
10283 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10285         * mini.c: ignore SIGPIPE.
10287 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
10289         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
10291         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
10293 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
10295         * mini.h: Add prototype for mono_allocate_stack_slots_full.
10297 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10299         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
10300         exception handling support.
10301         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
10302         patch by Brian Koropoff <briank@marakicorp.com>).
10304 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
10306         * mini.c: revert another 'optimization' which breaks when
10307         items on the eval stack need to be saved at a basic block end
10308         (bug #75940).
10310 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10312         * jit-icalls.c: for arrays, ensure we always provide
10313         lower bounds.
10315 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
10317         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
10318         
10319         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
10321 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
10323         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
10324         arguments in their original register.
10326 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
10328         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
10329         memset/memcpy.
10331         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
10332         when ssapre is enabled.
10334         * inssel-long.brg: Fix bug in previous patch.
10336         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
10337         multiplication by a constant.
10339 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
10341         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
10342         icc.
10344         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
10345         saving registers.
10347 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
10349         * inssel-arm.brg: apply changes tested by Brian Koropoff
10350         <briank@marakicorp.com>.
10352 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
10354         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
10355         
10356 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
10358         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
10359         to the same register if dreg is just a base register.
10360         (print_ins): Improve printing of membase opcodes.
10362         * inssel-x86.brg: Add optimized ldind(reg) rules.
10364         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
10366 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
10368         * mini.c: when running under valgrind, set the stack bottom for
10369         the GC at the actual approximate stack for the app (fixes running
10370         mono with valgrind).
10372 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
10374         * mini.c: do no break at the first valuetype to init found
10375         (fixes bug #75791).
10377 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
10379         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
10381 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
10383         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
10385 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
10387         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
10389 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10391         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10393         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10394         code.
10396         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10397         code.
10399         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10400         methods.
10402 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10404         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10406 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10408         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10409         in the tail recursion optimization.
10411         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
10412         debug info into the assembly file.
10414         * iltests.il: Add test for filter regions.
10416         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10417         initial stack of filter regions. Fixes #75755.
10419 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10421         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10422         stack requirements.
10424 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10426         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10427         the check for an already compiled method on non-ia64 platforms.
10428         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10429         proper domain.
10431         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10433         * inssel-x86.brg: Add some optimized call rules.
10435 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
10437         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10438         method here.
10440         * mini.h mini-trampolines.c: Pass the trampoline argument to 
10441         mono_arch_patch_delegate_trampoline.
10443         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10445         * mini-trampolines.c: Fix build.
10447         * mini-amd64.h: Add delegate trampolines.
10449         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10451         * inssel-amd64.brg: Add optimized call rules.
10452         
10453         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10455         * inssel-ia64.brg: Add optimized ldind(reg) rules.
10457 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
10459         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10460         change.
10462         * mini-ia64.c: Remove LMF fixmes.
10464         * mini-ia64.h: Remove most fields from LMF.
10466         * inssel-ia64.brg (stmt): Fix unaligned access errors.
10468         * mini-trampolines.c: Add support for IA64 function descriptors.
10470         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10471         for IA64 function descriptors.
10473 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10475         * tramp-arm.c: patch the vtable for virtual calls. Added
10476         support code to register/unregister the LMF.
10477         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10478         more LMF work.
10480 2005-08-19  Dick Porter  <dick@ximian.com>
10482         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10483         bit value if needed.
10485 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
10487         * mini.c (mini_get_method): Move handling of wrapper data here.
10489         * mini.c (mono_method_to_ir): Add support for dynamic methods.
10491         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10492         virtual.
10494         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
10495         bblock->code does not remain empty.
10497 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
10499         * arrays.cs: Add regression test for #75832.
10501         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10502         rules. Fixes #75832.
10504         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10505         instruction scheduling.
10507 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
10509         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
10511 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
10513         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
10515         * mini-codegen.c: Fix VC build.
10517         * cpu-pentium.md: Increase length of atomic_exhange_i4.
10519 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10521         * mini.h: fix signature for mono_register_opcode_emulation.
10523 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
10525         * mini.c: Get rid of most of the helper_sig_... constants using
10526         mono_create_icall_signature ().
10528 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
10530         * jit-icalls.c (helper_ldstr): New helper function.
10532         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10534         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10535         throw, load the string using a helper call instead of creating a string object.
10537         * aot.c: Update after LDSTR changes.
10539         * mini.h: Bump AOT file version.
10540         
10541         * aot.c: Save class size info into the AOT file. Print more statistics during
10542         compilation.
10544         * mini.h: Bump AOT file version.
10546         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10547         ordering of disasm cases. Fixes #74957.
10549 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10551         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10552         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10553         the generic code needed for the ARM port.
10555 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10557         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10558         inssel-arm.brg: more ARM features and fixes.
10560 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10562         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10563         ARM port work in progress.
10565 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
10567         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10569         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10571         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10573         * inssel.brg (mini_emit_memset): Add support for unaligned access.
10575         * *-ia64.*: Ongoing IA64 work.
10576         
10577         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10579 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
10581         * TODO: Remove out-of-data todo stuff.
10583         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
10584         dead code.
10586         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
10588         * mini.h: Bump corlib version.
10590 2005-07-27  Martin Baulig  <martin@ximian.com>
10592         * mini-codegen.c
10593         (create_copy_ins): Added `const unsigned char *ip' argument; set
10594         `copy->cil_code' from it.
10596 2005-07-27  Martin Baulig  <martin@ximian.com>
10598         * mini-exceptions.c (mono_handle_exception): Don't call
10599         mono_debugger_handle_exception() for filters.
10601 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
10603         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
10604         as well.
10606 2005-07-26  Martin Baulig  <martin@ximian.com>
10608         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
10610         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
10611         helper_compile_generic_method() if the method is actually virtual
10612         and non-final.
10614 2005-07-26  Martin Baulig  <martin@ximian.com>
10616         * mini.c
10617         (trampoline_code): Renamed to `mono_trampoline_code' and made it
10618         public; this is now accessed directly by the debugger.
10619         (mono_generic_trampoline_code): Removed.
10621         * debug-mini.c
10622         (mono_debug_init_method): Also add interncalls and wrappers.
10624 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
10626         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
10628 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
10630         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
10632 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
10634         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
10636 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10638         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
10639         getting TLS offsets on AMD64 too.
10641 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
10643         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10645 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10647         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10648         inssel-arm.brg, mini-arm.h: ARM port work in progress.
10650 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10652         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10654         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10655         to mini.c.
10657         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
10658         mono_sparc_is_virtual_call ().
10659         
10660         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10662         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10663         trampoline parameters.
10665         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10666         
10667         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10668         to mono_arch_get_vcall_slot_addr.
10670         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10671         trampoline code.
10673         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10675 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10677         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10679 2005-07-19  Martin Baulig  <martin@ximian.com>
10681         * exceptions-amd64.c (throw_exception): Call
10682         mono_debugger_throw_exception() here like we're doing it on i386.
10684 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10686         * mini-ia64.c: Add optimized TLS access support.
10688 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
10690         * mini-exceptions.c: Ongoing IA64 work.
10692         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10694         * mini.c: Use the default optimization set when embedding. Fixes
10695         #75194.
10697 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
10699         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
10700         of trampolines to a separate file.
10702         * mini-trampolines.c: New file.
10704         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
10705         separate file.
10706         
10707         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
10708         amd64/ia64 code.
10710         * mini-codegen.c: Fix cygwin build.
10712 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
10714         * mini.c: Add some minor changes needed by the IA64 port.
10716         * *-ia64.*: Ongoing IA64 work.
10718 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
10720         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
10721         trampolines into arch-independent and arch-dependent parts.
10723         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10725 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
10727         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10729         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10730         the xp-regalloc-branch for amd64.
10732         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10733         xp-regalloc-branch for x86.
10735 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10737         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10739 2005-07-06  Martin Baulig  <martin@ximian.com>
10741         * mini.c
10742         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10743         (mono_jit_runtime_invoke): Likewise.
10745 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
10747         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10748         on x86 too.
10749         
10750         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10751         without loading their metadata. Reorganize the file format so exception handling+
10752         debug info is kept separate from normal method info. Create MonoJitInfo 
10753         structures for methods lazily.
10755         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10756         loading metadata.
10757         (x86_class_init_trampoline): Patch AOT class init trampolines too.
10759         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10761         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10762         in AOT code.
10764         * mini.h: Bump AOT file version.
10766 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
10768         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10770 2005-07-01  Raja R Harinath  <rharinath@novell.com>
10772         * Makefile.am (check-local): Call semdel-wrapper.
10774 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
10776         * mini-x86.c: Revert the last change as it seems to break the build..
10778 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
10780         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10781         
10782         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10784 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
10786         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10787         outside of the macro, so strange stuff doesn't happen with gcc4
10788         (NEW_AOTCONST_TOKEN): Likewise.
10790 2005-06-28  Martin Baulig  <martin@ximian.com>
10792         * mini.c (mini_class_is_system_array): New static method; use this
10793         instead of `klass->parent == mono_defaults.array_class' everywhere
10794         since this also works for the new generic array class.
10796 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
10798         * inssel.brg: Remove warnings.
10800 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
10802         * mini-ia64.c: Ongoing IA64 work.
10804         * basic-float.cs: Add float->i1 conversion test.
10806         * iltests.il: Add conv.u4 test.
10808 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
10810         * inssel-long.brg: Fix bug caused by last change.
10812 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
10814         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
10815         BSDs.  Allows the x86 JIT to work on OSX86
10817 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
10819         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
10820         u4->i8 conversion.
10822         * mini-ia64.c: Ongoing IA64 work.
10824 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
10826         * mini-ia64.c: Ongoing IA64 work.
10828         * driver.c: Clean up jit_code_hash as well when using --regression.
10830         * inssel-long.brg: Fix long->i4/u4 conversion rules.
10832         * basic-long.cs: Add tests for long->u4 conversion.
10834 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
10836         * mini.c: Take mono_get_domainvar out of macros. This makes sure
10837         that we do not depend on undefined C behavior: the order stuff
10838         gets evaluated within an expression. Fixes mono when compiled on
10839         GCC 4.
10841 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
10843         * *-ia64.*: Ongoing IA64 work.
10845         * aot.c: Lower memory usage while loading AOT methods.
10847         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
10849         * mini.h: Bump AOT file format version.
10851 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
10853         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
10855 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
10857         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
10858         not on callee assembly). Fixed some comments.
10860 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
10862         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
10863         it gets proper disassembly.
10864         (emit_method_info): Remove some dead code.
10866         * mini.c (mini_method_compile): Allways allocate the GOT var in
10867         mono_method_to_ir for emulating opcodes.
10869 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
10871         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
10872         before freeing the code memory. Fixes #74990.
10874         * objects.cs: Add regression test for #74992.
10876         * liveness.c: Extend live ranges of arguments to the beginning of the
10877         method. Fixes #74992.
10879         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
10880         so it points into the faulting instruction.
10882 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
10884         * jit-icalls.c (mono_imul_ovf): Add exception handling.
10886         * *-ia64.*: Ongoing IA64 work.
10888         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
10890 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
10892         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
10894         * *-ia64.*: Ongoing IA64 work.
10896 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
10898         * basic-long.cs: Add tests for add/sub.ovf.
10900         * basic.cs: Add tests for sub.ovf.
10902         * *-ia64.*: Ongoing IA64 work.
10904 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
10906         * *-ia64.*: Ongoing IA64 work.
10908         * basic.cs: Add conv.ovf.i4.un test.
10910 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
10912         * mini.c: (remove_block_if_useless) Fixed bug 75061.
10913         
10914 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10916         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
10918 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
10920         * *-ia64.*: Ongoing IA64 work.
10922 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10924         * trace.[ch]:
10925         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
10927 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
10929         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
10931 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
10933         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
10935         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
10936         of a call is callable by a near call.
10938 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
10940         * mini-ia64.c: Ongoing IA64 work.
10942 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
10944         * genmdesc.c: Make the generated array non-static.
10946         * inssel-long.brg: Fix LSHR_IMM rule.
10948         * *-ia64.*: Ongoing IA64 work.
10950         * *-ia64.*: Ongoing IA64 work.
10952 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10954         * *-ia64.*: Ongoing IA64 work.
10956         * *-ia64.*: Ongoing IA64 work.
10957         
10958         * mini-ia64.c: Ongoing IA64 work.
10960         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
10962 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
10964         * objects.cs basic-calls.cs: Move some tests to objects.cs.
10965         
10966         * objects.cs basic-long.cs: Move some tests to objects.cs.
10968 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
10970         * *-ia64.*: Ongoing IA64 work.
10972         * iltests.il: Add a new test.
10974         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
10975         newobj. Fixes #75042.
10977 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
10979         * *-ia64.*: Ongoing IA64 work.
10980         
10981         * *-ia64.*: Ongoing IA64 work.
10982         
10983         * *-ia64.*: Ongoing IA64 work.
10985         * basic.cs objects.cs: Move tests accessing static variables as well.
10987         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
10989 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
10991         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
10993         * driver.c: Always print failed tests.
10995         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
10996         frame pointer.
10998         * *ia64*: Ongoing IA64 work.
11000 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
11002         * basic.cs: Add tests for add.ovf. Fix warnings.
11004 2005-05-18  Miguel de Icaza  <miguel@novell.com>
11006         * driver.c (mono_main): Avoid crash if no argument is passed to
11007         --break;  Do not use g_error, but f_printf.   And fix all other
11008         ocurrences of the same crash.
11010 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
11012         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
11013         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
11014         Fixes #74742.
11016 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
11018         * *-ia64.*: Add beginnings of IA64 backend.
11020         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
11022 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
11024         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
11025         Fixes #74925.
11027         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
11029         * mini-amd64.c: Fix a warning.
11031 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
11033         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
11034         in float_neg. Fixes #74897.
11036         * mini-amd64.c (emit_call): Fix another near call bug.
11038 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
11040         * declsec.c: Keep the appdomain information in the structure. Added a 
11041         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
11042         value gets overwritten).
11043         * declsec.h: Set the default MonoArray for the the stack to 6. Added
11044         an MonoAppDomain member to MonoSecurityFrame.
11045         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
11046         used in the stack walk. Now use a MonoArray which grow (double) when
11047         it gets full.
11049 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
11051         * mini.c: Re-enabled runtime cleanup, since running threads should
11052         now properly stop when exiting.
11054 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
11056         * mini-codegen.c: New file contaning the arch-independent local
11057         register allocator. Not used by any architectures yet.
11059         * mini.h linear-scan.c: Merge some changes from the 
11060         mini-xp-local-regalloc branch.
11062 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
11064         * mini-amd64.c (emit_call): Fix calls to native functions when the
11065         runtime is compiled as a shared library. Fixes #74756.
11067         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
11068         on a literal field. Fixes #74751.
11070 2005-04-25  Raja R Harinath  <rharinath@novell.com>
11072         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
11074 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
11076         * objects.cs: Add missing null casting test.
11078 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
11080         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
11081         in wrapper methods. Also rename 'address' variable to 'offset'.
11083 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
11085         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
11086         warnings.
11087         
11088         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
11090         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
11091         work on windows.
11093 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11095         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
11097 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11099         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
11100         just the last bytes.
11102 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11104         * aot.c (mono_compile_assembly): Fix warning.
11106         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
11107         by the _MSC_VER stuff.
11109 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
11111         * inssel-long.brg: Fix #74588.
11113         * cpu-amd64.md: Fix #74591.
11115         * iltests.il: Add new regression tests.
11117 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
11119         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
11120         valuetype.
11122 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
11124         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
11126         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
11127         from Bill Middleton <flashdict@gmail.com>.
11129 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
11131         * arrays.cs: Add new regression test. Fix warnings.
11133 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
11135         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
11136         and leakage in CKFINITE.
11138         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
11139         this to a null op since it is called on amd64 too.
11141         * exceptions-amd64.c (get_throw_trampoline): Align stack.
11143         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
11144         body since this is not used on amd64.
11145         
11146         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
11148         * mini-amd64.c: Remove obsolete fixmes.
11150         * mini.c (print_method_from_ip): Fix debugging support.
11152 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11154         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
11155         so that expressions that don't give much gain are not reduced.
11156         * ssapre.h: Likewise.
11158 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
11160         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
11162         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
11164         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
11166 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
11168         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
11170         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
11172 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
11174         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
11175         stack touching.
11177         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
11179         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
11181         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
11183         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
11184         MONO_ARCH_USE_SIGACTION. Fixes #74252.
11186         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
11188         * mini-x86.c: Fix up stack overflow handling.   
11190         * exceptions.cs: Add new regression test.
11192 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
11194         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
11195         mono_jit_thread_attach.
11197         * mini.c (mono_method_to_ir): Verify called method is not abstract.
11199 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11201         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
11202         avoid calling constructors using callvirt.
11204         * inssel.brg: Fix #74073.
11206 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
11208         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
11209         compilation with non-GCC compilers.
11210         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
11211         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
11213 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
11215         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
11216         klass->interface_offsets (will likely fix bug#74073).
11218 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11220         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
11222 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
11224         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
11225         to amd64_div_reg_size ().
11226         
11227         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
11229 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
11231         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
11233 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11235         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
11237 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11239         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
11240         
11241         * mini.c (mono_precompile_assembly): Load and precompile referenced
11242         assemblies as well. Fixes #74015.
11244 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
11246         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
11248 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
11250         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
11251         a lot of checks and (anyway) permissions cannot work until corlib is 
11252         loaded.
11254 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
11256         * mini-ppc.c: fixed ABI issue on sysv/ppc.
11258 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
11260         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
11261         calls (fixes bug#72824).
11263 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11265         * mini.c: fix tail recursion elimination (see test in bug#73936).
11267 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
11269         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
11270         some fp functions in sse2 mode.
11272 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
11274         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
11276 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
11278         * mini.h mini.c: Add mono_get_jit_tls_key ().
11280         * mini-x86.c: Enable fast TLS support on windows.
11282 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
11284         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
11285         * mini.c: Check for p/invoke method when generating code. If a
11286         p/invoke method, or it's class, isn't decorated with [Suppress
11287         UnmanagedCodeSecurity] then generate code to call System.Security.
11288         UnmanagedDemand (only if the security manager is active).
11290 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11292         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
11293         last change as it seems to cause strange crashes.
11294         
11295 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11297         * *.c: handle unsafe function pointers where needed.
11299 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11301         * mini.c (mono_jit_free_method): Remove the fixme too.
11303 2005-03-15  Miguel de Icaza  <miguel@novell.com>
11305         * mini.c: As discussed, make the code actually free the delegate
11306         thunk now, to enable the debugging of delegate problems, use
11307         MONO_DEBUG=1 when running Mono. 
11309         This takes also care of parts of the leaks as seen by Joe.
11311 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
11313         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
11314         thread_tls_offset calculation.
11316 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
11318         * declsec.c: Reworked linkdemand checks for icall. The previous code
11319         was using the declaration code (untrusted) and didn't work as expected
11320         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
11321         specific case.
11323 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
11325         * iltests.il: Add new localloc test.
11327         * mini-amd64.c: Handle large stack allocations the same way as on
11328         windows if stack overflow handling is working.
11329         
11330         * mini-amd64.c: Allocate the signal stack using mmap.
11332         * mini.c (sigsegv_signal_handler): Fix reading of context.
11334         * mini-exceptions.c: Fix up stack overflow handling.
11336         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
11338         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
11340         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
11342         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
11344         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
11345         tramp_init functions as they are no longer needed.
11347 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
11349         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
11350         
11351         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
11353         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
11354         
11355         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
11356         support that now.
11358         * mini-ops.h: Add OP_LMUL_IMM.
11360         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
11361         long mul/div opcodes as intrinsic.
11363         * mini-amd64.c (emit_call): Handle the case when the callee might be
11364         an AOT method.
11366 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
11368         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
11369         extra safe.
11370         
11371         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
11373         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
11375 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
11377         * mini.c (mono_codegen): Don't leak here, to help people running
11378         monogrind.
11380 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
11382         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
11383         conversions in sse2 mode.
11385         * basic-float.cs: Add regression test.
11386         
11387         * mini-amd64.c: Reenable sse2.
11389 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11391         * mini-amd64.c: Disable sse2 until some regressions are fixed.
11393 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
11395         * driver.c: Copyright text should include 2005.
11396         
11397 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11399         * cpu-amd64.md (load_membase): Fix more max lengths.
11401 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
11403         * cpu-amd64.md (load_membase): Fix max length.
11405         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11407         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11409         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11410         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11412         * basic-float.cs: Add rounding regression test.
11414         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11416 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
11418         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11419         structures in registers for pinvoke wrappers.
11421 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
11423         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11425 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
11427         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11428         wrapper to mono_jit_thread_attach.
11430         * mini.c (mini_jit_thread_attach): New jit icall.
11432         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
11433         native->managed wrappers.
11435         * exceptions.cs: Add new regression test.
11437         * mini.c (optimize_branches): Check regions in the cbranch to throw
11438         block case as well. Fixes #73242.
11440 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11442         * mini.c: thread safety fixes.
11444 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
11446         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11447         patching stuff, since delegates use jump trampolines so there is
11448         no caller.
11450         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
11451         jump trampolines.
11452         
11453         * tramp-amd64.c: Fix build.
11455         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11456         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11458         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11459         Rename this to mono_arch....
11460         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11462         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11464         * mini-amd64.c (emit_call): If both the caller and the callee is
11465         guaranteed to have 32 bit addresses, emit a normal call.
11467         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11469         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
11470         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11471         method_ptr inside delegates.
11473 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
11475         * mini.c (mono_jit_free_method): Free the method info even if the native code is
11476         invalidated. Fixes #73001.
11478         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11480         * mini-x86.c: Only use stdcall for pinvokes on windows.
11482 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11484         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11485         * mini-x86.c: remove unreliable __thread var offset detection,
11486         use the correct accessors and enable by default.
11488 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
11490         * mini.c (mono_jit_free_method): Fix memory leak.
11492 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
11494         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
11496 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
11498         * cpu-amd64.md: Fix lengths of atomic opcodes.
11500 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11502         * driver.c: try to not imply using ICU is any good.
11504 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
11506         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
11507         functions as inline ops.
11509         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11510         some Interlocked functions as inline ops.
11512         * mini.c (move_basic_block_to_end): Fix bug in last patch.
11514         * mini.h (MonoBasicBlock): Reorganize fields a bit.
11516         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
11518         * mini.c: Add support for OP_NOT_TAKEN.
11520         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
11521         structures in registers for pinvoke wrappers.
11523         * mini-amd64.c: Fix warnings.
11525 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
11527         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11529         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11531         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
11532         address instead of loading the address from it.
11534         * mini-x86.c: Add support for returning small structs in registers
11535         on Win32. Fixes part of #70864.
11536         
11537 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
11539         * trace.c (get_token): Improve error checking.
11541 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
11543         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11545 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
11547         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11548         it can be reused for MonoClass.
11549         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11550         _LINKDEMAND.
11552 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
11554         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
11555         instead of a MonoReflectionMethod. The method information wasn't used
11556         when displaying SecurityException details (but will be now).
11558 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
11560         * Makefile.am : windows build fix.
11562 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
11564         * iltests.il: Add new regression test.
11566         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11567         #72522.
11569 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
11571         * mini.c: Moved linkdemand check into helper function check_linkdemand
11572         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
11573         LDFTN, LDVIRTFTN).
11575 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
11577         * declsec.c: Added statistics counter for different kinds of 
11578         LinkDemands.
11579         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11580         (and commented) declaration.
11581         * mini.c: Added statistics counter for security Demand code 
11582         generation. Added display of security statistics.
11584 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
11586         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
11587         Fix compilation errors under gcc-2.95.
11589 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
11591         * mini.c, driver.c: Use the new jit trampoline hashtable
11593 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11595         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
11597 2005-02-11  Martin Baulig  <martin@ximian.com>
11599         * debug-mini.c (mono_debug_close_method): Free the line number array.
11601 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11603         * aot.c: Break up large methods into smaller ones. Share GOT slots for
11604         icalls.
11606         * mini.h: Bump AOT file format version. 
11608 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
11610         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
11611         APTC and P/Invoke.
11612         * declsec.h: Added macros to get/set lazyly initialized security 
11613         informations about assemblies. Added new enum for different type of
11614         possible LinkDemand violation. Added function to check LinkDemands.
11615         * mini.h: Added a field to MonoCompile to hold any security violation
11616         detected when JITting a method (so it can be thrown later).
11617         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
11618         and CEE_CALLVIRT. Added code to throw exception at the end of
11619         mini_method_compile (note: the exception is unhandled right now).
11621 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
11623         * mini.c, jit-icalls.c: use the managed implementation of
11624         memset for initobj and memset, to avoid managed <-> unmanaged
11625         transitions.
11627 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11629         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
11630         optimization if it would need a GOT var.
11632         * basic.cs: Add tests for constant propagation and switch statements.
11634         * ssa.c: Fix out-of-range constant propagation and switch statements.
11636 2005-02-09    <vargaz@freemail.hu>
11638         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
11640 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
11642         * cpu-amd64.md (load_membase): Fix max length of load_membase.
11644 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11646         * mini.c: update to new signature of mono_class_get_allocation_ftn().
11648 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
11650         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
11651         arithmetic operations.
11653 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11655         * mini-ppc.c: add a workaround for broken user code that
11656         DllImports vararg functions with non-vararg signatures.
11658 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
11660         * mini.c (mono_jit_compile_method_inner): Add detection and a 
11661         meaningfull error message for assemblies written in Managed C++.
11663         * tramp-amd64.c mini-amd64.h: Add support for 
11664         create_trampoline_from_token ().
11666         * aot.c mini-x86.c abcremoval.c: Applied patch from
11667         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11669 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
11671         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
11672         which takes a MonoImage/token as parameter instead of a MonoMethod.
11674         * aot.c: Use the new trampoline for initializing vtables.
11676         * aot.c: Add support for ldfld/stfld_remote wrappers.
11678         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11679         rules for compare <MEM>, IMM.
11681         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11683         * aot.c: Handle inherited finalizers correctly.
11685 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
11687         * inssel.brg (stmt): Add a missing _setup_... ().
11689         * aot.c: Save some parts of the class state to the AOT file and use it
11690         to recompute that state when a class is initialized.
11692         * mini.c: Install AOT hooks into the runtime.
11694         * mini.h: Bump AOT file format version.
11695         
11696         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11697         Fixes #72148.
11699         * iltests.il: Add new test.
11701 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11703         * mini.c: fix typo.
11705 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11707         * mini.c: setup the statistical profiler in the thread attach
11708         callback to cope with the new single thread code.
11710 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11712         * mini-ppc.c: ensure we have enough room for the profiler
11713         calls (fixed bug#72084).
11715 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
11717         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
11718         it.
11720 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11722         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11724 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11726         * ssapre.c: Fixed an issue with down safety (this allows IronPython
11727         to succesfully execute parrotbench).
11728         * ssapre.h: Likewise.
11730 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11732         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11733         variable for stores to method arguments (fixes a SSAPRE issue).
11735 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11737         * mini.c: handle value types in dup, fixes gen-112.cs.
11739 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11741         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11742         sequence for calls in dynamic methods to avoid thunks.
11744 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11746         * mini.c: correctly remove dynamic methods from the hashtable.
11748 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11750         * driver.c: Disabled SSAPRE until fix the bug that appears
11751         in IronPython's parrotbench.
11753 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
11755         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11757         * mini.c (mono_method_to_ir): Revert the previous change.
11758         
11759         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11760         when AOT compiling.
11762         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
11763         mono_jit_info_table_find () etc. when running under valgrind.
11765         * inssel.brg: Fix warnings.
11767         * mini-exceptions.c: Fix warnings.
11769 2005-01-31  Martin Baulig  <martin@ximian.com>
11771         * driver.c (compile_all_methods_thread_main): Don't try to compile
11772         generic methods or anything which has type parameters.
11774 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
11776         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11778         * TestDriver.cs: Add --verbose flags.
11780         * graph.c ssa.c: Fix 64 bit warnings.
11781         
11782         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
11783         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11784         Fix 64 bit warnings.
11786         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11787         variable not spotted by gcc.
11788         
11789         * mini-amd64.c inssel-amd64.brg: Applied patch from  
11790         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
11791         X86_COMPARE_MEMBASE opcodes.
11793         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11795 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
11797         * *: MonoMethod->signature might be NULL now. You *MUST* use
11798         mono_method_signature.
11800 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11802         * driver.c (compile_all_methods_thread_main): Compile the methods
11803         without invoking cctors.
11805 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11807         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
11808         * basic-calls.cs: test for the above.
11810 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11812         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
11813         MonoJitInfo changes.
11815 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
11817         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
11818         eagerly if it contains dynamic methods.
11819         
11820         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
11822         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
11823         trace, it is now computed by an icall from trace_ips.
11824         
11825         * mini-exceptions.c: Fix a warning.
11827 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
11829         * mini-exceptions.c: don't bother getting stack trace info if
11830         it's not going to be used.
11832 2005-01-27  Raja R Harinath  <rharinath@novell.com>
11834         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
11835         ssapre-mini-ops.h.
11837 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
11839         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
11841         * aot.c: Avoid calling mono_method_get_header () if not needed.
11843         * mini.h: Bump AOT file format version.
11844         
11845         * mini.c (mono_emit_native_call): Allocate a GOT var here.
11847         * mini.c (mono_print_tree): Print more info for calls.
11849 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
11851         * declsec.h: Remove warning by adding missing include for marshal.h
11853 2005-01-26  Martin Baulig  <martin@ximian.com>
11855         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
11856         `ip' twice.
11858 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
11860         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
11861         flags.
11863         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
11865         * aot.c (mono_compile_assembly): Fix a warning.
11867 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
11869         * declsec.c: Look for security attributes on the original MonoMethod 
11870         (and not the wrapped one). This fix permissions on icalls.
11872 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11874         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11876         * mini.c (mono_allocate_stack_slots): Add a fixme.
11878         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
11880 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11882         * inssel.brg: optimize casts of sealed types (more
11883         optimizations waiting for fixes in remoting).
11885 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
11887         * inssel.brg (stmt): Add another dummy rule.
11889         * driver.c: Fix warnings.
11891         * driver.c (mono_main): If running under valgrind, instruct glib to use
11892         the system allocation functions so valgrind can track the memory
11893         allocated by the g_... functions.
11895         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
11897         * mini-ops.h: Add OP_DUMMY_STORE opcode.
11899         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
11901         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
11902         variables in try regions.
11904         * mini.c (mini_method_compile): Don't disable optimizations on large
11905         methods when AOT compiling.
11907         * mini.c (mono_allocate_stack_slots): New arch independent method to 
11908         allocate stack slots. Not yet used.
11910 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
11912         * debug-mini.c (mono_debug_close_method): Plug some leaks.
11914 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
11916         * mini-ppc.c: make the branch info relative as the code
11917         buffer can be reallocated.
11919 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
11921         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
11922         * driver.c: Removed the AOT/security restriction. Now initialize the
11923         security manager (in metadata) if --security is used.
11924         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
11925         rather than the pointer to declarative security, when AOT is used.
11927 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
11929         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
11930         basic blocks, reduced intrinsic exception throwing code size.
11932 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
11934         * driver.c (mini_usage): Reorder the usage screen.
11936 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
11938         * mini.c (mono_resolve_patch_target): Fix warning.
11940 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
11942         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
11943         previous patch.
11945         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11947         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
11948         breaks the amd64 build.
11950         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
11951         register allocation. Fixes #71454.
11953         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
11955         * arrays.cs: Add new regression test.   
11957 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11959         * ssapre.c: Turned usage of snprintf to GString.
11960         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
11961         (I left it on by mistake in my previous commit).
11963 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
11965         * mini.c, cfold.c, basic-calls.cs: preserve side effects
11966         on cond branch optimization (fixes bug# 71515).
11968 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11970         * abcremoval.c: Fixed bug 71062.
11971         * abcremoval.h: Likewise.
11973 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11975         * mini.c: Added a new functionality to optimize_branches, the removal
11976         of useless basic blocks, and fixed some problem in the removal of
11977         critical edges; some utility functions added for both purposes.
11978         * ssapre.c: Added complex expression support, and fixed bug 70637.
11979         * ssapre.h: Likewise.
11980         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
11981         enabled in SSAPRE.
11982         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
11983         * driver.c: Re-enabled SSAPRE.
11985 2005-01-19  Martin Baulig  <martin@ximian.com>
11987         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
11988         the result of mono_get_method_constrained().
11990 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
11992         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
11993         manager.
11995 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
11997         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
11998         be detected.  Fixes #59296.
12000 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12002         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
12003         which can happen. Fixes #71361.
12005 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12007         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
12008         manager.
12010 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12012         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
12013         appdomain-unload.exe to fail.
12014         
12015         * mini.c: Fix some memory leaks.
12017 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
12019         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
12020         Fixed bug and sped up some codepaths.
12022 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12024         * mini.c: Fix some memory leaks.
12026         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
12027         conversion.
12029         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
12031         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
12032         #71320.
12034         * iltests.il: Add regression test for #71320.
12036 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
12038         * mini.c (mono_codegen): Fix installation of profiler hooks.
12040         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
12042 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12044         * mini.h, mini.c, cfold.c: optimize access to enum
12045         readonly fields, too. Eval conditional branches if possible
12046         to perform unreachable code removal in more cases.
12048 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
12050         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
12052         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
12053         code manager.
12055         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
12056         WinXP DEP. Fixes #71244.
12058 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
12060         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
12062 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
12064         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
12066 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
12068         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
12069         changes.
12071         * mini.h: Bump AOT version.
12073         * mini.h (MonoCompile): Change exvar to a hash table.
12075         * mini.c: Allocate a separate exvar for each handler block.
12077         * mini.c: Get rid of the computation of filter_lengths, its not needed.
12079         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
12080         ex var with the pending exception and only throw if the two are equal.
12081         Fixes #68552.
12082         
12083         * exceptions.cs: Add tests for rethrow and nested catch clauses.
12085         * mini-x86.c: Fix warnings.
12087         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
12088         used by all the ports now.
12090         * aot.c: Add write-symbols and save-temps options.
12092 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12094         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
12096 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
12098         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
12099         operations.
12101         * tramp-s390.c: Check vtable slot belongs to the domain.
12103         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
12104         as per other platforms.
12106         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
12108 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
12110         * driver.c: we don't run the Main() code in a subthread anymore.
12112 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
12114         * mini.c: added experimental rtc support in the statistical
12115         profiler: if the user has the permission, more accurate statistics
12116         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
12117         The MONO_RTC value must be restricted to what the linux rtc allows:
12118         power of two from 64 to 8192 Hz.
12120 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12122         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
12124 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
12126         * mini-ppc.c: better icache flush for smp.
12128 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
12130         * mini-amd64.c (emit_move_return_value): Fix memory leak.
12132         * mini-x86.c (get_call_info): Add the get_call_info () code from the
12133         amd64 port, not yet used.
12135 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12137         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
12138         a struct type.
12140 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
12142         * driver.c: Added --security option to activate the security manager.
12143         Right now this will allow code generation for declarative demands and
12144         is disabled when AOT is specified.
12145         * mini.c: Add code generation for declarative security demands.
12146         * mini.h: Add mono_use_security_manager as an extern gboolean.
12148 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12150         * aot.c (mono_compile_assembly): Speed up compilation a bit by
12151         emitting more dense assembly code.
12153         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
12154         exception throwing stuff.
12156 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
12158         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
12159         dead code.
12161         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
12162         left in by mistake.
12164         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
12165         fixed.
12167         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
12169         * tramp-*.c: Only patch vtable slots if the object is in the current
12170         domain. Fixes appdomain-unload.exe.
12172         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
12173         
12174         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
12175         x86 branch.
12177 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12179         * mini.c (reverse_branch_op): New helper function.
12181         * mini.c (optimize_branches): Run the new optimization only on 
12182         platforms which support it. Also reverse all kinds of branches.
12184         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
12186         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
12187         a throw statement.
12189         * mini.c (optimize_branches): Reverse not-equals branches if the false
12190         bblock is a throw. This happens a lot of time with argument checking in
12191         corlib.
12193         * mini.c (mono_codegen): Add support for placing basic blocks after
12194         the function epilogue.
12196         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
12197         function epilogue.
12198         
12199 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
12201         * mini.c (setup_stat_profiler): Only set this up if the platform
12202         supports ITIMER_PROF.
12204 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12206         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
12207         previous patch.
12209         * inssel.brg: Fix a warning.
12211 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
12213         * mini.c: added support for statistical profiler 
12214         (run with: --profile=default:stat).
12216 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
12218         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
12220         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
12222         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
12223         related to global registers from the amd64 port.
12225 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
12227         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
12229         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
12230         with global registers.
12231         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
12233         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
12235 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
12237         * debug-mini.c (encode_value): Fix off-by-one.
12239         * aot.c (encode_value): Likewise.
12241         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
12243 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
12245         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
12246         AOT.
12248         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
12249         
12250         * aot.c (emit_method_info): Increase size of temp buffer.
12252         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
12253         the AOT case.
12255 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
12257         * aot.c (emit_method_info): Fix build.
12258         
12259         * aot.c: Further rework of the AOT file format to reduce the size of
12260         the method info data.
12262         * mini.h: Bump AOT file format version.
12264 2004-12-27  Martin Baulig  <martin@ximian.com>
12266         * mini.c (mini_get_method): New static method; call
12267         mono_get_method_full() and mono_get_inflated_method().
12268         (mono_method_to_ir): Use mini_get_method() instead of
12269         mono_get_method_full(). 
12271 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
12273         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
12275 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
12277         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
12279         * inssel-amd64.brg: Add some optimization rules.
12281 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
12283         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
12284         standard not GC'd stuff is fine.
12286 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
12288         * aot.c: Rework the AOT file format to get rid of most of the global
12289         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
12291         * mini.h: Bump AOT file format version.
12292         
12293 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
12295         * mini.h: Bump AOT file format version.
12297         * aot.c (mono_aot_is_got_entry): New function to determine if an 
12298         address is inside a GOT.
12300         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
12302         * cpu-pentium.md: Increase the maximum size of some instructions which
12303         might involve a got access.
12304         
12305         * mini.c (get_method_from_ip): Another debug helper function.
12307         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
12308         when got var accesses are created during the decompose phase.
12310         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
12312         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
12313         argument mini_compile_method and to MonoCompile, and use this to
12314         determine whenever a given method is compiled for AOT. This allows the
12315         other methods compiled during AOT compilation to be free of AOT stuff,
12316         so the backends does not need to add special support for them by
12317         creating a fake GOT etc.
12319         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
12320         longer needed.
12322 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12324         * mini.c (mono_method_to_ir): It turns out that some of the
12325         x-appdomain wrappers are lax with types, so just ignore this for
12326         all wrappers.
12328         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
12329         at the vtable->klass. If it is non-shared code we can just use the
12330         vtable.
12332 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
12334         * mini-ppc.c: access MonoDomain from tls, too.
12336 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
12338         * declsec.c: Removed unused variable (and related warning ;-)
12340 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12342         * iltests.il: New test for LDELEMA on an array of ref types.
12344         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
12345         all ldelema's on reftypes.
12346         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
12347         it was the wrong place to put it.
12349         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
12350         register to pop to make this cleaner, at the request of Paolo.
12352 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12354         * mini-ops.h (OP_GETHASHCODE): New op.
12356         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
12358         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
12359         operation.
12361         For a microbenchmark, this reduces the cost of Hashtable.get_Item
12362         by 25%.
12363         
12364         * mini-x86.c (mono_arch_output_basic_block): Rather than
12366         add ebp, 4
12368         Emit
12370         pop edx
12372         The first is 3 bytes while the second is 1. This saves 36 kb on
12373         mscorlib, quite a big saving. When bootstraping mcs, I was able to
12374         see a small boost because of icache locality.
12376         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
12378 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
12380         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
12381         started code sharing with the generic code.
12383 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
12385         * mini-ppc.c, cpu-g4.md: added code for direct access to
12386         tls data slots.
12388 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
12390         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
12391          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12392         to OP_TLS_GET.
12394 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
12396         * declsec.c|h: Added functions to cache the declarative stack modifiers
12397         in MonoJitInfo and to create a security frame from a MonoJitInfo 
12398         structure.
12399         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12400         created. Register internal calls for System.Security.SecurityFrame::
12401         _GetSecurityFrame and _GetSecurityStack.
12402         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12403         the definitions for the new stack walk/callback mechanism.
12404         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
12405         first security frame for LinkDemands and InheritanceDemands) and
12406         GetSecurityStack for Demands. Both use the new mono_walk_stack code
12407         from lupus.
12408         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12409         walk initialization (lupus).
12411 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12413         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12414         idiom.
12415         (handle_loaded_temps): Do not create a temporary variable for
12416         things that we know are temps. They will never be modified.
12417         (mono_spill_call): Set MONO_INST_IS_TEMP
12418         (mono_emulate_opcode): ditto
12419         (emit_tree): ditto
12420         (mono_method_to_ir.CEE_DUP): ditto
12422 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
12424         * mini.c (type_to_eval_stack_type): Make this handle the void type
12425         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12426         (emit_tree): use ip_in_bb to special case some common idioms
12427         Update all callers to pass in the IP.
12428         (mono_method_to_ir): Make CEE_CALL* do the above as well.
12430         This gives us a nice 2% speedup in mcs bootstrap.
12432         * mini-x86.c (peephole_pass): Peephole pass to make
12433         mov  [foo], eax
12434         push [foo]
12436         into
12438         mov [foo], eax
12439         push eax
12441         * mini.c (ip_in_bb): new method.
12442         (mono_method_to_ir): use this method rather than doing the hash
12443         lookup ourselves.
12445         * linear-scan.c (mono_linear_scan): When expiring actives, you
12446         don't need to keep around variables that expire on this
12447         instruction. This makes it so that:
12448              a = b + 1
12449         will turn into:
12450              store (ebx add (ebx, 1))
12451         which will become
12452              add ebx, 1
12454 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
12456         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
12457         combination to avoid doing two copies. Fix up problems with previous
12458         patch.
12460         * mini.c: Fix 64 bit warnings.
12462         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12464 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
12466         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12467         changes from the x86 code.
12469         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12471 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
12473         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12474         throwing code to reduce its size, unify the AOT and non-aot code and 
12475         get rid of relocations in the AOT case.
12477         * mini-x86.h mini.c exceptions-x86.c 
12478         (mono_arch_get_throw_corlib_exception): New arch specific function to 
12479         raise corlib exceptions which doesn't require relocations in the 
12480         caller.
12482         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12484 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
12486         * mini.c (mono_emit_method_call): Only allocate the got var when it is
12487         needed.
12489         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12490         in the AOT case.
12492 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12494         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12495         with add function when used from Inc/dec atomic 
12496         functions. Re-enabled optimization on x86.
12497         * mini-ops.h: renamed atomic_add functions to
12498         allow _add to match the Interlocked::Add and
12499         _add_next to match Interlocked::Inc/Dec.
12501 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
12503         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12504         linking of BBs to the end BB, and enabled SSAPRE also with
12505         consprop and copyprop (which was prevented by that bug).
12507 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12509         * mini-x86.c: disabling the Interlocked optimizing code. 
12511 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12513         * aot.c (load_aot_module): Move reading of got_addr after the AOT
12514         file version check.
12515         
12516 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12518         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
12519         interlocked optimization due lack of support on x86, rewrote 
12520         exchange to take into account that base may be in eax.
12521         
12522         xsp works again; activated Interlocked optimizing code.
12523         
12524 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12526         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12528 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
12530         * mini-ops.h: Add new opcodes.
12532         * mini.h: Add new patch types. Add got_var to MonoCompile.
12534         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
12535         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12536         make it work with all kinds of patchable code.
12538         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12539         address of the GOT, and referencing entries in the GOT.
12541         * mini.c: Add code to load the GOT address if needed by an opcode.
12543         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
12544         independent AOT code on the x86 using an elf-style Global Offset Table.
12546 2004-12-14  Raja R Harinath  <rharinath@novell.com>
12548         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12550 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12552         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12553         when running xsp.
12555 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
12557         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12558         of Interlocked:Increment/Decrement/Add as inline ops.
12559         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12561 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
12563         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12564         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12566 2004-12-12  Duncan Mak  <duncan@ximian.com>
12568         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12569         again. `patch_info->table_size' is no longer valid after Zoltan's
12570         commit #37636.
12572 2004-12-12  Martin Baulig  <martin@ximian.com>
12574         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12575         if we are the "real" method, ie. not an inlined method inside it.
12577 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
12579         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12580         before we look in the special fields table. This fixes
12581         ../tests/thread-static-init.cs.
12583 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12585         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
12586         for Array get_Rank and get_Length. Fixes bug #70465.
12588 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
12590         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
12591         separate structure to reduce the size of MonoJumpInfo.
12593 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
12595         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
12597 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
12599         * mini.c (mini_get_inst_for_method): Changed to allow ports
12600         to return a MonoInst instead of opcode 
12601         (renamed mini_get_opcode_for_method to better reflect the new functionality)
12602         
12603         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
12604         Allow ports to return a created MonoInst instead of op-code, will enable
12605         new optimizations.
12606         (renamed mini_get_opcode_for_method to better reflected the functionality)
12608 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
12610         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
12612 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12614         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
12615         Fixes #69985.
12617 2004-12-08  Martin Baulig  <martin@ximian.com>
12619         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
12620         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
12622 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12624         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
12625         correctly.
12627         * exceptions.cs: Disable some tests which depend on properties of x86 fp
12628         arithmetic.
12630 2004-12-08  Raja R Harinath  <rharinath@novell.com>
12632         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
12634 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
12636         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
12637         bug introduced by the previous patch.
12639 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12641         * mini-ppc.c, objectc.cs: handle large structs passed by value
12642         (fixes bug #69972).
12644 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12646         * mini-ppc.c: OP_ARGLIST implementation from
12647         Geoff Norton  <gnorton@customerdna.com>.
12649 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12651         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12652         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12654 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12656         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12658 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12660         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12661         support.
12663 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
12665         * mini-sparc.c: Zero out localled-ed memory.
12667         * iltests.il: Add tests for zeroing out localloc-ed memory.
12669 2004-12-04  Martin Baulig  <martin@ximian.com>
12671         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12672         mono_method_get_signature_full().       
12674 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
12676         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12677         and some utility functions (always for SSAPRE), integrated SSAPRE.
12678         * mini.h: Likewise.
12679         * driver.c: Added ssapre option.
12680         * ssa.c: Small fix on OP_ARG handling.
12681         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12682         * Makefile.am: Likewise.
12684 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
12686         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12687         now in the xp code.
12689         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12690         icall.
12692 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12694         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12695         
12696         * cpu-s390.md : Increase instruction length of oparglist.
12698         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12700 2004-11-30  Martin Baulig  <martin@ximian.com>
12702         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12703         virtual generic methods.  We call a special helper_compile_generic_method()
12704         icall to retrieve the method from the vtable, inflate and compile
12705         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
12707         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12709 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
12711         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12713 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
12715         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12716         Fixes #69929.
12718 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
12720         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12721         platforms with PIC aot.
12723 2004-11-28  Martin Baulig  <martin@ximian.com>
12725         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12726         Fixes gen-112.cs.
12728 2004-11-28  Martin Baulig  <martin@ximian.com>
12730         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12731         the result of mono_type_get_underlying_type() to check whether
12732         we're byref.
12734 2004-11-26  Martin Baulig  <martin@ximian.com>
12736         * mini.c
12737         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12738         in the g_assert().
12740 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
12742         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12743         the same way as the other arguments so they won't get clobbered.
12745         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
12746         calls through R11 since it is clobbered by the trampoline code.
12748 2004-11-26  Raja R Harinath  <rharinath@novell.com>
12750         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12751         pick up in-tree mscorlib.dll.
12753 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
12755         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12757         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
12758         runtime data/code are now stored in a table similar to the GOT in ELF. 
12759         This allows the code itself to be position independent.
12761         * aot.c: Fix loading of referenced assemblies after the lazy assembly
12762         loading changes.
12764         * aot.c: Attach ELF type (object/function) directives to all global
12765         symbols.
12767         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12769         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12771         * mini-amd64.h: Turn on PIC AOT code.
12773         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12774         returning the offset within an OP_AOTCONST instruction where the GOT
12775         offset needs to be added.
12777         * mini.h: Bump AOT file format version.
12779 2004-11-25  Martin Baulig  <martin@ximian.com>
12781         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12782         uninflated generic methods.
12784 2004-11-25  Martin Baulig  <martin@ximian.com>
12786         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12788 2004-11-24  Martin Baulig  <martin@ximian.com>
12790         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12791         original klass (this only applies for generic instances).
12793 2004-11-24  Martin Baulig  <martin@ximian.com>
12795         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
12796         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
12797         that array).
12799 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
12801         * mini.c (mono_method_to_ir): Disable inlining for methods containing
12802         localloc. Fixes #69678.
12804         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
12805         
12806 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
12808         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
12809         used SSE registers on pinvoke calls. Fixes #69774.
12811 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
12813         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
12814         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
12816 2004-11-23  Raja R Harinath  <rharinath@novell.com>
12818         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
12819         Refer directly to the mcs/ tree.
12821 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12823         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
12824         Check if a trampoline for a synchronized method is required. 
12826 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
12828         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
12829         with localloc if needed. Throe arithmetric exception in
12830         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
12831         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
12833 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
12835         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
12836         types before switching on type.  Fixes #69622.
12838 2004-11-19  Raja R Harinath  <rharinath@novell.com>
12840         * Makefile.am (check-local): New.  Integrate into 'make check'.
12841         (MCS,RUNTIME): Define using in-tree mono and mcs.
12842         (ILASM): New.
12843         (%.exe): Use $(ILASM).
12845 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
12847         * mini-ppc.c: adjust initial prolog size (bug #69691).
12849 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
12851         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
12852         #69664.
12854 2004-11-17  Raja R Harinath  <rharinath@novell.com>
12856         * Makefile.am (clean-local): Rename from 'clean'.
12858 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12860         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
12861         to mono_arch_is_int_overflow. 
12862         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
12863         SIGFPE events.
12865 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
12867         * declsec.c|h: New files to support declarative security attributes.
12868         Added function to check if a method has (applicable) security.
12869         * mini.c|h: Add check for declarative security attributes in
12870         mono_method_check_inlining.
12871         * Makefile.am: Added declsec.c and declsec.h to the build.
12873 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
12875         * mini.c, mini.h: update to keep dynamic code info per-domain.
12877 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
12879         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
12880         (mini_init): Get rid of it from here too.
12882 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
12884         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
12885         implemented OP_RETHROW (patch by Geoff Norton
12886         <gnorton@customerdna.com>).
12888 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
12890         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
12891         between appdomains.  Fixes appdomain-unload on PPC.
12893 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
12895         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12896         mini-exceptions.c: handle the new wrapper types.
12897         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
12898         token value as a MonoClass* when compiling a wrapper.
12899         mono_jit_create_remoting_trampoline now takes an additional
12900         MonoRemotingTarget parameter.
12901         
12902 2004-11-10  Martin Baulig  <martin@localhost>
12904         * mini.c (mono_method_to_ir): Use `generic_container->context'
12905         rather than creating a new one.
12907 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12909         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
12911         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
12913 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
12915         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
12916         the experimental aot cache stuff.
12918 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
12920         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
12921         mini-exceptions.c: update to exception clause structure changes.
12923 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12925         * exceptions-x86.c (throw_exception): Fix warnings.
12927         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
12928         for OP_RETHROW.
12930 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
12932         * exceptions-sparc.c (get_throw_exception): Really fix this.
12934 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
12936         * tramp-*.c: we no longer support icalls without wrappers, so
12937         a bit of code can be removed here
12939 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
12941         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
12942         patch.
12944         * cpu-sparc.md: Add op_rethrow.
12946         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
12948         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
12950         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
12951         * mini-ops.h: Add OP_RETHROW.
12953         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
12955         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
12957 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
12958         
12959         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
12960         Makes the output much easier to read
12962 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
12964         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
12965         prevents another huge leak when compiling with ssa. Secondly, the
12966         performance of doing this rather than freeing the lists is much
12967         better. GList does a lock every time you allocate a list link,
12968         so that it can use a memory pool. So, it is better to just use
12969         a memory pool of our own.
12970         
12971         * ssa.c, linear-scan.c: replace g_list_remove_link with
12972         g_list_delete.  The remove one does not free the GList, so we were
12973         leaking memory. On -O=all --compile-all with corlib, this cut down
12974         3 MB of allocations.
12976 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
12978         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
12980         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
12982         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
12983         into a new function mono_create_jit_trampoline ().
12985 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
12987         * trace.c (get_spec): Allow tracing of classes without a namespace.
12989 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
12991         * mini.c: Fix pointer overwrite in mini_method_compile.
12993 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
12995         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
12996         The darwin ABI needs some special handling for 1 and 2 byte structs
12997         Lets use lbz/lhz instead of lwz everywhere.
12998         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
12999         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
13000         Use stb/sth for the former, and put the latter always on stack instead of in
13001         argument registers.
13003 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
13005         * trace.c (is_filenamechar): Add '_'.
13007 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
13009         * mini-s390.c: Fix prolog length to allow for large trace requirements.
13011         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
13013 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
13015         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
13016         depends on libmonogc. Fixes #68805.
13018 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
13020         * mini.c (mono_jit_free_method): Provide extra information for
13021         this error.  Currently this leaks, but will be turned into a
13022         developer option in the future.
13024 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
13026         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
13028 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
13030         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
13031         boundary. Fixes reading of PATCH_INFO_R4 and R8.
13032         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
13034 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
13036         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
13037         trampolines for AOT code.
13039 2004-10-22    <vargaz@freemail.hu>
13041         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
13042         constructed types. Fixes #68136.
13044 2004-10-21  Martin Baulig  <martin@ximian.com>
13046         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
13047         if it returns true, unwind the stack to the call instruction.
13049 2004-10-21    <vargaz@freemail.hu>
13051         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
13053         * mini.h: Bump AOT version number.
13055         * objects.cs: Add another test for unbox trampolines.
13057         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
13058         valuetype methods.
13060 2004-10-20    <vargaz@freemail.hu>
13062         * driver.c: Add SHARED to the set of optimizations tested.
13064         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
13066         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
13067         used by CEE_NEWARR.
13069         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
13071 2004-10-20  Martin Baulig  <martin@ximian.com>
13073         * mini-exceptions.c (mono_handle_exception): Call
13074         mono_debugger_handle_exception() to tell the debugger about
13075         catch/finally clauses.
13077 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
13079         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
13081         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
13082         #68447.
13084 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
13086         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
13087         methods as their native size, fixed bug #57543, #57545.
13088         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
13089         This saves a temporary register and mullw call down into 1 (minor perf
13090         increase for cases like sum = sum * 5;  This use to translate into:
13091             li r11,5
13092             mullw r28,r28,r11
13093         It now translates to
13094             mulli r28,r28,5
13096 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
13098         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
13099         #68388.
13101 2004-10-11  Martin Baulig  <martin@ximian.com>
13103         * mini.c (mono_method_to_ir): If we're a generic method, get the
13104         MonoGenericContainer from our MonoMethodNormal and create a
13105         MonoGenericContext from it.
13107 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
13109         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
13111         * basic-long.cs: Add test for checked i8->i2 cast.
13113 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13115         * inssel-ppc.brg: added a couple of speedup rules.
13117 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
13119         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
13120         to speed up rebuilds.
13122 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13124         * mini-s390.c: Minor fix to OP_OR_IMM.
13126 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
13128         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
13129         better. Fixes appdomain-unload.exe on sparc.
13131 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
13133         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
13134         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
13135         see bug 67324.
13137 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
13139         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
13141 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
13143         * mini.c: Always generate a field read/write wrapper for members
13144         of the class MarshalByRefObject since the actual instance could
13145         be a CBO.
13147 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
13149         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
13151 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
13153         * driver.c mini.h trace.c: Move the setting of the main assembly into
13154         a separate function called mono_trace_set_assembly () and call it after
13155         actually loading the main assembly. Fixes #66872.
13157 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
13159         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
13160         using the code manager.
13162 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
13164         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
13166 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
13168         * cpu-amd64.md: Fix bug in previous patch.
13169         
13170         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
13171         #66650.
13173 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
13175         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13176         mini-exceptions.c: updates for changed stack walk interface.
13178 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13180         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
13182 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
13184         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
13186 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
13188         * driver.c (mini_regression_list): Do not call mono_assembly_close 
13189         since assemblies can't be unloaded.
13190         
13191 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13193         * cpu-amd64.md: Fix more instruction lengths.
13195         * cpu-amd64.md: Fix lengths of some instructions.
13197 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
13199         * inssel.brg: Make the array ldelema check aot friendly.
13201 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13203         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
13205         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
13207 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
13209         * mini-x86.c: Fix build.
13211         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
13212         mono_type_get_underlying_type () helper function to simplify code.
13213         
13214 2004-09-09  Martin Baulig  <martin@ximian.com>
13216         * mini-amd64.c: Don't access `type->data.klass' directly, call
13217         mono_class_from_mono_type() instead since the type may be a
13218         generic instance.
13220 2004-09-09  Martin Baulig  <martin@ximian.com>
13222         * mini-amd64.c (get_call_info): Fix support for generic instances.
13223         (add_valuetype): Use mono_class_from_mono_type() to get the class
13224         since we can be a generic instance.
13226 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
13228         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
13230 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13232         * liveness.c: reset spill costs on each scan: bug 62107
13234 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
13236         * exceptions-sparc.c (mono_arch_find_jit_info): remove
13237         unnecessary line that doesn't compile
13239 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
13241         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
13242         trampolines, make them call an error function so people can fix their
13243         code.
13245 2004-09-06  Martin Baulig  <martin@ximian.com>
13247         * mini.c (mono_method_to_ir): When initializing locals, handle a
13248         generic instances like a valuetype if it's a valuetype and like a
13249         class if it's a class.
13251 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13253         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
13254         stack. Fixes #64674.
13256         * exceptions.cs: Add test for unwinding of call arguments.
13258 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
13260         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
13261         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
13262         set the carry/borrow flag). The sparc and s390 implementations
13263         can now use optimized versions (and simplify the code). ppc bugfixes.
13265 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13267         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
13269 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
13271         * inssel-amd64.brg: Remove leftover 32 bit rule.
13273         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
13275 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
13277         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
13278         mono_arch_find_jit_info functions into a new function. Fix a memory
13279         leak.
13281         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
13282         refactored code.
13283         
13284 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13286         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
13287         as well.
13288         
13289         * exceptions.cs: Add array size tests.
13291         * mini.c: Allocate a separate icall wrapper for each arity of 
13292         mono_array_new_va. Fixes #59509.
13294         * exceptions.cs: Add testcase for 64578.
13296         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
13298         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
13299         
13300 2004-09-02  Martin Baulig  <martin@ximian.com>
13302         * mini.c (mono_method_to_ir): When initializing the locals, call
13303         handle_initobj() on the generic instance itself, not its
13304         underlying type.
13306 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13308         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
13309         MonoJitInfo for dynamic methods.
13311         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
13313         * mini.c: Add support for freeing JIT data for dynamic methods.
13314         
13315 2004-09-01  Martin Baulig  <martin@ximian.com>
13317         * mini-x86.c (is_regsize_var): Added support for generic
13318         instances.
13319         (mono_arch_emit_prolog): Make this compile again, use
13320         `x86_push_imm_template (code)'.
13322 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
13324         * mini-x86.c: make all push_imm instructions that get
13325         patched always emit the long form
13327 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
13329         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
13330         in a per-domain hash.
13332         * mini-amd64.c (merge_argument_class_from_type): Handle generic
13333         types.
13335 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
13337         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
13338         work.
13339         
13340         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
13341         work.
13343         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
13344         Beginnings of SSE2 support.
13346         * exceptions.cs: Add more tests for checked int<->uint casts.
13348 2004-08-28  Martin Baulig  <martin@ximian.com>
13350         * mini-x86.c (mono_arch_instrument_epilog): Added support for
13351         generic instances.
13353         * mini.c
13354         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
13355         Handle generic instances recursively.
13357 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13359         * iltests.il: test for conv.u8 on a constant
13361 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13363         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
13364         LCONV_x4 (shrun_32 (membase)).
13366 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13368         * inssel-x86.brg: c&p rules for push/setret of long
13370 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13372         * inssel-x86.brg: c&p rules for compare (base, regvar) and
13373         compare (regvar, base)
13375         * inssel-x86.brg: more burg love
13377         * inssel.brg: more cleanup
13379         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
13381 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13383         * basic-long.cs, basic-calls.cs: new tests for optimization.
13385 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
13387         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
13388         patch.
13390 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13392         * mini-amd64.c (read_tls_offset_from_method): Add another case.
13393         
13394 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
13396         * inssel.brg (mini_emit_memcpy): use 
13397         NO_UNALIGNED_ACCESS to disable memcpy optimization
13399 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13401         * mini-amd64.c: Handle generic types in various places.
13403         * mini.c (mono_method_to_ir): Handle generic types in init locals.
13405 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
13407         * mini.c (handle_box): Fix warning.
13409         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13411         * mini-amd64.h: Enable the emit_state optimization.
13413         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13415         * mini-amd64.c: Add some new 64 bit peephole opts.
13417         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13419         * cpu-amd64.md: sreg1 of div instructions must be %rax.
13421         * mini-amd64.c: Register allocator fixes.
13423         * mini.c: Add an optimization to emit_state to avoid allocation of new
13424         registers on some platforms.
13426 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
13428         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13430         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13431         allocation. Fixes #63085.
13433         * basic-long.cs: Add new regression test.
13435         * mini-amd64.c: Register allocator improvements.
13437 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
13439         * mini-amd64.c (read_tls_offset_from_method): Add another code
13440         sequence.
13442         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13443         instruction sequence for nullifying class init trampolines.
13445         * objects.cs: Add new regalloc test.
13447         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13449 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13451         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13452         
13453         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13454         arguments.
13456         * driver.c: Fix profiling after TLS changes.
13457         
13458         * driver.c (mono_main): Set mono_stats.enabled if needed.
13460         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13461         CEE_BOX.
13463 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
13465         * mini-x86.c: use a 1 op rather than a 2 op tls access
13466         instruction -> faster.
13468 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13470         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13471         x86 backend.
13473 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13475         * exceptions-sparc.c (throw_exception): fix typo
13477 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13479         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13480         set tree->dreg correctly with tls. Allow any
13481         register to be used.
13483         * mini-x86.c (read_tls_offset_from_method): add new code
13484         generation pattern seen with GCC.
13487 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13489         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13490         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13491         exceptions-sparc.c: fix some performance issues in exception
13492         handling and setting of the stack trace for exceptions that were
13493         already thrown.
13495 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13497         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
13498         x86 backend.
13499         
13500         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
13501         registers.
13503 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13505         This patch inlines tls access, when possible.
13506         
13507         * mini.h: new arch functions for TLS intrinsics.
13508         All platforms updated with a stub.
13510         * mini.c: use the new intrinsics
13512         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
13513         arch specific intrinsic for tls variables
13515 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13517         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
13518         under windows.
13520 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13522         * mini.c: thread local allocation
13524 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
13526         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13528         * Makefile.am: Link against the static version of libmonogc.
13529         
13530         * Makefile.am: Link the static versions of the convenience libraries
13531         into the mono executable.
13533         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13535 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
13537         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13538         on integer overflow.
13540         * mini-amd64.c: Reorganize function call code.
13542         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13544 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13546         * inssel-x86.brg: use xor eax,eax.
13547         
13548         * basic.cs: new tests
13550 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13552         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13553         in exception throwing code.
13554         
13555 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13557         * inssel-x86.brg: use xor esi,esi.
13559 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13561         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13562         can trace methods compiled during mini_init () too.
13564         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
13565         CEE_CONV_U4.
13567 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13569         * Makefile.am: static link on x86 (r=zoltan)
13571 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13573         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13574         code since it causes some programs to fail.
13576 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
13578         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13580 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13582         * mini.c: ovfops_op_map - add STACK_OBJ case for
13583         CONV_I 
13584         * basic.cs: add test_0_pin_string as test
13585         case for above.
13587 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13589         * Makefile.am: build C# if srcdir != builddir
13591 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13593         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
13594         fall-through blocks.
13596 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13598         * driver.c: enable loop by default again and include abcrem in -O=all.
13600 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
13602         * iltests.il: Add some localloc tests.
13604         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
13606         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
13607         Fixes #62574.
13609         * inssel-amd64.brg: Add some optimizations.
13611         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
13612         for gcc-3.4.
13614         * Makefile.am: Statically link mono against libmono on AMD64.
13615         
13616         * mini-amd64.c inssel-amd64.brg: Optimizations.
13618 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
13620         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
13622         * tramp-amd64.c: Patch calling code in trampolines.
13624 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
13626         * mini-amd64.c: pinvoke struct passing fixes.
13628 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
13630         * mini-sparc.c: redo change, make mono_arch_cpu_init call
13631         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
13633 2004-08-05  Duncan Mak  <duncan@ximian.com>
13635         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13636         CEE_LDELEM_ANY.
13638 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13640         * mini-amd64.c (emit_move_return_value): Move return value for normal
13641         calls too.
13643 2004-08-05  Martin Baulig  <martin@ximian.com>
13645         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13646         `type->type'; just modify `type' itself when dealing with enums
13647         and generic instances.
13648         (check_call_signature): Make `simple_type' a `MonoType *'.
13650 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13652         * mini.c: Use OP_PADD to add offsets to addresses.
13654         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13656 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
13658         * mini-sparc.c (mono_arch_emit_epilog): fix check
13659         for folding last op into restore instruction
13661 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13663         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13664         helper methods using the code manager.
13665         
13666         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13668         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13670 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13671         
13672         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13673           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13675         * mini-s390.c: fix tail processing
13677 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13679         * mini-ppc.c: mul.ovf.un exception name fix.
13681 2004-08-03  Martin Baulig  <martin@ximian.com>
13683         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13684         instances; before jumping to `handle_enum', also modify `ptype'.
13686 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
13688         * cpu-sparc.md: fcall maximal length too small.
13690 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
13692         * mini-amd64.c mini.h: Add initial support for passing/returning 
13693         structures to/from pinvoked methods.
13695 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13697         * mini-ppc.c: reg allocator fix.
13699 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
13701         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13703         * inssel.brg: Optimize memset on 64 bit machines.
13705         * mini-amd64.c: Fix some vararg cases.
13707 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13709         * mini-s390.c: Corrected macro in emit_float_to_int
13711         * s390-abi.cs: Tests to exercise the s390 ABI
13713 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13715         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13716         caller saved regs.
13718         * basic.cs: Add a test for add.ovf.un.
13720 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
13722         * mini-sparc.c: add case for OP_IDIV_UN
13724 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13726         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13727         
13728         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13730 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
13732         * basic.cs: regression tests.
13734         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13735         regressions.
13737 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13739         * basic.cs: Add a new test.
13741         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
13742         and AOT. Various fixes and optimizations.
13744         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13746 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13748         * mini-ppc.c: make sure temp regs are not used for global reg
13749         allocation.
13751 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13753         * cpu-sparc.md: conv_i8 fix for 64bits
13755         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13757 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
13758         
13759         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13760         add opcode for cmp BYTE PTR [eax], imm.
13762         * inssel.brg: Make memcpy and memset takes bases.
13764 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13766         * *-amd64.*: More AMD64 work.
13767         
13768 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13770         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13771         add a compare-not-equal opcode.
13772         
13773 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13775         * mini.c: Use mono_init_from_assembly instead of mono_init.
13776         
13777 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13779         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13781         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13783         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13785         * inssel.brg: 64 bit fixes.
13787         * mini.h (MonoCallInst): Add some AMD64 specific data.
13789         * mini.h: Add some OP_P opcodes.
13791 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13793         * basic.cs: tests for 61797 and 61740
13795 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13797         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
13798         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
13800 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
13802         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
13804         * *-amd64*.*: Ongoing AMD64 work.
13806 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
13808         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
13810         * *-amd64*: Ongoing AMD64 work.
13812         * mini-arch.h: Add AMD64 support.
13814         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
13816         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
13818         * mini-ops.h: Add new opcodes.
13820         * Makefile.am: Add AMD64 support.
13822         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
13823         rules into the inssel-long*.brg files.
13825         * *-amd64.*: Add beginnings of AMD64 backend.
13827 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
13829         * mini.c (print_dfn): commenting out the code that prints
13830         the cil. With -O=deadce, this makes -v -v crash.
13831         
13832         * cpu-pentium.md: make checkthis have a length of 2
13834 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
13836         * mini-sparc.h: fix implementations of __builtin
13837         functions for Sun compiler for V9.
13839 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
13841         * mini.c: use the new stelem.ref wrapper
13842         * exceptions.cs, arrays.cs: new stelem.ref tests
13844 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
13846         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
13847         new XSP should work with these changes).
13849 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
13850         
13851         * inssel-{long32,x86,}.brg: trivial optimizations.
13852         
13853 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
13855         * mini.c: load value when emitting box operation in
13856         constrained calls.
13858 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
13860         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
13861         is one byte shorter than cmp DWORD PTR [eax], 0.
13863 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
13865         * inssel-ppc.brg: arguments on the stack are always
13866         relative to the stack pointer (spotted by Neale Ferguson).
13868 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13870         * exceptions-x86.c: delay appending the method name to the trace until
13871         after mono_jit_info_table_find is called, as this gets the real
13872         MonoMethod.
13874 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
13876         * aot.c: register roots
13878 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13880         * aot.c : I could just use PLATFORM_WIN32 flag.
13882 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13884         * aot.c : Reverting the previous fix. This time it broke linux build.
13886 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
13888         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
13890 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
13892         * mini.c (handle_stack_args): Remove some more debugging code.
13893         
13894         * mini.c (handle_stack_args): Remove debug output left in by mistake.
13896         * driver.c mini.h aot.c: Allow additional options to be specified with
13897         --aot and pass them to mono_compile_assembly.
13899         * aot.c: Add experimental code to AOT compile all loaded assemblies
13900         on demand and save the code into a cache in the filesystem.
13902         * aot.c: Add support for more wrapper methods.
13903         
13904         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
13905         58863.
13907         * cpu-*.md: Remove removed opcodes.
13909         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
13910         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
13911         related icalls to marshal.c.
13913 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
13915         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
13917         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
13919         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
13921 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
13922         * liveness.c: If liveness is recomputated we need to reset the information
13923         for each variable. This way, if the liveness range has been narrowed
13924         by optimizations that happened after the last computation, we can return
13925         a smaller range.
13926         
13927         For example, if you have
13928         
13929         {
13930                 int i = 0;
13931                 
13932                 // Tons of code that does not affect i
13933                 
13934                 i = foo ();
13935                 ...
13936         }
13937         
13938         i = 0 is dead code and will be removed by SSA. However, when
13939         linear scan gets to the code, i will still appear to be live
13940         throughout the entire block. This prevents good register allocation.
13942 2004-07-06  Martin Baulig  <martin@ximian.com>
13944         * debug-mini.c (mono_debug_init_method): Allow
13945         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
13946         (mono_debug_add_icall_wrapper): New method.
13948         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
13950 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
13952         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
13953         optimization.
13955 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
13957         * aot.c (mono_aot_load_method): Fix loading of debug info.
13959 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13961         * aot.c: Add logging support.
13963 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13965         * mini.h: Add prototype for mono_print_method_from_ip.
13967         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
13969         * inssel.brg: 64 bit fixes.
13971         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
13972         inssel-long32.brg.
13974         * Makefile.am: Add SPARC64 support.
13976 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
13978         * aot.c: Fix alignment problems on 32 bit platforms.
13980 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
13982         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
13983         SPARC64.
13985         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
13986         problems.
13988         * mini.h: Bump AOT file version. Some 64 bit fixes.
13990 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
13992         * inssel-sparc.brg: Add new rule to avoid register moves.
13994         * inssel.brg: Add ldind_to_load_membase helper function.
13996 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
13998         * mini.c: OffsetToStringData intrinsic.
13999         
14000 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14002         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
14004         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
14005         regression tests.
14007         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
14008 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14010         * mini.c: reinstated mono_compile_get_interface_var()
14011         on x86, too, since the change breaks the Gtk# build there as well.
14013 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14015         * driver.c: remove loop from the default optimizations: it seems to
14016         interact badly with some of the other options (see bug #60613).
14018 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
14020         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
14021         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
14023 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
14025         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
14026         vararg-using methods.
14028 2004-06-21  Martin Baulig  <martin@ximian.com>
14030         * mini/mini-exceptions.c
14031         (mono_handle_exception): Added `gpointer original_ip' argument.
14032         After calling mono_unhandled_exception(), call
14033         mono_debugger_unhandled_exception() and if that returns true,
14034         restore the context and return.
14036 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14038         * mini-ppc.c: prefer the use of relative branches so
14039         they won't need to be patched in aot code (patch from Patrick Beard).
14041 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14043         * aot.c: patch from Patrick Beard to make the output assembly
14044         more correct for the MacOSX assembler. Small tweak to
14045         generate sane images on Linux/PPC, too.
14047 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14049         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
14050         case until bug #59509 is fixed (shows up in #60332).
14052 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14054         * mini.c: make sure the needed wrappers are compiled, too, with
14055         precomp.
14057 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
14059         * driver.c: remove NPTL reference in --version output.
14061 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14063         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
14064         generate valid assembly for the Mach-O assembler.
14066 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14068         * driver.c: don't include abcrem in the all optimization specifier
14069         since it slows down jit compilation too much for now.
14071 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
14073         * mini.c: use BIGMUL only if both operands have the same signage.
14074         * iltests.il: Test for bug 60056. (errors related to signage in
14075         BIGMUL).
14077         r=lupus.
14079 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
14081         * mini.c, aot.c: memory leak fixes.
14083 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14085         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
14087 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
14089         * Makefile.am: remove the -static hack completely, it links in
14090         statically glib as well.
14092 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
14094         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
14095         * exceptions.cs: make it compile with new mcs/csc.
14097 2004-06-03 Massimiliano Mantione <massi@ximian.com>
14098         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
14099         and added relevant test case.
14101 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14103         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
14104         regressions in gtk-sharp.
14106 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
14108         * exceptions.cs: New regression tests.
14110         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
14112 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
14114         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
14116 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
14118         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
14120         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
14122 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
14124         * mini.c (mono_jit_runtime_invoke): Init class in this
14125         method instead of trusting mono_jit_compile_method to
14126         do the work (because wrappers can be in object class)
14128 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
14130         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
14132         * basic-long.cs: New regression test.
14134 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
14136         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
14137         and div/rem checks.
14139 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
14141         * Makefile.am: fix miguel's change to build mono statically against
14142         libmono (track build dependencies).
14144 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14146         * cfold.c: Some glib versions do not have G_MININT32.
14148 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
14150         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
14151         with precision of tan, atan, sin and cos, and implemented related
14152         regressions tests (fixes bug 54467, but one new problem appeared and
14153         is not fixed yet).
14155 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14157         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
14159         * exceptions.cs: Add test for constant folding && division by zero.
14161         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
14162         since driver.c is in libmono too, so the optimization was useless.
14164         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
14165         variable to driver.c so the compiler can emit more efficient code to
14166         access them.
14168 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14170         * Makefile.am: don't distribute generated inssel.[ch] files.
14172 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
14174         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
14175         into the default appdomain. Fixes #58707.
14177         * jit-icalls.c: Remove the broken approximation for truncl, doing
14178         no conversion is better.
14180         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
14181         Fixes #58863.
14183 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14185         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
14186         of the mcrxr instruction which is not available on some processors
14187         even if it's documented to be. Implement add and sub overflow correctly
14188         (still not complete for long unsigned). Speed up icalls a bit.
14190 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
14192         * mini.c (mono_jit_compile_method_with_opt): Make sure that
14193         we run .cctor in the current domain instead of target_domain.
14194         
14195         Fixes bug #58558, .cctor not being called in -O=shared.
14197 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14199         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
14201 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
14203         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
14204         which can be done with an imm8, do it that way.
14205         (mono_arch_output_basic_block): ditto for a jmp
14206         (mono_arch_emit_prolog): Computate maximum offset of a label.
14208 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
14210         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
14211         now tries to allocate prefered physical reg's for virtual
14212         regs. This reduces the number of emited spills/loads with
14213         20-30% on our core assemblies.
14215 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14217         * jit-icalls.c: truncl() is not needed and trunc() is
14218         the correct thing to do anyway (bug #58287).
14220 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
14222         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
14223         if available.
14225 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
14227         * driver.c: enable loop optimizations by default.
14229 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14231         * mini-x86.c: fix calc of max loop size when aligning loops start.
14233 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
14235         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
14236         the stack.
14238 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
14240         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
14241         should set carry.
14243         * basic-long.cs: Add tests for add/subtract of immediates with carry.
14245         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
14246         
14247         * mini.c (inline_method): Allways inline some wrappers even if the cost
14248         is too large. Fixes #58785.
14250         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
14251         
14252 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
14254         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
14255         (crichton@gimp.org). Beginning of support for sparc/linux.
14257         * mini-sparc.c: Optimize retrieval of LMF address.
14259 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
14261         * exceptions-ppc.c:  handle alloca in methods with clauses.
14263 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
14265         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
14267 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
14269         * mini.c: Delegate most of the abort signal work to 
14270           mono_thread_request_interruption, which also handles Stop and Suspend
14271           states.
14273 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
14275         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
14276         supports the save/restore lmf opcodes.
14278 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
14280         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
14281         by gcc-3.4 as well.
14283         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
14285 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14287         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
14288         methods which contain array accesses.
14290         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
14291         boundaries. Fixes #58537.
14293         * iltests.il: Add regression test for #58537.
14295 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14297         * mini-x86.c (mono_arch_local_regalloc): Last part of
14298         fix for bug #58633 (releasing register to early).
14300 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
14302         * basic-long.cs: Add new regression test.
14304 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14306         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
14307         register too early on the chain.
14309 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14311         * mini.c (create_helper_signature): Use a helper function to reduce
14312         the code which needs to be written. Also set the calling convention of
14313         icalls on windows. Fixes #57840.
14315 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14317         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
14318         exceptions-ppc.c: added helper function to get the instruction address
14319         from a signal handler context.
14321 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14323         * helpers.c: use g_get_tmp_dir. Invokes happyness 
14324         from gonzalo.
14326 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14328         * helpers.c: Add new env variable to pass args to objdump.
14329         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
14331 2004-05-17  Radek Doulik  <rodo@ximian.com>
14333         * Makefile.am (common_sources): added abcremoval.h so it get
14334         disted and daily mono packages on go-mono.com will build again
14336 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
14338         * abcremoval.c: Fixed coding style, added copyright header.
14340         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
14342         * mini.h: Added prototype for abc removal main function.
14344         * build_relations_propagation_table.pl: Added copyright header.
14346 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14348         * basic-long.cs: reg test for complex ceq_long bug.
14350 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14352         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
14353         reg in long and clob case (bug #58343). Fixed/added comments.
14355 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
14357         * mini.c (mono_jit_runtime_invoke): Follow new convention
14358         of calling the invoke method with an function pointer.
14360 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
14362         * ChangeLog: Fix author of memory leak patch.
14364 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
14366         * Makefile.am: fix make dist as well...
14369 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
14371         * cfold.c: Made so that conversions from pointer to int4 are no-ops
14372         on archs where pointers are 4 bytes long.
14374         * Makefile.am: Added abcremoval.c source file.
14376         * abcremoval.c: Added abcremoval.c.
14378         * abcremoval.h: Added abcremoval.h.
14380         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
14382         * inssel.brg: Enabled bounds check removal.
14384         * mini.c: Added support for abcrem optimization.
14386         * mini.h: Added abcrem optimization label.
14388         * driver.c: Added support for abcrem optimization.
14390         * propagated_relations_table.def: Added propagated_relations_table.def.
14392 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14394         * mini.c, cfold.c: fix style.
14396 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14398         * mini.c: handle issue with the low-level implementation of
14399         some long opcodes (bug #54209).
14401 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
14403         * basic.cs: test for my new cmov stuff.
14405 2004-05-13      Patrik Torstensson
14407         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14408         opt and added peephole documentation.
14410 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14412         * tramp-ppc.c: rewrote the generic trampoline code.
14414 2004-05-11      Patrik Torstensson
14416         * mini-x86.c: optimize long shl/shr asm code (one less branch)
14418 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14420         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14422         * mini.h mini.c dominators.c: Applied patch from Derek Woo
14423         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14425         * mini.c: Add new icalls for AsAny marshalling.
14427 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14429         * tramp-ppc.c, mini-ppc.c: more cleanups.
14431 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14433         * mini.c: no warnings.
14435 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14437         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14439 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14441         * mini.c: In the thread abort signal handler, if the thread is in the
14442         process of being stoped, don't throw the Abort exception, just stop the
14443         thread.
14445 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14447         * tramp-ppc.c: removed old code.
14449 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14451         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14452         do some simple speed optimizations on ppc.
14454 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14456         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14457         and large offsets in load/store.
14459 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14461         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14462         it causes regressions.
14464 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14466         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14467         support.
14469 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14471         * jit-icalls.c: remove warnings.
14472         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14473         speedups for unsafe code.
14475 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
14477         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14479 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
14481         * basic-calls.cs: Add new regression test.
14483         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14484         more portable.
14486         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14488         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14489         is no longer used.
14491 2004-05-06      Patrik Torstensson
14493         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14494         long reg allocation in any reg (not only eax:edx) and implemented 
14495         long shl/shr ops in asm instead of helpers.
14497 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14499         * mini-sparc.h: Fix warnings.
14501         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14502         stack.
14504         * mini-exceptions.c (mono_handle_exception): Call the filter in a
14505         separate statement for clarity.
14507         * mini-sparc.c: Update status.
14509 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
14511         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
14512         here.
14514 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14516         * inssel-ppc.brg: another small pre-release workaround:
14517         we don't do overflow detection for long_sub_un.
14519 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14521         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14522         (also works around a weird ppc bug: 57957).
14524 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14526         * tramp-ppc.c: trampoline fixes.
14528 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
14530         * mini-ppc.c: fixed typos.
14532 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14534         * mini-ppc.c, exceptions-ppc.c: more code saves registers
14535         at the top of the stack. Fixed typos. Use a frame registers
14536         for all the methods with exception clauses.
14538 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14540         * exceptions-ppc.c: restore fp registers.
14542 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14544         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14545         order from the stack top (moved the stack room to save the
14546         return value for trace after the param area). Fixed corruption
14547         in restoring registers on unwind.
14549 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14551         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14553 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14555         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14556         and prolog/epilog for methods that use it. Allow
14557         enough param area room for varargs methods. Fix miguel's
14558         breakage in exception handling.
14560 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14562         * Makefile.am: run genmdesc only on current arch.
14564 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14566         * exceptions-x86.c:
14567         * mini-x86.h: fix the build on windows.
14569 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14571         * 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.
14573         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14575         * mini-exceptions.c: New file.
14576         
14577         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14578         Move some parts of the x86 exception handling code to an 
14579         arch-independent file so it can be shared with other ports.
14581 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14583         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
14585 2004-04-26  David Waite  <mass@akuma.org>
14587         * driver.c: remove comma from end of enumeration declaration
14589 2004-04-26  Jackson Harper  <jackson@ximian.com>
14591         * driver.c: parse config file before loading first assembly. This
14592         allows the user gac to be enabled/disabled. 
14593         
14594 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
14596         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
14597         simpler mechanism: we do not care what is encoded initially
14598         (branch absolute or relative), we care about the code and its
14599         target.  I kept the old code for reference for now.
14601         The new code tries first to determine if the jump is anywhere in
14602         the -/+32 absolute meg range, if it succeeds, it encodes using the
14603         absolute branch;  If not, it tried to find something in the
14604         relative range, if not, it uses the handle_thunk code. 
14606 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
14608         * exceptions-ppc.c: use the correct ip register on macosx.
14610 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
14612         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
14614 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
14616         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
14617         Raise exception on integer divide by zero by hand since the hw
14618         doesn't support it. Handle NaNs in FP compares.
14620 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
14622         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
14623         code reducing duplication between the platforms and enabled
14624         signal exception handling (on linux for now).
14626 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
14628         * exceptions-ppc.c: more macosx support.
14630 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14632         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
14634 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14636         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
14638 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
14640         * iltests.il: more tests.
14642 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14644         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14645         vars as well.
14647 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14649         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14651 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14653         * liveness.c: Mark variables as volatile in all basic blocks reachable
14654         from exception clauses.
14656 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14658         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14659         inlining.
14661 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
14663         * iltests.il, basic.cs: more tests for regalloc.
14665 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14667         * iltests.il: Some tests for register allocation modifications
14668         I have locally.
14670 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
14672         * exceptions.cs: Add regression test for bug #56782.
14674         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14675         original stack trace if an exception is rethrown. Fixes #56782. Oh,
14676         the beauty of fixing the same thing in 5 different files...
14678 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
14680         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14681         methods.
14683 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14685         * mini.c: Add support for STRWLPARRAY marshalling convention.
14687 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14689         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14690         to init the context to setup the regs pointer).
14692 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14694         * exceptions-ppc.c: more exceptions work.
14696 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14698         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14699         not allowed.
14701 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14703         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14704         can use the memory directly.
14706         * cpu-pentium.md: Update documentation from a post from Zoltan. 
14708         add x86_add_membase, x86_sub_membase, x86_mul_membase
14710 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14712         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14713         GENERAL_REGS they were also hardcoded for all PPC ports.
14715         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14717         Remove hard-coded limit for floating point registers, use
14718         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14720         Notice that in MacOS X calling conventions you can fit a lot more
14721         floating point values in registers, so I should update the PInvoke
14722         test to excercise the passing of floating point values on the
14723         stack (currently broken).
14724         
14725 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
14727         * tramp-ppc.c (create_trampoline_code): Added
14728         JUMP_TRAMPOLINE_SIZE. 
14729         (ppc_magic_trampoline): Follow the pattern from
14730         x86_magic_trampoline: if code is set to zero, return. 
14731         (create_trampoline_code): Always pass MonoMethod to the jump
14732         trampoline, before it was passing a null.
14733         (mono_arch_create_jump_trampoline): Implement the jump stub, could
14734         share the code with mono_arch_create_jit_trampoline. 
14736         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14737         implemented.
14738         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14739         implemented.  
14741         * cpu-g4.md: Added length for jmp instruction, the worst case
14742         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14743         for save_lmf).
14745 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14747         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14749 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
14751         * mini.c: Only set bblock->real_offset when adding a new bblock, and
14752         before each IL instruction.
14754         * mini.c (CEE_BOX): Fix warnings.
14756 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14758         * mini.c: removed a few unused vars and extra whitespace.
14760 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
14762         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14763         checks.
14764         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14765         index.
14766         (OP_GETCHR): use the above
14767         (CEE_LDELEMA): use the above.
14769         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14770         version of the generic impl.
14771         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14772         (CEE_LDELEMA): use the above.
14774 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14776         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14777         Fixes #56317.
14779         * iltests.il: Added new regression test for #56317.
14781 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14783         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14784         under NetBSD. Fixes #56450.
14786         * liveness.c (update_gen_kill_set): Fix previous patch.
14788 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14790         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14792 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
14794         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
14795         ldsfld and ldsflda.
14797         * inssel-sparc.brg: Add more optimizations.
14799         * mini-sparc.c: Replace multiply/divide with shifts if possible.
14801 2004-04-01  Martin Baulig  <martin@ximian.com>
14803         * mini.c (handle_box): New static function; moved the
14804         implementation of CEE_BOX here.
14805         (mono_method_to_ir): Added `constrained_call' variable.
14806         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
14807         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
14808         mono_method_get_constrained() to get the method.
14810 2004-04-01  Martin Baulig  <martin@ximian.com>
14812         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
14813         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
14814         (mono_method_to_ir): We don't need these macros anymore since
14815         mono_class_get_full() already takes care of it. 
14817 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14819         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
14820         use @function (as doesn't accept #function here) and check the return
14821         value of system and stop if fails.
14823 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14825         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
14827 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
14829         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
14831         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
14833         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
14834         #56223.
14836         * basic-long.cs: Add test for negation of Int64.MinValue.
14838 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
14840         * mini-sparc.c: Update status.
14842         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
14844         * exceptions-sparc.c: Fix return value in filters.
14846         * inssel-sparc.brg: Fix register allocation in some rules.
14848 2004-03-28  Martin Baulig  <martin@ximian.com>
14850         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
14851         if neccessary.  
14853 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
14855         * mini-x86.c (mono_arch_patch_code): Fix warnings.
14856         
14857         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
14858         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
14859         remove unused conv_u4 opcode.
14861         * mini-x86.c: Remove valgrind workaround since it slows down things
14862         even when mono is not run under valgrind.
14864 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
14866         * mini-sparc.c: Update status.
14868         * inssel-sparc.brg: Add some optimizations.
14870         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
14871         future delay slot filling. Add support for varargs, tail calls and JMP.
14873         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
14874         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
14876         * inssel.brg: Fix register allocation in OP_ARGLIST.
14878         * inssel.brg: Fix warnings.
14880 2004-03-25  Martin Baulig  <martin@ximian.com>
14882         * mini.c (inflate_generic_field): Removed.
14883         (mini_get_method): Removed, use mono_get_method_full(),
14884         (mini_get_class): Removed, use mono_class_get_full().
14885         (mono_method_to_ir): Pass our generic context to
14886         mono_field_from_token().        
14888 2004-03-25  Martin Baulig  <martin@ximian.com>
14890         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
14891         of a `MonoMethod *'.
14892         (mini_get_method): Take a `MonoGenericContext *' instead
14893         of a `MonoMethod *'.
14894         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
14895         a new local variable called `generic_context' which holds the
14896         current `MonoGenericContext *'; use it to lookup things.
14898 2004-03-24  Martin Baulig  <martin@ximian.com>
14900         * mini.c (mini_get_class): New static method; if we're inside a
14901         generic instance, inflate the class if neccessary.
14902         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
14904 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
14906         * iltests.il: New regression test for #55976.
14908         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
14909         #55976.
14911 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14913         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
14914         output.
14916 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
14918         * liveness.c: Consider SSA stores as well as loads when making vars
14919         volatile.
14921         * exceptions.cs: New regression tests for register allocation.
14922         
14923 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
14925         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
14926         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
14927           domain lock only to protect puntual access to data structures.
14928           Added access lock for sighash, jit_icall_hash_name, 
14929           jit_icall_hash_addr and domain->code_mp.
14931 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
14933         * driver.c: Print SIGSEGV handling method.
14935         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
14937         * mini.c (setup_jit_tls_data): Handle case when this is called
14938         multiple times for a thread.
14940         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
14941         is different from fbxx_un. Fixes #54303. Also use constants instead of
14942         magic numbers in a lot of places.
14944 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
14946         * exceptions.cs: Fix cctor test when --regression is used.
14948 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
14950         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
14951         for Linux/ppc.
14953 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
14955         * inssel-ppc.brg: fixed register assignments for some rules.
14957 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14959         * exceptions.cs: Add test for exceptions in static constructors.
14961         * mini.c (mono_jit_compile_method_with_out): Move the calling of
14962         static constructors outside the domain lock. Fixes #55720.
14964 2004-03-17  Martin Baulig  <martin@ximian.com>
14966         * mini.c (get_generic_field_inst): Removed, this'll never happen.
14967         (inflate_generic_field): Take the `MonoMethod *' instead of the
14968         `MonoClass *' and added support for generic method.
14969         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
14970         have a `field->parent->gen_params', only inflate the field if it's
14971         an open constructed type.
14973 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
14975         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
14976         exception object instead of the preconstructed ones.
14978 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14980         * mini.c: reverted changed to sigsegv_signal_handler commited
14981         accidentally in the previous patch.
14983 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14985         * mini.c:
14986         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
14987         running --aot with an old assembly.
14989 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
14991         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
14992         point values.
14994         * mini-sparc.c: Add support for v9 branches with prediction.
14996 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
14998         * mini.c (mini_init): #warning is GNUC only
15000         * mini-sparc.h: implement __builtin_frame_address
15001         and __builtin_return_address for Sun C compiler
15003 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
15005         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
15007 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
15009         * basic-calls.cs: Add test for unaligned byref long argument passing.
15011         * mini-ops.h: Add sparcv9 compare and branch instructions.
15013         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
15014         v9 instructions if we have a v9 cpu.
15016         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
15017         registers for global allocation.
15019         * exceptions-sparc.c: Fixes.
15020         
15021 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
15023         * liveness.c (mono_analyze_liveness): Optimized version.
15025         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
15027         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
15028         sparc work.
15030         * basic-float.cs basic-calls.cs: New regression tests.
15032 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
15034         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
15035         sigaltstack implementation.
15037         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
15038         
15039         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
15040         stuff if SIGSEGV_ON_ALTSTACK is not defined.
15042 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
15044         * mini.c: Fix warnings.
15045         
15046         * mini.c (mono_resolve_patch_target): New function which contains the
15047         arch independent part of the patching process.
15049         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
15050         patching code to a separate function.
15052 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
15054         * mini.c (add_signal_handler): ifdef out on Windows
15056 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
15058         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
15059         cpu-sparc.md: Add exception handling support + other fixes.
15061         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
15062         typed GC detection in --version.
15064         * basic.cs exceptions.cs: New regression tests.
15066         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
15067         the arch specific code can store data during a compilation.
15069         * mini-ops.h: Add OP_SETFRET.
15071         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
15072         function, register a separate icall for each arity, so the icalls can
15073         get a wrapper.
15074         
15075         * mini.c (mono_print_tree): Print negative offsets in a more readable
15076         form.
15077         
15078         * mini.c: Make signal handling work on sparc.
15079         
15080         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
15082         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
15084         * jit-icalls.c: Emulate truncl by aintl on solaris.
15086         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
15088 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
15090         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
15092 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
15094         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
15095         a MarshalByRef type, inline a method that performs the check, taking into
15096         account that the object can be a proxy. Also implemented tow new opcodes:
15097         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15098         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
15099         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15101 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
15103         * mini-ppc.c: if a relative branch displacement is too big
15104         but it points to and area reachable with an absolute branch, 
15105         avoid the thunks.
15107 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15109         * mini.c: optimize small copies in cpblk.
15111 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
15113         * basic-calls.cs basic-float.cs: New regression tests.
15115         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
15116         negative offsets from %fp. Implement localloc. Fix local register 
15117         allocation. Fix the case when the this argument needs to be saved to
15118         the stack. Implement some missing opcodes.
15120 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
15122         * mini.c (mini_method_compile): Reenable global regalloc in methods
15123         with exception handlers.
15125         * linear-scan.c (mono_varlist_sort): Fix warning.
15127         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
15129         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
15130         regalloc costs.
15132         * liveness.c: Make all variables uses in exception clauses volatile, to
15133         prevent them from being allocated to registers. Fixes #42136.
15135 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
15137         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
15138         causes regressions.
15140         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
15141         argument to mono_arch_regalloc_cost.
15143         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
15144         precisely.
15146 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
15148         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
15149         Make the cost of allocating a variable to a register arch dependent.
15151         * basic-calls.cs: Fix compilation of tests.
15152         
15153         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
15154         helper function to cut back on the number of #ifdefs needed.
15156         * mini-ppc.c: Fix compilation.
15158         * basic-calls.cs: New regression tests.
15160         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
15162         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
15163         of l0 since that is callee saved.
15165         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
15166         to virtual calls.
15168         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
15169         of delay instruction.
15171         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
15173         * mini.h (MonoCallInst): Add 'virtual' flag.
15175         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
15177 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
15179         * *.cs: New regression tests.
15181         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
15182         work.
15184         * mini.c (mono_runtime_install_handlers): Fix build.
15186         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
15187         'signal_stack_size' members.
15189         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
15190         alternate signal stack.
15192         * exceptions-x86.c: Add stack overflow handling.
15194         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
15195         functions to arch independent code.
15197         * mini.c (mono_print_tree): Print more detailed info for load_membase
15198         opcodes.
15199         
15200 2004-02-23  Martin Baulig  <martin@ximian.com>
15202         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
15204 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15206         * mini-x86.c: fixed reg allocation for div/rem.
15208 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
15210         * driver.c (mono_main): Report some configuratio options on --version.
15212 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
15214         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
15215         low in the address space. Correctly flush memory in thunks where we
15216         output native code.
15218 2004-02-20  Martin Baulig  <martin@ximian.com>
15220         * mini.c (mini_get_method): New static method; inflate all generic
15221         methods and methods in open generic instances.
15222         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
15223         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
15225 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15227         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
15229         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
15231 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
15233         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
15235         * mini-sparc.c (flushi mono_arch_output_basic_block): make
15236         it compile using Sun's compiler.
15238 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15240         * 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.
15242         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
15244 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15246         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
15247         code.
15248         * mini-ppc.c: handle calls outside of the allowed range with thunks
15249         allocated using the code manager.
15250         * tramp-ppc.c: use the code manager to hold generated native code.
15251         Fixed the magic trampoline to just patch vtable entries.
15253 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
15255         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
15256         independent file.
15258 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
15260         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
15261         PPC.
15263         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
15264         if we have a working __thread implementation.
15266         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
15267         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
15269 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
15271         * mini-x86.c: Fix compilation under gcc 2.
15272         
15273 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
15275         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
15276         contains a call to the wrapped function.
15278         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
15279         OP_<CALL>_IMM opcodes, and use them under X86.
15280         
15281         * mini.c (mono_jit_find_compiled_method): Fix warning.
15283         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
15285         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
15287         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
15288         functionality to mini.c.
15290         * mini.c (mono_create_jump_trampoline): New function to create a jump
15291         trampoline. Return a compiled method instead of a trampoline if it
15292         exists. Add a cache for jump trampolines.
15294         * mini.c (mono_jit_find_compiled_method): New function to return a
15295         compiled method if it exists.
15297         * mini-x86.c: Call mono_create_jump_trampoline instead of 
15298         mono_arch_create_jit_trampoline.
15300         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
15301         a jump trampoline. Fixes #52092.
15302         
15303 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
15305         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
15306         which is not up-to-date. Add check_corlib_version () instead.
15308         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
15309         have to call it.
15310         
15311         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
15312         since newer valgrind versions do not need it.
15314         * mini.c (mono_jit_compile_method_with_opt): New helper function to
15315         compile a method with a given set of optimizations.
15317         * mini.c: Compile icall wrappers on-demand instead of at startup.
15319         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
15320         wrapper for an icall.
15322 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
15324         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
15325         #54063.
15327         * iltests.il: Add test for non-empty stack before switch instruction.
15329 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
15331         * mini.c: Add support for new stringbuilder marshalling conventions.
15333         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
15335 2004-02-01  Martin Baulig  <martin@ximian.com>
15337         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
15338         in `ginst->mtype_argv'.
15340 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
15342         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
15343         facilitate grepping.
15345 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
15347         * mini.c: fixed buglet in initobj generic implementation for references.
15349 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
15351         * Makefile.am: make the version script conditional.
15352         * jit-icalls.c: handle missing truncl().
15354 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
15356         * exceptions.cs: Add more tests for double->int conversion.
15358         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
15359         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
15361 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
15363         * driver.c: make --verbose --version emit an error
15364         if the loaded corlib doesn't match the runtime version.
15366 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
15368         * mini-ppc.h: export ppc_patch().
15369         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
15370         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
15371         on par or better than on MacOSX.
15373 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
15375         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
15376         mono_lookup_pinvoke_call.
15378         * mini-x86.c: Under windows, the default pinvoke calling convention is
15379         stdcall. Fixes #52834.
15381         * mini.c (optimize_branches): Add an upper bound to the number of
15382         iterations to prevent infinite loops on strange loops. Fixes #53003.
15384 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
15386         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
15387         and ISINST. Fixes #52093.
15389         * objects.cs (test_0_vector_array_cast): New tests.
15390         
15391 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
15393         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15394         checking in Array.Set ().
15396         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15397         #52590.
15399         * object.cs (test_0_multi_array_cast): New regression test.
15401 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15403         * exceptions-ppc.c: fix build on Linux/PPC.
15405 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
15407         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15408         running under valgrind.
15409         (x86_magic_trampoline): Fix build bustage.
15411         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15412         negative values as well. This is needed for the encoding of the line number
15413         info, since sometimes the line numbers are not in increasing order.
15415 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
15417         * cpu-pentium.md (localloc): Increase the size of the localloc 
15418         instruction since it is a loop under Win32.
15420         * debug-mini.c (record_line_number): Get rid of unneccesary memory
15421         allocation.
15423 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
15425         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
15426         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
15427         Max Horn (max@quendi.de). Fix file names in comments.
15429 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
15431         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15432         avoid stack overflow.
15433         (replace_usage): Avoid uninitialized variable warnings.
15435         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15436         and taking the address of valuetype variables.
15438 2004-01-03  Patrik Torstensson
15440         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15441         for other purposes than FP later on.
15443 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
15445         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15446         of tail calls.
15448 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15450         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15452 2003-12-30  Patrik Torstensson <p@rxc.se>
15454         * mini-x86.h: Decreased number of availiable fp regs.
15455         Solves corner cases with FP spilling.
15457 2003-12-23  Patrik Torstensson <p@rxc.se>
15459         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15460         for floating point stack tracking / spilling on x86. 
15461         Fixes bug #49012.
15462         
15463         * basic-float.cs: added float mul overflow test.
15465 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
15467         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15469 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15471         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15472         supports for cond branches that overflow the immediate
15473         overflow offset. mcs can compile simple programs.
15475 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15477         * exceptions-ppc.c: exception handling support wip:
15478         finally handlers get run on exception.
15480 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
15482         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
15483         profiling.
15485 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15487         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15488         initial support for stack walking and unwinding.
15490 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
15492         * driver.c (mono_main): Make corlib-out-of-sync message more 
15493         descriptive. Also remove verify_corlib call.
15495 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15497         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
15498         not overlap with other call's arguments, too.
15500 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15502         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
15503         move to arch-specific code the choice of arch-specific
15504         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15505         * mini.c: ensure emulation calls will not interleave
15506         with other calls.
15508 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15510         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
15511         the magic trampoline stack frame is dropped before executing
15512         the new method.
15514 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15516         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
15517         and integer to fp conversions. Added support for overflowing
15518         arguments on the stack. Reserve a couple more registers as temps.
15519         Added support for aot compilation (as output still needs to be
15520         tweaked, though).
15522 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15524         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15525         Don't overwrite return register in some corner cases.
15527 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
15529         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15530         static constructors when AOT compiling.
15532         * driver.c (mono_main): Call mono_check_corlib_version.
15534 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15536         * cpu-g4.md, basic.cs: fixed div target register.
15538 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15540         * mini-ppc.c, basic.cs: shl_imm fix with test.
15542 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15544         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
15545         structures by value. Misc fixes.
15546         * objects.cs: more tests.
15548 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15550         * mini-ppc.c: lconv.ovf.i implemented.
15552 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15554         * mini.c:
15555         (mini_init): don't error out if someone already called g_thread_init.
15557 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15559         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15560         to be any type per the spec. Fix abnormal memory usage when
15561         the same object is repeatedly thrown.
15563 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15565         * mini.c: check for overruns in IL code.
15567 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
15569         * TODO: Add/remove some todo entries.
15571 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
15573         * driver.c (mono_main): Call mono_verify_corlib.
15575 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
15577         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
15578         This has been moved to mini.c
15579         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15580         type being casted is marshalbyref it could be a proxy, so instead of
15581         emitting the type check code, emit a call to a runtime method that will
15582         perform the check by calling CanCastTo if needed.
15584 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
15586         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
15587         methods with large stack frames under Win32.
15589 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
15591         * Makefile.am: Distribute regression tests.
15593         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
15594         at the end instead of inserting each variable into the sorted list.
15596         * linear-scan.c (mono_varlist_sort): New helper function.
15597         
15598 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15600         * mini.c: ensure arguments and locals are within bounds.
15602 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15604         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
15605         related fixes.
15607 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15609         * mini.c (mono_cprop_copy_values): Fix crash.
15611         * aot.c: Set verbosity back to 0.
15612         
15613 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15615         * regalloc.c: complete memory leak fix by Laurent Morichetti
15616         (l_m@pacbell.net).
15618 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15620         * driver.c (main_thread_handler): Revert the previous patch.
15622         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
15623         under valgrind.
15625         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
15626         memory from the memory pool.
15628         * driver.c (main_thread_handler): Turn on all optimizations when
15629         --aot is used.
15631         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
15632         an array for better performance.
15634         * regalloc.c (mono_regstate_assign): Fix memory leak.
15636         * debug-mini.c (mono_debug_serialize_debug_info): New function to
15637         serialize the debug info.
15639         * debug-mini.c (mono_debug_add_aot_method): New function to load the
15640         debug info from the serialized representation.
15642         * aot.c: Save debug info into the generated file and load it when 
15643         loading a method.
15645         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15647 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15649         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15650         More FP-related fixes.
15652 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15654         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15655         and register allocation buglet. Hello world now runs.
15657 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15659         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15660         * tramp-ppc.c: fixed class init trampoline.
15661         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15663 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15665         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15666         mini.c: more ppc changes/fixes.
15668 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15670         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15671         Also optimize the case when the arguments are the same in the caller 
15672         and in the callee.
15674         * iltests.il: Add tests for tail calls with valuetype arguments.
15676 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15678         * mini-ppc.c: fixes for struct return type.
15680 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15682         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
15683         mono_spillvar_offset() to arch-specific code.
15685 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15687         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15689 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15691         * exceptions-x86.c: Fix stack space leaks.
15692         
15693         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15694         registers from the lmf if the method has save_lmf set.
15696 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
15698         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15699         of icall wrappers into InvokeInDomain, since these are now per-domain.
15701 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15703         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15704         make some opcode emulation and intrinsic ops enabled/disabled 
15705         according to the architecture. More fixes.
15707 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15709         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15711 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15713         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15714         arch-specific handling for 'this' and struct return type to
15715         arch-specific code.
15717 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15719         * aot.c: prevent divide by zero error when reporting (it happened with
15720         Accessibility.dll).
15722 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
15724         * mini.h (inst_switch): Remove unused macro.
15726 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15728         * aot.c:
15729         (load_aot_module): free 'info->methods' and 'info' properly. No more
15730         "free(): invalid pointer blah" messages when you have an old aot
15731         compiled assembly.
15733 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
15735         * jit-icalls.c, mini.c: Added support for context static fields.
15737 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15739         * mini.c (mono_method_blittable): Methods which set LastError are not 
15740         blittable either. Fixes #51108.
15741         
15742 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15744         * mini.c: flush icache.
15745         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15747 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15749         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15751 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
15753         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15754         safe on IA32.
15756         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
15757         vararg calls.
15759         * inssel.brg (CEE_MKREFANY): Fix AOT case.
15761 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
15763         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
15764         instruction when the result is discarded.
15766         * iltests.il (test_0_div_regalloc): New regression test.
15768         * arrays.cs: Fix compilation error.
15770 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15772         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15773         float rules to inssel-x86.brg: sane architectures with FP registers
15774         don't need to implement these rules.
15776 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15778         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15780 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15782         * mini.h, inssel-long32.brg: fixed endianess issues in int64
15783         implementation of 32 bit systems.
15785 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15787         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15788         (Jeroen Zwartepoorte).
15790 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15792         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15793         the caller and the callee matches.
15794         
15795         * mini.c (mono_method_to_ir): Add comment.
15797         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
15798         signbit is missing on some platforms.
15800 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
15802         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
15804         * mini.c (setup_jit_tls_data): Call the new function.
15805         
15806         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
15808         * mini-x86.c: Add experimental support for fast access to the lmf
15809         structure under NPTL/Linux 2.6.x.
15811 2003-11-06  Martin Baulig  <martin@ximian.com>
15813         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
15814         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
15815         the debugger.
15817 2003-11-02  Martin Baulig  <martin@ximian.com>
15819         * mini.c (inflate_generic_field): New static method.
15820         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
15821         generic instance and the field is declared in a generic type, call
15822         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
15824 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
15826         * mini.h mini.c (mono_method_same_domain): New function to return
15827         whenever the caller and the callee are in the same domain.
15829         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
15831 2003-10-30  Martin Baulig  <martin@ximian.com>
15833         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
15834         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
15835         method parameters.
15836         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
15837         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
15839 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
15841         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
15842         propagation.
15844         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
15845         object here, so it is in the correct appdomain etc.
15847 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
15849         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
15850         already done.
15851         (mono_method_to_ir): Avoid freeing the type created returned from
15852         mono_type_create_from_typespec, since it is put into an internal cache
15853         by the function. Fixes pointer.exe.
15855         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
15856         trampolines for icalls and pinvokes as well. Fixes #33569.
15858 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
15860         * mini.c: Update after appdomain changes.
15862         * mini.c (mono_jit_compile_method_inner): Allways compile native
15863         method wrappers in the root domain, since there can only be one
15864         instance of them, whose address is stored in method->info.
15866 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
15868         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
15869         environment variable. Instead detect automatically whenever running
15870         under valgrind using the magic macro RUNNING_ON_VALGRIND from
15871         valgrind.h.
15873 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
15875         * trace.c, trace.h: New files that implement the new trace option
15876         parsing. 
15878         * driver.c: Document new --trace options.
15880         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
15881         mini-x86.c: Apply:
15883         -       if (mono_jit_trace_calls)
15884         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
15886         * mini.h: prototypes.
15887         
15888 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
15890         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
15892         * mini.c inssel.brg: Implement typedefbyref opcodes.
15894         * mini.c (mono_jit_compile_method): Remove unused local variable.
15896         * mini.c (mono_jit_compile_method_inner): Ditto.
15897         
15898 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
15900         * tramp-x86.c (x86_class_init_trampoline): Fix build.
15901         
15902         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
15904 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
15906         * mini.c (mono_no_aot): Remove unused global variable.
15908         * mini.c: Thread safety fixes.
15910 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
15912         * mini.c (mono_create_class_init_trampoline): Add a lock around
15913         class_init_hash_addr.
15915         * arrays.cs (test_0_newarr_emulation): Add new regression test for
15916         #30073.
15918         * mini.c: Decompose the NEWARR instruction before decomposing its
15919         arguments. Fixes #30073.
15921 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
15923         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
15924         convention.
15926 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
15928         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
15930         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
15932         * driver.c: Add support for compiling icall wrappers to --compile.
15934 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
15936         * inssel.brg: The empty value in class->interface_offsets is -1, not
15937         0. Fixes #49287.
15939 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
15941         * objects.cs: New test for 'is' operator on an array of interfaces.
15943 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
15945         * tramp-ppc.c: update trampoline code to support jumps
15946         and class initialization.
15948 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
15950         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
15952         * inssel.brg (OP_UNBOXCAST): Fix #46027.
15954         * inssel.brg (OP_UNBOX): Remove unused rule.
15956         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
15957         region instead of one for each method. Fixes #47813.
15959 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
15961         * exceptions.cs (test_0_nested_finally): New regression test for
15962         nested exception handlers.
15964         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
15966         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
15968         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
15969         inlining.
15971         * mini.c (mono_method_check_inlining): Make the inlining limit 
15972         configurable by an environment variable.
15973         
15974         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
15976         * mini.h: Bump AOT file version.
15978         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
15979         token, store the image along with the token, since the token might not 
15980         refer to the same image as the method containing the relocation, 
15981         because of inlining.
15983 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
15985         * mini.c (mono_precompile_assemblies): New function to compile
15986         all methods in all loaded assemblies.
15988         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
15990         * regalloc.h regalloc.c (MonoRegState): Change the type of 
15991         iassign and fassign to int*, since they can contain large negative
15992         values if the register is spilled. Also added some comments. Fixes
15993         #45817.
15995         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
15996         under Win32. Fixes #42964.
15998 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
16000         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
16002         * aot.c: Added support for AOT compiling methods which contain calls
16003         to wrappers. Currently, only remoting-invoke-with-check wrappers are
16004         handled.
16005         
16006         * driver.c (compile_all_methods): Run the compilation in a thread
16007         managed by mono. Fixes #44023.
16009         * mini.c (mono_codegen): Print full method name in verbose output.
16011         * mini-x86.c (mono_arch_patch_code): Fix warning.
16012         
16013         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
16014         jumps, since the method we are jumping to might be domain-specific.
16016         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
16018 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16020         * inssel.brg: string chars are unsigned.
16022 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
16024         * TODO: New todo item.
16026         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
16027         which calls mono_runtime_class_init and patches the call site to
16028         avoid further calls.
16029         (mono_arch_create_class_init_trampoline): New arch specific function 
16030         to create a class init trampoline.
16031         (create_trampoline_code): Generalized so it can create
16032         class init trampolines as well.
16034         * mini.c (helper_sig_class_init_trampoline): New helper variable.
16035         (mono_create_class_init_trampoline): New function to create and cache
16036         class init trampolines.
16037         (mono_find_class_init_trampoline_by_addr): New function to lookup the
16038         vtable given the address of a class init trampoline. Used by the
16039         patching process.
16040         (mono_codegen): Generate a call to a trampoline instead of
16041         mono_runtime_class_init in LDSFLD[A].
16042         (mono_codegen): Add relocations for the new trampoline.
16043         
16044         * mini.h mini-x86.c aot.c: Added a new relocation type: 
16045         MONO_PATCH_INFO_CLASS_INIT.
16047         * mini.h: Bump AOT version number.
16049         * aot.c: Create a copy of the loaded code instead of using the original
16050         so methods which call each other will be close in memory, improving
16051         cache behaviour.
16052         
16053         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
16054         patch since it breaks the regression tests.
16055         
16056         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
16057         for the register saving instruction sequence since the 
16058         frame_state_for function in glibc 2.3.2 don't seem to detect it.
16060 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
16062         * TODO: Fix todo item && remove another.
16064 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
16066         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
16067         previous checkin.
16069         * aot.c: Moved the check for MONO_LASTAOT into the initialization
16070         function of the module.
16072         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
16073         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
16074         --no-aot command line option.
16076 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
16078         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
16079         by Bernie Solomon (bernard@ugsolutions.com).
16081         * inssel.brg: Refactor the interface offset table related code into
16082         its separate functions and add support for the AOT case.
16084 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
16086         * aot.c (mono_aot_get_method_inner): Fix memory leak.
16087         
16088         * aot.c: Added mono_aot_verbose variable and made all debugging
16089         output depend on the value of this variable.
16091         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
16092         method_label and info_label.
16094         * mini.h mini-x86.c aot.c: Added a new relocation type 
16095         MONO_PATCH_INFO_IID for klass->interface_id.
16097         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
16098         the MonoJitInfo structure.
16100         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
16101         a non-root appdomain in shared mode.
16103 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16105         * aot.c: make aot loader less verbose. Remove free of unused variable.
16107 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
16109         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
16111         * .cvsignore: Added *.dll.
16113         * mini.c (mono_print_tree_nl): New function callable while debugging.
16115         * mini.c (mono_print_code): Export this.
16117         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
16118         patched code.
16120 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
16122         * mini.h (MonoCompile): Added 'jit_info' field.
16124         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
16125         the cfg structure, since it is needed by the AOT compiler.
16127         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16129         * aot.c: A major rewrite. Changes include:
16130         - save exception tables for methods which have them.
16131         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
16132         to g_module_symbol.
16133         - reworked the file format so it is now much smaller and needs
16134         fewer relocation entries.
16135         
16136 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16138         * aot.c (load_aot_module): Fix build bustage on platforms without
16139         Boehm GC.
16141 2003-09-04  Martin Baulig  <martin@ximian.com>
16143         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
16145 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16147         * TODO: Some new optimization ideas.
16149         * aot.c: Move AOT module loading logic here from mono_assembly_open.
16151         * aot.c: Save the optimization flags used to compile the code into
16152         the AOT module.
16154         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
16155         support emitting domain specific code.
16156         
16157         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
16158         no longer domain neutral. It can be made domain neutral by compiling 
16159         with --optimize=shared.
16161         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
16162         between appdomains.
16164         * driver.c mini.h mini.c: New --no-aot debugging option which disables
16165         loading of AOT code.
16167         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
16168         
16169         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
16170         if there is no domain neutrality information.
16172 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
16174         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
16175         format version into the generated library.
16177         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
16178         callee method into the caller since one of them could be shared.
16180         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
16181         system exceptions from AOT code now works.
16183         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
16184         method if it is domain neutral and the callee is not.
16186         * graph.c (cfg_emit_one_loop_level): Fix warning.
16188 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
16190         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
16191         last checkin.
16193 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
16195         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
16196         is needed  by code which is executed before mono_runtime_init ().
16197         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
16198         
16199         * mini.c (mono_thread_abort): Fix warning.
16200         (mono_jit_compile_method): Call static constructor in the AOT case too.
16202         * aot.c (mono_compile_assembly): Fix warning.
16204 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16206         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
16208 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
16210         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
16212         * cpu-pentium.md: Fix the length of call opcodes so they include the
16213         ESP restoring instruction. Fixes #47968.
16215 2003-08-28  Martin Baulig  <martin@ximian.com>
16217         * mini-x86.c (mono_arch_call_opcode): Added support for
16218         MONO_TYPE_GENERICINST.
16220         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
16222 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
16224         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
16225         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
16227         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
16228         metadata_section.
16230 2003-08-26  Martin Baulig  <martin@ximian.com>
16232         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
16233         when reporting an error, set this to the actual error location.
16234         (mono_method_to_ir): Report the correct error location if
16235         get_basic_blocks() returned an error.
16237 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
16239         * mini.c (mono_type_blittable): OBJECT is not blittable.
16240         (mono_method_blittable): Methods which have marshalling descriptors
16241         are not blittable either. Fixes #47842.
16243 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
16245         * driver.c mini.c: Use an environment variable instead of a global 
16246         variable. Also fix the build.
16248         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
16249         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
16250         reporting this. 
16252         * driver.c mini.c: Added --with-valgrind option to turn off some
16253         code which prevents mono from running under valgrind.
16255         * mini.c (mono_emit_call_args): Fixed warning.
16257         * mini.c (mono_emulate_opcode): Fixed warning.
16259 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16261         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
16262         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
16263         regalloc.c, regalloc.h: specify available registers in arch-specific
16264         code and support floats in the regallocator (patch by Laurent Morichetti 
16265         <l_m@pacbell.net>)
16267 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16269         * mini.c: mono_thread_current() can be called only after
16270         mono_runtime_init(): rearrange code to not call it early on.
16272 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16274         * mini.c: allocate jump tables in the code mempools.
16276 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16278         * mini.c, mini.h: make sure per-thread data allocated by the jit is
16279         freed.
16281 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
16283         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
16284         12 to 16.  This fixes bug #47453.
16287 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16289         * mini-ppc.c: fixed indexed load and unsigned compares.
16291 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
16293         * mini.c: reenabled installation of handler for
16294           thread abort signal.
16296 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16298         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
16299         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
16300         until it's fixed and actually useful.
16302 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16304         * inssel-long32.brg: couple more opcodes implemented.
16306 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16307         
16308         * mini-sparc.c: Even more opcodes implemeted.
16310 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
16312         * mini-sparc.c: More opcodes implemented.
16314 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
16316         * mini-sparc.c: More opcodes implemented.
16318 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16320         * inssel-sparc.brg: Add some needed rules.  Direct
16321         copy from PPC.
16322         * Makefile.am: Use inssel-sparc.brg
16323         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
16324         an assert happy for now.
16326 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
16328         * mini-sparc.c: Fixed compile errors.
16329         * exceptions-sparc.c: Same.  We now produce a mono binary 
16330         on sparc-linux.  Yea.
16332 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
16334         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
16335         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
16336         They compile, but do not work.
16338 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16340         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
16341         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
16342         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
16343         (ct@gentoo.org).
16345 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16347         * mini.c: more opcodes implemented and better support for generics.
16349 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16351         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
16352         * mini.c, mini.h: first cut at generics support: some new instructions 
16353         added and changed the behaviour of some of the existing ones.
16355 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
16357         * mini.c: Removed definition of metadata_shared mutex here.
16359 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16361         * mini-x86.c: make vararg calls work for instance methods.
16363 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16365         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
16366         returns the arguments in a separte list, now.
16368 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16370         * aot.c, mini.c: updates for array type representation changes.
16372 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
16374         * mini.c: register function to perform jit shutdown.
16376 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16378         * mini.c: use a faster allocator if possible.
16380 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16382         * aot.c: some cleanups and portability changes.
16384 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16386         * mini.c: use faster allocation for CEE_BOX if possible.
16388 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16390         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
16391         Moved inlined mempcy code to its own function so that is can be
16392         reused. Added an inline memset function as well (optimized initobj).
16393         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16395 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16397         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16399 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16401         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16402         arch code can setup the cpu for CLR execution, if needed.
16403         We use it on x86 to set the precision of FP operations.
16405 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16407         * mini.c: disable some optimizations if we can guess they'll cost too
16408         much for a given method.
16410 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16412         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16413         
16414 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16415         * mini.h mini.c mini-x86.c: Added instruction level coverage 
16416         info collection support.
16418 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16420         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16421         is now implemented in the profiling API. Get rid of a couple of
16422         unnecessary global variables.
16424 2003-06-15  Nick Drochak <ndrochak@gol.com>
16426         * basic-long.cs: tests for negative values for bigmul, and unsigned.
16427         * cpu-g4.md: add op_bigmul and op_bigmul_un
16428         * cpu_pentium.md: add op_bigmul_un
16429         * inssel-long32.brg: add rule for unsigned bigmul
16430         * mini-ops.h: define OP_BIGMUL_UN
16431         * mini-x86.c: THE BUG: handle (un)signed properly
16432         * mini.c: choose unsigned opcode if needed.
16433         This set of patches fixes bug #44291
16435 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
16437         * mini.c (optimize_branches): improved to handle all kinds of
16438         conditional branches.
16440 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16442         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16443         don't raise exceptions.
16445 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16447         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16448         to arch-specific files.
16450 2003-06-09  Martin Baulig  <martin@ximian.com>
16452         * Makefile.am (libs): Added $(LIBGC_LIBS).
16454 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16456         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16457         and OP_ATAN (fixes bug#44293).
16459 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16461         * Makefile.am, mini-x86.c: rename cpu description array to
16462         pentium_desc, since some compilers define the 'pentium' preprocessor
16463         symbol.
16465 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
16467         * mini.c (mini_select_instructions): add explicit branch if the
16468         following block is not the false target of a conditional branch -
16469         we need this with any optimization that reorder or remove bblocks
16471         * mini.c (optimize_branches): bug fixes
16473 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
16475         * mini.c (mono_method_to_ir): inline static readonly fields
16477         * ssa.c (fold_tree): start cfold support for long (very simple
16478         cases only)
16480         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16482 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16484         * inssel.brg: fixed memcpy (bug #44219).
16486 2003-06-05  Dick Porter  <dick@ximian.com>
16488         * driver.c: Set the glib log levels to not abort if g_message
16489         recurses.
16491         g_set_prgname() has to happen before mini_init() so that the
16492         process handle gets the info.
16493         
16494 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16496         * driver.c: add intrins to the default optimizations to get wider
16497         exposure.
16499 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16501         * mini.h: some large basic blocks will overflow a 16-bit
16502         integers for symbolic registers.
16504 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16506         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16507         (mono_arch_output_basic_block): fix bug 43499 
16509 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16511         * mini.c: kill duplicated definition of mono_debug_format.
16513 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
16515         * mini-x86.c, arrays.cs: fixed register allocation bug.
16517 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16519         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16521         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16523 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16525         * mini.c:
16526         (print_method_from_ip): also print source location information if
16527         available.
16529 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
16531         * mini.c (mono_find_block_region): bug fix in region code
16532         (mini_method_compile): enable removing unreachable code again, but
16533         only in methods without exception clauses.
16535 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16537         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16538         Implemented arglist opcode and handling of TypedReference type.
16539         Fixed x86 call convention when a structure is returned.
16540         Minimal support for calling static vararg methods.
16542 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
16544         * mini.c (mini_method_compile):  always remove unreachable code,
16545         because the code in them may be inconsistent  (access to dead
16546         variables for example).
16548 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16550         * driver.c, debug-mini.c: warning fixes.
16552 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16554         * Makefile.am, jit.h, mini.h: install header for embedding mono.
16556 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16558         * mini.c: thread-static fields are registered in mono_class_vtable(),
16559         so ensure the function is called before checking for them.
16561 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
16563         * mini.c (optimize_branches): fix for bug 43586
16565         * jit-icalls.c (mono_llmult_ovf): added an additional check for
16566         overflow (fixes Bug #43639)
16568 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16570         * mini.c, objects.cs: allow the use of stobj for primitive types.
16572 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16574         * mini.c: be less strict about argument checking until we support
16575         running the verifier.
16577 2003-05-27  Nick Drochak <ndrochak@gol.com>
16579         * basic-long.cs: tests for (ulong)int * (ulong)int also
16580         * mini.c: use the same trick for (ulong)int * (ulong)int
16582 2003-05-27  Nick Drochak <ndrochak@gol.com>
16584         * basic-long.cs: add regression test for (long)int * (long)int
16585         * cpu-pentium.md: add op_bigmul specification
16586         * inssel-long32.brg: add OP_BIGMUL rule
16587         * mini-ops.h: add OP_BIGMUL
16588         * mini-x86.c: register allocator: handle case where src1 needs to be
16589         in EAX.
16590         * mini.c: substitute special BIGMUL opcode in the tree for 
16591         (long)int * (long)int
16593 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16595         * jit-icalls.c: call the type ctor on field access if needed.
16597 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16599         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
16600         to a method (including results of ldelema, bug#43207).
16602 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
16604         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
16605         colors to show exception handler blocks.
16607         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
16608         (fix for pinvoke7.cs).
16610 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16612         * mini.h, mini.c: ensure correct initialization order for types that
16613         require it. Prepare for lazy compilation of jit icall wrappers.
16614         Provide a name for opcode emulation to reduce unneeded mallocing.
16616 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16618         * mini-x86.c: better register restoring code and profiling
16619         support for tail calls.
16621 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16623         * mini.h, driver.c: prepare for leaf methods optimization.
16625 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16627         * mini.c: get targets of branches before converting a method.
16629 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
16631         * mini.c (optimize_branches): added some experimental code (disbaled) 
16633 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
16635         * mini.c (optimize_branches): fix branch to branch optimization 
16637         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
16639         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
16641         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
16643         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16644         if needed.
16646 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
16648         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16649         enable use of interface variables again.
16651         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16652         I1 to registers because there is no simply way to sign extend 8bit
16653         quantities in caller saved registers on x86.
16655         * inssel-float.brg: set costs of some rules to 2 so
16656         that monobure always select the arch. specific ones if supplied,
16657         regardless of the order we pass the files to monoburg.
16659 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16661         * mini.c, mini-x86.c: since the magic trampoline for jumps
16662         can't patch the code directly, we do it as soon as the
16663         method gets compiled.
16665 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16667         * mini-x86.c, mini.h: introduce a new patching method
16668         to support CEE_JMP and tail calls.
16669         * mini.c: obey tail.call. Don't precompile methods target
16670         of CEE_JMP.
16671         * tramp-x86.c: new trampoline code to handle methods
16672         reached through a jump.
16674 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
16676         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16677         bit values to registers
16679 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
16681         * mini.c (mono_compile_get_interface_var): share interface
16682         variables if possible.
16684 2003-05-16  Martin Baulig  <martin@ximian.com>
16686         * debug-mini.c (mono_init_debugger): New function to initialize
16687         the debugger.  This is not in the debugger since it needs to
16688         access some of mini's internals.
16690 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16692         * mini.c (mono_method_to_ir): inlining fixes/cleanups
16694 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16696         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16697         for value type handling.
16699 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16701         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16702         (mono_method_check_inlining): enable inlining of all kinds of wrappers
16704 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
16706         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16707           the constructor through a proxy.
16709 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16711         * jit-icalls.c, inssel.brg: fixes to array element address
16712         calculations.
16714 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
16716         * mini-x86.c (is_regsize_var): allocate pointer to registers
16718 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16720         * driver.c: fixed typo, added intrins to the set of optimizations
16721         tested with regressions.
16723 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16725         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16726         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16727         test case.
16729 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
16731         * inssel.brg: remove some common pop instructions without side effects
16733 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16735         * inssel-x86.brg: fixed thinko in int to double conversions.
16737 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16739         * mini.c, jit-icalls.c: added runtime thread-static variable support.
16741 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16743         * inssel-long32.brg: two more missing instructions.
16745 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
16747         * mini.c (mono_emit_call_args): set the cil_code for all arguments
16748         if not already set.
16750 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
16752         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16753         correctly.
16755         * basic-float.cs: Added tests for negative zero.
16757 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16759         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16760         a couple of missing operations for long casts, with test cases.
16762 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16764         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16766 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
16768         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16769         code size estimation.
16771 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
16773         * mini.c (mono_jit_create_remoting_trampoline): make it work with
16774         abstract methods (fix bug 42542)
16776         * aot.c: add ability to handle array types
16777         
16778 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
16780         * mini.c: Call the _specific versions of the object allocation
16781         functions if possible.
16783 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16785         * driver.c: call setlocale ().
16787 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16789         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16790         windows build.
16792 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
16794         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
16796         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
16797         wrappers (fix bug 42122)
16799 2003-05-04  Martin Baulig  <martin@ximian.com>
16801         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
16803         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
16804         s/mini_set_defaults/mono_set_defaults/g.
16806 2003-05-04  Martin Baulig  <martin@ximian.com>
16808         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
16810 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16812         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
16813         (reported by Don Roberts).
16815 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16817         * mini.c: temporarily work around two bugs for this release.
16819 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16821         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
16822         that contains -export-dynamic and it makes using the ld script
16823         useless.
16824         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
16826 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16828         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
16829         specific cpu.
16831 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16833         * mini.c: make sure leave calls all the needed finally blocks,
16834         even when the target jumps out of multiple exception clauses.
16836 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16838         * ldscript, Makefile.am: add linker script to reduce the number of
16839         exported symbols (should also fix the issues with libwine defining
16840         some of the same symbols in io-layer).
16842 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
16844         * driver.c (mini_main): Avoid assertion when no file name is given on 
16845         the command line.
16847 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
16849         * driver.c: added --version/-V command line option.
16850         Added the inline optimization in the regression tests.
16852 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16854         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
16855         to the type in the method signature (fixes bug#42134).
16857 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
16859         * mini.c: when inlining, check this is not null only when needed (bug #42135).
16861 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
16863         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
16865 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16867         * driver.c: fixed bug #42100.
16869 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
16871         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
16873 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16875         * mini.c: moved most of the code required to do inlining to its own
16876         function so it can be reused. Inline also ctors if appropriate.
16878 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
16880         * Makefile.am: Link with -export-dynamic so shared libs loaded by
16881         the runtime can call mono API functions.
16883 2003-04-27  Martin Baulig  <martin@ximian.com>
16885         * debug-mini.c (mono_debug_init_method): Added
16886         `guint32 breakpoint_id' argument; if the method has a breakpoint,
16887         send a notification to the debugger.
16889         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
16890         running in the Mono Debugger, just pass the breakpoint number to
16891         mono_debug_init_method().
16893         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
16895 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
16897         * mini.c: allow some more unsafe compares.
16899 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16901         * mini-x86.c, Makefile.am: make distcheck works (partially from
16902         a patch by Richard Lee <r.h.lee@attbi.com>).
16903         * regset.c, regset.h: removed, they are unused.
16905 2003-04-25  Dick Porter  <dick@ximian.com>
16907         * driver.c: Usage reports the name as 'mono' not 'mini'
16908         * exceptions-x86.c: Build and run on freebsd
16910 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
16912         * Makefile.am: install the program with the 'mono' name and
16913         the library as libmono instead of mini and libmini.
16915 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16917         * driver.c: provide the APIs for the embedding interface of the old jit.
16919 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
16921         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
16923 2003-04-23  Martin Baulig  <martin@ximian.com>
16925         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
16927         * driver.c: Added `--debug' command line argument to enable
16928         debugging support.
16930 2003-04-23  Martin Baulig  <martin@ximian.com>
16932         * debug.[ch]: Removed.  The code is now in
16933         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
16935         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
16936         last six months.
16938 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
16940         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
16942 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16944         * mini.c:
16945         (mini_cleanup): moved mono_runtime_cleanup call after the call to
16946         mono_domain_finalize.
16947         (mini_method_compile): use mono_method_profile* if the the option is
16948         enabled.
16950 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
16952         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16953         methods with their wrapper.
16955         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
16956         methods with their wrapper.
16958         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
16959         their wrapper.
16961         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
16962         wrapper.
16964         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
16965         methods.
16967 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
16969         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
16971 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
16973         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
16974         of the mempool. This is slightly faster and uses less memory
16976 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16978         * mini.c: avoid O(n) allocation for variables.
16980 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16982         * mini.c: handle items on the stack after inlining methods.
16984 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16986         * mini.c: make the method->opcode optimization dependent
16987         on MONO_OPT_INSTRINS and do it lazily.
16989 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16991         * driver.c: print overall results at the end of regression run.
16993 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
16995         * inssel.brg: don't overwrite symbolic registers.
16997 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
16999         * inssel-x86.brg: fix conversion from long to float.
17001 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
17003         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
17005 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
17007         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
17009         * driver.c: Added --print-vtable option as in the old JIT.
17011 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17013         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
17015 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
17017         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
17019 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
17021         * mini.c regalloc.c regalloc.h: Fix memory leak.
17023 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
17025         * aot.c (mono_aot_get_method): register all used strings
17027 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17029         * mini.c: always intern strings references with ldstr at compile time.
17031 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17033         * Makefile.am: add BUILT_SOURCES.
17035 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17037         * driver.c: give a better error message when the assembly to execute
17038         doesn't have an entry point.
17040 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
17042         * Makefile.am: added hack for automake
17044         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
17045         correct sematics.
17047         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
17049 22003-04-07  Martin Baulig  <martin@ximian.com>
17051         * Makefile.am: Added Makefile.am.
17053         * debugger-main.c: Removed, this is now in the debugger where it
17054         belongs.
17056         * mini.pc.in: Call this package `mini' for the moment.