2009-01-07 Zoltan Varga <vargaz@gmail.com>
[mono-project.git] / mono / mini / ChangeLog
blob9e7d697ac5588a701088ed247b7f0acfa347866b
1 2009-01-05  Zoltan Varga  <vargaz@gmail.com>
3         * branch-opts.c (mono_if_conversion): Fix another assert introduced by
4         the last change.
6         Backport of r122452.
7         
8         * mini.c (mono_allocate_stack_slots_full2): Use mono_class_from_mono_type
9         instead of directly accessing type->data.klass. Fixes #462016.
10         (mono_allocate_stack_slots_full): Ditto.
12         Backport of r122416.
14         * mini-arm.c (mono_arch_flush_icache): Applied patch from Riku Voipio 
15         <novell@kos.to>. Fix cache flush on kernels without OLDABI compat option.
17 2009-01-04  Zoltan Varga  <vargaz@gmail.com>
19         Backport of r122392.
20         
21         * branch-opts.c (mono_if_conversion): Fix an assert introduced by the last
22         change.
23         
24         Backport of r122386.
26         * branch-opts.c (mono_if_conversion): Use branch->inst_true_bb/inst_false_bb
27         instead of bblock->out_bb [0]/[1], the two might not be the same. Fixes
28         #463357.
30         * iltests.il.in: Add a regression test.
32 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
34         Backport of r122364.
36         * basic-simd.cs: Add a regression test for #462457.
38 2009-01-04  Rodrigo Kumpera  <rkumpera@novell.com>
40         Backport of r122363.
42         * mini-ops.h: Add a definition of XPHI.
44         * mini.h (MONO_IS_PHI): Make is aware of simd instrincs. 
46         * ssa.c (op_phi_to_move): Handle XPHI.
48         * ssa.c (mono_ssa_compute): Generate a XPHI for simd intrinsics instead of VPHI.
50         Fixes #462457
52 2008-12-29  Zoltan Varga  <vargaz@gmail.com>
54         Backport of r122170.
56         * mini.c (mono_jit_compile_method_inner): Avoid holding the domain lock
57         while loading AOT methods.
59         Backport of r122168.
60         
61         * mini-exceptions.c: Check jit_tls->class_cast_from instead of class_cast_to
62         since only the former is nulled out after a successful cast. This prevents
63         crashes with rethrown exceptions when using --debug=casts.
65 2008-12-24  Mark Probst  <mark.probst@gmail.com>
67         Backport of r122086.
69         * mini.h: New macro for checking whether a method is final,
70         i.e. whether the method or its class is marked final.
72         * method-to-ir.c: Use the new macro for all final-checks
73         consistently.  Fixes the crash in the System.ServiceModel tests.
75 2008-12-24  Mark Probst  <mark.probst@gmail.com>
77         * mini-ppc.c (mono_arch_build_imt_thunk): Fix the build.
79 2008-12-23  Mark Probst  <mark.probst@gmail.com>
81         Backport of r122034.
83         * mini-ppc.c (mono_arch_build_imt_thunk): Save and restore r11.
84         Clobbering it is not allowed because the caller might use it as
85         the vtable register in the interface call.
87 2008-12-23  Mark Probst  <mark.probst@gmail.com>
89         * mini-exceptions.c (get_exception_catch_class): Removed another
90         overly strict assertion.  Fixes #461198.
92 2008-12-19  Mark Probst  <mark.probst@gmail.com>
94         * mini-exceptions.c (get_exception_catch_class): Removed overly
95         strict assertion.
97 2008-12-19  Mark Probst  <mark.probst@gmail.com>
99         Backport of r121292.
101         * method-to-ir.c: Removed an unnecessary assertion.
103 2008-12-16  Martin Baulig  <martin@ximian.com>
105         Backport of r120438.
107         * method-to-ir.c (mono_method_to_ir): Disable debugging
108         information for the init locals block to make the debugger stop
109         after all locals have been initalized.
111 2008-12-16  Martin Baulig  <martin@ximian.com>
113         Backport of r120419.
115         * mini.c (mini_method_compile): Disable MONO_OPT_DEADCE when
116         running inside the debugger.
118 2008-12-16  Martin Baulig  <martin@ximian.com>
120         Backport of r120407 from Zoltan Varga.
122         * mini.c (mini_method_compile): Only run local deadce if MONO_OPT_DEADCE
123         is enabled.
125         * method-to-ir.c (mono_method_to_ir): Fix invalid code generated by the 
126         alu->alu imm optimization which only shows if deadce is disabled.
128 2008-12-16  Martin Baulig  <martin@ximian.com>
130         Backport of r120260.
132         * mini-exceptions.c (mono_handle_native_sigsegv): Check
133         mono_debug_using_mono_debugger() in addition to the
134         `no_gdb_backtrace' flag in the `MonoDebugOptions'.
136 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
138         Backport of r120389.
139         
140         * method-to-ir.c (mono_method_to_ir): Set the type of the value pushed on
141         the stack in CEE_LDFLDA. Fixes #450542.
143         * generics.cs: Add a new test.
145 2008-12-14  Zoltan Varga  <vargaz@gmail.com>
146         
147         Backport of r121496.
148         
149         * liveness.c (mono_analyze_liveness): Avoid eliminating the 'this' var in
150         gshared code. Fixes #458947.
152         * generics.cs: Add a test.
154 2008-12-12  Zoltan Varga  <vargaz@gmail.com>
156         Backport of r121457.
157         
158         * mini-arm.c tramp-arm.c: Fix calls to mono_arch_flush_icache.
160 2008-12-10  Rodrigo Kumpera  <rkumpera@novell.com>
162         * ssa.c (fold_ins): branch opt can kill dummy switch ops so we can't
163         expect that an OP_BR_REG will be there.
165         * branch-opts.c (remove_block_if_useless): Use MONO_IS_BRANCH_OP instead of checking
166         for the many branch ops. The original check miss OP_BR_REG.
168         Fixes #457574.
170         Backported from trunk r121173 and r121175
172 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
174         Backport of r121150.
175         
176         * aot-runtime.c (load_method): Avoid calling decode_exception_debug_info
177         while holding the aot lock.
179 2008-12-09  Zoltan Varga  <vargaz@gmail.com>
181         Backport of r121103.
182         
183         * aot-runtime.c (decode_exception_debug_info): Acquire the domain
184         lock when calling mono_domain_alloc (). Hopefully fixes #415608.
186 2008-12-08  Zoltan Varga  <vargaz@gmail.com>
188         Backport of r120999.
189         
190         * mini-exceptions.c (mono_print_thread_dump): Mark threadpool threads
191         as such. Fixes #456669.
193 2008-12-04  Zoltan Varga  <vargaz@gmail.com>
195         Backport of r120756.
196         
197         * aot-compiler.c (add_wrappers): Add pinvoke wrappers.
199         * mini.c (mono_resolve_patch_target): Allow pinvoke methods in 
200         MONO_PATCH_INFO_ICALL_ADDR.
202 2008-12-03  Mark Probst  <mark.probst@gmail.com>
204         Backport of r120589.
206         * method-to-ir.c (mono_method_to_ir): Handle ldtoken of an open
207         generic type (via a typedef or typeref) correctly.
209 2008-12-03  Zoltan Varga  <vargaz@gmail.com>
211         Backport of r120543.
212         
213         * mini-trampolines.c (mono_magic_trampoline): Add some debugging code to help
214         diagnose an assertion failure.
216 2008-11-29  Zoltan Varga  <vargaz@gmail.com>
218         Backport of r120273.
219         
220         * mini.h aot-runtime.c: Fix building with DISABLE_AOT.
222 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
224         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
225         and not 4.1. 
227         Backported from trunk.
229 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
231         * mini-amd64.h: Change the monitor fastpath defines to check for
232         !PLATFORM_WIN32 so they work on *bsd too.
234 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
236         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
238 2008-11-10  Mark Probst  <mark.probst@gmail.com>
240         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
241         space for stdcall.  Fixes regressions on Win32.
243 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
245         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
246         bblocks.
247         (linear_scan): Remove an assert which doesn't seem to be needed.
249         * local-propagation.c (mono_local_deadce): Avoid a call to
250         MONO_DELETE_INS which would screw up the instruction linking.
252         * mini.c (mono_decompose_op_imm): Make this work with globalra.
254         * regalloc2.c: Upgrade to work the current JIT code.
256 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
258         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
259         case.
261         * aot-runtime.c: Remove some dead code.
263         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
264         consistency.
265         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
267         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
268         trampolines using sscanf since atoi doesn't work on large unsigned values.
270         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
271         Initialize code_size.
273 2008-11-08  Mark Probst  <mark.probst@gmail.com>
275         * method-to-ir.c (mini_emit_inst_for_method): Make
276         Interlocked.CompareExchange work for Int arguments on 32 bit
277         archs, as well.
279 2008-11-07  Mark Probst  <mark.probst@gmail.com>
281         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
283 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
285         * main.c Fix MSVC build.
287         Contributed under MIT/X11 license.
289 2008-11-06  Mark Probst  <mark.probst@gmail.com>
291         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
292         alignment larger than 8 bytes are aligned correctly, too.
294         * mini.c: Honor the min_align field of MonoClass when laying out
295         the stack.
297 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
299         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
301         * aot-compiler.c (emit_plt): Fix a warning.
302         
303         * aot-compiler.c: Implement ARM support in the binary writer.
305 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
307         * basic-simd.cs: Add test for getter with byref arg.
308         Fix the naming of a few tests.
309         Add missing checks to a test.
311 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
313         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
315         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
316         most of the full-aot support for monitor enter/exit trampolines.
318         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
319         enter/exit trampoline creation functions.
321         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
322         make dist.
324 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
326         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
327         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
328         implement the needed functionality without adding crap to the runtime.
330 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
332         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
333         non-x86 builds.
335         * mini.c (mono_build_date): New global version holding the build date in
336         string format.
337         
338         * Makefile.am (buildver.c): Generate a file containing the build date.
340         * main.c: Set the build date from the generated file.
342         * mini.c (mono_get_runtime_build_info): New helper function returning build
343         information in a string format.
344         
345         * driver.c (mono_main): Print the build date in --version.
347         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
348         file when the bind-to-runtime-version option is used.
350 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
352         * simd-intrinsics.c: Fix bug when using getters and byref args. 
354 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
356         * simd-methods.h: Rename prefetch methods.
358         * simd-intrinsics.c: Same.      
360 2008-11-05  Mark Probst  <mark.probst@gmail.com>
362         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
363         sizes.
365 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
367         * aot-compiler.c: Use the bundled elf header files instead of depending on
368         the system one.
369         
370         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
371         mempool.
373         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
374         on every call.
376 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
378         * cpu-x86.md: Add store nta ops.
380         * mini-ops.h: Same.
382         * mini-x86.c: Same.
384         * mini.h: Add an enum for simd prefetch modes.
386         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
387         of store. Use the changed code to support store nta.
389         * simd-intrinsics.c: Add prefetch ops for all vector types.
391 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
393         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
394         threads.
395         
396         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
397         names.
399         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
400         trampolines.
402 2008-11-04  Mark Probst  <mark.probst@gmail.com>
404         * mini-x86.c: Fixed commit.
406 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
408         * aot-compiler.c (emit_plt): Align the plt section only on x86.
410 2008-11-04  Mark Probst  <mark.probst@gmail.com>
412         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
413         and MONITOR_EXIT, for the ASM fastpaths.
415         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
416         available.
418         * mini.c, patch-info.h: Signature and patch infos for
419         Monitor.Enter/Exit trampolines.
421         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
423         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
424         Monitor.Enter/Exit ASM fastpath for Linux.
426 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
428         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
430         * objects.cs: Add a new test.
431         
432         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
434         * aot-runtime.c (load_method): Run class initialization in the PLT case even
435         if MONO_LOG_LEVEL is set.
437         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
439         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
441         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
442         
443         * aot-compiler.c: Change the relocation code to use virtual addresses instead
444         of file offsets. Align the sections belonging to the data segment to 
445         PAGESIZE.
447 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
449         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
450         elf.h. Port it to amd64.
452 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
454         * driver.c: Enable SIMD by default.
456 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
458         * cpu-x86.md: Add prefetch op.
460         * mini-ops.h: Same.
462         * mini-x86.c: Same.
464         * mini.h: Add an enum for simd prefetch modes.
466         * simd-methods.h: Add prefetch function names.
468         * simd-intrinsics.c: Add prefetch ops for all vector types.
470 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
472         * aot-compiler.c (emit_bytes): Speed this up a little.
474 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
476         * aot-compiler.c: Add JIT time etc. statistics.
477         
478         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
480         * mini.h (MonoCompile): Add 'got_offset' field.
482         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
483         method_got_offsets array.
485         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
486         wrappers.
488         * aot-compiler.c (compile_method): Add generic method instances referenced
489         by the method to the list of methods to be compiled, this is required so if
490         A<T> references B<T>, and another assembly references A<int>, then it will
491         also get a copy of B<int>.
493         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
494         when checking for monitor enter/exit.
496 2008-10-30  Mark Probst  <mark.probst@gmail.com>
498         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
499         for Monitor.Enter and Monitor.Exit if enabled.
501         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
502         Solaris.
504 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
506         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
507         of an OP_MOVE. Fixes #440046.
509         * basic-long.cs: Add a new test.
511 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
513         * mini.h: Add synchronization note for the managed counter-part.
515         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
516         returns the simd caps of the current cpu.
518 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
520         * basic-simd.cs: Remove Console.WriteLine.
522 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
524         * basic-simd.cs: New tests for Vector2ul.
526 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
528         * simd-intrinsics.c: Add new vector type Vector2ul.
530 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
532         * basic-simd.cs: New tests for Vector2l.
534 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
536         * cpu-x86.md: Add long version of most packed int ops.
538         * mini-ops.h: Same.
540         * mini-x86.h: Same.
542         * simd-intrinsics.c: Add new vector type Vector2l.
544 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
546         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
548         * simd-methods.h: Remove SN_op_BitwiseXor.
550 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
552         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
553         alignment.
555 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
557         * basic-simd.cs: Test for Vector2d.
559         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
560         value.
562 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
564         * cpu-x86.md: Add double version of all packed float ops.
566         * mini-ops.h: Same.
568         * mini-x86.h: Same.
570         * simd-intrinsics.c: Add new vector type Vector2d.
572         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
574         * simd-methods.h: Add Duplicate.
576 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
578         * basic-simd.cs: Test for packing with signed saturation.
580 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
582         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
583         found in the TYPESPEC table.
585 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
587         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
588         too.
590         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
592         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
593         instead of the RVA, since the RVA can be changed by tools like the cil 
594         stripper.
596         * method-to-ir.c (mono_method_to_ir2): Ditto.
598         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
599         (deserialize_variable): Ditto.
601 2008-10-25  Martin Baulig  <martin@ximian.com>
603         * debug-mini.c (write_variable): Use
604         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
606 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
608         * cpu-x86.md: Add unsigned variants of packd and packw.
610         * mini-ops.h: Same.
612         * mini-x86.h: Emit the right instruction for packd and packw.
613         Add unsigned variants of packd and packw.
615         * simd-intrinsics.c: Packd and packw were used in place of their
616         unsigned variants. Change that.
617         Add intrinsics for (Signed)PackWithSignedSaturation.
619         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
621 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
623         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
625 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
627         * mini-ops.h: Remove dword packed add/sub with saturation ops.
629         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
631         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
632         sse instructions.
634         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
636 2008-10-24  Mark Probst  <mark.probst@gmail.com>
638         * method-to-ir.c, mini.c: Special casing for the synchronized
639         wrapper for the ldtoken+GetTypeFromHandle case.
641 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
643         * mini.c (mono_replace_ins): Move this to branch-opts.c.
645         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
646         created/split bblocks.
648 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
650         * mini-ops.h: Add packed signed mul high.
651         
652         * cpu-x86.md: Same.
654         * mini-x86.c (mono_arch_output_basic_block): Same.
656         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
658         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
660 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
662         * basic-simd.cs: Tests for Vector16sb.
664 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
666         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
668 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
670         * mini-ops.h: Add packed signed min, max and compare greater.
671         
672         * cpu-x86.md: Same.
674         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
675         saturation.
677         * simd-methods.h: Add CompareGreaterThan.
679         * simd-methods.h: Remove CompareEquals.
681         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
683         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
685         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
686         CompareEqual.
688 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
690         * basic-simd.cs: Fix tests due to change in the API.
692 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
694         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
696 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
698         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
700         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
701         inst_offset as this has invalid values for LDADDR.
703 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
705         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
707         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
709 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
711         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
712         for accessing field->data.
714 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
716         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
718 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
720         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
722         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
724 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
726         * dominators.c (mono_compute_natural_loops): Allocate GList enties
727         from the cfg mempool.
729 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
731         * basic-simd.cs: Tests for new methods in Vector8us.
733 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
735         * mini-ops.h: Add multiply and store high.
736         
737         * cpu-x86.md: Same.
739         * mini-x86.c (mono_arch_output_basic_block): Same.
741         * simd-methods.h: Same.
743         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
744         and CompareEqual.
746 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
748         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
749         mono_class_setup_vtable ().
751         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
752         mono_class_get_vtable_entry () for accessing klass->vtable.
754         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
756         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
757         found.
759         * method-to-ir.c (mono_save_token_info): Don't save references made from
760         wrappers.
762         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
763         of generic instances.
765         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
767 2008-10-19  Mark Probst  <mark.probst@gmail.com>
769         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
770         OP_JMP depends on the method signature.  Calculate it properly.
772 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
773         
774         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
775         called directly.
777         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
778         instances.
779         (emit_extra_methods): Add another table mapping method indexes to 
780         offsets in the extra_method_info table.
782         * mini.h: Bump AOT file format version.
783         
784         * aot-runtime.c: Merge most of the code from mono_aot_get_method
785         and mono_aot_get_method_from_token () into one function.
787 2008-10-19  Mark Probst  <mark.probst@gmail.com>
789         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
790         separate counter.
792 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
794         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
795         methods.
797         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
798         disable_aot.
800         * mini.c (mono_patch_info_equal): Compare the generic context as well.
802         * mini.h: Bump aot file format version.
804         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
805         AOT file can contain native code for methods which are not in the METHOD
806         table. Generate code for non-sharable generic instances of generic methods
807         found in the METHODSPEC table.
808         
809         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
810         encoding generic type handles.
812         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
813         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
815         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
816         macros + MONO_ADD_INS.
818         * mini.c (mono_jump_info_token_new2): New function which takes a generic
819         context as well.
821         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
823         * mini.h: Bump aot file format version.
825         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
827 2008-10-17  Mark Probst  <mark.probst@gmail.com>
829         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
830         platforms, with definable stack alignment value.  Set to 16 now
831         for all platforms.
833         * mini.c, mini.h, driver.c: Command line option for disabling
834         stack alignment.
836 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
838         * basic-simd.cs: Tests for new methods in Vector4ui.
840 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
842         * mini-ops.h: Add packed int shuffle.
843         
844         * cpu-x86.md: Same.
846         * mini-x86.c (mono_arch_output_basic_block): Same.
848         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
849         extract mask, max, min, shuffle.
851         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
853 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
855         * basic-simd.cs: Tests for new methods in Vector8us.
857 2008-10-17  Mark Probst  <mark.probst@gmail.com>
859         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
860         RuntimeTypeHandle, not a TypedReference.
862 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
864         * simd-intrinsics.c: remove relocations.
866 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
868         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
869         optimizations from the x86 backend.
871 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
873         * simd-methods.h, simd-intrinsics.c: debloat method names and
874         prepare for no relocations.
876 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
878         * mini-ops.h: Add packed min/equal and sum of absolute differences.
879         
880         * cpu-x86.md: Same.
882         * mini-x86.c (mono_arch_output_basic_block): Same.
884         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
885         extract mask, max, min and sum of absolute differences.
887         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
888         method name.
890 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
892         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
893         Renamed one test for consistency.
895 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
897         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
898         fix to the code that deal with other blocks.
900 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
902         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
904 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
906         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
907         that deals with vreg interference. Explicitly check for OP_LDADDR to be
908         able to process the source reg.
910 2008-10-16  Martin Baulig  <martin@ximian.com>
912         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
914         * inssel.brg: Add `OP_HARD_NOP'.
916         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
918         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
919         `OP_HARD_NOP' instruction when running inside the debugger.
921         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
922         `OP_HARD_NOP' instruction when running inside the debugger.
924 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
926         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
927         now works. The issue with the regalloc tripping up no longer
928         happens.
930         * simd-intrinsics.c (load_simd_vreg): Same.
932 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
933         
934         * basic-simd.cs: Tests for new Vector8ui methods.
936 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
938         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
939         only for type. This fixes crashes where MonoInst::klass is checked
940         for ops of type != VTYPE or OBJ.
942         * simd-intrinsics.c (load_simd_vreg): Same.
944 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
946         * mini-ops.h: Add ops for packed shuffle/max/avg and
947         extract mask.
948         
949         * cpu-x86.md: Same.
951         * mini-x86.c (mono_arch_output_basic_block): Same.
953         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
954         extract mask.
956         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
957         to emit extract mask op.
959         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
960         to emit word shuffles.
962 2008-10-15  Mark Probst  <mark.probst@gmail.com>
964         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
965         the largest alignment needed by a variable, but at least
966         sizeof(gpointer).
968 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
970         * basic-simd.cs: Tests for the fixes in the last commit.
972 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
974         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
975         no longer handles STACK_PTR input.
977         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
979         * simd-intrinsics.c (load_simd_vreg): New function that works like 
980         get_simd_vreg   but handles STACK_PTR input.
982         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
983         as the input can be an arbitrary pointer.
985         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
986         LDADDR local optimization directly otherwise use a store op.
988 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
990         * basic-simd.cs: Tests for dup low and dup high.
992 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
994         * mini-ops.h: Add dup low and dup high ops.
995         
996         * cpu-x86.md: Same.
998         * mini-x86.c (mono_arch_output_basic_block): Same.
1000         * simd-intrinsics.c (vector4f_intrinsics): Same.
1002 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1004         * basic-simd.cs: Tests for recently added functionality.
1006 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1008         * mini-ops.h: Add remaining sse1 fp ops.
1009         
1010         * cpu-x86.md: Add remaining sse1 fp ops.
1012         * mini-x86.c (mono_arch_output_basic_block): Same.
1014         * mini.h: Add enum for simd FP compare conditions.
1016         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
1018         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
1019         so the backed can generate the appropriate op.
1021 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1022         This patch squeese one more byte from the SimdIntrinsc struct.
1024         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
1025         a a shift amount intead of simply or'ing it.
1027         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
1029         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
1030         byte so we can have an aditional flags field without increasing struct size.
1032         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
1033         against the simd_supported_versions bitmask.
1035         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
1037 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
1039         * mini.c: remove rawbuffer code (the only use here is unsafe because
1040         it takes locks during signal handling and the kernel now provides much
1041         better info in proc/pid/smaps these days).
1043 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
1045         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
1046         OP_X86_PUSH_OBJ. Fixes #434620.
1048         * objects.cs: Add a test.
1049         
1050 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
1052         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
1053         that the packuswb/packusdw don't work with unsigned numbers for what
1054         would be negative numbers in signed format.
1056         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
1057         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
1059         * mini-ops.h: Add doubleword forms of many ops and packing ones.
1061         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
1063         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
1065         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
1067         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
1068         add more ops.
1070         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
1071         version as the enum in mini.h.
1073         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
1074         for sse3 ops, check the simd_version field if present. This way the code
1075         works with all versions of sse.
1077 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1079         * simd-intrinsics.c: Fixed intrinsic name typo.
1081         * mini.h: Added missing simd exported function.
1083         * basic-simd.cs: Added tests for Vector4ui.
1084         Fixed broken test for Vector16b.
1086 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
1088         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
1089         the max length to 64.
1091 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1093         * method-to-ir.c: Only do the fast virtual generic method call for
1094         non-wrapper methods.
1096         * mini.h, mini-trampolines.c: The new generic virtual remoting
1097         trampoline handles virtual method calls via the vtable (as done by
1098         the fast virtual generic method calls) to remoting proxies.
1100         * mini.c (mono_jit_create_remoting_trampoline): For generic
1101         methods reate a generic virtual remoting trampoline.
1103         * mini-amd64.h: Enable fast virtual generic method calls again.
1105 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1107         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
1108         restore registers when doing tail calls.
1110 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1112         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
1113         Vector4ui.
1115 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1117         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
1119 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1121         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
1123 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1125         * basic-simd.cs: Retrofit for API changes.
1127 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1129         * mini-ppc.c: Handle integer stack arguments for tail calls.
1131 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1133         * optflags-def.h: Removed sse3 optimization.
1135         * driver.c: Same.
1137         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
1138         sse3.
1140         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
1142         * mini.h: Added enumeration with simd versions.
1144         * simd-intrinsics.c (emit_intrinsics): Use the new static var
1145         for detecting SSE3.
1147         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
1149         * mini.c (mini_init): Call mono_simd_intrinsics_init.
1151 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1153         * basic-simd.cs: Added tests for Vector8u and Vector16u.
1155         * basic-simd.cs: Fixed test naming.
1157 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1159         * mini-ops.h: Added ops for packed and saturated math, shifts
1160         and packing/unpacking.
1162         * cpu-x86.md: Added descriptors for the above ops.
1164         * mini-x86.c: Added code to emmit the above ops.
1166         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
1168 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
1170         * aot-compiler.c (compile_method): Enable AOT for generic code.
1172         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
1174 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
1176         * mini.c: add a workaround for a common screwup that ends up blamed
1177         to mono (other processes blocking signal delivery).
1179 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1181         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
1182         in the LDFLD/STFLD opcodes. Fixes #432673.
1184         * iltests.il.in: Add a new test.
1186 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
1188         * mini-arm.c: attach the thread in unmanaged->managed transitions
1189         using delegates (bug #433148).
1191 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1193        * basic-simd.cs: Use new ShuffleSel constants.
1195 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1197         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
1199         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
1200         only disable simd intrinsics if no sse2 is detected.
1202         * optflags-def.h: Added sse3.
1204         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
1205         is disabled.
1207 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1209         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
1210         when adding delegate-invoke wrappers.
1212 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1214         * Makefile.am: Reenable the simd tests.
1216 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
1218         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
1219           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
1220           other vreg is allocated to that hreg.
1222         Contributed under MIT/X11 license.
1224 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1226         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
1227         yet checked in.
1229 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1231         * basic-simd.cs: New test suite for SIMD intrinsics.
1233         * Makefile.am: Added new tests.
1235 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1237         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
1239         * mini-ops.h: Same.
1241         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
1243         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
1244         using SSE2 aware opcodes.
1246         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
1247         is enabled, this code path is only reachable if conversion ops are emmited after
1248         mono_method_to_ir.
1250         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
1252         This optimization saves 6 bytes per conversion against the old version.
1254 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1256         * aot-compiler.c (compile_method): Don't skip methods referencing 
1257         generic methods without a corresponding entry in token_info_hash, since
1258         encode_method_ref () can handle all generic methods now.
1260         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
1261         generic context is set.
1262         
1263         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
1264         generic sharing of LDTOKEN.
1266 2008-10-06  Mark Probst  <mark.probst@gmail.com>
1268         * mini-amd64.h: Temporarily disabled fast virtual generic method
1269         calls because it breaks the System.Runtime.Remoting tests.
1271 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1273         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
1275         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
1276         so inlining actually works.
1277         (check_inline_caller_method_name_limit): Ditto.
1279 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
1281         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
1282         64 bit safety (from Olaf Hering and Andreas Färber).
1284 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1285         
1286         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
1287         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
1288         unused virtual call support code.
1290         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
1291         
1292         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
1293         which can't use aot trampolines.
1294         (decode_patch): Don't create aot trampolines for methods which can't use
1295         them.
1297         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
1298         use aot trampolines.
1300         * mini.h: Bump AOT image format version.
1301         
1302 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
1304         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
1305         to save_token_info () since cmethod is inflated for constrained calls.
1307         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
1309 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
1311         * Makefile.am: Add build rules for ppc64.
1312         This avoids the build failing at pedump with unresolved symbols
1313         due to lack of arch_sources. Instead it will now fail earlier
1314         due to lack of cpu-ppc64.md.
1316         Contributed under MIT/X11 license.
1318 2008-10-04  Mark Probst  <mark.probst@gmail.com>
1320         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
1321         tail calls.
1323         * iltests.il.in: Add test case for tail call with many arguments.
1325 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1327         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
1328         to the fast virtual generic method code until the aot case is fixed.
1330 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1332         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
1334 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1336         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
1337         thunks.
1339 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1340         
1341         * simd-intrinsics.c: Forgot to add this one.
1343         * mini-codegen.c: Fix macro in case SIMD is not supported.
1345 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1346         
1347         This patch land initial JIT support for simd intrinsics.
1349         * mini-x86.h: Added new define to make --enable_minimal work on x86.
1351         * Makefile.am: Added simd-intrinsics.c
1353         * simd-intrinsics.c: New file with simd instrinsic related
1354         code.
1356         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
1358         * cpu-x86.md: Add simd related instructions.
1360         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
1362         * driver.c: Added two new --regression variants.
1364         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
1366         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
1368         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
1369         extract some complicated logic to helper functions.
1371         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
1373         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
1375         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
1376         the specialized simplification pass.
1378         * method-to-ir.c (mono_spill_global_vars): Use new macro.
1380         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
1382         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
1383         table.
1385         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
1386         if MONO_ARCH_NEED_SIMD_BANK is defined.
1388         * mini-ops.h: Added the new simd ops.
1390         * mini-x86.c: Added mono_arch_xregname.
1392         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
1394         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
1396         * mini-x86.h: Define simd related MONO_ARCH macros.
1398         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
1400         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
1402         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
1403         MONO_CLASS_IS_SIMD to deal with simd related IR.
1405         * mini.h (MonoInst): Added spill_var to the backend union.
1407         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
1409         * mini.h: Added forward declarations of the new simd fuctions.
1411         * optflags-def.h: Added new optimization names SIMD.
1413         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
1415         * regalloc.h: Added support for working with 3 register banks.
1417         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
1419         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
1421 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
1423         * mini-exceptions.c: remove 64 bit related ifdef clutter.
1425 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1427         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
1428         instead of one on 64 bit systems.
1430         * method-to-ir.c: Remove unused includes.
1432 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
1434         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
1435         cfg->used_int_regs, since the two are different on arm.
1437 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1439         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
1440         mono_method_get_vtable_index() to get the vtable index.
1442 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1444         * method-to-ir.c (mono_method_to_ir2): Don't create native
1445         wrappers for array methods, because they're never called (and if
1446         they were called they wouldn't work).
1448 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1450         * method-to-ir.c (mono_method_to_ir2): Array methods are
1451         special-cased and must not be invoked indirectly via the (M)RGCTX
1452         when generic sharing is turned on.  Fixes #431413.
1454 2008-10-01  Mark Probst  <mark.probst@gmail.com>
1456         * method-to-ir.c: When generic sharing is active, call
1457         non-interface virtual generic methods via the standard trampoline.
1459         * mini-trampolines.c: Handle virtual generic shared methods.
1461         * mini.h, mini-x86.c, mini-x86.h: New argument for
1462         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
1463         method thunks and which is the trampoline to call if the lookup
1464         fails.  Enable the virtual generic method thunk for x86.
1466         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
1467         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
1468         argument but assert that it's NULL, because these archs don't yet
1469         implement the virtual generic method thunk.  Changes in the IMT
1470         thunk data structures.
1472 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
1474         * aot-compiler.c (emit_globals): Avoid invalid characters in
1475         the static linking symbol.
1477         * objects.cs: Add a test for the range check optimization. Fix warnings.
1479         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
1480         optimization from the current JIT.
1482         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
1483         later in decompose_array_access_opts () to allow more optimizations.
1485         * method-to-ir.c (mono_handle_soft_float): Rename this to 
1486         mono_decompose_soft_float () for consistency.
1488         * mini-ops.h: Fix arguments of OP_STRLEN.
1490         * method-to-ir.c (save_cast_details): Extract the cast details saving code
1491         into a separate function.
1492         (reset_cast_details): Ditto.
1493         (handle_unbox): Save cast details. Fixes #431254.
1495         * method-to-ir.c: Remove some obsolete FIXMEs.
1497 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1499         * ir-emit.h (alloc_dreg): Write a warning before crashing.
1501 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1503         * mini-codegen.c: More work on macros to make them
1504         ready for multiple regbanks.
1506 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1508         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
1510         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
1512 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1514         * mini-codegen.c (mono_spillvar_offset): Proper support for
1515         multiple regbanks.
1517 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1519         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
1520         the stack overflow changes.
1522 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1524         * mini-codegen.c: Make all bank macros depend on reg_bank.
1526         * mini-codegen.c (mono_local_regalloc): Make free mask
1527         initialization regbank aware.
1529 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1531         * mini-codegen.c (mono_local_regalloc): Extract callee
1532         mask selection to a function and make it regbank aware.
1534 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1536         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
1537         code to deal with many regbanks.
1539 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1541         * mini-codegen.c: More fp->regbank changes.
1543 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1545         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
1546         of a hardcoded constant.
1548 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1550         * method-to-ir.c (type_from_stack_type): Fix typo.
1552 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
1554         * mini-ia64.c (emit_move_return_value): Convert float return values to
1555         double.
1557         * objects.cs: Add a new test.
1558         
1559         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
1560         VARARG methods to fix an assert later.
1562         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
1563         end so it at least compiles.
1565 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1567         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
1569 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
1571         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
1572         optimization to a new function (emit_optimized_ldloca_ir) and enable
1573         it for both ldloca and ldloca_s.
1575 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1577         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
1578         gshared CASTCLASS code.
1580         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
1581         amd64, where the libc stack unwinder encounters stack frames referring to
1582         native code in unmapped memory.
1584         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
1585         sharing.
1587         * generics.cs: Add new test.
1589 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
1591         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
1592         add a check that one of the ARM_FPU_ constants is defined.
1594         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
1595         
1596         * mini-exceptions.c: Fix build on non-altstack platforms.
1598         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
1599         sharing of vtypes.
1601         * ir-emit.h: Add a comment to NEW_PCONST.
1603         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1605         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1607         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1608         after the changes to MonoJitDomainInfo.
1610 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1612         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1614 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1616         * mini-ppc.c: Compiler warning fixes.
1618 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1620         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1621         for pinvokes.
1623 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1625         * exceptions-ppc.c, mini-ppc.h: Compile
1626         mono_arch_handle_altstack_exception() on Darwin, too.
1628 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1630         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1631         work on archs which don't have generic sharing implemented, only
1632         without the vtable_arg.
1634 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1636         * mini.c: Added comment explaining why delegate ctor icall
1637         wrappers are compiled.
1639 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1641         * mini.c: Don't produce trampolines to delegate ctor icall
1642         wrappers but compile them upfront.
1644 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1646         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1647         runtime-set function when going back to managed code. Currently this
1648         is used to set back the protection on the soft ovf pages and/or to
1649         throw the stack overflow exception that happened in unmanaged code.
1651 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1653         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1654         runtime-set function when going back to managed code. Currently this
1655         is used to set back the protection on the soft ovf pages and/or to
1656         throw the stack overflow exception that happened in unmanaged code.
1658 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1660         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1661         the support code for restoring stack protection after stack overflows
1662         that happen in unmanaged code. Don't set the exec permission on the
1663         soft overflow area.
1665 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
1667         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1668         delegate->method_ptr is set. Fixes #428054.
1670 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1672         * tests.cs: Rename to ratests.cs.
1674         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
1675         emit_get_rgctx_... functions.
1677 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1679         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1681 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1683         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1684         before asserting that method is sharable.
1686 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1688         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1689         whether method needs a static RGCTX wrapper used instead of
1690         complex conditions.
1692         * generic-sharing.c, mini.h: A few functions moved to
1693         metadata/generic-sharing.c.
1695 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1697         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1698         Generic code sharing for value types, which essentially means
1699         treating value type methods like static methods.  The RGCTX is
1700         passed in the same way.
1702 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1704         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1705         opcode when creating multi-dimensional arrays of open types.
1707         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1708         open generic types.
1710         * generics.cs: Add a test.
1712         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1714 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1716         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1718         * mini.c (mini_method_compile): Set it when running under the debugger. 
1720         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
1721         vreg optimization if the flag is set.
1723         * driver.c (mono_main): Add --attach= option to pass options to
1724         the attach agent.
1726         * mini.c (sigquit_signal_handler): Start the attach agent.
1728         * ssapre.c: Disable this to save space since it is not yet ported to
1729         linear IR.
1731         * regalloc2.c: Disable this to save space.
1733         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1735 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1737         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1738         the -v option useful again.
1740 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1742         * mini-amd64.c (mono_arch_output_basic_block): Add support for
1743         --break-at-bb.
1745         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1746         arrays of arrays. Fixes #428406.
1748         * method-to-ir.c (mini_emit_castclass): Ditto.
1750         * objects.cs: Add new test.
1751         
1752 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
1754         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1755         was wrong at it choked against target_type_is_incompatible for byref types.
1757 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1759         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
1760         places.
1762 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1764         * mini-exceptions.c: update a few more exceptions-related counters.
1766 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1768         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1769         new functions to allocate from persistent mempools.
1771 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1773         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
1774         multiple register banks in the future.
1776         * mini-codegen.c (mono_local_regalloc): Fix a warning.
1778 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
1780         * mini.c (type_to_eval_stack_type): Remove duplicated function.
1782         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1784         * mini.h: Export type_to_eval_stack_type.
1786         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1787         is only ins->klass of byref types.
1789 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
1791         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
1792         (mini_emit_memcpy2): Ditto.
1794         * mini-amd64.c: Fix a warning.
1796 2008-09-21  Mark Probst  <mark.probst@gmail.com>
1798         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
1799         linking.
1801 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
1803         * method-to-ir.c: Extract stloc micro-optimization to a
1804         function and apply it to all cases.
1806 2008-09-19  Mark Probst  <mark.probst@gmail.com>
1808         * method-to-ir.c: Don't fail generic code sharing in cases we
1809         already support.
1811 2008-09-18  Mark Probst  <mark.probst@gmail.com>
1813         * mini-ppc.c: Handle structs in tailcalls on Darwin.
1815 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1817         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
1818         implementation.
1820 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
1822         * trace.c: make tracing more useful and correct, with per-thread
1823         id and indent info.
1825 2008-09-15  Mark Probst  <mark.probst@gmail.com>
1827         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
1828         doing a method call and the argument is an R4.
1830 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
1832         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
1833         generic methods.
1835 2008-09-13  Mark Probst  <mark.probst@gmail.com>
1837         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
1839 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
1841         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
1842         (MONO_JUMP_TABLE_FROM_INS): Ditto.
1844 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1846         * driver.c: Add a --agent argument (not supported yet) to load managed
1847         agent assemblies before loading the main assembly, similarly to how the
1848         Java VM handles agents.
1850 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1852         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1853         function to do stack layout of local variables.
1855 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1857         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1858         calculation.
1860 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1862         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1863         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1864         JIT if DISABLE_JIT is defined.
1866         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1867         defined.
1869 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1871         * iltests.il.in: Disable the fconv test on PPC (the result is
1872         undefined according to ECMA).
1874 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1876         * iltests.il.in: Enable tail call tests for PPC.
1878         * mini.h: Add variable for storing incoming valuetype argument
1879         addresses for tail calls.
1881         * mini-ppc.c: Implement valuetype arguments and return values for
1882         tailcalls on Linux.
1884 2008-09-09  Mark Probst  <mark.probst@gmail.com>
1886         * mini-ppc.c: Partially implement tail calls (struct arguments and
1887         return values not supported).
1889         * method-to-ir.c: Enable tail calls on PPC.
1891 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
1893         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1894         runtime-invoke wrappers to work around the problem of them getting
1895         assigned to a random class.
1897         * aot-runtime.c (mono_aot_get_method): Ditto.
1898         
1899 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
1901         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1902         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1904 2008-09-07  Mark Probst  <mark.probst@gmail.com>
1906         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1907         until they're implemented properly.
1909         * exceptions-ppc.c: Use arch-independent exception-handling code
1910         instead of custom one.
1912         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1913         for Linear IR.
1915         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1917         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1918         applies when __powerpc__ is defined.
1920 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
1922         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1923         methods to their code to avoid computing the full name of wrappers and
1924         doing a lookup in a string hash table.
1926 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1928         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1929         we identify bblocks before method_to_ir () is ran.
1931         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1932         Also avoid optimizing branches pointing to themselves.
1934         * mini.c (mini_method_compile): Ditto. Fixes #422947.
1936 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
1938         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1940 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1942         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1943         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1944         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1945         'buf'.
1947         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
1948         jumped to the same entry in plt_jump_table.
1950 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
1952         * method-to-ir.c (initialize_array_data): Handle field with RVA from
1953         dynamic images.
1955 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
1957         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1958         other assignment can be if converted. Saves 1.5% on corlib size and fixes
1959         #421807.
1961 2008-08-29  Geoff Norton  <gnorton@novell.com>
1963         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1964         segment, and doesn't properly handle .space as .text.  Fixes
1965         AOT Mach/ARM
1967 2008-08-29  Geoff Norton  <gnorton@novell.com>
1969         * mini.c: Disable the mach exception handler when running on 
1970         ARM
1972 2008-08-29  Geoff Norton  <gnorton@novell.com>
1974         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
1975         globals on Darwin/ARM
1977 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
1979         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
1980         since too many things depend on it. Instead, call 
1981         mono_runtime_set_no_exec ().
1982         
1983         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1984         the new JIT.
1986         * aot-compiler.c: Add an 'asm-only' AOT option.
1988         * mini.c: Avoid initializing the runtime when doing AOT compilation.
1989                 
1990         * aot-compiler.c (compile_method): Disable gshared support for now as it
1991         doesn't yet work.
1993 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1995         * mini-amd64.h : Fix a compiler warning.
1997         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1998           Changed to use a callback function to retrieve the unwind info.
1999           This avoids problems observed when code blocks were removed by
2000           unloading an app domain.
2002         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
2003           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
2004           to work properly.
2006         Contributed under MIT/X11 license.
2008 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
2010         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
2011           case to keep the stack aligned to 8.
2013         Contributed under MIT/X11 license.
2015 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
2017         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
2018         avoid repeated linear searches.
2020 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
2022         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
2023         methods it can't handle.
2024         
2025         * aot-compiler.c (add_method): Avoid adding a method twice.
2026         (add_wrappers): Add runtime invoke wrappers for all methods.
2028         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
2029         function to create an aot-compatible version of this trampoline.
2031         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
2033 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
2035         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
2037         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
2038         with a generic sharing failure.
2040         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
2042         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
2043         CEE_RETHROW. Fixes #419634.
2045         * mini.c (mono_method_to_ir): Ditto.
2047         * exceptions.cs: Add a new test.
2048         
2049         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
2050         to mono_type_stack_size_internal () since some callers might not pass in
2051         an rgctx.
2053         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
2054         instrument_prolog. Fixes #419878.
2056         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
2057         doubles in soft float mode volatile.
2059 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
2061         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
2063         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
2064         to handle soft float correctly.
2066         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
2067         the fast path.
2069         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
2071         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
2072         to sp, since the generics catch code requires it.
2074         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
2075         copying.
2077         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
2078         mono_arch_emit_imt_argument ().
2080         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
2082         * mini-arm.c tramp-arm.c: Generic sharing updates.
2084 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
2086         * mini-arm.c: Fix the arm build.
2088         * generic-sharing.c (mini_type_get_underlying_type): New helper function
2089         handling enums, generic instances and generic sharing.
2090         (mini_type_stack_size_full): Ditto.
2092         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
2093         
2094         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
2096         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
2098         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
2099         trampolines.
2101         * mini-arm.c: Various small generic sharing changes.
2103         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
2104         this for x86.
2105         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
2106         custom code.
2108         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
2109         helper function to return a generic class init trampoline.
2111         * method-to-ir.c mini.c: Use it.
2112         
2113         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
2114         arch-specfic function to return a generic class init trampoline.
2116         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
2117         the GENERIC_CLASS_INIT custom code.
2119         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
2120         a fatal error, not a sharing failure.
2122         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
2123         needed.
2125         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
2126         trampoline argument from MONO_ARCH_VTABLE_REG.
2128         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2129         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2130         argument, and pass the vtable in VTABLE_REG.
2132         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2133         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2134         argument, and pass the vtable in VTABLE_REG.
2135         (mono_arch_create_trampoline_code_full): Remove some special casing for
2136         the rgctx fetch trampoline.
2138         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
2139         Fixes #419273.
2141         * iltests.il: Add a test for it.
2143 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
2145         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
2147         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
2148         no longer needed.
2150         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
2151         use mono_jit_info_table_find () to avoid recursion.
2152         (mono_delegate_trampoline): Add a sync wrapper here.
2154         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
2155         here.
2157         * mini.c (mono_method_to_ir): Ditto.
2158         
2159         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
2160         add_sync_wrapper argument. Don't add a sync wrapper here.
2161         (mono_create_jump_trampoline): Don't add a sync wrapper here.
2163         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
2164         
2165 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2167         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
2168           of nonvolatile registers back from MonoContext to CONTEXT.
2170         Contributed under MIT/X11 license.
2172 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2174         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
2175           arguments on Winx64 there are only 4 argument registers.  For this
2176           logic to work the last argument must be pulled from the stack.  
2178         Contributed under MIT/X11 license.
2180 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
2182         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2184         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
2185         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
2186         encode/decode_method_ref ().
2188         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
2190         * aot-runtime.c (decode_patch): Ditto.  
2192         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
2193         MONO_PATCH_INFO_METHOD.
2195         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
2196         MonoGenericJitInfo.
2198         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
2199         MonoGenericJitInfo.
2201         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
2203         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
2204         one from the caller.
2206         * aot-runtime.c (decode_generic_inst): New function to decode and
2207         return a interned generic inst.
2208         (decode_klass_ref): Use it.
2209         (decode_method_ref): Ditto.
2211         * aot-compiler.c (emit_exception_debug_info): Save 
2212         jinfo->has_generic_jit_info too.
2214 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2216         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
2218         * iltests.il.in: Add a test for fconv_to_i.
2220         * liveness.c: Disable the liveness2 pass for now to save space.
2222         * regalloc2.c: Include mempool-internals.h to fix warnings.
2224         * aot-compiler.c (encode_method_ref): Encode the context of generic
2225         instance methods.
2227         * aot-runtime.c (decode_method_ref): Inflate generic methods using
2228         the context saved in the aot file.
2230         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2232         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2234         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
2235         volatile so they won't be optimized away.
2237 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
2239         * ssa.c:
2240         * ssa2.c:
2241         * mini.c:
2242         * regalloc2.c:
2243         * dominators.c: Remove duplicated functions that now are in
2244         mempool-internals.h.
2246 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2248         * aot-compiler.c: Fix warnings.
2250         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
2252         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
2254         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
2255         as the patch type.
2257         * mini.c (mono_resolve_patch_target): Ditto.
2258         
2259         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
2260         (encode_klass_ref): Add support for encoding VARs/MVARs.
2262         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
2264         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
2265         the handling of the got entries into a separate 'decode_got_entry' function.
2266         Add support for RGCTX_FETCH.
2268         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
2269         clobbered by the trampoline code.
2271         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
2272         not clobbered by the indirect calling code.
2274 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2276         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
2277         to fix the build.
2279 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
2281         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
2282         signature using the compilation mempool otherwise we would leak it.
2284 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2286         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
2287         mono_emit_abs_call ().
2289         * patch-info.h: Add GENERIC_CLASS_INIT.
2291         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
2293         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
2294         as their target as a near call.
2296         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
2297         ABS handling code.
2298         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
2300         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
2301         call to a runtime function described by a patch.
2303         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
2304         mono_emit_abs_call, this has the advantage that the ABS handling code in
2305         mono_codegen () can handle them both, and can handle other stuff in the
2306         future without additional code.
2308         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
2309         entry.
2310         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
2311         abs addresses.
2313         * mini.h: Add missing bblock related prototypes.
2315         * mini.h (MonoCompile): Remove unused reverse_inst_list and
2316         reverse_inst_list_len fields.
2318         * mini.c: Refactor this file a bit by moving branch optimizations to 
2319         branch-opts.c.
2321         * method-to-ir.c: Merge generic sharing changes missed earlier.
2323         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
2325         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
2326         shared patches. Process METHODCONST as a shared patch.
2328         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
2329         as it crashes on the 2.0 mscorlib.
2331         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
2332         to cause crashes.
2333         
2334         * aot-compiler.c: Use is_plt_patch () in a few additional places.
2335         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
2336         by IMT.
2338         * aot-compiler.c: Reorganize the got handling code to be a bit more
2339         understandable.
2341 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2343         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
2344         mono_patch_info_equals/hash, and use it to massively simplify
2345         get_plt_index ().
2347         * mini.c (mono_patch_info_hash): Simplify this and add support for
2348         more patch types.
2350         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
2352         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
2353         handling code, since an offset is not enough to identify a trampoline.
2355         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
2357 2008-08-17  Mark Probst  <mark.probst@gmail.com>
2359         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
2361         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
2363         * mini-ops.h: Argument and result types for OVF_CARRY ops.
2365         * decompose.c: PPC decompositions for various ops.
2367         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
2369 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2371         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
2372         call the generic trampoline code using a call, instead of a jump, to
2373         remove some special casing from the generic trampoline code.
2375         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
2376         (mono_codegen): Ditto.
2378         * aot-compiler.c aot-runtime.c: Ditto.
2380         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
2382         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
2383         helper function to find the offset corresponding to a lazy fetch trampoline.
2385         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
2386         when doing generic sharing.
2388         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
2389         places.
2390         
2391         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
2392         mini-trampolines.c to be with the other trampoline creation functions.
2394         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
2395         as it is equal to method->signature in most cases, add a 
2396         mono_emit_method_call_full variant which takes a signature and an imt
2397         argument as well.
2399 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
2401         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
2402         to this function, since it could be computed easily from the method 
2403         argument.
2404         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
2405         more.
2407         * method-to-ir.c mini.c: Remove references to 
2408         compile_generic_method_wo_context.
2410         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
2411         generic method calls.
2412         
2413         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
2414         dimensional non-szarrays.
2416         * mini.c (mini_init): Register mono_array_new_1.
2418         * jit-icalls.c (mono_array_new_1): New jit icall.
2420         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
2421         pointing to the method.
2423         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
2424         method addresses belonging to METHOD_JUMP patches in the 
2425         jump_target_got_slot_hash.
2426         (mono_aot_load_method): Ditto.
2428         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
2429         METHOD_JUMP patches.
2431         * mini.c (mini_create_jit_domain_info): New helper function which 
2432         initializes/frees domain->runtime_info.
2433         (mini_free_jit_domain_info): Ditto.
2434         (mini_init): Install the domain hook functions with the runtime.
2436         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
2437         information maintained by the JIT.
2439         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
2440         insertion into jump_table_hash into mono_codegen (), also implement proper
2441         locking.
2443         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
2444         tail calls, it is already done by the aot code.
2445         
2446         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
2447         mechanism on amd64.
2449         * iltests.il.in: Make the jmp test a bit more complex.
2451         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
2452         generic instances which doesn't have a token.
2454         * aot-runtime.c (decode_method_ref): Ditto.
2455         
2456         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
2457         can handle this case now.
2458         (handle_box): Ditto.
2460 2008-08-15  Geoff Norton  <gnorton@novell.com>
2462         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
2463         debugging check.
2465 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
2467         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
2468         calling generic methods.
2470         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
2472         * aot-runtime.c (decode_patch_info): Ditto.
2474         * mini.c (mono_resolve_patch_target): Ditto.
2475         
2476         * patch-info.h: Add METHOD_RGCTX.
2478         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
2480 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
2482         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
2483         arguments in registers.
2485         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
2486         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
2488         * mini.c (mini_method_compile): Abort aot compilation for generic
2489         methods if generic sharing is disabled.
2490         
2491         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
2492         an mrgctx.
2494         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
2495         requiring an mrgctx.
2497         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
2498         store instructions when converting a vcall to a normal call.
2500         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
2501         mono_arch_find_jit_info.
2503 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
2505         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
2506         avoid calling mono_method_full_name () for every method even if the
2507         env var is not set.
2508         (check_inline_caller_method_name_limit): Ditto.
2510 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2512         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
2513         assemblies in one run.
2515         * aot-compiler.c (mono_compile_assembly): Only print out a count of
2516         skipped methods if it is not 0.
2518         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
2520 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2522         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
2523           MONO_ARCH_HAVE_UNWIND_TABLE.
2525         Contributed under MIT/X11 license.
2527 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2529         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
2530           from default optimizaton list on Winx64.
2532         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
2534         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
2535           the LMF from the MonoJitTlsData structure.
2537         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
2539         Contributed under MIT/X11 license.
2541 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2543         * mini.c (sigsegv_signal_handler): Fix the build.
2545         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
2546         assembly->aot_module.
2548         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
2549         hash table. This simplifies and speeds up a lot of code, and fixes support
2550         for .netmodules.
2552         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
2553         with the runtime.
2555         * mini-exceptions.c: Ditto.
2556         
2557         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
2558         'native_offset' argument, since these are computed in the 
2559         mono_find_jit_info () function.
2561         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
2562         is used by exceptions-ppc.c.
2564         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
2565         mono_arch_find_jit_info ().
2566         
2567         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
2568         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
2569         generic code in mini-exceptions.c.
2571 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
2573         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
2575         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
2576         
2577         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
2578         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
2579         called while holding the loader lock. Fixes #415608.
2580         (mono_aot_get_method_from_token_inner): Ditto.
2582 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2584         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
2585         to reduce differences between this and the generic implementation in
2586         mini-exceptions.c.
2587         (ves_icall_get_frame_info): Ditto.
2589         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
2591         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
2592         longer neccesarry.
2594         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
2595         mono_arch_get_call_filter () and make it non-static, for consistency with the
2596         other architectures.
2598 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
2600         * mini.c:
2601         * local-propagation.c:
2602         * mini-x86.c: Correct the name of arch defines.
2604 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2606         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2607         NO_EMULATE_LONG_SHIFT_OPS define.
2609 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2611         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2612         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2614         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2615         MACH fixes. Merged from the 2.0 branch.
2617         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2619         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2620         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2622         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2624         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2625         mono_marshal_get_native_wrapper () signature changes.
2627 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
2629         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2630         conversion bug under arm.
2632 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2634         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2636         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2637         with overflow checking.
2639 2008-08-05  Marek Habersack  <mhabersack@novell.com>
2641         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2642         to the genmdesc.pl file
2644 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
2646         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2647         arg_array in the soft-float versions of the LOAD/STORE macros.
2649         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2650         implementation.
2652         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2654 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2656         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2657         a float HFA. Fixes #413621.
2659 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
2661         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2662         frame_size to args_size. Fixes build.
2664 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2666         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2667         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2669         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2670         the stack are not unaligned. Fixes #413247.
2671         
2672 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2674         * mini.c: update jitted methods performance counters.
2676 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2678         * mini-exceptions.c: increase the exceptions thrown performance
2679         counter in mono_handle_exception ().
2681 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
2683         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2684         can work with netmodules.
2686 2008-07-28  Geoff Norton  <gnorton@novell.com>
2688         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
2689         regression tests.
2691 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2693         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2694         correct place.
2696 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
2698         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2699           The float param registers and other param registers must be the 
2700           same index on Windows x64.
2702         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
2703           ArgValuetypeAddrInIReg argument case.  Setting the argument
2704           op to OP_VTARG_ADDR (OP_REGOFFSET)).
2706         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
2707           variable computed above as the copy length for arguments of storage
2708           type ArgValuetypeAddrInIReg.
2710         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
2711           ArgValuetypeAddrInIReg argument case.  This case will rely on
2712           mono_arch_emit_outarg_vt to emit the correct code later in the process.
2714         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
2715           a 32 byte stack allocation for all calls.  We will omit the adjustment for
2716           jump and tail call instructoins as they do not follow the typical call behavior.
2718         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
2719           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2720           local variable and pass the local variable by reference to the called method.
2722         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
2723           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
2724           of a struct is passed in a register it must be saved with the other
2725           volatile argument on the stack.
2727         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
2728           frame pointer the stack adjustment value must be saved to the unwind 
2729           info structure.
2731         Contributed under MIT/X11 license.
2733 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2735         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2736         which got lost in the merge.
2738 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2740         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2741         build.
2743         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2744         
2745         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2746         icalls, since they won't be patched.
2748         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2749         different code sequence when running under valgrind to prevent some valgrind
2750         errors.
2752         * iltests.il.in: Add new regression test.
2754         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2755         end with a throw.
2757         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2758         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2760         * iltests.il.in: Add new test.
2762         * aot-compiler.c: Fix some warnings.
2764         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2765         Fixes #412494.
2767 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2769         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2770         (mini_usage_jitdeveloper): Add a missing --wapi option.
2772 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2774         * mini-codegen.c: Simplify the is_fp macros.
2775         (free_up_ireg): Remove, use free_up_reg instead.
2776         (free_up_reg): Fix the fp case.
2778 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2780         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2781         lowered earlier.
2783         * exceptions-x86.c: Merge some changes which seemed to have got lost
2784         in the linear-ir merge.
2786         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2788         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2789         long vreg volatile even if the variable was already created.
2791         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
2792         volatile variables.
2794 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2796         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
2798         * mini.c (mono_jit_compile_method_inner): Add support for 
2799         MONO_EXCEPTION_BAD_IMAGE.
2801         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
2802         mini_method_get_context () returns NULL. Fixes #356531.
2804         * mini.c (mono_method_to_ir): Ditto.
2805         
2806         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
2807         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
2809 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2811         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
2812         in the LDFTN implementation.
2814 2008-07-25  Mark Probst  <mark.probst@gmail.com>
2816         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
2817         code, patch calls to icalls, too, even if they're not in the
2818         shared generic code hash.  Fixes #411962.
2820 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2822         * cpu-x86.md: Increase the length of the fcall opcodes.
2824         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
2825         calls returning floats.
2827         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
2828         on NEWARR.
2829         
2830         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
2831         missed earlier.
2833         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
2834         into the domain->method_code_hash.
2836         * aot-compiler.c: Fix win32 build.
2838         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
2839         
2840         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
2841         gshared NEWARR implementation.
2843         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
2845         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
2846         can be used outside of method_to_ir.
2848         * mini.h (MonoCompile): Add arg_types field.
2850         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
2851         
2852         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2853         the values of the local arg_array and param_types array.
2855 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2857         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2858         got accesses might only get generated later when NEWOBJ is decomposed.
2859         
2860         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2861         looking up the native code of the target method when a delegate is called
2862         for the first time.
2864         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2865         optimization.
2867         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2869         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2870         AOT work on platforms without a working dlsym implementation.
2872         * mini.h: Bump AOT image format version.
2873         
2874 2008-07-24  Mark Probst  <mark.probst@gmail.com>
2876         * mini-exceptions.c: Free a MonoType with
2877         mono_metadata_free_type() instead of g_free().
2879         * aot-runtime.c: Free a MonoType.
2881 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2883         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2884         optimization.
2886         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2887         fp stack on x86.
2889 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
2890         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2891         profiler hook.
2893 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2895         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2896         NEWOBJ calls on valuetypes.
2898         * iltests.il.in: Add new test.
2900         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2902 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2904         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2905         is no longer needed.
2907         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2908         non register sized integer arguments.
2909         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2910         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
2911         emit_memcpy2 ().
2913         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2914         CEE_MONO_RETOBJ.
2915         
2916         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2917         two a binop with different sized arguments is emitted.
2919         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2920         instruction in the ins==NULL case.
2922 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2924         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2926         * mini-x86.c: Fix osx build.
2928         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2929         opcodes as well.
2931         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2932         instruction for non int sized variables.
2934         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2935         implementation.
2937 2008-07-23  Robert Jordan  <robertj@gmx.net>
2939         * method-to-ir.c: Fix MSVC build.
2941 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2943         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2944         a non int sized type, widen it to an int since newer versions of gcc seem to
2945         generate code which needs this.
2947         * ssa2.c abcremoval2.c: Fix warnings.
2949         * *: Merge the Linear IR branch.
2951         The original branch is at trunk/branches/vargaz/mini-linear-il, and
2952         the ChangeLog file there describes all the changes done over the years. 
2953         Further documentation can be found at www.mono-project.com/Linear_IL.
2955 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2957         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2958           The float param registers and other param registers must be the 
2959           same index on Windows x64.
2961         Contributed under MIT/X11 license.
2963 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
2965         * mini.c: Make the previous fix GC safe.
2967 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
2969         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2971 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2973         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2974           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
2975           ArgValuetypeAddrInIReg instead.
2977         Contributed under MIT/X11 license.
2979 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
2981         * mini-codegen.c (get_register_spilling): Fix a warning.
2983 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
2985         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2986         for types which the initialization fails. Raises the provided exception
2987         at the right stop after cleanup.
2989 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
2991         * aot-compiler.c: Free most of the memory allocated during compilation.
2993         * mini.c (mini_parse_debug_options): Fix a leak.
2994         
2995         * mini.c (mini_method_compile): Don't add the method to the jit info tables
2996         during aot compilation.
2998 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
3000         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
3001         it has too much register pressure.
3003 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
3005         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
3007 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3009         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3010         on x86.
3012         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3013         on amd64 similar to the way it is done on arm.
3015         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3017         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
3018         consistency, normalize error messages, avoid loading aot-only modules in
3019         normal mode.
3021         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
3022         for consistency.
3024         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
3026 2008-07-11  Martin Baulig  <martin@ximian.com>
3028         * debug-debugger.h
3029         (MonoDebuggerInfo): Add `interruption_request'.
3031 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3033         * aot-compiler.c (emit_plt): Remove some dead code.
3035         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
3037         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
3038         return the plt info offset belonging to a given plt entry.
3040         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
3041         mono_aot_get_plt_info_offset.
3042         
3043         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
3044         similar to the amd64 code by makeing jumps through a separate jump table 
3045         instead of embedding the jump addresses into the code.
3047 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
3049         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
3050         method.
3052 2008-07-10  Martin Baulig  <martin@ximian.com>
3054         * mini.c (mini_method_compile): Disable generics sharing when
3055         running in the debugger.
3057 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3059         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
3061         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
3062         the local register allocator from running out of registers on x86 when 
3063         using aot.
3065 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
3067         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
3068         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
3069         C4146.
3071         Contributed under MIT/X11 license.
3073 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3075         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
3076         speed up the assembler.
3078 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3080         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
3081         support.
3083         * mini.c: Move the soft float handling macros a bit earlier, add 
3084         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
3085         place.
3087         * mini.h: Add prototype for mono_arch_fixup_jinfo.
3089         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
3090         read-only to help catch code allocation requests.
3091         
3092         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
3093         and turn it off when using --aot-only or when compiling with --aot=full.
3095         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
3096         jump table for switches from the normal domain mempool, not the code
3097         manager.
3099         * mini-trampolines.c (get_unbox_trampoline): New function to return an
3100         unbox trampoline which handles aot-only mode too.
3102         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
3103         an AOTed unbox trampoline.
3105         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
3107 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3109         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
3110         ""
3112         Contributed under MIT/X11 license.
3114 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3116         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
3117           the unwind information for the method at the end of the allocated block.
3118           
3119         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
3120           MonoCompileArch to hold the unwind info for SEH on Winx64
3121         
3122         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
3123           frame pointer info for the method being compiled.
3124           
3125         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
3126           the call to mono_exception_from_token.
3127           
3128         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
3129           storing the method prolog information in a format that the Winx64 SEH can understand.  This
3130           information is stored a the end of the method block because it is all 32-bit offset based.
3132         Contributed under MIT/X11 license.
3134 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3136         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
3138         * wapihandles.c: Fix warnings.
3140         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
3141         mode.
3143         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
3144         mono_jit_compile_method in aot-only mode since that calls the type 
3145         initializer.
3146         
3147         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
3148         get_delegate_invoke_impl in aot-only mode.
3150         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
3152 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
3154         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
3156         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
3157         is on by default.
3159         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
3161         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
3162         init trampoline from the AOT file as well.
3164         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
3165         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
3166         code.
3168         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
3169         mono_init.
3171         * exceptions-amd64.c: Add _full variants for the remaining exception code
3172         creation functions as well, allow emission of relocatable code, remove
3173         caching since that is now done by the caller.
3175         * mini-exceptions.c: Add _full variants for the remaining exception code
3176         creation functions as well, add aot-only support.
3178         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
3179         if we can determine a proper token for them.
3180         (add_wrappers): Add a few more wrappers.
3181         (emit_method_code): Remove some dead code.
3182         (emit_trampolines): Emit exception code too.
3184         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
3186         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
3187         mono_array_new_va which avoids varargs.
3189         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
3191         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
3192         mono_arch_create_specific_trampoline () in all places.
3194         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
3195         a bit so it can be used for other things as well.
3196         
3197         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
3198         on demand as well.
3200         * exceptions-amd64.c: Rename the caching from the exception code creation
3201         functions, it is done by the caller instead.
3202         
3203         * exceptions-amd64.c: Change the signature of the exception code creation 
3204         functions to allow the creation of relocatable code later.
3206         * mini-exceptions.c: Add a set of functions to query the various 
3207         runtime-generated exception functions.
3209         * mini.c mini-exceptions.c: Use the newly added functions instead of the
3210         mono_arch_.. () functions.
3211         
3212 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3214         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
3216         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
3218         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
3219         (mini_get_vtable_trampoline): Ditto.
3221         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
3222         code in the AOT case by returning the code size and a list of relocations to
3223         the caller.
3225         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
3227 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
3229         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
3230           clean the stack.
3232         Contributed under MIT/X11 license.
3234 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3236         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
3237         so the buffer size can be computed correctly. Fixes #404735.
3239         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
3240         normally as cfg->debug_info is already freed.
3242 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
3244         * mini-amd64.c: For calls returning vtypes in registers, don't store
3245         the return address on the stack, instead allocate a separate local for
3246         it. Fixes #404729.
3248 2008-07-05  Mark Probst  <mark.probst@gmail.com>
3250         * mini-trampolines.c, mini.h: Add an argument to
3251         mono_create_jit_trampoline_in_domain() for turning off the adding
3252         of the sync wrapper.
3254         * mini.c: Use the JIT trampoline without sync instead of
3255         ldftn_nosync in static RGCTX invoke wrappers so that the call can
3256         be patched.
3258 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3260         * driver.c: Turn on GSHARED optimization by default.
3262 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
3264         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
3265         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
3267         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
3268         create a variant of the generic trampoline code callable from AOTed trampolines.
3270         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
3271         trampoline code callable from AOTed trampolines.
3273         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
3275 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3277         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
3278         pass-through manner.
3280         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
3281         and don't fail sharing for them anymore.
3283         * mini-exceptions.c: Handle exceptions in shared generic methods.
3285         * generic-sharing.c: When checking the context of a generic
3286         method, also check its class's context.  Don't treat wrappers as
3287         sharable.
3289         * mini-trampolines.c: Some code factored out to
3290         metadata/generic-sharing.c.  Handle the MRGCTX case.
3292         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
3293         we must deal with the method being of another instantiation of the
3294         class.  Add static rgctx invoke wrappers to generic methods.
3296 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3298         * mini.c: Provide all jit infos of generic shared methods with a
3299         generic jit info.
3301         * mini-exceptions.c: Handle the new situation that a generic info
3302         might be available, but not info about the this/vtable/mrgctx
3303         variable.
3305 2008-07-03  Mark Probst  <mark.probst@gmail.com>
3307         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
3308         generic methods.
3310 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
3312         * dominators.c (check_dominance_frontier): Fix a warning.
3314         * mini.h: Add some missing prototypes.
3316         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
3318         * driver.c (mono_jit_init_version): Correct the comments since the first
3319         argument should be the name of the root domain, not a filename.
3321         * aot-runtime.c (make_writable): Error out if this is called while running
3322         with --aot-only.
3323         (load_aot_module): Ditto.
3325         * aot-compiler.c: Really fix the computation of method indexes.
3327         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
3328         optimizations as this is no longer called frequently.
3330         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
3331         method and the invoke impl code and pass it to the delegate trampoline instead of
3332         just the delegate class.
3334 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
3336         * aot-compiler.c: Fixup the computation of method indexes.
3337         (add_wrappers): Create the base methods of the runtime invoke wrappers using
3338         the method builder infrastructure.
3340         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
3341         has no header.
3343         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
3344         mode, load the method right away instead of creating a trampoline.
3346         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
3348         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
3349         some checks a bit.
3351 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
3353         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
3354         (mono_aot_load_method): Use method_index instead of method->token.
3356         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
3357         can handle icalls etc. properly.
3359         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3361         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
3363         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
3364         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
3365         JIT_ICALL_ADDR patch type.
3367         * patch-info.h: Add JIT_ICALL_ADDR patch type.
3369         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
3370         request flag.
3371         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
3373         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
3375 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
3377         * mini.c: Use domain->jit_code_hash_lock for controlling access to
3378         domain->jit_code_hash.
3380 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
3382         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
3384 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
3386         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
3387         get_this_arg_from_call, let it compute it when needed.
3389         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
3390         gsctx from code only when needed.
3392         * mini-trampolines.c (get_generic_context): Rename this to 
3393         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
3394         it can be called by the arch backends.
3396         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
3398 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
3400         * driver.c (mono_main): Add experimental --aot-only command line option.
3402         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
3403         set.
3405 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
3407         * driver.c (DllMain): Remove mono_module_handle.
3409         Contributed under MIT/X11 license.
3411 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
3413         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
3414         for emitting methods which are not in the source assembly. Detect and report
3415         failure of assembling+linking.
3416         
3417         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
3419         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
3421 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
3423         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
3425 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
3427         * mini.h: Remove some obsolete prototypes.
3429         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
3431 2008-06-24  Mark Probst  <mark.probst@gmail.com>
3433         * mini.c (get_object_generic_inst): Variable-sized arrays are not
3434         supported by Visual Studio, so use alloca().
3436 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
3438         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
3439         Fixes #402585.
3441 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3443         * mini.c: Fail sharing of a generic method if it contains an open
3444         catch clause (because we don't pass MRGCTXs yet).
3446 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3448         * mini.c: When compiling a method with generic sharing, insert the
3449         method instantiated with an all-Object generic context into the
3450         jit info table, instead of the context of the first instantiation
3451         of the method we happen to compile.
3453 2008-06-18  Martin Baulig  <martin@ximian.com>
3455         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
3456         `major_version' and `minor_version'.
3458 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3460         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
3461         mono_method_is_generic_sharable_impl() takes an additional
3462         argument specifying whether to treat type variables as reference
3463         types.
3465 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3467         * mini.h: Removed obsolete prototypes.
3469 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3471         * mini.c: Don't fail generic sharing for initobj and sizeof - we
3472         already handle them.
3474 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3476         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
3477         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
3478         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
3479         tramp-x86.c: Added a MonoGenericContext* argument to
3480         mono_arch_get_unbox_trampoline() so that it can call other
3481         functions which require it.
3483 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3485         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
3486         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
3487         mono_arch_get_this_arg_from_call() takes a
3488         MonoGenericSharingContext* as well.
3490 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3492         * mini.c: Factor out code for emitting unbox into emit_unbox() and
3493         implement generic sharing of unbox.
3495 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3497         * mini.c: Don't compute the vtable to determine whether a field is
3498         special static, because it might not work for open types.
3500 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3502         * mini.c: Removed the unused token_type and token_source arguments
3503         from get_runtime_generic_context_ptr().
3505 2008-06-17  Marek Habersack  <mhabersack@novell.com>
3507         * mini.c (ADD_BINOP): fix the build
3509 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
3511         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
3512         a widening op.
3514 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3516         * mini.h: Removed class relations enum that's not used anymore.
3518 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3520         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
3522         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
3523         the lazy fetch trampoline access code.
3525 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
3527         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
3529 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
3531         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
3533         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
3535         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
3537 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3539         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
3540         intrinsics.
3542         * mini-ops.h: Add MIN/MAX_UN opcodes.
3544         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
3545         intrinsics.
3547         * basic-math.cs: Add more min/max tests.
3549         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3551 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3553         * mini.c: Small fix in the prologue of emit_castclass.
3555 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3557         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3559         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
3560         do not work even for unsigned types. Fixes #400014.
3562         * basic-math.cs: Add regression tests for unsigned Min/Max.
3564 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3566         * mini.c: Added additional context_used argument to several
3567         functions, which will be needed for sharing generic methods.  Use
3568         GET_RGCTX macro wherever appropriate.  Declare only one
3569         context_used in mono_method_to_ir().
3571 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3573         * mini.c, generic-sharing.c: Removed generic class relations.
3575         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
3576         functions due to MRGCTX changes.
3578 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3580         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
3581         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
3582         with calculated IMT.
3584         * mini.c: Generic sharing of calls via generic interfaces.
3586         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
3587         generic method with non-constant MonoGenericContext*.  Instead,
3588         the context is taken out of the method itself.
3590 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3592         * mini.c: Generic sharing of ldvirtftn.
3594 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3596         * mini.c: Generic sharing of ldftn.
3598 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3600         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3602 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3604         * mini.c: Generic sharing of the special case of ldtoken followed
3605         by a call to GetTypeFromHandle.
3607 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3609         * mini.c: Generic sharing of box for nullable types.
3611 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3613         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3614         are passed on the stack. Fixes #324807.
3616 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
3618         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3619         for the ArgValuetypeAddrInIReg case.
3621         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
3622         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
3624         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
3625         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
3626         local variable and pass the local variable by reference to the called method.
3627           
3628         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
3629         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3631         Contributed under MIT/X11 license.
3633 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
3635         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3637         * debug-mini.c (mono_debug_print_vars): Release memory after printing
3638         everything.
3640 2008-06-10  Martin Baulig  <martin@ximian.com>
3642         * debug-mini.c
3643         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3645 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
3647         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3648         possible error when no arguments are passed.
3650         Contributed under MIT/X11 license.
3652 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
3654         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3655         where the file name is NULL.
3657 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
3659         * mini.c: Fix s390 build.
3661 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
3663         * trace.c (mono_trace_parse_options): Fix warnings.
3665         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3667 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
3669         * mini.c (remove_block_if_useless): Avoid printing the method name.
3670         
3671         * mini.c: Remove needless setting of ins->cil_code which is now done by 
3672         MONO_INST_NEW.
3674         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3675         LMF. Not yet used.
3677         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3678         translated code after it has been patched.
3680 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
3682         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3683         avoid problems during code patching on SMP systems.
3684         (emit_call): Avoid adding a patch info which is already added by 
3685         emit_call_body.
3686         (mono_arch_emit_exceptions): Ditto.
3688 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
3690         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3691         MONO_TYPE_ISSTRUCT already checks for it.
3693 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
3695         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
3696           structs with floats on Winx64 the float registers are not used.  
3697           The integer registers are always used..
3698         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
3699           only one register will be used and only if the size of the struct 
3700           is 1,2,4, or 8 bytes.
3702         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
3703           to work for Winx64.
3705         Contributed under MIT/X11 license.
3707 2008-06-05  Martin Baulig  <martin@ximian.com>
3709         * debug-debugger.c (debugger_lookup_class): Also call
3710         mono_class_setup_methods() here; we're only called from RTI.
3712 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
3714         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3715         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3716         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3717         Post-process object files and add dtrace-generated object, if necessary.
3719         Contributed under MIT/X11 license.
3721 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3723         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
3724         element class.
3726         * mini.c: Generic sharing for unbox.any and castclass.
3728 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3730         * mini.c: Ignore tailcall prefix in shared generic code and when
3731         doing calls which require a vtable/rgctx argument.
3733 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3735         * mini.c: Don't free the JIT info.
3737         * driver.c: Changes in the JIT info table testing code.
3739 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3741         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
3742         interruption. Fix some warnings.
3744         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3745         interruption_checkpoint.
3747 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3749         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3750         from embedding applications.
3752 2008-06-02  William Holmes  <billholmes54@gmail.com>
3754         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
3755           reserving 32 bytes on the stack when making calls. 
3757         Contributed under MIT/X11 license.
3759 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
3761         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3762         the linear IL branch.
3764         * driver.c: Print out more information for --version on arm.
3766 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
3768         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3769         bb_exit instead, since out of line bblocks might not actually be emitted
3770         out-of-line.
3771         
3772         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3773         maximum epilog size for out of line bblocks if tracing is enabled.
3775         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3777 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
3779         * arrays.cs: Regression tests for allocating arrays with negative sizes.
3781 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
3783         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3784         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
3785         opcodes.
3787 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
3789         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3790         the 'value' to store is a constant.
3792         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
3794         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
3795         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
3797 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
3799         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
3800         for accessing method->generic_container.
3802 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
3804         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
3805         
3806         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
3808         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
3810         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
3811         fails.
3813 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
3815         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
3817         * mini.c: Handle the case when mono_class_vtable () fails.
3819 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
3820         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
3821         the stat profiler.
3823 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3825         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
3826         together with domain sharing.
3828 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3830         * mini.c: Treat callvirts to final methods like non-virtual calls
3831         when doing generic sharing, i.e. look them up in the runtime
3832         generic context.
3834 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3836         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
3837         with computed types (for generic sharing).
3839         * mini.c: Generic sharing for mkrefany and refanyval.
3841 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
3843         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
3844         possible.
3846         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
3847         the generic sharing code.
3848         
3849         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
3850         when needed.
3852 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3854         * mini.h: Remove the declaration of mono_aot_init_vtable ().
3856 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
3858         * driver.c: updated copyright date
3860 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3862         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3863         needed.
3865 2008-05-19  Martin Baulig  <martin@ximian.com>
3867         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3868         pointing to the new `_mono_debug_using_mono_debugger' variable.
3870         * driver.c
3871         (mono_main): Check mono_debug_using_mono_debugger() rather than
3872         the `MONO_INSIDE_MDB' environment variable to check whether we're
3873         inside the debugger.
3875 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
3877         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3878         argument.
3880 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
3882         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3884         * mini.c: Added mini_assembly_can_skip_verification. This
3885         function checks if the assembly requested to skip verification. 
3886         Fixes part of #387274.
3888 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
3890         * mini.c (mini_get_method): Disable the check for open generic classes when
3891         using generic sharing.
3893         * generics.cs: Add a test for #387034.
3895         * mini.c (mini_get_method): Check whenever the method class is an open generic
3896         type, and return NULL in that case, causing a verification error. Fixes
3897         #384123.
3899 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3901         * driver.c (mono_main): Revert r102623. The right
3902         thing to do is to enable the verifier under verifiable
3903         unless a --security flag was passed.
3905         We need this non-trivial behavior for --verify-all otherwise
3906         mcs-compileall won't be able to use it. As it needs everything to
3907         be verified under validil.
3909 2008-05-06  Martin Baulig  <martin@ximian.com>
3911         Fix #383749.
3913         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3914         (mono_debugger_thread_cleanup): Likewise.
3915         (mono_debugger_extended_notification): Likewise.
3917 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3919         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3920         against both inflated and non-inflated methods. We need to check against the
3921         generic definition for cases where the instantiated method is not visible.
3922         We need to check against the inflated types for cases where the instantiation
3923         changes any super type. This fixes #382986.
3925         Note that this doesn't need to be applied to other parts of mono_method_to_ir
3926         that check for visibiliy as generic params only appears as the type subject
3927         of tokens on call opcodes. Field manipulation and ldftn must always
3928         target an exact type.
3930 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3932         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3933         if no related --security flag is passed.
3935 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3937         * mini-arch.h: Prepare support for ppc64.
3939         Contributed under MIT/X11 license.
3941 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3943         * aot-runtime.c: Prepare support for ppc64.
3945         Contributed under MIT/X11 license.
3947 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3949         * mini-ops.h: Prepare support for ppc64.
3951         Contributed under MIT/X11 license.
3953 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
3955         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3957         Contributed under MIT/X11 license.
3959 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
3961         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3962         assemblies, since aot_name is not a full path, causing us to load MS.NET 
3963         assemblies on windows.
3965 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
3967         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3968         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3969         * main.c: Use UTF-8 encoded command line instead of Windows default code
3970         page on Windows to support Unicode.
3971         * driver.c (DllMain): New function for mixed-mode assembly support.
3972         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3973         export __stdcall functions without decoration.
3975         Contributed under MIT/X11 license.
3977 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3979         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3980         saving it very early.
3982 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3984         * mini.h, mini.c: Lots of code for accessing the old RGCTX
3985         deleted.  The only way to access the new RGCTX is via the
3986         trampline.
3988         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3989         vtable instead of the RGCTX to static methods.
3991         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3992         accessing the new RGCTX.
3994         * generic-sharing.c: There is no separation between self, type
3995         arguments and other types in the RGCTX anymore.
3997 2008-04-25  Jonathan Chambers <joncham@gmail.com>
3999         * mini-amd64.c (add_general): Remove previous stack adjustment.
4000         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
4001         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
4002         for 32 bytes of stack space reserved for all calls.
4003         
4004         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
4005         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
4006         adjustment.
4007         
4008         Code contributed under MIT/X11 license.
4010 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
4012         * mini.c (mini_method_verify): Only verify non-inflated methods, check
4013         against the root definition, peeling out method and type instantiations.
4014         Cache verify success results, code that fails verification is still
4015         checked multiple times.
4017 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
4019         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
4021 2008-04-23  Jonathan Chambers <joncham@gmail.com>
4023         * mini-amd64.c (add_general): Always increment stack on Win64.
4024         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
4025         on Win64.
4026         
4027         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
4028         stack based argument handling on Win64.
4029         
4030         Code contributed under MIT/X11 license.
4032 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
4034         * Makefile.am (version.h): Add support for git-svn.
4036 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
4038         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
4039         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
4040         avoiding allocations and libc functions which might deadlock.
4041         
4042         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
4043         'no-gdb-backtrace' option is set.
4045         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
4047         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
4049 2008-04-21  Martin Baulig  <martin@ximian.com>
4051         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
4052         and `get_lmf_addr'; `notification_address' is no longer a pointer.
4054 2008-04-21  Martin Baulig  <martin@ximian.com>
4056         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
4057         `thread_vtable', `event_handler_ptr' and `event_handler'.
4059 2008-04-21  Martin Baulig  <martin@ximian.com>
4061         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
4062         allows delayed initialization of the `executable_code_buffer' when
4063         attaching.
4065 2008-04-21  Martin Baulig  <martin@ximian.com>
4067         * mini.h (mono_debugger_create_notification_function): Removed.
4068         * tramp-*.c (mono_debugger_create_notification_function): Removed.
4070         * mdb-debug-info64.s
4071         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4073         * mdb-debug-info32.s
4074         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4076         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
4077         currently only works on x86 and x86_64, so don't create it on ppc.
4079 2008-04-21  Martin Baulig  <martin@ximian.com>
4081         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
4083         * mini.c
4084         (mini_method_compile): In the fp elimination check, check
4085         `debug_options.mdb_optimizations' in addition to
4086         mono_debug_using_mono_debugger().       
4088         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
4089         disable some JIT optimizations which are only disabled when
4090         running inside the debugger.
4091         Added `--help-debug' option to describe the debugging options.
4092         (parse_debug_options): New static function to parse the `--debug'
4093         options, so we can easily add more stuff in future.
4095 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
4097         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
4098         the method has no body.
4100 2008-04-19  Jonathan Chambers <joncham@gmail.com>
4102         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
4103         assembly is not allowed in MSVC 64-bit compiler. 
4104         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
4105         as we get floating point exceptions everywhere.
4106         
4107         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
4108         correctly align arguments for call to throw_exception.
4109         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
4110         
4111         Code contributed under MIT/X11 license.
4113 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
4115         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
4117 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
4119         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
4121         * mini-amd64.c (NEW_INS): Set cil_code.
4123         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
4124         from mini-amd64.c so all debugger related logic is in one place.
4126         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
4127         later won't have a random ip assigned to them.
4129 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
4131         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
4132         the arch specific function initializes code_size.
4133         (mono_create_delegate_trampoline): Ditto.
4135         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
4136         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
4137         platforms.
4139         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
4140         running under the debugger.
4142         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
4143         debugger.
4145         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
4146         debugger. Also move the disabling of optimizations here from driver.c.
4147         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
4148         debugger.
4150         * mini.h (MonoCompile): Add a few new flags.
4152 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
4154         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
4155         so the cil_code field of created MonoInst's is properly set.
4156         (mini_select_instructions): Ditto.
4158         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
4159         (MONO_INST_NEW_CALL): Ditto.
4161         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
4162         in many places so the ins->cil_code field is properly initialized.
4164         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
4165         place.
4167 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
4169         * mini.c (mini_method_compile): Print a different message when compiling a 
4170         shared method.
4171         
4172         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
4173         > 1.
4175 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4177         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
4178         SSE2 instructions.
4180         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
4181         
4182 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4184         * mini.c (handle_stack_args): Make this return void since its return value was
4185         never used. Also set cfg->unverifiable for invalid IL instead of calling
4186         G_BREAKPOINT ().
4188 2008-04-10  Mark Probst  <mark.probst@gmail.com>
4190         * mini.c: Make sure "this" is live in catch clauses with type
4191         variables in shared generic code.
4193 2008-04-08  Mark Probst  <mark.probst@gmail.com>
4195         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
4196         generic_class_is_reference_type() to ensure the proper behaviour
4197         when sharing generic code and the type in question is a type
4198         argument.
4200 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4202         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
4203         race conditions when printing thread dumps. Fixes #377738.
4205 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
4206         
4207         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
4208         shows up when both MonoInst arguments can cause aliasig.
4209         There is likely no way in the current JIT to trigger this problem, but
4210         it showed up in the development of generics sharing, when in a new
4211         opcode both args of an OP_GROUP can be aliases (addresses of a local).
4212         When the generics sharing code will be committed, its tests will be
4213         valid also for this bug.
4215 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4217         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
4218         PATCH_INFO_METHOD.
4220         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
4221         NULL.
4223 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
4225         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
4226         use a more detailed exception message for InvalidCastException.
4228         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
4230         * driver.c (mono_main): Add --debug=casts option to turn on better 
4231         InvalidCastException message details.
4233         * mini.c (mini_get_debug_options): New helper function to return the address of
4234         the debug_options variable.
4236         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
4237         the jit_tls TLS variable.
4239         * mini.c (mono_jit_tls): New TLS variable.
4241         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
4242         option is used.
4244 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
4246         * mini.h: Removed verifer related stuff. This code was moved to verify.c
4248         * mini.c: Removed verifer related stuff, code moved to verify.c.
4250         * driver.c: Using code from verify.c instead of mini.c.
4252 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
4254         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
4255         longer valid.
4257 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
4259         * mini.c (check_for_method_verify): Enabling verification of
4260         corlib if mono_verify_all is set. Bugs in the verifier preventing that
4261         have been fixed.
4263 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
4265         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
4266         caller saved registers as well.
4267         
4268         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
4269         saved registers as well.
4271 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
4273         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
4275         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
4276         code.
4278 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
4280         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
4281         to get_call_info.
4282         (get_call_info): Take a gsctx argument instead of 'cfg'.
4284 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
4286         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
4287         mono_verify_all is set.
4289         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
4291         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
4293 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
4295         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
4296         an exception.
4298         * driver.c mini.c mini.h: Add a --verify-all development option to test the
4299         verifier and the code generated by the compiler.
4301 2008-03-25  Mark Probst  <mark.probst@gmail.com>
4303         * mini.c: Generic sharing of the non-nullable case of the box
4304         instruction.
4306 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
4308         * inssel.brg: Fix the build.
4310         * iltests.il.in: Add a test for lconv.ovf.u8.un.
4312 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
4314         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
4315         Array:Address. Fixes #372410.
4317         * iltests.il.in: New tests for readonly prefix.
4319 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
4321         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
4322         mini-trampolines.c.
4324         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
4325         mini-exceptions.c.
4327         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
4328         
4329         * mini.c (mono_decompose_op_imm): New helper function.
4331         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
4332         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4333         return value.
4335         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4336         mono_arch_output_basic_block. Fix warnings.
4338         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
4339         for now.
4341 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
4343         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
4344         since the extra frame is now detected automatically inside the loop.
4346         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
4347         opts which are now in mono_peephole_ins ().
4348         
4349         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
4351         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
4352         frames and skip duplicate managed-to-native frames. Fixes #367665.
4354         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4355         opts which are now in mono_peephole_ins ().
4356         (mono_arch_peephole_pass_2): Ditto.
4358         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
4360         * mini-codegen.c (mono_peephole_ins): New helper function containing the
4361         arch independent peephole optimizations.
4363         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4364         opts which are now in mono_peephole_ins ().
4366         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
4367         
4368         * mini-s390.c (mono_arch_output_basic_block): Fix build.
4370         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
4371         pattern.
4373         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
4374         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
4375         opcode. 
4377 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
4379         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
4380         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4381         return value.
4383         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4384         mono_arch_output_basic_block. Fix warnings.
4386 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4388         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4389         conv.ovf.u.un.
4391 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4393         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4394         conv.ovf.u.un.
4396         * iltests.il: Add new tests.
4398 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
4400         * mini.c: Removed Windows version macros.
4402 2008-03-20  Mark Probst  <mark.probst@gmail.com>
4404         * generic-sharing.c: Put reflection types in the extensible part
4405         of the runtime generic context.
4407         * mini.c: Generic sharing of the GetTypeHandle special case of the
4408         ldtoken instruction.
4410 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4412         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
4414         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
4415         
4416         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
4417         consistency with the other version on the linear IR branch.
4419         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
4421         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
4423         * iltests.il.in: Add new tests.
4425 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
4427         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
4429         * iltests.il.in: Add new tests.
4431 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4433         * mini.c: Two variables with the same name were declared in
4434         nesting contexts and one wasn't initialized.  Fixed.
4436 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4438         * mini.c: Generic sharing of the initobj instruction.
4440 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4442         * mini.c: make the test to optimize ldtoken from typeof() more
4443         precise.
4445 2008-03-18  Mark Probst  <mark.probst@gmail.com>
4447         * mini.c: Generic sharing of the initobj instruction for reference
4448         types.
4450 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4452         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
4453         the mono_breakpoint_clean_code() code to perform bound checks.
4455 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
4457         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
4458         mono_arch_patch_callsite() to include the start of the managed method
4459         to be able to perform bound checks.
4461 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4463         * mini.c: Generic sharing for the isinst instruction.
4465 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4467         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4468         inssel-long32-mips.brg: Added opcodes for doing indirect calls
4469         with the runtime generic context argument.
4471         * mini.c: Share calls to several types of unsharable methods by
4472         putting the address of the method code in the runtime generic
4473         context and doing an indirect call.
4475         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4476         to switches.
4478 2008-03-16  Mark Probst  <mark.probst@gmail.com>
4480         * generic-sharing.c: Change due to a change in the runtime genric
4481         context API.
4483 2008-03-15  Martin Baulig  <martin@ximian.com>
4485         * tramp-x86.c
4486         (mono_arch_nullify_class_init_trampoline): Add call to
4487         mono_breakpoint_clean_code() to make things work when running
4488         inside the debugger.
4490         * tramp-amd64.c
4491         (mono_arch_nullify_class_init_trampoline): Add call to
4492         mono_breakpoint_clean_code() to make things work when running
4493         inside the debugger.
4495 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4497         * inssel-long.brg (reg): Fix 64 bit build.
4499 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4501         * mini.c, mini.h: Share static generic code by passing it an
4502         implicit argument pointing to the runtime generic context.
4504         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4505         inssel-long32-mips.brg: New opcodes for calling shared static,
4506         which need to be passed the runtime generic context.
4508         * mini-amd64.c, mini-x86.c: Save the runtime generic context
4509         argument on the stack in the prologue if needed.  New function for
4510         finding the runtime generic context argument from the registers
4511         saved by the trampoline.
4513         * mini-amd64.h, mini-x86.h: Specify which register to use for the
4514         runtime generic context argument.
4516         * tramp-amd64.c: Also restore the register used for the runtime
4517         generic context argument.
4519         * mini-trampoline.c: Resolve shared static calls by consulting the
4520         runtime generic context via the new argument.
4522         * generic-sharing.c: Add an argument to sharability-checking
4523         functions that specifies whether type variables should be treated
4524         as sharable type arguments.
4526         * inssel-x86.brg: Removed a superfluous, buggy rule.
4528         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4529         to switches.
4531 2008-03-14  Martin Baulig  <martin@ximian.com>
4533         * debug-debugger.c (main_thread_handler): Call
4534         mono_runtime_run_main() without sending any notifications.
4536         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
4538 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4540         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
4542 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4544         * tramp-x86.c: Fixed register restore offsets in the trampoline
4545         code for ECX and EDX.
4547 2008-03-12  Geoff Norton  <gnorton@novell.com>
4549         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
4550         different ucontext_t implementations.
4551         * exceptions-arm.c: Use the above defines to get exceptions working on 
4552         iPhone (based on a patch by Luke Howard lukeh@padl.com)
4553         * mini-arm.c: Implement iPhone icache support (based on a patch by
4554         Luke Howard lukeh@padl.com)
4556 2008-03-12  Mark Probst  <mark.probst@gmail.com>
4558         * mini.c: Enable generic sharing of calls to non-static
4559         non-interface non-generic non-value-type methods.
4561         * mini-trampolines.c: Resolve calls from shared generic code.
4563 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
4565         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
4567         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
4569 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
4571         * mini.c: some fixes for the AOT compiler.
4573 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4575         * cpu-amd64.md: Add clob:1 to some float opcodes.
4577 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
4579         * mini.h: Added MiniVerifierMode enumeration.
4581         * mini.c: Added mini_verifier_set_mode to control
4582         the usage of the new verifier.
4584         * mini.c (mono_method): Integrated the new verifier.
4586         * driver.c: Extended --security option with validil and
4587         verifiable options to activate the new verifier.
4589 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4591         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
4592         optimization to ctors taking 0 or 2 arguments too.
4594         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
4595         a bit.
4597         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
4599         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4601 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
4603         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4604         non-aot case as well.
4606         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4608         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4609         changes.
4611         * aot-compiler.c (encode_patch): Ditto.
4613         * mini.h (G_MININT32): Fix the definition of this.
4615 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
4617         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4619         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4621 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4623         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
4624         methods returning vtypes in registers.
4625         (mono_arch_allocate_vars): Ditto.
4627         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4629         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
4631         * generics.cs: Add a test from the linear IR branch.
4633         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4635         * mini.c (inline_method): Cache failed inline attempts.
4637 2008-03-04  Mark Probst  <mark.probst@gmail.com>
4639         * mini.c: For shared methods of generic classes put the location
4640         of "this" into the MonoGenericJitInfo.
4642         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4643         register out of a MonoContext by register number.  Add the generic
4644         sharing context as an argument to mono_arch_find_this_argument().
4646         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4647         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4648         for new arch function.
4650         * mini-exception.c: Handle open exception clauses in shared
4651         generic code.
4653         * mini-trampolines.c: Supply additional argument to
4654         mono_arch_find_this_argument().
4656 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4658         * Makefile.am (regtests): Run the bench.exe tests last.
4660 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
4662         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4663         a bit.
4665 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
4667         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4668         with MS.
4670         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4671         
4672         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4674         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4675         whose class has no cctor.
4677         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4679 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
4681         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4682         unverified.
4684 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
4686         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4687         to be in sync with the code on the linear IR branch.
4689         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4691         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4693 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
4695         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4697         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4699         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4701         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4703         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4704         
4705         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4706         body.
4708 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
4710         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4711         OP_LOADR4_MEMBASE emission.
4713         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4714         (mono_spillvar_offset_float): Ditto.
4716         * mini-mips.c (mono_arch_emit_prolog): Ditto.
4718         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
4719         emission.
4721         * basic-long.cs: Add regression tests for them.
4723         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
4724         use.
4725         (mono_arch_allocate_vars): Fix representation of single-precision float
4726         argument.
4727         (mono_arch_output_basic_block): Ditto.
4729         * inssel-mips.brg: Ditto, remove duplicate items.
4731         * mini-mips.c (emit_load_volatile_arguments): New function to handle
4732         arguments of tail calls as on other platforms.
4733         (mono_arch_output_basic_block): Handle tail calls.
4735         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4736         register.
4738         * objects.cs (test_5_pass_static_struct): Add test for it.
4740         Contributed under MIT/X11 license.
4742 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
4744         * Makefile.am: Use gmcs for compiling the regression tests.
4746         * *.2.cs *.2.il: Rename to *.cs and *.il.
4748 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
4750         * regalloc.h: Make the vassign array smaller.
4752         * mini.c (mini_method_compile): Remove an unused field in cfg.
4754         * mini-codegen.c: Add a bunch of micro optimizations.
4756 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
4758         * regalloc.h: Remove some unused fields.
4760 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
4762         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4764         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4766 2008-02-22  Mark Probst  <mark.probst@gmail.com>
4768         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4770         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4771         trampoline: Fetch an entry from the runtime generic context.  If
4772         it's NULL, jump to the actual trampoline to fill the runtime
4773         generic context.  Otherwise, return it.
4775         * mini.c: Call the lazy fetch trampoline to get entries out of the
4776         runtime generic context.
4778         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4779         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4780         tramp-sparc.c: Stubs for the lazy fetch trampoline.
4782 2008-02-21  Mark Probst  <mark.probst@gmail.com>
4784         * mini.c: Fetch data out of the extensible part of the runtime
4785         generic context instead of calling a helper function.
4787         * generic-sharing.c: Some functions moved into
4788         metadata/generic-sharing.c.  Helper function for fetching other
4789         types now checks and asserts against extensible rgctx (just for
4790         debugging purposes - the helper function isn't called anymore
4791         unless for debugging).
4793 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4795         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
4796         for tail calls up to the point that the tests in iltests.exe run. Also add a
4797         dummy CKFINITE implementation.
4798         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
4799         needed for trampoline LMF frames.
4801         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
4802         trampoline LMF frames.
4804 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
4806         * mini.c (inline_method): clean any pending loader error when inlining fail.
4807         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
4809 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4811         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
4813         * aot-runtime.c (decode_patch_info): Ditto.
4815         * mini.c (mono_resolve_patch_target): Ditto.
4816         
4817         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
4818         icall wrappers.
4820         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
4821         
4822         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
4823         if it references an icall address.
4825 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
4827         * cpu-s390x.md: Remove some more unused opcodes.
4828         
4829         * cpu-s390x.md: Remove some unused opcodes.
4831         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
4832         mono_op_imm_to_op ().
4834         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
4835         instead of a switch statement.
4836         
4837         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
4838         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
4840         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
4841         
4842         * mini-codegen.c: Remove unused mono_regstate2_... functions.
4844         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
4845         -1.
4847 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
4849         * driver.c (mono_main): Improve error reporting when an assembly cannot be
4850         opened. Fixes #362607.
4852         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4854         * iltests.il.in: Add a test for static methods in interfaces.
4856 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
4858         * genmdesc.c (build_table): Fix a crash on older glib versions.
4860         * cpu-sparc.md: Remove some unused opcodes.
4861         
4862         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
4863         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4865         * cpu-amd64.md: Remove some unused opcodes.
4867         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4868         like the other opcodes.
4870 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
4872         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4874         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4876         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4877         variables 'cfg' instead of 'm' for consistency.
4879         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4881         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4882         argument holding the vtype return address, to avoid the ambigious use of
4883         cfg->ret for this purpose.
4885         * mini.c (NEW_RETLOADA): Use vret_addr if set.
4887         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4888         
4889         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4890         new mono_print_ins () function which only takes one argument.
4892 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
4894         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4895         macro arguments.
4897 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
4899         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4901         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4903         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
4904         opcodes and other small changes.
4906         * mini-ops.h: Add some new opcodes from the linear IR branch.
4908         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4910         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4911         opcodes, use the REG_MEMBASE opcodes instead.
4912         
4913         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4914         opcodes, use the REG_MEMBASE opcodes instead.
4915         
4916         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4917         linear IR branch.
4919         * mini.c (mono_op_imm_to_op): New helper function.
4921         * mini-ops.h: Add some opcodes from linear IR branch.
4923 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
4925         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
4926         <tsv@solvo.ru>.
4928 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
4930         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
4931         OP_ICONV_TO_R4/R8.
4933         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4935 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
4937         * aot-compiler.c (emit_method_code): Add an assert.
4939         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4940         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4941         methods.
4943 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
4945         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
4946         some load/store opcodes so they are consistent. 
4947         (mono_arch_emit_prolog): Simplify some code.
4949         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4951         * objects.cs: Add tests for large argument offsets on ARM.
4953         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
4954         stack offsets. Fixes #359651.
4956         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4958         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4960         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4962         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4964         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4966         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4967         rid of CEE_CONV_R_UN.
4969         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4971 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
4973         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4975         * mini.c (mono_normalize_opcodes): Add some more opcodes.
4977         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4979         * cpu-amd64.md: Remove some unused opcodes.
4981         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4983         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4985         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
4986         arch specific functions for its parts. Call the peephole pass after local
4987         regalloc so the prolog can compute a more accurate max_offset.
4988         
4989         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4990         the corresponding OP_I/OP_L opcodes.
4992         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4994         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4996 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4998         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4999         as they are handled in mini.c.
5001         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
5002         
5003         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
5004         case since it is handled in mini.c.
5006         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
5008         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
5010         * *.c: Use the new opcodes in the IR and back end code.
5012         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
5014         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
5016 2008-02-06  Mark Probst  <mark.probst@gmail.com>
5018         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
5019         an assert because it has a race condition.
5021 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
5023         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
5025         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
5027         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
5029         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
5030         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
5032 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
5034         * cpu-amd64.md (move): Correct the maximum size of move.
5036 2008-02-05  Mark Probst  <mark.probst@gmail.com>
5038         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
5039         the generic class init trampoline to return quickly if the class
5040         is already inited.
5042 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
5044         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
5045         issues where an 32 bit callsite cannot be patched by a 64 bit address.
5047 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
5049         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
5050         branch.
5052 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
5054         * objects.cs: Add some soft-float tests.
5056         * mini.c: Fix a couple more soft-float issues.
5058         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
5060         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
5061         avoid a REX prefix.
5063 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
5065         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
5066         exception happens while compiling a virtual method.
5068 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
5070         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
5071         
5072         * mini-sparc.c: Fix build.
5074         * mini-sparc.c (get_call_info): Add support for generic sharing.
5076         * mini-exceptions.c: Add a FIXME.
5078 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
5080         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
5081         altstack handling code.
5083         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
5084         
5085         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
5087         * mini-s390.c: Add support for generic sharing.
5089         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5090         Fix CAS on s390.
5091         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5093         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
5095         * mini-s390x.c: Add support for generic sharing.
5096         
5097         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5098         Fix CAS on ia64.
5099         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5101         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
5102         can be used since it takes a 16 bit signed immediate.
5104         * inssel-s390x.brg: Fix OP_SETRET.
5106         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
5108         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
5110         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
5112         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
5114         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
5115         in one place.
5117         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
5118         stuff.
5120         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
5121         of the unused mono_arch_patch_delegate_trampoline stuff.
5123 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
5125         * basic-long.cs: Move the fp related tests to basic-float.cs.
5127         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
5129         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
5131         * basic-calls.cs: Add a test for proper float argument passing.
5133         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
5134         if the context corresponds to an exception received through a signal.
5136         * exceptions.cs: Add a test for nullref handling at the start of a try
5137         clause.
5139         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
5141         * jit-icalls.c (mono_break): New JIT icall.
5143         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
5145         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
5147 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
5149         * cpu-*.md: Get rid of unused opcodes.
5151         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
5153         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
5154         by all platforms.
5156         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
5157         define.
5159         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
5160         the arch independent trampoline code in mini-trampolines.c.
5162         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
5164         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
5166         * mini-s390.h: Remove an unused define.
5167         
5168         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
5169         the arch independent trampoline code in mini-trampolines.c.
5171         * mini-arm.c (mono_arch_emit_prolog): Fix build.
5173 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
5175         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
5177         * mini-s390.c (mono_arch_emit_prolog): Fix build.
5179         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
5181         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
5183         * cpu-amd64.md: Use smaller sizes for int opcodes.
5185         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
5187         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
5188         objects.cs.
5190         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
5191         debugging.
5193         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
5194         instead of though a pointer to save an indirection when accessing elements of
5195         the array.
5197         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
5198         some typos.
5199         (NOT_IMPLEMENTED): New helper macro.
5200         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
5201         of a bb.
5203         * *.c: Use the new helper macro.
5205 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
5207         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
5209 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
5211         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
5212         stack slots.
5214 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
5216         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
5217         profiling is enabled.
5218         
5219         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
5220         the end.
5221         (mono_arch_emit_prolog): Add more first bblock optimizations.
5223         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
5224         in order if possible.
5225         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
5226         bblock, since the arguments are still in their original registers.
5228         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
5230 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
5232         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
5233         as well.
5235         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
5236         offset 0.
5238         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
5240         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
5241         process async exceptions received while in unmanaged code.
5243         * mini.c (mini_init): Install a callback with the runtime which will be called
5244         when a thread receives an async exception while in unmanaged code.
5246         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
5248         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
5250 2008-01-16  Wade Berrier  <wberrier@novell.com>
5252         * cpu-g4.md:
5253         * cpu-arm.md:
5254         * cpu-s390x.md:
5255         fix build
5257 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5259         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
5260         compilation with sun cc.
5262         * cpu-*.md: Fix the build.
5264         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
5266         * mini-amd64.h: Add some comments to the MonoLMF structure.
5268         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
5269         
5270         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
5271         in the LMF structure if possible. This saves two instructions in the
5272         managed->native wrappers.
5274         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
5276 2008-01-16  Mark Probst  <mark.probst@gmail.com>
5278         * generic-sharing.c: New type argument lookup code which uses the
5279         runtime generic context template.
5281 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
5283         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
5285         * mini-arm.c (add_general): Fix arm eabi parameter passing.
5286         (mono_arch_output_basic_block): Fix localloc implementation.
5288         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
5290         * mini-ia64.c (peephole_pass): Fix ia64 build.
5292         * mini-amd64.c (peephole_pass): Fix a warning.
5293         
5294         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
5295         at a constant offset from sp/fp.
5297         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
5298         instead of obtaining it from *lmf in the managed method case.
5300 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
5302         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
5304 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
5306         * mini.h (MonoInstList): New type.
5307         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
5308         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
5309         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
5310         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
5311         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
5312         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
5313         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
5314         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
5315         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
5316         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
5317         MONO_INST_LIST_FOR_EACH_ENTRY,
5318         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
5319         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
5320         mono_inst_list_first, mono_inst_list_last,
5321         mono_inst_list_next, mono_inst_list_prev): New instruction
5322         list handling interfaces.
5323         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
5324         list head 'ins_list'.
5325         (MonoInst): Replace next pointer with list head 'node'.
5326         (MonoCallInst): Make 'out_args' a MonoInstList.
5327         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
5328         (MonoCompile): Delete reverse_inst_list and
5329         reverse_inst_list_len.
5330         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
5331         mono_arch_lowering_pass, mono_arch_local_regalloc,
5332         mono_arch_output_basic_block, mono_arch_emit_prolog):
5333         Convert to new instruction lists.
5334         (insert_after_ins): Delete.
5335         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
5336         instruction lists.
5337         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
5338         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
5339         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
5340         mono_emulate_opcode, mono_emit_load_got_addr,
5341         inline_method, mono_method_to_ir, mono_print_bb_code,
5342         print_dfn, decompose_pass, nullify_basic_block,
5343         replace_out_block_in_code, remove_block_if_useless,
5344         merge_basic_blocks, move_basic_block_to_end,
5345         try_unsigned_compare, optimize_branches, mono_print_code,
5346         mini_select_instructions, remove_critical_edges): Likewise.
5347         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
5348         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
5349         mono_arch_output_basic_block, mono_arch_emit_prolog):
5350         Likewise.
5351         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
5352         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5353         mono_arch_output_basic_block): Likewise.
5354         (inst_list_prepend, insert_after_ins): Delete.
5355         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
5356         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
5357         instruction lists.
5358         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
5359         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
5360         mono_arch_emit_prolog): Likewise.
5361         * cfold.c (mono_constant_fold): Likewise.
5362         * liveness.c (visit_bb, mono_analyze_liveness,
5363         optimize_initlocals): Likewise.
5364         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
5365         * graph.c (mono_draw_code_cfg): Likewise.
5366         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
5367         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
5368         mono_ssa_cprop): Likewise.
5369         * abcremoval (get_relations_from_previous_bb, process_block):
5370         Likewise.
5371         * local-propagation (mono_cprop_invalidate_values,
5372         mono_local_cprop_bb): Likewise.
5373         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
5374         peephole_pass, mono_arch_output_basic_block,
5375         mono_arch_emit_prolog): Likewise.
5376         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
5377         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5378         mono_arch_emit_prolog): Likewise.
5379         (insert_after_ins): Delete.
5380         * aliasing.c (print_code_with_aliasing_information,
5381         mono_build_aliasing_information, mono_aliasing_deadce):
5382         Convert to new instruction lists.
5383         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
5384         peephole_pass, NEW_INS, mono_arch_lowering_pass,
5385         mono_arch_local_regalloc, mono_arch_output_basic_block):
5386         Likewise.
5387         (insert_after_ins): Delete.
5388         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
5389         peephole_pass, mono_arch_output_basic_block): Convert to
5390         new instruction lists.
5391         * mini-codegen (InstList, inst_list_prepend,
5392         insert_after_ins): Delete.
5393         (insert_before_ins, get_register_force_spilling,
5394         get_register_spilling, free_up_ireg, free_up_reg,
5395         create_copy_ins, create_spilled_store, alloc_int_reg,
5396         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
5397         to new instruction lists.
5398         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
5399         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5400         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
5401         (insert_after_ins): Delete.
5402         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
5403         mono_arch_local_regalloc, mono_arch_output_basic_block,
5404         mono_arch_call_opcode): Convert to new instruction lists.
5405         (insert_after_ins): Delete.
5406         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
5407         peephole_pass, mono_arch_output_basic_block,
5408         mono_arch_emit_prolog): Convert to new instruction lists.
5410 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
5412         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
5414         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
5415         Fixes #353182.
5417         * Makefile.am (version.h): Make this work with non-bash shells.
5419 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
5421         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
5423 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
5425         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
5426         the InitializeArray optimization.
5428 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
5430         * mini.c driver.c: Don't include os/gc_wrapper.h.
5432 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
5434         * mini.c (print_jit_stats): Print GC statistics if available.
5436 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
5438         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
5440 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
5442         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
5444 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
5446         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
5447         
5448         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5450         * driver.c (mono_main): Ditto.
5452 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
5454         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
5456         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
5457         in the vtable can't be encoded.
5458         (compile_method): Ditto.
5460 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
5462         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
5463         defined.
5465         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
5466         lmf->rbp.
5468         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
5469         the top LMF entry belongs to the current method.
5471         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
5473 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
5475         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
5476         
5477         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
5479         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
5481         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
5483         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
5485         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
5486         implementation.
5488         * basic-float.cs: Add an ulong->double cast test.
5490 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
5492         * mini.c (mono_method_to_ir): Fix a warning.
5494 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
5496         * mini-ops.h: Add OP_SWITCH.
5498         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
5499         CEE_SWITCH in back-end code, use OP_SWITCH instead.
5501 2007-12-11  Geoff Norton  <gnorton@novell.com>
5503         * mini-s390x.c: Minor change to the MAX() define to allow
5504         it to compile with other gcc versions.
5506 2007-12-11  Geoff Norton  <gnorton@novell.com>
5508         * cpu-s390x.md:
5509         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
5511 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5513         exceptions-arm.c (mono_arch_get_restore_context): Restore
5514         the frame pointer.
5516         exceptions-arm.c (throw_exception): Save the frame pointer.
5517         This is a partial fix for #323747. Only the client side is
5518         fixed.
5520 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5522         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
5523         was using an unrelated variable to log the class which
5524         needed the cctor to be called. This was crashing on arm.
5526 2007-12-09  Robert Jordan  <robertj@gmx.net>
5528         * mini-x86.c (mono_arch_emit_epilog):
5529         Consider all kinds of 64-bit types. Fixes #323114.
5531 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
5533         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
5535 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5537         * mini-amd64.c (peephole_pass): Add a missing instruction check.
5539 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5541         * mini.c: run type ctor before allocating an object, not only
5542         when running it's constructor method (fixes at least part of bug #342507).
5544 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5545         
5546         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
5547         
5548         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
5549         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
5550         function.
5552         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
5553         mono_generic_class_init_trampoline () the same as it is done with the other
5554         trampolines.
5556         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
5557         aot-runtime.c aot-compiler.c: Implement AOT support.    
5559 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5561         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
5562         build for archs which don't have the vtable trampoline defined
5563         yet.
5565 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5567         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
5569         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
5571         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
5573         * tramp-<ARCH>.c: Use the new helper function.
5575 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5577         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
5578         trampoline call, which takes a vtable argument.
5580         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
5581         OP_TRAMPCALL_VTABLEs like other calls.
5583         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
5584         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
5585         call.  Implemented a support function which fetches the vtable
5586         from a register set.
5588         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
5589         Implemented a generic class init trampoline, using the
5590         OP_TRAMPCALL_VTABLE opcode.
5592         * mini.c: Implemented static field access when sharing generic
5593         code.  This implies initing the class using the new
5594         OP_TRAMPCALL_VTABLE call.
5596 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5598         * mini.c: Don't compile methods with sharing enabled if their
5599         classes are disabled for sharing.
5601 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5603         * inssel.brg: Add a missing sign extension to the GETCHR and array access
5604         opcodes. Fixes #346563.
5606         * objects.cs: Add a new test.
5608         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5610         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5611         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5613 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5615         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5617 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
5619         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5620         code stream.
5622 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
5624         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5626         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
5627         optimization in the AOT case.
5628         
5629 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
5631         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5632         
5633         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5635         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5637         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5639         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5640         is created by the inlined delegate ctor.
5642         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
5644         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5646 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
5648         * cpu-x86.md: Fix the length of ckfinite.
5650 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
5652         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5653         
5654         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5655         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5657         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5659         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
5660         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5662 2007-11-28  Martin Baulig  <martin@ximian.com>
5664         * mini-x86.c
5665         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5666         after creating the trampoline.
5668 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
5670         * aot-runtime.c (load_aot_module): Check runtime version if needed.
5672         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5673         the same version.
5675         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5676         instead of the calling method to help AOT.
5678         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5680 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
5682         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5683         is defined.
5685 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
5687         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5688         
5689         * aot-compiler.c (compile_method): Correct check for generic method definitions.
5690         (encode_method_ref): No need to handle generic method definitions specially.
5692         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5694         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
5695         decode_klass_info.
5697         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5698         encode_klass_info.
5699         (compile_method): Enable generic sharing.
5701 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
5703         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5704         (mini_method_compile): Add preliminary support for AOTing shared generic code.
5706         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5707         generic code.
5709         * mini-trampolines.c: Fix a warning.
5711         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5712         NEW_PCONST.
5713         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5714         (generic_class_is_reference_type): Remove unused function.
5716         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5717         in the generic vtable trampoline case.
5719         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
5720         
5721         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
5722         return an AOT method based on a vtable slot.
5724         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
5726         * mini.c (mini_get_vtable_trampoline): Export this.
5728 2007-11-22  Martin Baulig  <martin@ximian.com>
5730         * debug-debugger.h
5731         (MonoDebuggerInfo): Move `debugger_version' up.
5733 2007-11-22  Martin Baulig  <martin@ximian.com>
5735         * mini-amd64.c
5736         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5738         * mini-trampolines.c
5739         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5740         after compiling the method.
5742 2007-11-20  Martin Baulig  <martin@ximian.com>
5744         * debug-mini.c
5745         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5746         (mono_debugger_remove_breakpoint): Likewise.
5747         (mono_debugger_check_breakpoints): Likewise.
5749         * debug-debugger.c: Implement the new breakpoint interface here.
5751 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
5753         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5754         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5756         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
5758 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
5760         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5762         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5763         mini.c.
5765         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5766         mini.c.
5768         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5769         returning a vtype in a register.
5771         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5772         here from the arch specific code.
5774         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5775         mini.c.
5777         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5778         (mono_arch_emit_prolog): Increment maximum prolog size.
5780         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5781         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5783         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
5784         MonoGenericSharingContext.
5786         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
5787         MonoGenericSharingContext. Allocate memory from the cfg mempool.
5789 2007-11-15  Mark Probst  <mark.probst@gmail.com>
5791         * mini.c, mini.h, generic-sharing.c: Functions for producing code
5792         which extract fields out of the runtime generic context.  Full
5793         sharing of the NEWARR opcode.
5795 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5797         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
5798         --enable-minimal=ssa.
5800 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
5802         * mini-trampolines.c (mono_delegate_trampoline): Update after 
5803         mono_marshal_get_delegate_invoke () signature change.
5805 2007-11-13  Mark Probst  <mark.probst@gmail.com>
5807         * mini.c: Removed the shared context in favor of the generic
5808         sharing context.  Allocate the MonoJitInfo structure with room for
5809         the generic sharing context if it's needed.
5811         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
5812         domain-internals.h now.
5814         * mini-x86.c: Pass the generic sharing context to get_call_info ().
5816         * generic-sharing.c: Several changes for working without a shared
5817         context and instead operating on open types instead.
5819 2007-11-12  David S. Miller  <davem@davemloft.net>
5821        * inssel-sparc.brg: Fix double instruction emit.
5823 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
5825         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
5826         Get/Set/Address methods.
5827         
5828         * mini.c debug-debugger.c mini-trampolines.c: Update after 
5829         mono_marshal_get_delegate_invoke signature change.
5831 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5833         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
5834         This can happens with dynamic methods. Fixes the other bug in #322722.
5836 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5838         * tramp-arm.c (mono_arch_patch_callsite): Support patching
5839         BX call sequence.
5841         * mini-arm.c (arm_patch): Implement patching of BX call
5842         sequence. Fixes one of the bugs in #322722.
5844 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
5846        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
5847        under Linux.  We only need to flush every 32-byte cache line.    
5849 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
5851         * mini.c:
5852         move_basic_block_to_end: Add branches when needed, eventually creating
5853         a new BB.
5854         optimize_branches: added a parameter that tells if it's ok to create
5855         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5856         and avoid calling move_basic_block_to_end when it's not ok.
5857         Fixes bug 318677.
5859 2007-11-07  Mark Probst  <mark.probst@gmail.com>
5861         * mini.c: Abort inlining call to InitializeArray if something
5862         looks wrong.  Let the icall handle it, which now has proper safety
5863         checks.
5865 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5867         * mini.c (mono_spill_call): add support for soft-float.
5869         * mini.c (mono_method_to_ir): add support for soft-float
5870         to inlined functions that return float.
5872         * mini.c (mono_method_to_ir): add support for soft-float
5873         to cee_stsfld opcode on float fields.
5875 2007-11-05  Geoff Norton  <gnorton@novell.com>
5877         * mini-x86.h: Fix the structure access for X86 Leopard.
5880 2007-11-05  Martin Baulig  <martin@ximian.com>
5882         * mini-trampolines.c
5883         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5884         after compiling the method to notify the debugger.
5886 2007-11-05  Martin Baulig  <martin@ximian.com>
5888         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5890 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
5892         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5893         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5895 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
5897         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5898         native-to-managed wrappers.
5899         
5900 2007-11-01  Geoff Norton  <gnorton@novell.com>
5902         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
5903         members.
5905 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5907         * mini.c, mini-x86.c: when getting back from unmanaged code
5908         to managed via a marshaled delegate we also need to set the
5909         right domain.
5911 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5913         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5914         for amd64.
5916 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5918         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5919         let the debugger or other external agents to tell the JIT when
5920         a sw breakpoint has been inserted in the code that the JIT needs
5921         to be able to inspect.
5923 2007-10-31  Martin Baulig  <martin@ximian.com>
5925         * debug-debugger.h
5926         (MonoDebuggerInfo): Remove `runtime_class_init'.
5928 2007-10-30  Martin Baulig  <martin@ximian.com>
5930         * debug-mini.h
5931         (mono_debugger_thread_created): Added `MonoThread *' argument.
5932         (mono_debugger_extended_notification): New public method.
5933         (mono_debugger_trampoline_compiled): New public method.
5935         * debug-mini.c
5936         (MonoDebuggerThreadInfo): Added `thread' and
5937         `extended_notifications' fields.
5939         * debug-debugger.c
5940         (debugger_executable_code_buffer): New static variable.
5942         * debug-debugger.h
5943         (MonoDebuggerInfo): Added `executable_code_buffer',
5944         `executable_code_buffer_size', `breakpoint_info_area',
5945         `breakpoint_table' and `breakpoint_table_size'.
5947 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
5949         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5950         that IP  either is an unused value or the vtable pointer. IMT 
5951         calls use vtable + offset now. Reduced by almost half the size
5952         of IMT entries.
5954 2007-10-26  Jonathan Chambers <joncham@gmail.com>
5956         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5957         defines to access param registers. Replace long usage with
5958         gsize as sizeof(long) != sizeof(void*) on Win64.
5960         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5961         on Win64. Fix intrinsic, use _AddressOfReturnAddress
5962         instead of non-existant _GetAddressOfReturnAddress.
5964         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
5965         param registers. Save/restore %rdi and %rsi in MonoLMF.
5967         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
5968         param registers. Modify (throw_exception) signature to take 
5969         %rdi and %rsi on Win64. 
5971         Code is contributed under MIT/X11 license.
5973 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5975         * helpers.c: unlink debugging output files.
5977 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
5979         * mini.c: Move mono_create_ftnptr () to object.c.
5981 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5983         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5984         optional. This function can now be used to disassemble code generated
5985         outside the JIT such as trampolines and IMT thunks.
5987         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5989         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5990         vtable pointer from a ldr instruction.
5992         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5993         new IMT call sequence.
5995         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5996         call sequence for interface invocations.
5998         * mini-arm.c (mono_arch_emit_imt_argument): added, required
5999         for imt support. This function is empty since IMT on ARM requires no
6000         special handling on the IR side.
6002         * mini-arm.c (mono_arch_find_imt_method): added, required for
6003         imt support.
6005         * mini-arm.c (mono_arch_find_this_argument): added, required
6006         for imt support.
6008         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
6009         a ldr instruction to load a value stored in the code stream.
6011         * mini-arm.c (mono_arch_build_imt_thunk):added, required
6012         for imt support.
6015 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
6017         * mini.c (mini_init): Install the jump trampoline callback.
6019 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6021         * mini-trampolines.c: handle synchronized methods with the common
6022         vtable trampoline (bug #335601).
6024 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
6026         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
6028         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
6029         64 bit platforms.
6031         * mini-ia64.h mini-ia64.c: Add support for IMT.
6033         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
6034         prolog. Fixes #331958.
6036 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
6038         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
6040 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6042         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
6043         trampoline.
6045 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6047         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
6048         trampoline.
6050 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
6052         * mini-x86.c, mini-x86.h: x86 support for the common vtable
6053         trampoline.
6055 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6057         * mini-trampolines.c: changed the magic rampoline to understand
6058         the common vtable trampoline method: the method to invoke is
6059         determined by the vtable displacement of the call.
6061 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6063         * mini.c, mini.h: register the common vtable trampoline if the
6064         architecture supports it.
6066 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6068         * cpu-amd64.md: use the correct max length for tls_get.
6070 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
6072         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
6073         CEE_STELEM_ANY. Fixes #333696.
6075 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6077         * exceptions-x86.c: provide more graceful handling of the case where
6078         we followed a bogus function pointer from managed code (bug #332866).
6080 2007-10-11  Mark Probst  <mark.probst@gmail.com>
6082         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
6083         replaces the generic_shared flag and will carry more information
6084         in the future.
6086         * generic-sharing.c: Added mini_type_stack_size() which allows
6087         allows open types if given a generic sharing context.
6088         mini_get_basic_type_from_generic() takes a
6089         MonoGenericSharingContext* instead of a MonoCompile* now.
6091         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
6092         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
6093         mini-sparc.c, mini-x86.c: Trivial changes required by the two
6094         changes above.  Just passing arguments through to the right
6095         places.
6097 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6099         * mini-arm.c: unify the call emission to emit_code_seq().
6101 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
6103         * tramp-arm.c: reduced the trampoline size.
6105 2007-10-10  Mark Probst  <mark.probst@gmail.com>
6107         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
6108         variable handling out of arch-specific code.
6110 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
6112         * mini-arm.c: implemented fast delegate dispatch.
6114 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6116         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
6117         that fp elimination is turned off if the space required by locals is too
6118         big. Fixes #331958.
6120 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6122         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
6123         ARM to the new style trampoline.
6125 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6127         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
6129         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
6131 2007-10-09  Martin Baulig  <martin@ximian.com>
6133         * debug-debugger.h
6134         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
6135         `field_info_offset_offset'.     
6137 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
6139         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
6140         removed more internal usage of the r11 register and made it available
6141         to the register allocator.
6143 2007-10-08  Mark Probst  <mark.probst@gmail.com>
6145         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
6146         when sharing generics and treat type variables as references.
6148 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6150         * mini-ppc.c: started removing the internal uses of register r11
6151         to eventually allow the register allocator to manage it as an
6152         additional available register.
6154 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6156         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
6158 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
6160         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
6161         specific trampolines as they are not performance critical as a jump
6162         target (maybe align as before only for AOT code?). This saves about
6163         200 KB of native code on x86 for monodevelop startup.
6165 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6167         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
6168         monodevelop startup.
6170 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
6172         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
6174         * mini-sparc.h mini-sparc.c: Implement IMT support.
6176         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
6177         its smaller and doesn't clobber sparc_g1.
6179         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
6181 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6183         * mini-ppc.c: optimized the size of the IMT thunks a bit.
6185 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6187         * mini-ppc.c: implemented fast delegate invocation.
6189 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
6191         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
6193 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6195         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
6196         code to the new style trampoline in preparation for IMT support.
6198 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6200         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
6201         systems already. This also reduces the specific trampiline sizes and
6202         prepares for the use of r12 as the IMT identifier register.
6204 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6206         * mini-mips.h: endianess fix (simplified from a patch by
6207         Thomas Kunze <thommy@tabao.de>, bug #323737).
6209 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6211         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
6212         to access ucontext fields and enable netbsd support
6213         (partially from Magnus Henoch <mange@freemail.hu>).
6215 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6217         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
6218         use the preprocessor from the CPP env var if it is set.
6220 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6222         * mini-trampolines.c: fixed an assertion and moved it earlier in the
6223         code, before interface_offset gets used.
6225 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
6227         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
6228         mono_class_setup_vtable () before accessing klass->vtable.
6230 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
6232         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
6233         hackish.
6235 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6237         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
6238         IMT slots (this saves hundreds of KB of memory in programs like
6239         IronPython and Monodevelop).
6241 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6243         * mini.c: print the delegate counter.
6245 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
6247         * mini-x86.c: make it easier to enable the debugging code for IMT
6248         slots.
6250 2007-09-28  Martin Baulig  <martin@ximian.com>
6252         * debug-debugger.h
6253         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
6254         `mono_method_klass_offset' and `mono_method_token_offset'.
6256 2007-09-20  Mark Probst  <mark.probst@gmail.com>
6258         * mini.c: First generics sharing implementation.  Can only share
6259         in very simple cases.  If sharing doesn't work it falls back to
6260         dedicated compilation.
6262         * mini.h: Flag in MonoCompile to specify whether generic
6263         compilation is shared.  Flags enum for marking which generic inst
6264         of a context is used.  Prototypes for helper functions.
6266         * generic-sharing.c: Helper functions for generic method sharing.
6268         * optflags-def.h: Optimization flag (gshared) for enabling generic
6269         method sharing added.
6271         * Makefile.am: generic-sharing.c added.
6273 2007-09-19 Daniel Nauck <dna@mono-project.de>
6275         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
6277 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
6278         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
6279         fixes bug 325507.
6281 2007-09-19  Martin Baulig  <martin@ximian.com>
6283         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
6284         mono_debug_cleanup() is now part of mono_cleanup().
6286 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
6288         * driver.c (mono_main): Fix a warning.
6290 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
6292         * aot-compiler.c: Optimize various parts when processing large assemblies.
6293         Fixes ##325568.
6295         * mini.c (mono_patch_info_hash): Improve hash function.
6297 2007-09-14  Jonathan Chambers <joncham@gmail.com>
6299         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
6300         
6301         Code is contributed under MIT/X11 license.
6303 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6305         * mini.c (mini_init): Fix a leak.
6307         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
6309 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6311         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
6313 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6315         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
6317 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
6319         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
6320         variance tests.
6322         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
6324         * mini.c (handle_alloc): Enable managed allocators in AOT code.
6326         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
6328         * aot-runtime.c (decode_patch_info): Ditto.
6330 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6332         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
6333         static case. Cache delegates in architecture specific code, 
6334         based on number of parameters.
6335         
6336         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
6337         in architecture specific code, based on number of parameters.
6338         
6339         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
6340         caching happen in architecture specific code now.
6341         
6342         Code is contributed under MIT/X11 license.
6344 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6346         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
6347         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
6348         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
6350         Code is contributed under MIT/X11 license.
6352 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6353         * mini.c: (mono_thread_abort) Fixed bug #82416.
6355 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6357         * mini.: hook the new managed GC allocation feature into the JIT.
6359 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6361         * mini.c: implementation for the new runtime tls opcode.
6363 2007-09-11  Martin Baulig  <martin@ximian.com>
6365         * debug-debugger.h
6366         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
6367         `mono_method_inflated_offset'.
6369 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
6371         * driver.c mini.h mini.c: Add a new devel command line option for injecting
6372         async exceptions into a method.
6374         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
6375         purpose of testing whenever the unwinder works at every instruction.
6377 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
6379         * mini.c: check accessibility of method used in ldftn (fixes
6380         bug #82635).
6382 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
6384         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
6386         * inssel.brg: Fix a warning.
6388 2007-09-03  Martin Baulig  <martin@ximian.com>
6390         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
6391         now takes the `main_method' as argument.
6393 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
6395         * cpu-sparc.md (endfilter): Add missing src1:i argument.
6397 2007-08-30  Jonathan Chambers <joncham@gmail.com>
6399         * driver.c: include the cil-coff.h header on Windows.
6400         
6401         Code is contributed under MIT/X11 license.
6403 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6405         * mini.c, driver.c: don't include the cil-coff.h header.
6407 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6409         * mini.c: flag places that needs fixes fo soft-float support.
6411 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
6413         * mini.h, inssel-float.brg: fix soft-float constant loads on big
6414         endian systems (partially from Dean Jenkins, bug #81924).
6416 2007-08-28  Mark Probst  <mark.probst@gmail.com>
6418         * mini.c (check_linkdemand): Remove embedded reference object in
6419         call to LinkDemandSecurityException.
6420         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
6421         with an IntPtr instead of a reference object.
6423 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
6425         * mini.c (handle_initobj): Handle alignment properly.
6427         * inssel.brg (mini_emit_memset): Ditto. 
6429         * inssel.brg (mini_emit_memcpy): Ditto. 
6431         * inssel-sparc.brg: Ditto.              
6433         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
6435 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
6437         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
6438         exceptions raised in unmanaged code. Fixes part of #82594.
6440 2007-08-24  Mark Probst  <mark.probst@gmail.com>
6442         * mini.c (mono_method_to_ir), declsec.c
6443         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
6445 2007-08-22  Martin Baulig  <martin@ximian.com>
6447         * debug-mini.h
6448         (MonoDebuggerThreadInfo): New typedef.
6449         (mono_debugger_thread_table): New global variable.
6450         (mono_debugger_thread_created): New public function.
6451         (mono_debugger_thread_cleanup): New public function.
6453         * debug-debugger.h
6454         (MonoDebuggerInfo):
6455         - removed `get_current_thread' and `lookup_assembly'.
6456         - removed `data_table'.
6457         - added `thread_table'.
6459         * mini.c
6460         (mono_thread_start_cb): Call mono_debugger_thread_created().
6461         (mono_thread_attach_cb): Likewise.
6462         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
6463         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
6464         initial domain.
6466         * driver.c (mono_main): Move mono_debug_init() up, before calling
6467         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
6469 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6471         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
6472         together when passing several arguments of type double (gives a small
6473         speedup and saves a few bytes of generated code).
6475 2007-08-20  Jb Evain  <jbevain@novell.com>
6477         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
6479 2007-08-20  Jb Evain  <jbevain@novell.com>
6481         * mini.c (mono_method_to_ir): throw MethodAccessException
6482         and FieldAccessException instead of InvalidProgramException.
6484 2007-08-20  Mark Probst  <mark.probst@gmail.com>
6486         * mini.c: CoreCLR security checks.
6488         * mini.h: Removed MonoSecurityMode (moved to
6489         metadata/security-manager.h) and mono_security_mode global var
6490         (replaced by set/get functions in security-manager.h).
6492         * driver.c: Added "core-clr-test" security mode for testing.  Used
6493         set-function for setting security mode.
6495 2007-08-17  Mark Probst  <mark.probst@gmail.com>
6497         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
6498         the new jit_info_table.
6500         * driver.c: Test code for the new jit_info_table (enabled by the
6501         define MONO_JIT_INFO_TABLE_TEST).
6503 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
6505         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6506         detection of call <REG> instruction sequence. Fixes build on freebsd.
6508 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
6510         * mini-exceptions.c: Fix a warning.
6512 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
6514         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
6515         stack overflow handling code on amd64 too.
6517         * mini-exceptions.c (mono_setup_altstack): Make this use 
6518         mono_thread_get_stack_bounds ().
6520         * mini-x86.h: Disable sigaltstack on solaris x86.
6522 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
6524         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
6526 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
6528         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
6530 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
6532         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
6534         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
6536 2007-08-03  Neale Ferguson <neale@sinenomine.net>
6538         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
6539         due to alignment.
6541 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6543         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
6544         to be emitted (bug #82281).
6546 2007-08-01  Martin Baulig  <martin@ximian.com>
6548         Merged the `debugger-dublin' branch.
6550         * debug-debugger.h (MonoDebuggerInfo):
6551         Removed the `old_*' compatibility entries.
6552         Added `debugger_version' and `data_table'.
6553         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
6554         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
6556         * debug-mini.c
6557         (MiniDebugMethodBreakpointInfo): Add `address_list'.
6558         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
6559         instead of a `gconstpointer'.
6560         (mono_debugger_insert_method_breakpoint): Return a
6561         `MonoDebugMethodAddressList *'.
6563 2007-06-28  Martin Baulig  <martin@ximian.com>
6565         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6567 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
6569         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
6570         __builtin_frame_address () since it is broken on older gcc versions.
6572 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6574         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
6575         on the stack overflow handling and made the managed stack overflows
6576         catchable in most cases using soft guard pages.
6577         * exceptions-x86.c: added code to restore the protection in the soft
6578         guard pages at the end of exception handling.
6580 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
6582         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
6584 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6586         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
6587         exception handling.
6589 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6591         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
6592         signal handling support until it has been ported to the new mechanism.
6593         * mini.c: fixed stack overflow detection and use the new
6594         architecture code  to handle signals on the altstack.
6596 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6598         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
6599         stack overflows on the alt stack.
6601 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6603         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6604         stack overflows on the alt stack.
6606 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6608         * exceptions-ppc.c: cleanup preparing for altstack support.
6610 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6612         * exceptions-arm.c: cleanup preparing for altstack support.
6614 2007-07-27  Mark Probst  <mark.probst@gmail.com>
6616         * mini.c (print_jit_stats): Output hazard pointer stats.
6618 2007-07-26  Mark Probst  <mark.probst@gmail.com>
6620         * driver.c, mini.c: Replaced security mode flags with a single
6621         enum variable.
6623 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6625         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6627 2007-07-25  Mark Probst  <mark.probst@gmail.com>
6629         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6630         (which doesn't do anything yet) for activating Core CLR
6631         (Silverlight) security.
6633 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6635         * mini-codegen.c: work around a possible gcc bug on arm.
6637 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6639         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6640         message for platforms that don't support AOT compilation.
6642 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6644         * mini.h, mini.c, driver.c: temporary smcs hack.
6646 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6648         * mini-arm.h, mini-arm.c: arm EABI fixes.
6650 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
6652         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6653         case.
6655         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6656         trampolines taking a method argument.
6658         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6660         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6661         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6663         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6664         JIT compilation throws an exception. Fixes #82050.
6666 2007-07-19  Mark Probst  <mark.probst@gmail.com>
6668         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6669         with the MONO_EXCEPTION_ defines.
6671 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
6673         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6674         #82117.
6675         
6676         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6677         the cause of an assertion.
6679 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6681         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6682         removed.
6684 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
6686         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6687         assert. Should fix #82103.
6689 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
6691         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6692         here too. Fixes #82095.
6694         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6695         addresses.
6697         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6699         * mini-amd64.h: Enable IMT for amd64.
6700         
6701         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6703 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
6705         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6707 2007-07-12  Mark Probst  <mark.probst@gmail.com>
6709         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6710         as soon as check_linkdemand sets an exception_type.
6712 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6714         * mini-x86.c: fixed offsets for IMT call sequence.
6715         * mini-x86.h: enable IMT again.
6717 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6719         * trace.c (mono_trace_enter_method): Decode MonoType too.
6721         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
6723         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
6725         * mini-amd64.c: Add preliminary IMT implementation.
6726         
6727 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6729         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6730         understand the new IMT-base interface invocation (thanks to
6731         Daniel Nauck for the report and the remote debugging session).
6733 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6735         * mini-x86.c: size and speed optimizations for the IMT bsearch.
6737 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6739         * Makefile.am (aotcheck): Make this actually use the AOTed code.
6741 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6743         * mini-trampolines.c: implement AOT IMT support.
6744         * mini-x86.h: enable IMT support for wider testing.
6746 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6748         * inssel.brg (emit_imt_argument): Add aot support here.
6750         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6752 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6754         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6755         of the IMT implementation, partially from massi, with my
6756         implementation of the bsearch sequence. Disabled by default until
6757         the AOT code is implemented.
6759 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6761         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6763         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6765 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6767         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6768         arch-independent IMT JIT code from Massimiliano
6769         Mantione (massi@ximian.com) with small cleanups from me.
6771 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6773         * Makefile.am: fix svn invocation to get the svn revision to be
6774         independent of the local language (build fix).
6776 2007-07-09  Mark Probst  <mark.probst@gmail.com>
6778         * mini.c (inline_method): Reset cfg->exception_type if the
6779         inlining is aborted.  Fixes: 82049.
6781 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6783         * mini.c: remove assert from exception handling code when exception_ptr
6784         is not set.
6786 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6788         * mini.c (mono_codegen): Add an assert.
6790         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
6791         enter and leave code.
6792         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
6794 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6796         * mini-ppc.c: fixed memory corruption for localloc(0)
6797         (bug #81852).
6799 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6800         
6801         * mini.c: Fix warnings.
6803 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6805         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
6806         to emit better double->int conversions.
6808 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6810         * mini.c: the provided Min/Max optimizations are valid for unisgned
6811         ints.
6813 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
6815         * 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
6817 2007-06-28  Miguel de Icaza  <miguel@novell.com>
6819         * mini.c (mono_running_on_valgrind): Add support for reporting the
6820         method and  its boundaries to valgrind.
6822 2007-06-28  Martin Baulig  <martin@ximian.com>
6824         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6826 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
6828         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
6830         * generic.2.cs: Add new test case.
6832 2007-06-25  Martin Baulig  <martin@ximian.com>
6834         Merged the `debugger-dublin' branch.
6836         * debug-mini.c
6837         (mono_debugger_insert_method_breakpoint): New public method.
6838         (mono_debugger_remove_method_breakpoint): Likewise.
6839         (mono_debugger_check_breakpoints): New static method.
6840         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
6842         * debug-debugger.h (MonoDebuggerInfo):
6843         Renamed (to keep backward compatibility in the vtable):
6844         `insert_breakpoint' -> `old_insert_breakpoint'.
6845         `remove_breakpoint' -> `old_remove_breakpoint'.
6846         `create_string' -> `old_create_string'.
6847         `lookup_class' -> `old_lookup_class'.
6848         `lookup_type' -> removed; changed into a dummy field.
6849         `lookup_assembly' -> `old_lookup_assembly'.
6850         Added (same functionality, but different signature):
6851         `create_string', `lookup_class', `lookup_assembly'
6852         Added new:
6853         `get_method_addr_or_bpt', `remove_method_breakpoint',
6854         `runtime_class_init'.
6856         * debug-debugger.c: Merged the `debugger-dublin' branch.
6858 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
6860         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6861         well.
6862         (peephole_pass): Likewise.
6864 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6866         * driver.c: hopefully make setaffinity work also for ancient
6867         versions of linux.
6869 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
6871         * driver.c : win32 build fix.
6873 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6875         * driver.c: check for the MONO_NO_SMP env var and bind to a single
6876         processor if it is set.
6878 2007-06-21  Martin Baulig  <martin@ximian.com>
6880         * debug-mini.h: New file.
6882         * debug-mini.c
6883         (mono_debugger_insert_breakpoint_full): Moved here from
6884         ../metadata/mono-debug-debugger.c.
6885         (mono_debugger_remove_breakpoint): Likewise.
6886         (mono_debugger_breakpoint_callback): Likewise.
6888 2007-06-15  Raja R Harinath  <rharinath@novell.com>
6890         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6891         changes in MonoGenericClass.
6893 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
6895         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6897 2007-06-14  Raja R Harinath  <rharinath@novell.com>
6899         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6900         removal of MonoGenericMethod.
6902 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6904         * mini-exceptions.c: hooks for the exception events profiling API.
6906 2007-06-14  Randolph Chung  <tausq@debian.org>
6908         * Makefile.ma: Add hppa target.
6909         * mini-arch.h: Include mini-hppa.h
6910         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6911         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6912         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6914 2007-06-14  Randolph Chung  <tausq@debian.org>
6916         * inssel.brg: Add rules for "chained" compare-branch operations so that
6917         a single compare op can affect multiple branches.  Adjust cost for
6918         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6919         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
6920         cost for some rules so that they can more easily be overridden by
6921         per-arch rules (with fixes from lupus).
6922         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6924 2007-06-13  Randolph Chung  <tausq@debian.org>
6926         * mini-ops.h: Reorder branch ops so that they match the order of the
6927         corresponding CEE_* ops.  The code expects them this way.
6928         Add new ops for HPPA target.
6929         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6931 2007-06-13  Randolph Chung  <tausq@debian.org>
6933         * mini-exceptions.c: Handle cases where the stack grows towards
6934         larger addresses.
6935         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6937 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6939         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6940         counter.
6941         * driver.c: explain where a non-matching corlib is found.
6943 2007-06-13  Mark Probst  <mark.probst@gmail.com>
6945         * mini.c (print_jit_stats): Output dynamic code allocation stats.
6947 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
6949         * mini-exceptions.c: Generate a method profile leave event during
6950         an exception to ensure that the profiler gets notified.
6952 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
6954         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
6955         branch.
6957         * cpu-amd64.md: Add long_and/or/xor opcodes.
6959 2007-06-06  Wade Berrier  <wberrier@novell.com>
6961         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6962         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
6963         length of instruction shr_imm (expected 8, got 10)
6965 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
6967         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6969 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6971         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6972         MonoInternalHashTable again (fixed bug in the internal hash table
6973         code).
6975 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6977         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6978         Have to figure out what makes it crash the SWF regression.
6980 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
6982         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6984 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6986         * mini.c: optimize out the type check when storing null in a
6987         reference array.
6989 2007-06-04  Mark Probst  <mark.probst@gmail.com>
6991         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6992         MonoInternalHashTable.
6994 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6996         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6997         signed integer methods.
6999 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
7001         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
7002         permanently since the current approach doesn't work.
7004 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
7006         * inssel.brg (stmt): Only call delegate->invoke_impl if 
7007         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
7009 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
7011         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
7012         the sreg2==rdx case.
7013         
7014         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
7015         account if it contains a rex prefix.
7016         (peephole_pass): Handle OP_FMOVE as well.
7018 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
7020         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
7021         as it causes regressions.
7023 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
7025         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
7026         static case as well.
7028         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
7030         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7031         (mono_arch_get_this_arg_from_call): Ditto.
7033         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
7035         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
7036         invoke_impl field.
7038         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7039         (mono_arch_get_this_arg_from_call): Ditto.
7041         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
7042         
7043         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
7044         try to create optimized invoke code and use that for further invocations. 
7045         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
7047         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
7049 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
7051         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
7052         sealed classes or methods.
7053         *devirtualization.cs: tests for the new optimization
7055 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
7057         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
7058         by the update_volatile () function.
7060 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
7062         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
7063         require it.
7065         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
7067 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
7069         * mini.c: Add configure checks for header files.
7070         * mini-x86.c: Add configure checks for header files.
7071         * trace.c: Add configure checks for header files.
7072         * aot-runtime.c: Add configure checks for header files.
7073         * aot-compiler.c: Add configure checks for header files.
7074         * driver.c: Add configure checks for header files.
7075         * mini-codegen.c: Add configure checks for header files.
7076         
7077         Code is contributed under MIT/X11 license.
7079 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
7081         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
7082         icompare_imm -128 + op_iclt. Fixes #81703.
7084 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
7086         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
7088 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
7090         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
7091         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
7092         so that all isinst checks now use "interface_bitmap".
7094 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
7096         * cpu-amd64.md (jmp): Fix a warning.
7098         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
7100         * basic.cs: Add new regression test.
7102         * basic.cs: Remove test which is now in basic-long.cs.
7104         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
7106         * basic-long.cs: Add new test.
7107         
7108 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
7110         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
7112 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
7114         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
7116         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
7117         places.
7118         
7119         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
7120         throwing code a bit.
7122         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
7123         the exception throwing code a bit.
7125         * mini-x86.c (get_call_info): Allocate result from a mempool.
7127 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
7129         * aot-compiler.c (find_typespec_for_class): Fix the assert.
7131         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
7133         * mini.h (MonoCompile): Add 'token_info_hash' field.
7135         * mini.c: Save token->method associations during compilation so the AOT 
7136         compiler can use it.
7137         
7138         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
7139         which reference generic classes and methods.
7141 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
7143         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
7145         * aot-compiler.c (compile_method): Fix a typo in a comment.
7147         * aot-runtime.c (decode_cached_class_info): Skip generic types.
7149         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
7150         everything generic.
7152         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
7154 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
7156         * mini.h (MonoCompile): Add 'args' field.
7158         * mini.c (mono_compile_create_vars): Store variables representing the arguments
7159         into cfg->args.
7161         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
7163 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
7165         * mini.c (mono_compile_get_interface_var): Remove this unused function.
7167         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
7169         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
7170         opcodes for some opcodes.
7172         * mini.h *.brg *.c: Use the new opcodes.
7174 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
7176         * mini.h: Bumped aot revision.
7178         * inssel.brg: modified code generation of type checks for interfaces
7179         to use the new "MonoClass.interface_bitmap" instead of the old
7180         "MonoClass.interface_offsets".
7182 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
7184         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
7186 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
7188         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
7189         64 bit platforms.
7191 2007-04-27  Neale Ferguson <neale@sinenomine.net>
7193         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
7195 2007-04-27  Wade Berrier  <wberrier@novell.com>
7197         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
7198         mini.h) to fix build.
7200 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
7202         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
7203         
7204         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
7205         causes the corlib unit tests to fail.
7207 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
7209         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
7211         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
7213         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
7214         opcodes to the comparison relations.
7216         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
7217         opcodes to their types.
7218         
7219         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
7221         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
7222         it in cfg->arch.cinfo.
7224         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
7226         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
7227         cfg->cil_offset_to_bb.
7229 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
7231         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
7232         created becase of initlocals.
7234 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
7236         * mini-alpha.c cpu-alpha.md: More alpha port work from 
7237         Sergey Tikhonov <tsv@solvo.ru>.
7239 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
7241         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
7243 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
7245         * cpu-s390.md (break): Correct the length of break instruction.
7247 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7249         * mini.c: fix a couple of soft-float issues and comments.
7251 2007-04-15  Miguel de Icaza  <miguel@novell.com>
7253         * trace.c (is_filenamechar): - is also a filename char.
7255 2007-04-15  Neale Ferguson <neale@sinenomine.net>
7257         * mini-s390.c: Correct checking for enum type in return value processing.
7259 2007-04-14  Raja R Harinath  <rharinath@novell.com>
7261         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
7262         (version.h): Makefile is in the build directory.
7264 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
7266         * mini-amd64.h: fix for assertion failure on Solaris/amd64
7268 2007-04-11  Martin Baulig  <martin@ximian.com>
7270         * mini.c (can_access_member): Fix handling of generic classes;
7271         fixes #81259.
7273 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
7275         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
7277 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
7279         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
7281 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7283         * mini-codegen.c: make sure the right spill amount is
7284         used for fp or integer registers (fixes the float_sub_spill() on ppc).
7286 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
7288         * mini-ppc.c: fixes for the fp_branch_nan test.
7290 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
7292         * basic.cs: Comment out new test which still fails on ia64.
7294 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7296         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
7298 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7300         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
7302 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
7304         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
7305         on 64 bit machines. Fixes part of #80738.
7307         * basic.cs: Add regression test.
7309 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7311         * inssel.brg basic.cs: Revert previous change to fix build.
7313         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
7314         platforms.
7315         
7316         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
7318         * basic.cs: Add new regression test.
7320 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7322         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
7323         many arguments.
7325 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7327         * cpu-s390x.md: Correct length of break instruction.
7329 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7331         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
7332         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
7334 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
7336         * *.c: Begin WIN64 port.
7337         * mini.c:  Use correct register in profiler.
7338         * mini-amd64.c: No inline assembly on Win64.
7339         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
7340         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
7341         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
7342         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
7343         mono_arch_ip_from_context for Win64.
7344         
7345         Contributed under MIT/X11 license.
7347 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
7349         * exceptions-amd64.c (seh_handler): Ditto.
7351         * exceptions-x86.c (seh_handler): Fix a memory leak.
7353 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
7355         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
7356         mini-s390x.c: fixed peephole optimizations to deal
7357         correctly with 1 and 2 byte reload avoidance.
7359 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
7361         * cpu-s390.md, cpu-s390x.md: update localloc length.
7363 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7365         * cpu-g4.md: added missing descriptions.
7367 2007-03-14  Miguel de Icaza  <miguel@novell.com>
7369         *  Makefile.am: Add support so the tail tests are not executed on
7370         PowerPC as that is a known limitation of the PowerPC port.
7372 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7374         * runmdesc.bat:  Move to msvc directory.
7375         
7376 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7378         * runmdesc.bat:  Run executable that was produced by the current
7379         target and sent via an argument.
7380         
7381 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
7383         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
7384         #81102.
7386         * generics.2.cs: Add regression test.
7388 2007-03-09  Wade berrier  <wberrier@novell.com>
7390         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
7392 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
7394         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
7395         AOT code depends on this.
7397 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7399         * mini.c: more precise tracking of types in the eval stack
7400         (part of fix for bug #81044).
7402 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
7404         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
7406         * aot-compiler.c (encode_patch): Remove an obsolete comment.
7408 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
7410         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
7412         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
7414 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
7416         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
7417         a pointer on 64 bit systems. Fixes #80190.
7419         * iltests.il: Add new regression test.
7421 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7423         * mini.c: inline a constant for Environment.IsRunningOnWindows.
7425 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
7427         * trace.c: Remove an erroneous alignemnt check when tracing.
7428           Fixes --trace on OSX86.
7430 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7432         * mini-$(arch).h: initialize SP in context for all the archs.
7434 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
7436         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
7437         regressions in the thread tests.
7439 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
7441         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
7442         - fixed implementation of LOCALLOC opcode
7443         - implemented non-un compare for floats
7444         - code cleanup
7445         - implementation of FDIV and CKFINITE opcodes
7446         - fixes for latest mono updates
7447         - additional arch opcodes
7449 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7451         * Makefile.am: simplify and merge rules for cross-compilation.
7453 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
7455         * local-propagation.c: Actually *apply* the fix for bug 80591...
7457 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7459         * mini-exceptions.c: backuot part of the last change
7460         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
7462 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
7463         * inssel.brg: Fix bug 59286.
7466 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
7468         * mini-exceptions.c: patch from Zoltan to correctly check for
7469         stack boundaries (using the stack register, not the frame register),
7470         fixes bugs #80724, #79717.
7472 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
7474         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
7475         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
7477         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
7478         presence of frame pointer elimination.
7480 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
7481         
7482         * mini-x86.h: NetBSD UCONTEX_REG defines.
7484 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
7486         * inssel-amd64.brg: Fix amd64 build.
7488 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
7490         * mini.h: remove extern to workaround what looks likes gcc bug 26905
7491         on amd64.
7493 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
7495         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
7496         ends.
7498         * mini-<ARCH>.c: Use mono_is_regsize_var ().
7500 2007-01-30 Mark Mason <mason@broadcom.com>
7502            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
7503            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
7504            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
7505            beginning support for CEE_JMP [not quite working yet]
7506            * tramp-mips.c: LMF handling now works
7507         
7508 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
7510         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
7512         * mini.h (NULLIFY_INS): New macro.
7514 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7516         * mini.c: statistical profiler fix for windows, patch
7517         from Tor Lillqvist (tml@novell.com).
7519 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
7520         * local-propagation.c: Fix bug 80591.
7522 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7524         * Makefile.am: put back the --export-dynamic option as with
7525         the previous gmodule flags (thanks to Robert Jordan).
7527 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
7529         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
7531         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
7532         simplify and speed up the local register allocator. Also rename some fields
7533         like iassign->vassign.
7534         
7535         * regalloc.c: Remove some functions which are no longer used since their
7536         inlined version is in mini-codegen.c.
7537         
7538         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
7540         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
7542 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
7544         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
7545         narrowing. Fixes #80622.
7547         * iltests.il: Add new regresssion test. 
7549 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7551         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
7552         debug-debugger.c, debug-debugger.h: warning fixes.
7553         * driver.c: updated copyright year and made it fit in one line.
7555 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
7557         * aot-runtime.c: updated to use mono-dl instead of gmodule.
7559 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
7561         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
7563         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
7565         * iltests.il: Add new test for bug #80507.
7567 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7569         * mini-arm.h: use soft-float also on vfp for now.
7571 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7573         * mini.c: fix some more soft-float issues.
7575 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
7577         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
7579 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
7580         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
7581         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
7582         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
7584 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
7586         * mini-arm.c: typo fix.
7588 2007-01-23  Neale Ferguson <neale@sinenomine.net>
7590         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
7592 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
7594         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
7595         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
7597         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
7599         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
7601         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7602         
7603         * inssel.brg: Fix a warning.
7605         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7607         * abcremoval.c ssa.c ssapre.c: Update after this change.
7608         
7609         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7611         * dominators.c (df_set): Use mono_bitset_union_fast.    
7613 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7615         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7616         mini-codegen.c: reduce relocations and memory usage for the cpu
7617         description.
7619 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
7621         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7623         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7624         to reduce their size.
7626 2007-01-19 Mark Mason <mason@broadcom.com>
7628         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7629         * mini-mips.c: more configuration macros, support long conditional branches, additional
7630         asserts, fix epilog instrumentation.
7631         * mini-mips.h: use standard stack walk
7632         * cpu-mips.md: increase size of div, rem and conditional branches
7633         
7634 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7636         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7637         to cpu spec data.
7639 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
7641         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7642         (compile_method): Ditto.
7644         * aot-runtime.c (decode_klass_info): Ditto.
7646         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7647         needed by the code generated by inssel.brg. Also fix a warning.
7649 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7651         * mini.c: deal with enums that become genericinsts by
7652         being nested in a generic class (bug #79956).
7654 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7656         * mini.c: match the generic definition to check for
7657         private access with generic types (bug #78431).
7659 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7661         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7662         to make life easier for people cross-compiling that insist on not
7663         using scratchbox.
7665 2007-01-17 Mark Mason <mason@broadcom.com>
7667         * inssel-long.brg: patch to deal with mips missing flags
7668         * inssel-long32-mips.brg: implement overflow checks
7669         * insset-mips.brg: implement overflow checks
7670         * mini-mips.h: implement conditional exception handling
7671         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7672           Remove unused code, minor cleanups.
7673         * exceptions-mips.c: minor cleanups
7674         * mini-ops.h: add mips conditional exception ops
7675         * cpu-mips.md: add mips conditional exception ops
7677         
7678 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7680         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7681         to deal with mips missing of flags.
7683 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7685         * exceptions-ppc.c: execute fault handlers.
7687 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7689         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7691 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7693         * mini.c: handle also floating point values in initialize_array.
7695 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7697         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7698         array initialization and make it conditional on the intrins option.
7700 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7702         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7703         relocations and put the patch info names close to the enum definition.
7705 2007-01-15 Mark Mason <mason@broadcom.com>
7707         * basic.cs, exceptions.cs: break up large tests to increase debugability.
7709 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7711         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7713 2007-01-12  Raja R Harinath  <rharinath@novell.com>
7715         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7717 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7719         * Makefile.am: distribute the mips sources.
7721 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7723         * mini-codegen.h: handle bug #80489 here, by excluding ecx
7724         directly.
7726 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
7728         * cpu-x86.md: back out for now as this triggers other regressions.
7730 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7732         * cpu-x86.md: force src1 and dest regpair for long shift instructions
7733         to eax:edx, so ecx can't get allocated to them (bug #80489).
7735 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7737         * mini.c, mini-exceptions.c: enabled running fault handlers
7738         (bug #80469).
7740 2007-01-03  Miguel de Icaza  <miguel@novell.com>
7742         * driver.c: If nothing fail, do not use the string "failed",
7743         because it makes it very annoying to view test result logs on the
7744         web. 
7746 2006-12-30  Miguel de Icaza  <miguel@novell.com>
7748         * debug-debugger.c (mono_debugger_main): Rename "main" to
7749         "main_method" to prevent a warning.
7751         Remove a warning for unused field.
7753 2006-12-28  Martin Baulig  <martin@ximian.com>
7755         * debug-debugger.c
7756         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7758 2006-12-22  Martin Baulig  <martin@ximian.com>
7760         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7761         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7762         seperate `.mdb_debug_info' section, so we can access it from the
7763         debugger even if the binary is stripped.
7765         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7766         from the `.mdb_debug_info' here to prevent the linker from
7767         removing that section.
7769         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7770         mdb-debug-info64.s.
7772 2006-12-19  Robert Jordan  <robertj@gmx.net>
7774         * mini-x86: enable the code to return small structures in
7775         registers for FreeBSD as well. Fixes bug #80278.
7776         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7778 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7780         * mini-x86.c: align the stack when calling the profiler
7781         function instrumenting the prolog (on OSX).
7783 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7785         * mini.c: emit a break opcode where Debugger.Break () is called.
7787 2006-12-13  Miguel de Icaza  <miguel@novell.com>
7789         * mini.c (mono_method_to_ir): Provide useful information on this
7790         assert, to prevent others from debugging like I did.
7792 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7794         * mini.c: enable code which was incorrectly commented
7795         (bug #80235).
7797 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7799         * mini-x86.c: enable on OSX, too, the code to return small
7800         structures in registers.
7802 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7804         * mini-x86.c: remove the use of the dynamic code manager here, too.
7806 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7808         * mini.h, debug-debugger.c, tramp-*.c: fixed 
7809         mono_debugger_create_notification_function() to use
7810         mono_global_codeman_reserve () instead of a dynamic code manager.
7812 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
7814         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
7815         ves_array_element_address() jit icall and use a generated
7816         managed method instead (which is about 4 times faster for a rank 3
7817         array access).
7819 2006-11-29  Mark Mason  <mason@broadcom.com>
7821         * basic-calls.cs: additional tests for passing
7822         structures as function arguments.
7824 2006-11-29  Mark Mason  <mason@broadcom.com>
7826         * mini-mips.h: disable custom exception handling
7827         * mini-mips.c: throw/rethrow should use jalr to call
7828         exception stubs.  Fixed bug with passing structures
7829         by value. More support for tracing floating point
7830         functions.
7832 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7834         * mini.c: fixed typo in the soft-float ldind.r4 handling
7835         (bug #80086).
7837 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7839         * mini.c, mini.h, driver.c: added --runtime command line
7840         option to select a different runtime than the autodetected one.
7841         * jit.h: added API for embedders to initialize with a specific
7842         runtime version.
7844 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7846         * mini.c: handle also boxing of r4 values (bug #80024).
7848 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7850         * mini-ppc.c: force indirect calls until we reserve
7851         enough address space for all the generated code.
7853 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7855         * exceptions-arm.c: workaround bugs in the libc definition
7856         of struct ucontext.
7858 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7860         * inssel.brg: fixes from me and Mark Mason.
7862 2006-11-23  Dick Porter  <dick@ximian.com>
7864         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7865         semaphore display now we've fixed the initial value
7867 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7869         * inssel.brg: partially revert the last change to fix the build.
7871 2006-11-21  Mark Mason  <mason@broadcom.com>
7873         * inssel.brg: Add and use compare-and-branch macros to support
7874         architectures that do not have condition code registers (ie. MIPS).
7875         * *-mips.{c,brg,md}: Fix copyright statements
7877 2006-11-20  Mark Mason  <mason@broadcom.com>
7879         * Makefile.am: remove mini-codegen.c from list of MIPS sources
7880         * mini.c: Allow GET_CONTEXT to be specified by the arch port
7881         * mini.h: Added declaration for mono_print_ins()
7882         * mini-codegen.c: added ins_spec initializer for MIPS
7883         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7884         vreg to be virtual and hreg to be non-virtual.
7885         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7886         is not yet working/implemented correctly.
7887         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7888         non-static, fixup calls to print_ins() from other parts in the file.
7890 2006-11-20  Mark Mason  <mason@broadcom.com>
7892         * basic-calls.cs: added tests for passing structures as arguments
7893         to calls.
7895 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7897         * inssel-long32.brg: optimize signed division by power of two.
7899 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7901         * mini-arm.c: added support for interworking with thumb code
7902         (mono must be still be built using the ARM instruction encoding).
7904 2006-11-19  Miguel de Icaza  <miguel@novell.com>
7906         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7907         verifier has different rules for it.   Fixes a few verifier issues
7908         in the test suite.
7910         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7911         at the end, so people know what happened.
7913 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7915         * brach-opts.c: in optimize_exception_target() make sure we
7916         are in a catch clause (fixes bug #79871).
7918 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7920         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7921         more soft-float support fixes.
7923 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7925         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7926         that are passed half on the stack and half in registers.
7928 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7930         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7931         more mips integration work from Mark E Mason 
7932         <mark.e.mason@broadcom.com>.
7934 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7936         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7937         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7938         tramp-mips.c: added sources for the mips port, not
7939         integrated in the build yet. Contributed by
7940         Mark E Mason <mark.e.mason@broadcom.com>.
7942 2006-11-14  Neale Ferguson <neale@sinenomine.net>
7944         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7946 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7948         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7949         put the soft-float rules in its own file since it seems to
7950         break s390 compilation.
7952 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7954         * mini-arm.c: fixed wrnings.
7956 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7958         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7959         inssel-arm.brg: ARM support for soft-float.
7961 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7963         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7964         loads and stores of 32 bit fp values.
7966 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
7968         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7970         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7971         works. Fixes #79852 and #79463.
7973 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7975         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7976         more soft-float support WIP and fixes.
7978 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7980         * mini-arm.c: some VFP updates.
7982 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7984         * mini-exceptions.c: 0 is a valid local var offset in some
7985         architectures, don't assert (bug #78508).
7987 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7989         * exceptions-arm.c: fixed off by one error in stack walk code.
7991 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7993         * mini.h, mini.c: more precise tracking of type load exceptions.
7995 2006-11-03  Robert Jordan  <robertj@gmx.net>
7997         * Makefile.am: [WIN32] Add monow.exe target.
7998         * driver.c: [WIN32] Don't detach the console when debugging.
7999         Fixes bug #79797.
8000         
8001 2006-10-30  Miguel de Icaza  <miguel@novell.com>
8003         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
8005 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
8007         * aot-compiler.c (emit_method_info): Add a case missed earlier.
8009         * driver.c (mini_regression): Fix --regression with AOT.
8011         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
8013 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
8015         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
8017         * mini-sparc.h: Don't use sigaction on sparc/linux.
8019         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
8021         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
8023         * mini-exceptions.c: Add proper include files for getpid ().
8025 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
8027         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
8028         address instead of a MonoJitInfo* to avoid decoding the exception info for the
8029         method.
8031         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
8032         name cache to reduce its size.
8034         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8036 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
8038         * mini-x86.c: Save/restore the current LMF structure more efficiently using
8039         the mono_lmf TLS variable.
8041         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
8042         trampoline lmf frames.  
8044         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
8046 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
8048         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
8049         the mono_lmf TLS variable.
8051         * mini-exceptions.c: Access the LMF structure through accessors.
8053         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
8054         variable instead of in jit_tls->lmf.
8056         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
8057         
8058         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
8059         trampoline lmf frames.
8061         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
8063 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
8065        * mini.c trace.c mini-x86.c: Revert these too.
8066         
8067        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
8068        signature change.
8070 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
8072         * genmdesc.c: removed now dead code.
8074 2006-10-09  Robert Jordan <robertj@gmx.net>
8076         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
8078 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
8080         * mini.h: do not leave gaps in the opcode values.
8082 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
8084         * jit-icalls.h: flag functions as internal here, too.
8086 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
8088         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
8089         functions with the internal attribute.
8091 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
8093         * aot-compiler.c: fclose the file descriptor in the profile read loop.
8095 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
8097         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
8098         for soft-float.
8100 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
8102         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
8103         tail calls as on other platforms.
8105         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
8107         * iltests.il: Add a few tailcall tests.
8109 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8111         * driver.c: fix loop for old compilers (bug #79521).
8113 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
8115         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
8117         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
8119         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
8120         metadata without any code.
8122         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
8123         more precise debugging information using gdb.
8125 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
8127         * inssel-ia64.brg: Make the helper methods static.
8129 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8131         * inssel-x86.brg: make the helper methods static.
8133 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
8135         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
8137 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8139         * mini.c: updates for monoburg changes.
8140         * inssel.brg: make a few helper functions static as they should.
8142 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
8144         * Makefile.am: Move mini-codegen.c to common_sources.
8146 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8148         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
8149         instructions.
8150         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
8151         mini-ppc.h: port to use the common local register allocator.
8153 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8155         * mini.h: Remove the comment too then.
8157 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
8159         * mini.h: put back backend.data which is to be used shortly and
8160         doesn't increase the size of MonoInst. If any 64 bit arch aligned
8161         pointers on 4 byte boundaries it'd have much bigger issues running
8162         and you can ifdef it out anyway.
8164 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8166         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
8167         MonoInst size by 4 bytes on 64 bit machines.
8169 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8171         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
8172         replacement with more meaningful field names. Arch maintainers, please
8173         check the assigned names are good enough for your arch.
8175 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8177         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
8178         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
8180 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8182         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
8183         relocations and memory requirements, put the optimization flags
8184         definitions in their own file.
8186 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
8188         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
8190         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
8192 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
8194         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
8196 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
8198         * inssel.brg: use the correct function to get the size of an item
8199         in an array, given an element class.
8200         * aot-compiler.c: do not access class->class_size directly.
8202 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8204         * mini.h, debug-mini.c: added a debugging function to print
8205         info about local variables and arguments in a jitted method.
8207 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
8209         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8211         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
8213 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8215         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
8216         inner and outer loops when passing vtypes.
8218 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
8220         * mini-ppc.c: take into account the cpu errata for cache flushing
8221         which caused some random errors (bug #79381).
8223 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8225         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
8226         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
8228 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
8230         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
8231         loaded.
8233         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
8234         freebsd ports tree.
8236         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
8237         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
8239         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
8240         displacement.
8242 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
8244         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
8246 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
8248         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
8249         macro does not have to be changed during debugging.
8251         * 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>.
8253         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
8255         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
8256         
8257         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
8258         MONO_ARCH_NO_EMULATE_MUL is defined.
8260         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
8262         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
8264         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
8266         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
8267         
8268 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
8270         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
8271         stuff to mini-exceptions.c where it is used.
8273         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
8274         setup code, the real one is in mini-exceptions.c.
8276         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
8277         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
8278         some changes from the freebsd ports tree.
8280         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
8281         constants.
8282         
8283         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
8285 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
8287         * mini.c: on Linux, check for /proc to be mounted
8288         (bug# 79351, novell bug#201204).
8290 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
8292         * mini.c: handle cases where pthread_attr_getstack() behaves
8293         incorrectly (bug #78096).
8295 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
8297         * mini-arm.c: support larger stack frames (bug #79272).
8299 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
8301         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
8303         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
8304         tokens.
8306         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
8307         mono_class_from_name () to find a class from its name.
8309         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
8311 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
8313         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
8315 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
8317         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
8319 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
8321         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
8322         callinfo->trampoline.
8324         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
8325         fixes #79271.
8326         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
8327         future.
8329 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
8331         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
8333 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
8335         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
8336         stats.method_trampolines, it is already done by the generic trampoline code.
8338         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
8339         
8340 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
8342         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
8344         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
8346         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
8348         * mini.c (print_jit_stats): Print mscorlib mempool size too.
8349         
8350         * mini.c (print_jit_stats): Print new stats.
8352         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8354 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
8356         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
8357         Address on two dimensional arrays. Fixes #78729.
8359         * mini.h (MonoCompile): Add a 'skip_visibility' field.
8361         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
8362         a method.
8364         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
8366         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
8367         #79130.
8368         
8369         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
8370         a race condition.
8371         (mini_get_ldelema_ins): Ditto.
8373 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
8375         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
8376         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
8377         Fixes #79213.
8379 2006-08-29 Neale Ferguson <neale@sinenomine.net>
8381         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
8382         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
8384         * exceptions-s390x.c: Cosmetic change.
8386         * tramp-s390.c: Fix warning.
8388         * cpu-s390.md: Correct length of mul_imm.
8390 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8392         * aot-compiler.c: added binary writer with ELF backend
8393         implementation (only on Linux/x86 for now).
8395 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8397         * Makefile.am: Don't run net 2.0 AOT tests.
8399         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
8400         (mono_compile_assembly): Skip net 2.0 assemblies as well.
8402         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
8404 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8406         * aot-compiler.c: simplified and refactored the asm-writing code
8407         to allow different backends.
8409 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8411         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8413         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
8414         little. Share patches of type TYPE_FROM_HANDLE as well.
8416         * mini.c (mono_patch_info_equal): New helper function.
8417         (mono_patch_info_hash): Ditto.
8419         * aot-compiler.c (emit_method_code): Fix s390 build.
8421         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
8422         is not handled because it is stored as a flag and not as a type ctor. Fixes
8423         #79016.
8425 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
8427         * aot-compiler.c: Fix computation of GOT slot statistics.
8428         
8429         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
8430         Also remove support for not PIC AOT.
8432         * mini.h: Bump AOT file format version.
8434         * objects.cs: Add a test for #78990.
8436         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
8437         (peter.dettman@iinet.net.au). Fixes #79087.
8439         * basic-long.cs: Add a test for the above.
8441 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
8443         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
8444         
8445         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
8446         code somewhat.
8448 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
8450         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
8451         exceptions.
8453 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
8455         * mini.c: Don't verify COM proxy invoke calls
8456         
8458 2006-08-10  Dick Porter  <dick@ximian.com>
8460         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
8461         which process is holding semaphores locked.
8463 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
8465         * mini-ia64.c mini-amd64.c: Fix #79027.
8467         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
8469         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
8471         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
8472         implicit arguments in a vararg call. Fixes #79027.
8474 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
8476         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
8477         (mono_get_array_new_va_signature): Ditto.
8479 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
8481         * aot-runtime.c: Call init_plt lazily.
8483         * inssel-long.brg: Fix unsigned long->int conversion.
8485         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
8487         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
8488         that most data is now in the .rss/.data section.
8490 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
8492         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
8494         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
8496         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
8498         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
8500         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
8501         virtual call. Fixes #79010.
8503         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
8504         and use the result as the this argument in the real call.
8506         * generics.2.cs: Add a new test for #79010.
8507         
8508 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
8510         * mini-x86.c: Fix a warning.
8512         * aot-compiler.c: Add a bunch of statistics.
8514         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
8516 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
8518         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
8520 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
8522         * 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>.
8524 2006-07-13  Miguel de Icaza  <miguel@novell.com>
8526         * mini.c (mono_method_to_ir): Obtain the original method in the
8527         CIL stream and use this to perform validation.
8529         Fixed: #78816
8531 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
8533         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
8534         (mono_arch_call_opcode): Ditto.
8536         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
8537         #78826.
8539         * mini.c (mono_patch_info_dup_mp): New helper function.
8540         
8541         * aot-compiler.c (compile_method): Fix some of the memory allocated during
8542         compilation. Fixes #78827.
8544 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
8546         * declsec.c: Use original security informations for
8547           MONO_WRAPPER_MANAGED_TO_MANAGED.
8549 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
8551         * mini.c: Allow Com Interop methods/classes and
8552         don't verify COM wrapper calls
8553         
8555 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
8557         * inssel-long32.brg: Fix long->i4 checked conversion.
8559         * exceptions.cs: Add a test for the above.
8561 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
8563         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
8565         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
8566         leaks.
8568         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
8569         #78775.
8571 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
8573         * mini.c: Fix solaris/x86 exception handling.
8575         * Makefile.am: Get rid of $(ICU_LIBS).
8577 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
8579         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
8580         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
8581         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
8583         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
8585         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
8586         this function causes a SIGSEGV.
8588 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
8590         * mini.c: Remove unused solaris/x86 includes.
8592 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
8594         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
8596 2006-06-20  Jb Evain  <jbevain@gmail.com>
8598         * cpu-g4.md: fix max length of start_handler instruction.
8600 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
8601         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8603 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
8604         * ssa.c: Fixed bug 78653 for SSA based deadce.
8605         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8606         MonoInst.flags, used in SSA based deadce.
8607         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8608         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8610 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8612         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8613         it can end up using non executable memory on ppc64 systems
8614         running ppc32 userspace (fix from Johannes Berg).
8616 2006-06-14  Dick Porter  <dick@ximian.com>
8618         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8619         4.1.1
8621 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
8622         * mini.c: Made so that inline is locally disabled if it would
8623         trigger a .cctor, because too many apps depend on this behavior
8624         (which seems to be also the one of the MS CLR).
8626 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
8628         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8629         No idea why this worked before.
8631         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8632         which branch to outer exception clauses since they could skip the
8633         inner finally clauses. Fixes #78633.
8635         * exceptions.cs: Add a test for the above.
8637         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8638         Fixes #78629.
8640         * iltests.il: Add a test for the above.
8642 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
8644         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8645         after the end of a try bblock, to prevent asserts in mini_method_compile ().
8647         * iltests.il: Add a test for the above.
8649 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
8651         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8652         
8653         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8654         methods as instrinsics.
8656 2006-06-09  Wade Berrier <wberrier@novell.com>
8658         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8659         (simple-cee-ops.h ssapre-mini-ops.h)
8661 2006-06-09  Neale Ferguson <neale@sinenomine.net>
8663         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8664         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8665         instruction).
8666         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8667         * cpu-s390x.md: Fix max. length values for a couple of instructions.
8669 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
8671         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8673 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
8675         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8676         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8677         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8678         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8679         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8680         of opcodes, so that bug 78549 should not happen again.
8681         * ssapre.c: Updated to use the renamed files.
8683 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
8685         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
8686         in OP_ATOMIC_EXCHANGE_I4.
8688 2006-06-07  Wade Berrier <wberrier@novell.com>
8690         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
8691         in mono_debugger_create_notification_function)
8693 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
8695         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8696         
8697         * mini.c (type_from_stack_type): Disable some changes which do not
8698         seem to work.
8700         * driver.c: Reenable opts.
8702         * mini.h (MonoStackSlot): New structure to keep track of the verification state
8703         of the evaluation stack.
8704         
8705         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8706         evaluation stack trace at entry to the bblock.
8708         * mini.c (merge_stacks): New function to perform verification of stack merges.
8709         Turned off by default.
8711         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8712         STACK_MP.
8713         
8714 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
8716         * local-propagation.c: Fixed bug 78549.
8718 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
8720         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
8722 2006-06-02  Miguel de Icaza  <miguel@novell.com>
8724         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
8725         tramp-arm.c, tramp-ia64.c
8726         (mono_debugger_create_notification_function): Update signature to
8727         new signature and use new protocol for creating the notification
8728         function.  
8730         Should fix the build.
8732 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
8734         * exceptions-ppc.c (mono_jit_walk_stack)
8735         (ves_icall_get_frame_info): Fix the build
8737 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
8739         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8741 2006-05-31  Raja R Harinath  <rharinath@novell.com>
8743         * il2tests.2.il: New file for generics CIL tests.  Add test for
8744         #78019.
8745         * Makefile.am: Update.
8747         Fix #78019
8748         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8749         to nullable types.
8751 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
8753         * aliasing.c: Fixed bug 78311.
8755 2006-05-29  Martin Baulig  <martin@ximian.com>
8757         * mini-exceptions.c (mono_find_jit_info): When computing the
8758         native offset, check whether we're actually inside the method's
8759         code; call mono_debug_print_stack_frame() to format the frame.
8760         (ves_icall_System_Exception_get_trace): Call
8761         mono_debug_print_stack_frame() to format the stack frame.
8762         (ves_icall_get_trace): Update to the new debugging API.
8763         (mono_jit_walk_stack_from_ctx): Likewise.
8764         (ves_icall_get_frame_info): Likewise.
8766         * mini.c (get_method_from_ip): Use the new debugging API.
8767         (mono_print_method_from_ip): Likewise.
8769         * exceptions-ppc.c
8770         (mono_jit_walk_stack): Use the new debugging API.
8771         (ves_icall_get_frame_info): Likewise.   
8773 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
8775         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8777 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
8779         * mini.c: Added "limitator" to inline for debugging.
8781 2006-05-24  Martin Baulig  <martin@ximian.com>
8783         * debug-debugger.c (mono_debugger_init): Create a private,
8784         malloc()-based code manager for the notification function and
8785         intentionally leak it on exit.  This fixes the crash-on-exit race
8786         condition.
8788         * tramp-amd64.c
8789         (mono_debugger_create_notification_function): Added
8790         `MonoCodeManager *' argument.
8792         * tramp-x86.c
8793         (mono_debugger_create_notification_function): Added
8794         `MonoCodeManager *' argument.
8796 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
8798         * aliasing.c: Fixed 64 bit issue.
8799         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8800         default since all known bugs are fixed (one more time!).
8802 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8804         * mini.c: write barrier support.
8806 2006-05-23  Martin Baulig  <martin@ximian.com>
8808         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
8809         check at the top of the file.
8811 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
8813         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
8814         reverting changes without reason and without changelog entries.
8816 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
8818         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
8819         to a few opcodes. Fixes #78439.
8821         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
8822         consistency with other archs.
8824         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
8826 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8828         * debug-debugger.c: fix the build.
8830 2006-05-17  Martin Baulig  <martin@ximian.com>
8832         * debug-debugger.c
8833         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
8834         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
8835         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
8836         (debugger_attach): Call GC_mono_debugger_add_all_threads().
8838 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
8840         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
8842 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
8844         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
8845         MONO_TYPE_GENERICINST.
8846         
8847         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
8848         MONO_TYPE_GENERICINST.
8850 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
8852         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8853         #78325.
8855 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
8857         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8858         mempool.
8859         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8861 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
8863         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8864         mono_trace_cleanup ().
8866         * iltests.il: Fix problem with the newly added test.
8868         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8869         due to register constraints, free up the previous hreg. Fixes #78314.
8871         * iltests.il: Add new test for #78314.  
8873         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8874         Interlocked.Add. Fixes #78312.
8876         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8877         
8878 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
8880         * inssel.brg (mini_emit_virtual_call): Fix a warning.
8882 2006-05-05  Martin Baulig  <martin@ximian.com>
8884         * debug-mini.c (mono_debug_open_block): New method.
8886         * mini-amd64.c
8887         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8888         the beginning of each basic block.
8890         * mini-x86.c
8891         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8892         the beginning of each basic block.
8894 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8896         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8897         default until I understand why they break the build on amd64.
8899 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
8901         * mini.c (mini_cleanup): Call mono_cleanup ().
8903         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8904         errors.
8906 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8908         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8909         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8910         default since all known bugs are fixed, and I cannot reproduce bug
8911         77944... I'm asking Matt Hargett to test again after this commit.
8913 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
8915         * mini-codegen.c: Fixed typo that thrashed inline.
8917 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
8919         * dominators.c (compute_dominators): Avoid using a worklist since
8920         it is not correct in some cases. Instead, iterate over all bblocks as
8921         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8923 2006-04-28  Miguel de Icaza  <miguel@novell.com>
8925         * mini.c (mono_jit_compile_method_inner): Use
8926         mono_prepare_exception_from_error that resets the value
8927         internally.
8929 2006-04-27  Miguel de Icaza  <miguel@novell.com>
8931         * mini.c: Move the mini_loader_error_to_exception to metadata. 
8932         
8933 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8935         * aliasing.c: Fixed bug 78210.
8937 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8939         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8940         default until all their problems (or the ones they trigger) are fixed.
8942 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
8944         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8945         
8946         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8947         as loaded only after resolving patches since that could invoke the same method.
8949         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8951         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8952         functions.
8954         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8955         AOT loader.
8957         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8958         stack.
8960         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8961         made from AOT code through the PLT table.
8963         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8964         holding the plt offset when a call is made to the aot plt trampoline.
8965         
8966 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8968         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
8969         amd64 AOT support.
8971         * Makefile.am (common_sources): Fix build breakage.
8973         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8974         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8975         intra-assembly calls if possible.
8976         
8977         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8979         * mini-trampolines.c: Handle PLT entries.
8981         * mini.c: Avoid creating a GOT var for calls.
8983         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8984         from mscorlib code.
8986         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8987         from mscorlib code.
8989         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8990         AOT code.       
8992         * mini.h: Bump AOT file format version.
8993         
8994         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8995         covers more cases.
8997 2006-04-25  Martin Baulig  <martin@ximian.com>
8999         * driver.c: Disable copyprop, consprop and inline when running
9000         inside the debugger.
9002 2006-04-25  Martin Baulig  <martin@ximian.com>
9004         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
9005         with `get_current_thread' and added `detach'.
9006         (MonoDebuggerMetadataInfo): Added `thread_size',
9007         `thread_tid_offset', `thread_stack_ptr_offset' and
9008         `thread_end_stack_offset'.
9010 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
9012         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
9013         aot-runtime.c.
9015         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
9016         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
9018         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
9020         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
9022         * aot.c: Add support for ADJUSTED_IID.  
9024 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
9026         * aot.c (emit_method_order): Don't align method_order_end.
9028         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
9029         the interface ID changes.
9031 2006-04-21  Dick Porter  <dick@ximian.com>
9033         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
9034         cleaning up a thread.  Fixes the new part of bug 77470.
9036 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
9038         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
9039         to managed wrapper.
9040                      
9041 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
9043         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
9044         
9045         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
9046         SIGSEGV. Fixes #78072.
9048         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
9049         unregister our SIGABRT handler.
9051 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
9053         * mini.c: Disabled inline where it can alter the call stack in a
9054         way visible from managed code.
9055         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
9056         default.
9058 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
9060         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
9061         on other platforms. Fixes #78089.
9063 2006-04-13  Martin Baulig  <martin@ximian.com>
9065         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
9066         determine whether we're inside the debugger.
9068         * debug-debugger.h
9069         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
9071 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
9073         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
9074         handler clauses. Fixes #78024.
9076         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
9077         in the CALL_MEMBASE opcodes. Fixes #78088.
9078         (mono_arch_get_vcall_slot_addr): Ditto.
9080 2006-04-10  Martin Baulig  <martin@ximian.com>
9082         * debug-debugger.c: The thread handling code has now been moved
9083         into ../metadata/threads.c.
9085 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9087         * driver.c (mono_main): Fix --with-gc=none build.
9089         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
9090         (mono_spillvar_offset_float): Ditto.
9091         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
9092         hreg, not when its !global, since on ia64, there is a third category: stacked
9093         registers.      
9095 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
9097         * mini.c: set MonoInst->klass for load field address and a few other
9098         places.
9100 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9102         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
9104 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
9106         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
9107         the branch opt changes.
9109 2006-04-06  Dick Porter  <dick@ximian.com>
9111         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
9112         
9113         * wapihandles.c (mini_wapi_seminfo): 
9114         * driver.c (mono_main): Add semaphore info option
9116 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
9118         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
9119         branch optimization changes. Fixes #78009.
9121 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9123         * mini.c: ignore accessibility of methods in managed->native wrappers.
9125 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
9127         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
9128         
9129         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
9131 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
9133         * mini.c: Modify the branch optimizations to preserve the invariant that
9134         the entries inside the in_bb and out_bb arrays are unique.
9135         (mono_unlink_bblock): Avoid creation of new arrays.
9137 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
9139         * mini.c (mono_unlink_bblock): Fix regression caused by previous
9140         change (#77992).
9142 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
9144         * mini.c (optimize_branches): Remove the "optimizations" in
9145         the cbranch1/cbranch2 -> branch cases which were causing several
9146         problems in the past. Fixes #77986.
9148 2006-03-31  Chris Toshok  <toshok@ximian.com>
9150         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
9151         default optimizations :(
9153 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
9155         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
9156         branch.
9158 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
9160         * local-propagation.c: Added comments to structs and removed
9161         "Mono" prefixes from local tree mover types.
9163 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
9165         * Makefile.am (arch_sources): Define this for each architecture so 
9166         libmono_la_SOURCES is defined in one place.
9168 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
9170         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
9171         from handles/.
9173 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
9175         * driver.c: print the GC name supplied by configure.
9177 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
9179         * local-propagation.c: Added tree mover, and moved here all the
9180         local propagation code from mini.c
9181         * mini.c: Added support for treeprop, and moved all the local
9182         propagation code to local-propagation.c
9183         * mini.h: Added support for treeprop
9184         * driver.c: Added support for treeprop, enabled consprop, copyprop,
9185         treeprop, inline and deadce by default
9186         * Makefile.am: Added local-propagation.c
9188 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
9190         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
9192 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
9194         * debug-debugger.c: make it compile without the Boehm GC.
9196 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9198         * mini.c: fixed issue with mismatch when an icall is registered
9199         with multiple names but same address.
9201 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9203         * declsec.c, mini-exceptions.c: use write barrier to set reference
9204         fields of managed objects.
9206 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9208         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
9209         (can_access_internals): Fix a warning.
9211         * mini.c (print_method_from_ip): Rename this to 
9212         mono_print_method_from_ip so it gets exported.
9214         * trace.c: Deal with strings inside StringBuilder's containing garbage
9215         and fix memory leaks. Fixes #77848.
9217 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9219         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
9220         fixes #77787.
9222 2006-03-16 Neale Ferguson <neale@sinenomine.net>
9223         
9224         * mini-s390.c: Remove OP_X86_TEST_NULL.
9226 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9228         * mini.c: use the correct GetHashCode() for the moving collector.
9230 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
9232         * liveness.c: Regalloc spill cost tuning.
9234 2006-03-15 Neale Ferguson <neale@sinenomine.net>
9235         
9236         * mini-s390x.h: Correct S390_LONG macro.
9238         * mini-s390x.c: Cleanup unused code.
9240 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
9242         * jit-icalls.h: New file.
9244         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
9245         icalls and include that instead of including jit-icalls.c.
9247         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
9248         OP_X86 opcodes.
9250 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
9252         * mini.c: when checking for member accessibility, also check for
9253         friend assemblies and for explicit interface implementations.
9255 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
9257         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
9259         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
9261         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9262         common cases are done first.    
9264         * mini-ops.h: Only define platform specific opcodes on the given platform.
9266         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
9267         branch.
9268         
9269 2006-03-14  Martin Baulig  <martin@ximian.com>
9271         Revert Paolo's change from r57348:
9273         * mini.h: don't use gboolean for bitfields.
9274         * mini.c: verifier changes for fields and methods accessibility.
9276 2006-03-13  Neale Ferguson <neale@sinenomine.net>
9278         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
9280         * mini-s390x.c: Fix conv_r_un.
9282         * cpu-s390, cpu-s390x.md: Fix lengths.
9284 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9286         * mini.c: nested types have access to all the nesting
9287         levels, not just the enclosing types.
9289 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9291         * mini.c: added a few more verification checks.
9293 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
9295         * liveness.c: Merge optimizations from the linear-il branch.
9297 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9299         * mini-ia64.c (emit_call): Add a comment.
9301         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
9303         * tramp-ia64.c: Fix some warnings.
9305 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9307         * mini.h: don't use gboolean for bitfields.
9308         * mini.c: verifier changes for fields and methods accessibility.
9310 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9312         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
9313         lazy icall wrapper changes.
9315         * dominators.c: Replace all the dominator algorithms with faster
9316         ones from the linear-il branch.
9318         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
9319         the mempool.
9321         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9322         common cases are done first.
9324         * mini-amd64.c: Fix some warnings.
9326         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
9327         from the mempool.
9329         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
9330         added code.
9332         * mini.h: Add a missing prototype.
9334 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
9336         * mini.c: Compile icall wrappers lazily.
9338         * mini-codegen.c: Use printf instead of g_print since its much faster.
9340         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
9341         function.
9343         * mini.c (optimize_branches): Cache the negative result from 
9344         remove_block_if_useless ().
9346         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
9347         Also fix some bblock linking issues.
9349         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
9350         assembly files.
9352         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
9354         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
9355         accessed fields first, for better cache behavior.
9356         
9357 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9359         * mini.c: speedup IList<T> array accesses.
9361 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
9363         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
9364         inline_costs counter. Fixes #77190.
9366 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
9368         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
9369         trace messages. Fixes #77706.
9371 2006-03-04  Martin Baulig  <martin@ximian.com>
9373         * tramp-amd64.c, tramp-x86.c
9374         (mono_debugger_create_notification_function): Use
9375         mono_global_codeman_reserve() to allocate a buffer at runtime and
9376         return it.
9378         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
9380         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
9381         notification function at runtime and then call `initialize' in the
9382         `MONO_DEBUGGER__debugger_info' vtable.
9384 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
9386         * iltests.il: Fix a visibility problem.
9388 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9390         * driver.c, mini.c: add hooks for the counters API.
9392 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9394         * driver.c: show disabled options.
9396 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9398         * linear-scan.c: always use cost-driven selection.
9400 2006-02-28  Raja R Harinath  <rharinath@novell.com>
9402         * jit-icalls.c (helper_compile_generic_method): Revert change from
9403         2006-02-24.
9405 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
9407         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
9409 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
9411         * inssel.brg: style fixes, mostly to force the updated monoburg
9412         to run for people using svn.
9414 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9416         * mini.c: match monoburg changes.
9418 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9420         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
9421         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
9422         declaration in the header file.
9424 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9426         * helpers.c: reduce relocations and mem usage.
9428 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9430         * mini.h, mini-codegen.c: disable logging features if
9431         requested by configure.
9433 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
9435         * mini.c: tiny verifier changes.
9437 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9439         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
9440         cpu-pentium.md: stack alignment changes for osx/x86,
9441         partially from Geoff Norton <gnorton@customerdna.com>.
9443 2006-02-24  Raja R Harinath  <harinath@gmail.com>
9445         * jit-icalls.c (helper_compile_generic_method): Update to changes
9446         in metadata/class.c.
9448 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
9449         
9450         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
9451         
9452         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
9453         interface calls with large offsets.
9455 2006-02-23  Raja R Harinath  <rharinath@novell.com>
9457         * jit-icalls.c (helper_compile_generic_method): Document the
9458         special-case we depend on so that we can inflate the method twice
9459         with the same context with no bad side-effects.
9461 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9463         * mini-x86.c, mini-amd64.c: fix for case when xen support
9464         is disabled.
9466 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9468         * mini-x86.c, mini-amd64.c: generate code to access tls items
9469         in a faster way for Xen systems.
9471 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9473         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
9474         updates and compilation fixes for the OSX/x86 port, mostly from
9475         Geoff Norton <gnorton@customerdna.com>.
9477 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9479         * inssel.brg: faster interface call implementation
9480         to sync with the interface_offsets MonoVTable changes.
9482 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9484         * mini.c: more verification checks.
9486 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
9488         * mini.c: added a few more verification checks.
9490 2006-02-17      Neale Ferguson <neale@sinenomine.net>
9492         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
9493         facility on the processor and use it if available.
9495 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9497         * driver.c, aot.c, mini.c: throw exception if the IL code is
9498         invalid or unverifiable.
9500 2006-02-17  Raja R Harinath  <rharinath@novell.com>
9502         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
9503         m.StructField.
9505 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
9507         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
9509 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9511         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
9512         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
9513         handling of instantiated generic valuetypes.
9515 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
9517         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
9518         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
9519         instead.
9521         * generics.2.cs: Revert the nullable reftypes tests.
9523 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
9525         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
9526         using __builtin_frame_address (1) as it doesn't work in the presence
9527         of optimizations. Hopefully fixes #77273.
9529         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
9530         -> generics.cs change as it doesn't work with some automake versions.
9532 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9534         * mini.c: handle systems that sue a different way to
9535         retrieve the stack address of the current thread.
9537 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
9539         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
9540         it specially in the makefile.
9542         * generics.2.cs: Add tests for nullable reference types.
9544 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9546         * mini.c: always handle the case when mono_jit_init()
9547         is called in a thread different from the main thread,
9548         confusing libgc (bug #77309).
9550 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
9552         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
9554 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9556         * mini.c: change optimize_branches () to use a single loop
9557         and introduce a new optimization to simplify some range checks.
9559 2006-02-03  Martin Baulig  <martin@ximian.com>
9561         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
9562         and merged with debugger_thread_manager_add_thread().
9563         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
9564         inform the debugger about the main thread.
9566 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9568         * basic.cs: Add test for div.un/rem.un constant folding.
9570 2006-02-03  Neale Ferguson <neale@sinenomine.net>
9572         * cpu-s390x.md: correct int_xor_imm length
9574 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9576         * generics.2.cs: New test for #77442.
9578         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
9579         #77442.
9581 2006-02-02  Martin Baulig  <martin@ximian.com>
9583         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
9584         <mono/metadata/mono-debug-debugger.h>   
9586         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
9588 2006-02-02  Martin Baulig  <martin@ximian.com>
9590         * debug-debugger.h: New header file for debug-debugger.c.
9592         * debug-debugger.c: Big API cleanup; don't run the managed Main()
9593         function is a separate thread anymore; add support for attaching.
9595 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
9597         * tramp-x86.c: Fix a warning.
9599 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
9601         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9602         on very large methods.
9604         * aot.c (load_patch_info): Fix a warning.
9606 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9608         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9609         mini-ops.h: alu membase optimizations.
9611 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9613         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9614         to speedup StringBuilder.
9616 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
9618         * dominators.c (mono_compute_natural_loops): Fix detection of
9619         loop body start blocks.
9621         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9623 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
9625         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9626         #75145.
9628 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
9630         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9632 2006-01-25  Martin Baulig  <martin@ximian.com>
9634         * debug-debugger.c: Moved the `MonoDebuggerManager' and
9635         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9636         started to cleanup this file a little bit.
9638 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9640         * mini.c: optimize a codepath frequently happening in generics code.
9642 2006-01-23  Martin Baulig  <martin@ximian.com>
9644         * Makefile.am: Only compile debug-debugger.c on supported platforms.
9646         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9647         functions directly.
9649         * driver.c: debug-debugger.c is only available if
9650         `MONO_DEBUGGER_SUPPORTED' is defined.   
9652 2006-01-23  Martin Baulig  <martin@ximian.com>
9654         * debug-debugger.c: Only enable this on platforms where the Mono
9655         Debugger is working (x86 and x86_64).
9657 2006-01-21  Martin Baulig  <martin@ximian.com>
9659         The Mono Debugger is now using the normal `mono' instead of the
9660         `mono-debugger-mini-wrapper' when executing managed code.
9662         * debug-debugger.c: New file; previously known as
9663         debugger/wrapper/wrapper.c.
9665         * debug-mini.c (mono_init_debugger): Removed.
9667         * driver.c (mono_main): Added new `--inside-mdb' command line
9668         argument which is used when running inside the debugger.
9670 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
9672         * liveness.c (mono_analyze_liveness): Remove some unused data
9673         structures.
9675 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
9677         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9679 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
9681         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9682         depends on implementation details of monobitset.
9684         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9685         Fixes #77271.
9687 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
9689         * liveness.c: Update after monobitset changes.
9691 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
9693         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9695 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9697         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9699         * mini-s390x.c: Remove warning messages.
9701 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
9703         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9705 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
9707         * generics.2.cs: Add ldelem/stelem_any test.
9709 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9711         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9713 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
9715         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9716         
9717 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
9719         * generics.2.cs: Reenable vtype tests.
9721         * inssel-x86.brg: Remove an icorrect valuetype rule.
9723 2006-01-06 Neale Ferguson <neale@sinenomine.net>
9725         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
9726         initial support for OP_ABS.
9728 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9730         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9732 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9734         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
9735         conversion and implement LADD/LSUB.
9737         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9738         architectures.
9740 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9742         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9744         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9745         architectures.
9747 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9749         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
9750         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
9751         (stack walk problem).
9753 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
9755         * aot.c (mono_aot_load_method): Fix a warning.
9757 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9759         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9761 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9763         * iltests.il: Add test for #77148.
9765         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9766         #77148.
9768 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9770         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9772 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9774         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9775         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9777         * basic-long.cs: Add lconv-to-r4/r8 tests.
9779 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9781         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9783         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9784         here as on other archs.
9786 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9788         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9790 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9792         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
9793         
9794         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
9796         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
9797         instrument_prolog; Add memory_barrier instruction.
9799 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
9801         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
9803 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
9805         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
9807         * aliasing.c inssel.brg: Fix warnings.
9809         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
9810         could skip initialization of some parts of memory.
9812         * mini.c mini-ia64.c: Fix warnings.
9814         * inssel-sparc.brg: Add an implementation of lneg which actually works.
9816 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
9818         * aliasing.c (mono_build_aliasing_information): Add a workaround for
9819         a crash seen on sparc.
9821         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
9822         
9823         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
9825 2005-12-21 Neale Ferguson <neale@sinenomine.net>
9827         * mini-ops.h: Add s390_backchain instruction
9829         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
9831         * cpu-s390.md: Add s390_backchain instruction
9833         * mini-s390.c: Significant ABI changes
9835         * mini-s390.h: Cater for zero length structures
9837 2005-12-20 Neale Ferguson <neale@sinenomine.net>
9839         * mini-s390.c: ABI fixes
9841         * inssel-s390.brg: Remove debug statements
9843         * cpu-s390.md: Fix length of ATOMIC_xx operations
9845 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
9847         * basic-float.cs: Add float<->long conversion tests.
9849 2005-12-16 Neale Ferguson <neale@sinenomine.net>
9851         * mini-s390.c: Fix LOCALLOC processing.
9853         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9855 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
9857         * iltests.il: Add tests for some opcodes not covered by the other
9858         tests.
9860 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9862         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
9863         register loading for Tail processing; Correct trace output.
9865         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9867         * cpu-s390.md: Correct size of jmp instruction. 
9869 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9871         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9873 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9875         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9876           Bring s390 up to current level.
9878 2005-12-12  Zltan Varga  <vargaz@gmail.com>
9880         * generics.2.cs: Disable the newly added tests as they do not work yet.
9881         
9882         * generics.2.cs: Add valuetype tests.
9884 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
9886         * basic-long.cs: Add i4->u8 test.
9888         * objects.cs: Add tests for JIT intrinsic.
9890         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9891         optimizations lost by a mistake.
9893 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
9895         * basic-long.cs: Remove a test moved to objects.cs.
9897         * arrays.cs: Add more array tests.
9899 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
9901         * arrays.cs: Add new tests for multi-dimensional arrays.
9903 2005-12-06  Raja R Harinath  <rharinath@novell.com>
9905         * Makefile.am (test_sources2): Add generics.2.cs.
9906         (EXTRA_DIST): Add test_sources2.
9908 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
9910         Support for boxing and unboxing nullable types as well as the
9911         isinst operation on nullables, per the CLI ammendment.
9913         * inssel.brg (CEE_ISINST): Special case for nullable
9915         * mini.c (handle_unbox_nullable): new method
9916         (handle_box): Special case for nullable types
9917         (mono_method_to_ir): Call handle_unbox_nullable in correct
9918         places.
9920         * generics.2.cs: New test suite
9922         * Makefile.am: Support for regression tests with generics.
9924 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
9926         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9927         allocated to registers. Fixes #76800.
9929 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9931         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9933 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
9935         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
9936         of platforms.
9938 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
9940         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9941         objects.cs.
9943         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9944         
9945         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9946 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9948         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9949         single precision before storing to a single precision location.
9951 2005-11-28  Raja R Harinath  <rharinath@novell.com>
9953         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9955 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
9957         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9958         correct files.
9960         * basic.cs: Remove test_0_byte_compares test which was moved to
9961         objects.cs a long time ago.
9963 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
9965         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9967 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
9969         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9970         handlers are called.
9972         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9973         throwing code.
9975          * mini-ia64.c: Add support for the throw->branch exception 
9976         optimization.   
9978         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9980 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9982         * mini.c: Enabled "fastpath" deadce :-)
9983         
9984 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9986         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9987         alias analysis pass to support it.
9988         * mini.h: Likewise.
9989         * ssa.c: Likewise.
9990         * liveness.c: Likewise (liveness computation can use aliasing
9991         information to be more accurate).
9992         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9993         moreover made so that "--compile-all" uses the given optimization
9994         flags and not the default ones.
9995         * aliasing.c: Alias analysis (new file).
9996         * aliasing.h: Likewise.
9997         * Makefile.am: added "aliasing.c" and "aliasing.h".
9998         
9999 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
10001         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
10002         OP_L opcodes.
10004 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
10006         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
10007         fp >= end_of_stack exit condition, as it is not needed, and it might
10008         become true for fp eliminated frames.
10010 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
10012         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
10013         coded offsets.
10015 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
10017         * mini-arm.c: fixed alignment of doubles/longs to match
10018         the C ABI (bug #76635).
10020 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
10022         * aot.c: fix compilation with --enable-minimal=aot.
10024 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
10026         * mini-arm.c: fixed compatibility with the new
10027         floating point emulator package for compares.
10029 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
10031         * mini.c : reverted sig->pinvoke changes (r51396-51397).
10033 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
10035         * mini-exceptions.c (print_stack_frame): Output to stderr.
10036         (mono_handle_native_sigsegv): Ditto.
10038 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10040         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
10041         OP_LCONV_TO_OVF_I implementation.
10043         * mini-amd64.c: Add support for the throw->branch exception 
10044         optimization.
10046         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
10047         when the catch clause catches a more general exception, i.e. Object.
10049 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
10051         * cpu-ia64.md: Remove unused opcodes.
10053         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
10054         specific defines for architectures defining USE_SIGACTION.
10056         * mini-ia64.c: Fix some warnings.
10058         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
10059         version seemed to skip a frame.
10061 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10063         * mini.c: Clean up the usage of sig->pinvoke flag. Now
10064         only calls which are made to native code use this flag.
10066 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
10068         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
10069         varargs methods as well.
10070         
10071         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
10072         which have save_lmf set. Reorganize methods prologs a bit.
10074         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
10075         debugger to the proper place.
10077 2005-10-29  Martin Baulig  <martin@ximian.com>
10079         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
10080         when running inside the debugger until the debugger has support
10081         for it.
10083 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
10085         * mini.h: Fix a warning.
10087 2005-10-24  Miguel de Icaza  <miguel@novell.com>
10089         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
10090         we expose publicly, this returns the string.
10092 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
10094         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
10095         with fp elimination.
10097 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
10099         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
10100         native stacktrace using the glibc 'backtrace' function if available.
10102 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
10104         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
10106         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
10107         handle SIGSEGVs received while in native code.
10109         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
10110         code, call mono_handle_native_sigsegv which will abort the runtime
10111         after printing some diagnostics, instead of converting it into a
10112         confusing NullReferenceException.
10114 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
10116         * cpu-pentium.md: Remove unused opcodes.
10118 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
10120         * mini-amd64.h (MonoLMF): Add rsp field.
10122         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
10123         the lmf too.
10125 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
10127         * mini-codegen.c (get_register_spilling): Fix some warnings.
10129 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
10131         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
10132         elimination during exception handling. Enable fp elimination by
10133         default.
10135         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
10136         elimination.
10138 2005-10-16  Martin Baulig  <martin@ximian.com>
10140         * mini-exceptions.c
10141         (mono_debugger_run_finally): New public method for the debugger.
10143 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
10145         * debug-mini.c (mono_debug_init_method): Fix warning.
10147         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
10148         the 'exname' parameter const to fix some warnings.
10150 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
10152         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
10153         introduced by the previous patch.
10155 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
10157         * basic-float.cs: Add test for precision of float arithmetic.
10159         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
10160         when loading/storing single values from/to memory.
10162         * mini.c (mono_jit_compile_method_with_opt): Create the function
10163         pointers in the correct domain.
10165 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
10167         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
10168         introduced by previous patch.
10169         
10170         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
10171         when out_filter_idx is NULL.
10173         * mini-exceptions.c: Don't run filter clauses twice during exception
10174         handling. Fixes #75755.
10176 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
10178         * aot.c: Add support for ldflda wrappers.
10180         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
10181         #75902.
10183 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
10185         * mini.c, mini.h: do not consider exception handlers blocks when
10186         setting up interface variables.
10188 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
10190         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
10192 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
10194         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
10195         causes a regression.
10197         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
10199 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
10201         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
10202         of the OP_P definitions.
10204         * TODO: Add a proposal for dealing with the CEE/OP mess.
10206         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
10207         optimizations from the x86 port.
10209         * cpu-amd64.md: Ditto.
10211         * basic.cs basic-long.cs: Add tests.
10213 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
10215         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
10216         Patrik Torstensson's implementation of my exception-handling
10217         optimization idea, when the exception object is not used
10218         (bug #62150).
10220 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
10222         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
10223         of the mul_imm optimizations from the old jit.
10225 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
10227         * mini.c, liveness.c: patch by Patrik Torstensson and
10228         Zoltan Varga to improve performance in methods with
10229         exception clauses.
10231 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
10233         * driver.c: Remove 'Globalization' entry from --version.
10235 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
10237         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
10238         there is a profiler interested in JIT events.
10240         * aot.c: Load profile files produced by the AOT profiling module, and
10241         reorder methods based on the profiling info. Add a 'method_order' table
10242         to the AOT file to make mono_aot_find_jit_info work with the reordered
10243         methods.
10245         * mini.h: Bump AOT file version info.
10247 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
10249         * mini-arm.h: work around what looks like a gcc bug when optimizations
10250         are enabled.
10252 2005-09-28  Raja R Harinath  <rharinath@novell.com>
10254         * Makefile.am (AM_CFLAGS): Don't use += to append inside
10255         conditionals.  Use ...
10256         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
10258 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
10260         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
10261         to determine the amount of memory to copy when passing valuetypes.
10263         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
10264         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
10266 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
10268         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
10269         information about aot.
10271 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
10273         * *.c: Replace the use of {Enter,Leave}CriticalSection with
10274         macros. This will allow a deadlock debugger to easily be plugged
10275         in.
10277 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
10279         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
10281 2005-09-27  Raja R Harinath  <rharinath@novell.com>
10283         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
10284         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
10285         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
10286         ($(arch_built)) [CROSS_COMPILING]: Error out.
10288 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
10290         * aot.c: Add support for the no_special_static flag for classes.
10292 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10294         * Reapply reverted patches.
10296         * *: Revert r50174 as well.
10298         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
10300 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10302         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
10304 2005-09-23  Miguel de Icaza  <miguel@novell.com>
10306         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
10307         part of the SIG_HANDLER_SIGNATURE.  
10309 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
10311         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
10312         statistics.
10314         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
10315         introduced by previous patch.
10317 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
10319         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
10320         saved registers too.
10322         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
10323         upon the information returned by get_call_info ().
10324         
10325         * mini-x86.c (add_float): Fix stack size calculation.
10326         (mono_arch_call_opcode): Rewrite this so it works based up the
10327         information returned by get_call_info ().
10328         (mono_arch_get_this_vret_args): Ditto.
10330 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
10332         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
10333         in cinfo to determine the registers which need to be used.
10335 2005-09-20  Miguel de Icaza  <miguel@novell.com>
10337         * driver.c (mono_main): Add --server and --desktop flags. 
10339 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
10341         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
10342         registers as global registers.
10344         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
10345         longer needed with the new register allocator.
10347         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
10349         * cpu-ia64.md: Remove unused opcodes.
10350         
10351         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
10352         
10353 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
10355         * cpu-amd64.md: Remove unused opcodes.
10357         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
10358         needed with the new register allocator.
10360         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
10361         reg-reg moves.
10363 2005-09-16  Raja R Harinath  <rharinath@novell.com>
10365         * Makefile.am (check-local): Don't invoke semdel-wrapper.
10367 2005-09-16  Martin Baulig  <martin@ximian.com>
10369         * exceptions-amd64.c
10370         (throw_exception): Don't call mono_debugger_throw_exception() if
10371         we're a rethrow - see the FIXME in the code.
10373 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
10375         * mini.c (mono_init_exceptions): This only works on some architectures.
10376         
10377 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10379         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
10380         on ia64.
10382         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
10384         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
10385         now in mini-exceptions.c.
10387 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
10389         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
10390         now in mini-exceptions.c.
10392 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10394         * exceptions-x86.c: Applied patch from Patrik Torstensson 
10395         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
10397         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
10398         code into mini-exceptions.c. Add some assertions to it.
10400 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
10402         * aot.c (emit_section_change): Applied patch from "The Software Team" 
10403         (<software@solmersa.com>). Fix as errors on windows.
10405 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10407         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
10408         method info into the LMF.
10410 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10411         
10412         * mini-ia64.c: Add proper unwind info for method epilogs.
10414         * exceptions-ia64.c: Add some code to help debugging.
10415         
10416         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
10418         * mini-exceptions.c: Fix warning.
10420 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10422         * mini.c: Really fix build.
10424         * mini-x86.c mini-amd64.c: Fix build.
10426 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10428         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
10430         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
10431         some Interlocked methods as intrinsics.
10433         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
10434         for Thread methods as well.
10436         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
10438         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
10440         * mini-ia64.c mini-x86.c mini-amd64.c 
10441         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
10442         OP_MEMORY_BARRIER.
10443         
10444         * mini.c (mono_init_exceptions): Fix build breakage.
10446 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
10448         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
10449         of instructions. Use the new ia64_unw_op macros for emitting unwind
10450         info.
10452         * mini.c (mono_init_exceptions): Initialize exception handling
10453         related trampolines at startup.
10455 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
10457         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
10459 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
10461         * mini.c: Handle type loading errors gracefully during compilation and
10462         throw the appropriate exception.
10464 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
10466         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
10467         for the mono binary.
10469 2005-09-09  Martin Baulig  <martin@ximian.com>
10471         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
10472         the release.
10474 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10476         * mini-arm.h: use emulation for conv.r.un for the release.
10478 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10480         * mini-arm.c, objects.cs: more fixes and tests for them.
10482 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10484         * mini-arm.c: align structures to at least 4 bytes to be able
10485         to keep our current optimized memcpy.
10487 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
10489         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
10491 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10493         * mini.c: ignore SIGPIPE.
10495 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
10497         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
10499         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
10501 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
10503         * mini.h: Add prototype for mono_allocate_stack_slots_full.
10505 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10507         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
10508         exception handling support.
10509         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
10510         patch by Brian Koropoff <briank@marakicorp.com>).
10512 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
10514         * mini.c: revert another 'optimization' which breaks when
10515         items on the eval stack need to be saved at a basic block end
10516         (bug #75940).
10518 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10520         * jit-icalls.c: for arrays, ensure we always provide
10521         lower bounds.
10523 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
10525         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
10526         
10527         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
10529 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
10531         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
10532         arguments in their original register.
10534 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
10536         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
10537         memset/memcpy.
10539         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
10540         when ssapre is enabled.
10542         * inssel-long.brg: Fix bug in previous patch.
10544         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
10545         multiplication by a constant.
10547 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
10549         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
10550         icc.
10552         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
10553         saving registers.
10555 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
10557         * inssel-arm.brg: apply changes tested by Brian Koropoff
10558         <briank@marakicorp.com>.
10560 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
10562         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
10563         
10564 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
10566         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
10567         to the same register if dreg is just a base register.
10568         (print_ins): Improve printing of membase opcodes.
10570         * inssel-x86.brg: Add optimized ldind(reg) rules.
10572         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
10574 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
10576         * mini.c: when running under valgrind, set the stack bottom for
10577         the GC at the actual approximate stack for the app (fixes running
10578         mono with valgrind).
10580 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
10582         * mini.c: do no break at the first valuetype to init found
10583         (fixes bug #75791).
10585 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
10587         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
10589 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
10591         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
10593 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
10595         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
10597 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10599         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10601         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10602         code.
10604         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10605         code.
10607         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10608         methods.
10610 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10612         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10614 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10616         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10617         in the tail recursion optimization.
10619         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
10620         debug info into the assembly file.
10622         * iltests.il: Add test for filter regions.
10624         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10625         initial stack of filter regions. Fixes #75755.
10627 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10629         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10630         stack requirements.
10632 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10634         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10635         the check for an already compiled method on non-ia64 platforms.
10636         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10637         proper domain.
10639         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10641         * inssel-x86.brg: Add some optimized call rules.
10643 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
10645         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10646         method here.
10648         * mini.h mini-trampolines.c: Pass the trampoline argument to 
10649         mono_arch_patch_delegate_trampoline.
10651         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10653         * mini-trampolines.c: Fix build.
10655         * mini-amd64.h: Add delegate trampolines.
10657         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10659         * inssel-amd64.brg: Add optimized call rules.
10660         
10661         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10663         * inssel-ia64.brg: Add optimized ldind(reg) rules.
10665 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
10667         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10668         change.
10670         * mini-ia64.c: Remove LMF fixmes.
10672         * mini-ia64.h: Remove most fields from LMF.
10674         * inssel-ia64.brg (stmt): Fix unaligned access errors.
10676         * mini-trampolines.c: Add support for IA64 function descriptors.
10678         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10679         for IA64 function descriptors.
10681 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10683         * tramp-arm.c: patch the vtable for virtual calls. Added
10684         support code to register/unregister the LMF.
10685         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10686         more LMF work.
10688 2005-08-19  Dick Porter  <dick@ximian.com>
10690         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10691         bit value if needed.
10693 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
10695         * mini.c (mini_get_method): Move handling of wrapper data here.
10697         * mini.c (mono_method_to_ir): Add support for dynamic methods.
10699         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10700         virtual.
10702         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
10703         bblock->code does not remain empty.
10705 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
10707         * arrays.cs: Add regression test for #75832.
10709         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10710         rules. Fixes #75832.
10712         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10713         instruction scheduling.
10715 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
10717         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
10719 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
10721         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
10723         * mini-codegen.c: Fix VC build.
10725         * cpu-pentium.md: Increase length of atomic_exhange_i4.
10727 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10729         * mini.h: fix signature for mono_register_opcode_emulation.
10731 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
10733         * mini.c: Get rid of most of the helper_sig_... constants using
10734         mono_create_icall_signature ().
10736 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
10738         * jit-icalls.c (helper_ldstr): New helper function.
10740         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10742         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10743         throw, load the string using a helper call instead of creating a string object.
10745         * aot.c: Update after LDSTR changes.
10747         * mini.h: Bump AOT file version.
10748         
10749         * aot.c: Save class size info into the AOT file. Print more statistics during
10750         compilation.
10752         * mini.h: Bump AOT file version.
10754         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10755         ordering of disasm cases. Fixes #74957.
10757 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10759         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10760         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10761         the generic code needed for the ARM port.
10763 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10765         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10766         inssel-arm.brg: more ARM features and fixes.
10768 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10770         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10771         ARM port work in progress.
10773 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
10775         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10777         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10779         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10781         * inssel.brg (mini_emit_memset): Add support for unaligned access.
10783         * *-ia64.*: Ongoing IA64 work.
10784         
10785         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10787 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
10789         * TODO: Remove out-of-data todo stuff.
10791         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
10792         dead code.
10794         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
10796         * mini.h: Bump corlib version.
10798 2005-07-27  Martin Baulig  <martin@ximian.com>
10800         * mini-codegen.c
10801         (create_copy_ins): Added `const unsigned char *ip' argument; set
10802         `copy->cil_code' from it.
10804 2005-07-27  Martin Baulig  <martin@ximian.com>
10806         * mini-exceptions.c (mono_handle_exception): Don't call
10807         mono_debugger_handle_exception() for filters.
10809 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
10811         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
10812         as well.
10814 2005-07-26  Martin Baulig  <martin@ximian.com>
10816         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
10818         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
10819         helper_compile_generic_method() if the method is actually virtual
10820         and non-final.
10822 2005-07-26  Martin Baulig  <martin@ximian.com>
10824         * mini.c
10825         (trampoline_code): Renamed to `mono_trampoline_code' and made it
10826         public; this is now accessed directly by the debugger.
10827         (mono_generic_trampoline_code): Removed.
10829         * debug-mini.c
10830         (mono_debug_init_method): Also add interncalls and wrappers.
10832 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
10834         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
10836 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
10838         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
10840 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
10842         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
10844 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10846         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
10847         getting TLS offsets on AMD64 too.
10849 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
10851         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10853 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10855         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10856         inssel-arm.brg, mini-arm.h: ARM port work in progress.
10858 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10860         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10862         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10863         to mini.c.
10865         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
10866         mono_sparc_is_virtual_call ().
10867         
10868         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10870         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10871         trampoline parameters.
10873         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10874         
10875         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10876         to mono_arch_get_vcall_slot_addr.
10878         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10879         trampoline code.
10881         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10883 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10885         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10887 2005-07-19  Martin Baulig  <martin@ximian.com>
10889         * exceptions-amd64.c (throw_exception): Call
10890         mono_debugger_throw_exception() here like we're doing it on i386.
10892 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10894         * mini-ia64.c: Add optimized TLS access support.
10896 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
10898         * mini-exceptions.c: Ongoing IA64 work.
10900         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10902         * mini.c: Use the default optimization set when embedding. Fixes
10903         #75194.
10905 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
10907         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
10908         of trampolines to a separate file.
10910         * mini-trampolines.c: New file.
10912         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
10913         separate file.
10914         
10915         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
10916         amd64/ia64 code.
10918         * mini-codegen.c: Fix cygwin build.
10920 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
10922         * mini.c: Add some minor changes needed by the IA64 port.
10924         * *-ia64.*: Ongoing IA64 work.
10926 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
10928         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
10929         trampolines into arch-independent and arch-dependent parts.
10931         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10933 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
10935         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10937         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10938         the xp-regalloc-branch for amd64.
10940         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10941         xp-regalloc-branch for x86.
10943 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10945         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10947 2005-07-06  Martin Baulig  <martin@ximian.com>
10949         * mini.c
10950         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10951         (mono_jit_runtime_invoke): Likewise.
10953 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
10955         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10956         on x86 too.
10957         
10958         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10959         without loading their metadata. Reorganize the file format so exception handling+
10960         debug info is kept separate from normal method info. Create MonoJitInfo 
10961         structures for methods lazily.
10963         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10964         loading metadata.
10965         (x86_class_init_trampoline): Patch AOT class init trampolines too.
10967         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10969         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10970         in AOT code.
10972         * mini.h: Bump AOT file version.
10974 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
10976         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10978 2005-07-01  Raja R Harinath  <rharinath@novell.com>
10980         * Makefile.am (check-local): Call semdel-wrapper.
10982 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
10984         * mini-x86.c: Revert the last change as it seems to break the build..
10986 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
10988         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10989         
10990         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10992 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
10994         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10995         outside of the macro, so strange stuff doesn't happen with gcc4
10996         (NEW_AOTCONST_TOKEN): Likewise.
10998 2005-06-28  Martin Baulig  <martin@ximian.com>
11000         * mini.c (mini_class_is_system_array): New static method; use this
11001         instead of `klass->parent == mono_defaults.array_class' everywhere
11002         since this also works for the new generic array class.
11004 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
11006         * inssel.brg: Remove warnings.
11008 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
11010         * mini-ia64.c: Ongoing IA64 work.
11012         * basic-float.cs: Add float->i1 conversion test.
11014         * iltests.il: Add conv.u4 test.
11016 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
11018         * inssel-long.brg: Fix bug caused by last change.
11020 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
11022         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
11023         BSDs.  Allows the x86 JIT to work on OSX86
11025 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
11027         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
11028         u4->i8 conversion.
11030         * mini-ia64.c: Ongoing IA64 work.
11032 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
11034         * mini-ia64.c: Ongoing IA64 work.
11036         * driver.c: Clean up jit_code_hash as well when using --regression.
11038         * inssel-long.brg: Fix long->i4/u4 conversion rules.
11040         * basic-long.cs: Add tests for long->u4 conversion.
11042 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
11044         * mini.c: Take mono_get_domainvar out of macros. This makes sure
11045         that we do not depend on undefined C behavior: the order stuff
11046         gets evaluated within an expression. Fixes mono when compiled on
11047         GCC 4.
11049 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
11051         * *-ia64.*: Ongoing IA64 work.
11053         * aot.c: Lower memory usage while loading AOT methods.
11055         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
11057         * mini.h: Bump AOT file format version.
11059 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
11061         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
11063 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
11065         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
11066         not on callee assembly). Fixed some comments.
11068 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
11070         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
11071         it gets proper disassembly.
11072         (emit_method_info): Remove some dead code.
11074         * mini.c (mini_method_compile): Allways allocate the GOT var in
11075         mono_method_to_ir for emulating opcodes.
11077 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
11079         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
11080         before freeing the code memory. Fixes #74990.
11082         * objects.cs: Add regression test for #74992.
11084         * liveness.c: Extend live ranges of arguments to the beginning of the
11085         method. Fixes #74992.
11087         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
11088         so it points into the faulting instruction.
11090 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
11092         * jit-icalls.c (mono_imul_ovf): Add exception handling.
11094         * *-ia64.*: Ongoing IA64 work.
11096         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
11098 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
11100         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
11102         * *-ia64.*: Ongoing IA64 work.
11104 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
11106         * basic-long.cs: Add tests for add/sub.ovf.
11108         * basic.cs: Add tests for sub.ovf.
11110         * *-ia64.*: Ongoing IA64 work.
11112 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
11114         * *-ia64.*: Ongoing IA64 work.
11116         * basic.cs: Add conv.ovf.i4.un test.
11118 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
11120         * mini.c: (remove_block_if_useless) Fixed bug 75061.
11121         
11122 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11124         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
11126 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
11128         * *-ia64.*: Ongoing IA64 work.
11130 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11132         * trace.[ch]:
11133         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
11135 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
11137         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
11139 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
11141         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
11143         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
11144         of a call is callable by a near call.
11146 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
11148         * mini-ia64.c: Ongoing IA64 work.
11150 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
11152         * genmdesc.c: Make the generated array non-static.
11154         * inssel-long.brg: Fix LSHR_IMM rule.
11156         * *-ia64.*: Ongoing IA64 work.
11158         * *-ia64.*: Ongoing IA64 work.
11160 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11162         * *-ia64.*: Ongoing IA64 work.
11164         * *-ia64.*: Ongoing IA64 work.
11165         
11166         * mini-ia64.c: Ongoing IA64 work.
11168         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
11170 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11172         * objects.cs basic-calls.cs: Move some tests to objects.cs.
11173         
11174         * objects.cs basic-long.cs: Move some tests to objects.cs.
11176 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
11178         * *-ia64.*: Ongoing IA64 work.
11180         * iltests.il: Add a new test.
11182         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
11183         newobj. Fixes #75042.
11185 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
11187         * *-ia64.*: Ongoing IA64 work.
11188         
11189         * *-ia64.*: Ongoing IA64 work.
11190         
11191         * *-ia64.*: Ongoing IA64 work.
11193         * basic.cs objects.cs: Move tests accessing static variables as well.
11195         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
11197 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
11199         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
11201         * driver.c: Always print failed tests.
11203         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
11204         frame pointer.
11206         * *ia64*: Ongoing IA64 work.
11208 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
11210         * basic.cs: Add tests for add.ovf. Fix warnings.
11212 2005-05-18  Miguel de Icaza  <miguel@novell.com>
11214         * driver.c (mono_main): Avoid crash if no argument is passed to
11215         --break;  Do not use g_error, but f_printf.   And fix all other
11216         ocurrences of the same crash.
11218 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
11220         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
11221         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
11222         Fixes #74742.
11224 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
11226         * *-ia64.*: Add beginnings of IA64 backend.
11228         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
11230 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
11232         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
11233         Fixes #74925.
11235         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
11237         * mini-amd64.c: Fix a warning.
11239 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
11241         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
11242         in float_neg. Fixes #74897.
11244         * mini-amd64.c (emit_call): Fix another near call bug.
11246 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
11248         * declsec.c: Keep the appdomain information in the structure. Added a 
11249         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
11250         value gets overwritten).
11251         * declsec.h: Set the default MonoArray for the the stack to 6. Added
11252         an MonoAppDomain member to MonoSecurityFrame.
11253         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
11254         used in the stack walk. Now use a MonoArray which grow (double) when
11255         it gets full.
11257 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
11259         * mini.c: Re-enabled runtime cleanup, since running threads should
11260         now properly stop when exiting.
11262 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
11264         * mini-codegen.c: New file contaning the arch-independent local
11265         register allocator. Not used by any architectures yet.
11267         * mini.h linear-scan.c: Merge some changes from the 
11268         mini-xp-local-regalloc branch.
11270 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
11272         * mini-amd64.c (emit_call): Fix calls to native functions when the
11273         runtime is compiled as a shared library. Fixes #74756.
11275         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
11276         on a literal field. Fixes #74751.
11278 2005-04-25  Raja R Harinath  <rharinath@novell.com>
11280         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
11282 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
11284         * objects.cs: Add missing null casting test.
11286 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
11288         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
11289         in wrapper methods. Also rename 'address' variable to 'offset'.
11291 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
11293         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
11294         warnings.
11295         
11296         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
11298         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
11299         work on windows.
11301 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11303         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
11305 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11307         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
11308         just the last bytes.
11310 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11312         * aot.c (mono_compile_assembly): Fix warning.
11314         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
11315         by the _MSC_VER stuff.
11317 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
11319         * inssel-long.brg: Fix #74588.
11321         * cpu-amd64.md: Fix #74591.
11323         * iltests.il: Add new regression tests.
11325 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
11327         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
11328         valuetype.
11330 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
11332         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
11334         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
11335         from Bill Middleton <flashdict@gmail.com>.
11337 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
11339         * arrays.cs: Add new regression test. Fix warnings.
11341 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
11343         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
11344         and leakage in CKFINITE.
11346         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
11347         this to a null op since it is called on amd64 too.
11349         * exceptions-amd64.c (get_throw_trampoline): Align stack.
11351         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
11352         body since this is not used on amd64.
11353         
11354         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
11356         * mini-amd64.c: Remove obsolete fixmes.
11358         * mini.c (print_method_from_ip): Fix debugging support.
11360 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11362         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
11363         so that expressions that don't give much gain are not reduced.
11364         * ssapre.h: Likewise.
11366 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
11368         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
11370         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
11372         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
11374 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
11376         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
11378         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
11380 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
11382         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
11383         stack touching.
11385         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
11387         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
11389         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
11391         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
11392         MONO_ARCH_USE_SIGACTION. Fixes #74252.
11394         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
11396         * mini-x86.c: Fix up stack overflow handling.   
11398         * exceptions.cs: Add new regression test.
11400 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
11402         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
11403         mono_jit_thread_attach.
11405         * mini.c (mono_method_to_ir): Verify called method is not abstract.
11407 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11409         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
11410         avoid calling constructors using callvirt.
11412         * inssel.brg: Fix #74073.
11414 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
11416         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
11417         compilation with non-GCC compilers.
11418         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
11419         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
11421 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
11423         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
11424         klass->interface_offsets (will likely fix bug#74073).
11426 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11428         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
11430 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
11432         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
11433         to amd64_div_reg_size ().
11434         
11435         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
11437 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
11439         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
11441 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11443         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
11445 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11447         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
11448         
11449         * mini.c (mono_precompile_assembly): Load and precompile referenced
11450         assemblies as well. Fixes #74015.
11452 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
11454         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
11456 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
11458         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
11459         a lot of checks and (anyway) permissions cannot work until corlib is 
11460         loaded.
11462 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
11464         * mini-ppc.c: fixed ABI issue on sysv/ppc.
11466 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
11468         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
11469         calls (fixes bug#72824).
11471 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11473         * mini.c: fix tail recursion elimination (see test in bug#73936).
11475 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
11477         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
11478         some fp functions in sse2 mode.
11480 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
11482         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
11484 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
11486         * mini.h mini.c: Add mono_get_jit_tls_key ().
11488         * mini-x86.c: Enable fast TLS support on windows.
11490 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
11492         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
11493         * mini.c: Check for p/invoke method when generating code. If a
11494         p/invoke method, or it's class, isn't decorated with [Suppress
11495         UnmanagedCodeSecurity] then generate code to call System.Security.
11496         UnmanagedDemand (only if the security manager is active).
11498 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11500         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
11501         last change as it seems to cause strange crashes.
11502         
11503 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11505         * *.c: handle unsafe function pointers where needed.
11507 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11509         * mini.c (mono_jit_free_method): Remove the fixme too.
11511 2005-03-15  Miguel de Icaza  <miguel@novell.com>
11513         * mini.c: As discussed, make the code actually free the delegate
11514         thunk now, to enable the debugging of delegate problems, use
11515         MONO_DEBUG=1 when running Mono. 
11517         This takes also care of parts of the leaks as seen by Joe.
11519 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
11521         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
11522         thread_tls_offset calculation.
11524 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
11526         * declsec.c: Reworked linkdemand checks for icall. The previous code
11527         was using the declaration code (untrusted) and didn't work as expected
11528         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
11529         specific case.
11531 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
11533         * iltests.il: Add new localloc test.
11535         * mini-amd64.c: Handle large stack allocations the same way as on
11536         windows if stack overflow handling is working.
11537         
11538         * mini-amd64.c: Allocate the signal stack using mmap.
11540         * mini.c (sigsegv_signal_handler): Fix reading of context.
11542         * mini-exceptions.c: Fix up stack overflow handling.
11544         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
11546         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
11548         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
11550         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
11552         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
11553         tramp_init functions as they are no longer needed.
11555 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
11557         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
11558         
11559         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
11561         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
11562         
11563         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
11564         support that now.
11566         * mini-ops.h: Add OP_LMUL_IMM.
11568         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
11569         long mul/div opcodes as intrinsic.
11571         * mini-amd64.c (emit_call): Handle the case when the callee might be
11572         an AOT method.
11574 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
11576         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
11577         extra safe.
11578         
11579         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
11581         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
11583 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
11585         * mini.c (mono_codegen): Don't leak here, to help people running
11586         monogrind.
11588 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
11590         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
11591         conversions in sse2 mode.
11593         * basic-float.cs: Add regression test.
11594         
11595         * mini-amd64.c: Reenable sse2.
11597 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11599         * mini-amd64.c: Disable sse2 until some regressions are fixed.
11601 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
11603         * driver.c: Copyright text should include 2005.
11604         
11605 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11607         * cpu-amd64.md (load_membase): Fix more max lengths.
11609 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
11611         * cpu-amd64.md (load_membase): Fix max length.
11613         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11615         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11617         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11618         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11620         * basic-float.cs: Add rounding regression test.
11622         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11624 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
11626         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11627         structures in registers for pinvoke wrappers.
11629 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
11631         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11633 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
11635         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11636         wrapper to mono_jit_thread_attach.
11638         * mini.c (mini_jit_thread_attach): New jit icall.
11640         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
11641         native->managed wrappers.
11643         * exceptions.cs: Add new regression test.
11645         * mini.c (optimize_branches): Check regions in the cbranch to throw
11646         block case as well. Fixes #73242.
11648 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11650         * mini.c: thread safety fixes.
11652 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
11654         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11655         patching stuff, since delegates use jump trampolines so there is
11656         no caller.
11658         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
11659         jump trampolines.
11660         
11661         * tramp-amd64.c: Fix build.
11663         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11664         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11666         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11667         Rename this to mono_arch....
11668         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11670         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11672         * mini-amd64.c (emit_call): If both the caller and the callee is
11673         guaranteed to have 32 bit addresses, emit a normal call.
11675         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11677         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
11678         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11679         method_ptr inside delegates.
11681 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
11683         * mini.c (mono_jit_free_method): Free the method info even if the native code is
11684         invalidated. Fixes #73001.
11686         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11688         * mini-x86.c: Only use stdcall for pinvokes on windows.
11690 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11692         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11693         * mini-x86.c: remove unreliable __thread var offset detection,
11694         use the correct accessors and enable by default.
11696 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
11698         * mini.c (mono_jit_free_method): Fix memory leak.
11700 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
11702         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
11704 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
11706         * cpu-amd64.md: Fix lengths of atomic opcodes.
11708 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11710         * driver.c: try to not imply using ICU is any good.
11712 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
11714         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
11715         functions as inline ops.
11717         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11718         some Interlocked functions as inline ops.
11720         * mini.c (move_basic_block_to_end): Fix bug in last patch.
11722         * mini.h (MonoBasicBlock): Reorganize fields a bit.
11724         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
11726         * mini.c: Add support for OP_NOT_TAKEN.
11728         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
11729         structures in registers for pinvoke wrappers.
11731         * mini-amd64.c: Fix warnings.
11733 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
11735         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11737         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11739         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
11740         address instead of loading the address from it.
11742         * mini-x86.c: Add support for returning small structs in registers
11743         on Win32. Fixes part of #70864.
11744         
11745 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
11747         * trace.c (get_token): Improve error checking.
11749 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
11751         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11753 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
11755         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11756         it can be reused for MonoClass.
11757         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11758         _LINKDEMAND.
11760 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
11762         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
11763         instead of a MonoReflectionMethod. The method information wasn't used
11764         when displaying SecurityException details (but will be now).
11766 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
11768         * Makefile.am : windows build fix.
11770 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
11772         * iltests.il: Add new regression test.
11774         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11775         #72522.
11777 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
11779         * mini.c: Moved linkdemand check into helper function check_linkdemand
11780         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
11781         LDFTN, LDVIRTFTN).
11783 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
11785         * declsec.c: Added statistics counter for different kinds of 
11786         LinkDemands.
11787         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11788         (and commented) declaration.
11789         * mini.c: Added statistics counter for security Demand code 
11790         generation. Added display of security statistics.
11792 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
11794         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
11795         Fix compilation errors under gcc-2.95.
11797 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
11799         * mini.c, driver.c: Use the new jit trampoline hashtable
11801 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11803         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
11805 2005-02-11  Martin Baulig  <martin@ximian.com>
11807         * debug-mini.c (mono_debug_close_method): Free the line number array.
11809 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11811         * aot.c: Break up large methods into smaller ones. Share GOT slots for
11812         icalls.
11814         * mini.h: Bump AOT file format version. 
11816 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
11818         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
11819         APTC and P/Invoke.
11820         * declsec.h: Added macros to get/set lazyly initialized security 
11821         informations about assemblies. Added new enum for different type of
11822         possible LinkDemand violation. Added function to check LinkDemands.
11823         * mini.h: Added a field to MonoCompile to hold any security violation
11824         detected when JITting a method (so it can be thrown later).
11825         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
11826         and CEE_CALLVIRT. Added code to throw exception at the end of
11827         mini_method_compile (note: the exception is unhandled right now).
11829 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
11831         * mini.c, jit-icalls.c: use the managed implementation of
11832         memset for initobj and memset, to avoid managed <-> unmanaged
11833         transitions.
11835 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11837         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
11838         optimization if it would need a GOT var.
11840         * basic.cs: Add tests for constant propagation and switch statements.
11842         * ssa.c: Fix out-of-range constant propagation and switch statements.
11844 2005-02-09    <vargaz@freemail.hu>
11846         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
11848 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
11850         * cpu-amd64.md (load_membase): Fix max length of load_membase.
11852 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11854         * mini.c: update to new signature of mono_class_get_allocation_ftn().
11856 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
11858         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
11859         arithmetic operations.
11861 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11863         * mini-ppc.c: add a workaround for broken user code that
11864         DllImports vararg functions with non-vararg signatures.
11866 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
11868         * mini.c (mono_jit_compile_method_inner): Add detection and a 
11869         meaningfull error message for assemblies written in Managed C++.
11871         * tramp-amd64.c mini-amd64.h: Add support for 
11872         create_trampoline_from_token ().
11874         * aot.c mini-x86.c abcremoval.c: Applied patch from
11875         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11877 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
11879         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
11880         which takes a MonoImage/token as parameter instead of a MonoMethod.
11882         * aot.c: Use the new trampoline for initializing vtables.
11884         * aot.c: Add support for ldfld/stfld_remote wrappers.
11886         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11887         rules for compare <MEM>, IMM.
11889         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11891         * aot.c: Handle inherited finalizers correctly.
11893 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
11895         * inssel.brg (stmt): Add a missing _setup_... ().
11897         * aot.c: Save some parts of the class state to the AOT file and use it
11898         to recompute that state when a class is initialized.
11900         * mini.c: Install AOT hooks into the runtime.
11902         * mini.h: Bump AOT file format version.
11903         
11904         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11905         Fixes #72148.
11907         * iltests.il: Add new test.
11909 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11911         * mini.c: fix typo.
11913 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11915         * mini.c: setup the statistical profiler in the thread attach
11916         callback to cope with the new single thread code.
11918 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11920         * mini-ppc.c: ensure we have enough room for the profiler
11921         calls (fixed bug#72084).
11923 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
11925         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
11926         it.
11928 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11930         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11932 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11934         * ssapre.c: Fixed an issue with down safety (this allows IronPython
11935         to succesfully execute parrotbench).
11936         * ssapre.h: Likewise.
11938 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11940         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11941         variable for stores to method arguments (fixes a SSAPRE issue).
11943 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11945         * mini.c: handle value types in dup, fixes gen-112.cs.
11947 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11949         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11950         sequence for calls in dynamic methods to avoid thunks.
11952 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11954         * mini.c: correctly remove dynamic methods from the hashtable.
11956 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11958         * driver.c: Disabled SSAPRE until fix the bug that appears
11959         in IronPython's parrotbench.
11961 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
11963         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11965         * mini.c (mono_method_to_ir): Revert the previous change.
11966         
11967         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11968         when AOT compiling.
11970         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
11971         mono_jit_info_table_find () etc. when running under valgrind.
11973         * inssel.brg: Fix warnings.
11975         * mini-exceptions.c: Fix warnings.
11977 2005-01-31  Martin Baulig  <martin@ximian.com>
11979         * driver.c (compile_all_methods_thread_main): Don't try to compile
11980         generic methods or anything which has type parameters.
11982 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
11984         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11986         * TestDriver.cs: Add --verbose flags.
11988         * graph.c ssa.c: Fix 64 bit warnings.
11989         
11990         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
11991         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11992         Fix 64 bit warnings.
11994         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11995         variable not spotted by gcc.
11996         
11997         * mini-amd64.c inssel-amd64.brg: Applied patch from  
11998         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
11999         X86_COMPARE_MEMBASE opcodes.
12001         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
12003 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
12005         * *: MonoMethod->signature might be NULL now. You *MUST* use
12006         mono_method_signature.
12008 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
12010         * driver.c (compile_all_methods_thread_main): Compile the methods
12011         without invoking cctors.
12013 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12015         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
12016         * basic-calls.cs: test for the above.
12018 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
12020         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
12021         MonoJitInfo changes.
12023 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
12025         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
12026         eagerly if it contains dynamic methods.
12027         
12028         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
12030         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
12031         trace, it is now computed by an icall from trace_ips.
12032         
12033         * mini-exceptions.c: Fix a warning.
12035 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
12037         * mini-exceptions.c: don't bother getting stack trace info if
12038         it's not going to be used.
12040 2005-01-27  Raja R Harinath  <rharinath@novell.com>
12042         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
12043         ssapre-mini-ops.h.
12045 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
12047         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
12049         * aot.c: Avoid calling mono_method_get_header () if not needed.
12051         * mini.h: Bump AOT file format version.
12052         
12053         * mini.c (mono_emit_native_call): Allocate a GOT var here.
12055         * mini.c (mono_print_tree): Print more info for calls.
12057 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
12059         * declsec.h: Remove warning by adding missing include for marshal.h
12061 2005-01-26  Martin Baulig  <martin@ximian.com>
12063         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
12064         `ip' twice.
12066 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
12068         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
12069         flags.
12071         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
12073         * aot.c (mono_compile_assembly): Fix a warning.
12075 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
12077         * declsec.c: Look for security attributes on the original MonoMethod 
12078         (and not the wrapped one). This fix permissions on icalls.
12080 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12082         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12084         * mini.c (mono_allocate_stack_slots): Add a fixme.
12086         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12088 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12090         * inssel.brg: optimize casts of sealed types (more
12091         optimizations waiting for fixes in remoting).
12093 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12095         * inssel.brg (stmt): Add another dummy rule.
12097         * driver.c: Fix warnings.
12099         * driver.c (mono_main): If running under valgrind, instruct glib to use
12100         the system allocation functions so valgrind can track the memory
12101         allocated by the g_... functions.
12103         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
12105         * mini-ops.h: Add OP_DUMMY_STORE opcode.
12107         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
12109         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
12110         variables in try regions.
12112         * mini.c (mini_method_compile): Don't disable optimizations on large
12113         methods when AOT compiling.
12115         * mini.c (mono_allocate_stack_slots): New arch independent method to 
12116         allocate stack slots. Not yet used.
12118 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
12120         * debug-mini.c (mono_debug_close_method): Plug some leaks.
12122 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
12124         * mini-ppc.c: make the branch info relative as the code
12125         buffer can be reallocated.
12127 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
12129         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
12130         * driver.c: Removed the AOT/security restriction. Now initialize the
12131         security manager (in metadata) if --security is used.
12132         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
12133         rather than the pointer to declarative security, when AOT is used.
12135 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
12137         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
12138         basic blocks, reduced intrinsic exception throwing code size.
12140 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
12142         * driver.c (mini_usage): Reorder the usage screen.
12144 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
12146         * mini.c (mono_resolve_patch_target): Fix warning.
12148 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
12150         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
12151         previous patch.
12153         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12155         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
12156         breaks the amd64 build.
12158         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
12159         register allocation. Fixes #71454.
12161         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12163         * arrays.cs: Add new regression test.   
12165 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12167         * ssapre.c: Turned usage of snprintf to GString.
12168         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
12169         (I left it on by mistake in my previous commit).
12171 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
12173         * mini.c, cfold.c, basic-calls.cs: preserve side effects
12174         on cond branch optimization (fixes bug# 71515).
12176 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12178         * abcremoval.c: Fixed bug 71062.
12179         * abcremoval.h: Likewise.
12181 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12183         * mini.c: Added a new functionality to optimize_branches, the removal
12184         of useless basic blocks, and fixed some problem in the removal of
12185         critical edges; some utility functions added for both purposes.
12186         * ssapre.c: Added complex expression support, and fixed bug 70637.
12187         * ssapre.h: Likewise.
12188         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
12189         enabled in SSAPRE.
12190         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
12191         * driver.c: Re-enabled SSAPRE.
12193 2005-01-19  Martin Baulig  <martin@ximian.com>
12195         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
12196         the result of mono_get_method_constrained().
12198 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
12200         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
12201         manager.
12203 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
12205         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
12206         be detected.  Fixes #59296.
12208 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12210         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
12211         which can happen. Fixes #71361.
12213 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12215         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
12216         manager.
12218 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12220         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
12221         appdomain-unload.exe to fail.
12222         
12223         * mini.c: Fix some memory leaks.
12225 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
12227         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
12228         Fixed bug and sped up some codepaths.
12230 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12232         * mini.c: Fix some memory leaks.
12234         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
12235         conversion.
12237         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
12239         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
12240         #71320.
12242         * iltests.il: Add regression test for #71320.
12244 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
12246         * mini.c (mono_codegen): Fix installation of profiler hooks.
12248         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
12250 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12252         * mini.h, mini.c, cfold.c: optimize access to enum
12253         readonly fields, too. Eval conditional branches if possible
12254         to perform unreachable code removal in more cases.
12256 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
12258         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
12260         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
12261         code manager.
12263         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
12264         WinXP DEP. Fixes #71244.
12266 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
12268         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
12270 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
12272         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
12274 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
12276         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
12277         changes.
12279         * mini.h: Bump AOT version.
12281         * mini.h (MonoCompile): Change exvar to a hash table.
12283         * mini.c: Allocate a separate exvar for each handler block.
12285         * mini.c: Get rid of the computation of filter_lengths, its not needed.
12287         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
12288         ex var with the pending exception and only throw if the two are equal.
12289         Fixes #68552.
12290         
12291         * exceptions.cs: Add tests for rethrow and nested catch clauses.
12293         * mini-x86.c: Fix warnings.
12295         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
12296         used by all the ports now.
12298         * aot.c: Add write-symbols and save-temps options.
12300 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12302         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
12304 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
12306         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
12307         operations.
12309         * tramp-s390.c: Check vtable slot belongs to the domain.
12311         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
12312         as per other platforms.
12314         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
12316 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
12318         * driver.c: we don't run the Main() code in a subthread anymore.
12320 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
12322         * mini.c: added experimental rtc support in the statistical
12323         profiler: if the user has the permission, more accurate statistics
12324         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
12325         The MONO_RTC value must be restricted to what the linux rtc allows:
12326         power of two from 64 to 8192 Hz.
12328 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12330         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
12332 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
12334         * mini-ppc.c: better icache flush for smp.
12336 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
12338         * mini-amd64.c (emit_move_return_value): Fix memory leak.
12340         * mini-x86.c (get_call_info): Add the get_call_info () code from the
12341         amd64 port, not yet used.
12343 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12345         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
12346         a struct type.
12348 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
12350         * driver.c: Added --security option to activate the security manager.
12351         Right now this will allow code generation for declarative demands and
12352         is disabled when AOT is specified.
12353         * mini.c: Add code generation for declarative security demands.
12354         * mini.h: Add mono_use_security_manager as an extern gboolean.
12356 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12358         * aot.c (mono_compile_assembly): Speed up compilation a bit by
12359         emitting more dense assembly code.
12361         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
12362         exception throwing stuff.
12364 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
12366         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
12367         dead code.
12369         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
12370         left in by mistake.
12372         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
12373         fixed.
12375         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
12377         * tramp-*.c: Only patch vtable slots if the object is in the current
12378         domain. Fixes appdomain-unload.exe.
12380         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
12381         
12382         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
12383         x86 branch.
12385 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12387         * mini.c (reverse_branch_op): New helper function.
12389         * mini.c (optimize_branches): Run the new optimization only on 
12390         platforms which support it. Also reverse all kinds of branches.
12392         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
12394         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
12395         a throw statement.
12397         * mini.c (optimize_branches): Reverse not-equals branches if the false
12398         bblock is a throw. This happens a lot of time with argument checking in
12399         corlib.
12401         * mini.c (mono_codegen): Add support for placing basic blocks after
12402         the function epilogue.
12404         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
12405         function epilogue.
12406         
12407 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
12409         * mini.c (setup_stat_profiler): Only set this up if the platform
12410         supports ITIMER_PROF.
12412 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12414         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
12415         previous patch.
12417         * inssel.brg: Fix a warning.
12419 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
12421         * mini.c: added support for statistical profiler 
12422         (run with: --profile=default:stat).
12424 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
12426         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
12428         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
12430         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
12431         related to global registers from the amd64 port.
12433 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
12435         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
12437         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
12438         with global registers.
12439         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
12441         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
12443 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
12445         * debug-mini.c (encode_value): Fix off-by-one.
12447         * aot.c (encode_value): Likewise.
12449         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
12451 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
12453         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
12454         AOT.
12456         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
12457         
12458         * aot.c (emit_method_info): Increase size of temp buffer.
12460         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
12461         the AOT case.
12463 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
12465         * aot.c (emit_method_info): Fix build.
12466         
12467         * aot.c: Further rework of the AOT file format to reduce the size of
12468         the method info data.
12470         * mini.h: Bump AOT file format version.
12472 2004-12-27  Martin Baulig  <martin@ximian.com>
12474         * mini.c (mini_get_method): New static method; call
12475         mono_get_method_full() and mono_get_inflated_method().
12476         (mono_method_to_ir): Use mini_get_method() instead of
12477         mono_get_method_full(). 
12479 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
12481         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
12483 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
12485         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
12487         * inssel-amd64.brg: Add some optimization rules.
12489 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
12491         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
12492         standard not GC'd stuff is fine.
12494 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
12496         * aot.c: Rework the AOT file format to get rid of most of the global
12497         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
12499         * mini.h: Bump AOT file format version.
12500         
12501 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
12503         * mini.h: Bump AOT file format version.
12505         * aot.c (mono_aot_is_got_entry): New function to determine if an 
12506         address is inside a GOT.
12508         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
12510         * cpu-pentium.md: Increase the maximum size of some instructions which
12511         might involve a got access.
12512         
12513         * mini.c (get_method_from_ip): Another debug helper function.
12515         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
12516         when got var accesses are created during the decompose phase.
12518         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
12520         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
12521         argument mini_compile_method and to MonoCompile, and use this to
12522         determine whenever a given method is compiled for AOT. This allows the
12523         other methods compiled during AOT compilation to be free of AOT stuff,
12524         so the backends does not need to add special support for them by
12525         creating a fake GOT etc.
12527         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
12528         longer needed.
12530 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12532         * mini.c (mono_method_to_ir): It turns out that some of the
12533         x-appdomain wrappers are lax with types, so just ignore this for
12534         all wrappers.
12536         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
12537         at the vtable->klass. If it is non-shared code we can just use the
12538         vtable.
12540 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
12542         * mini-ppc.c: access MonoDomain from tls, too.
12544 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
12546         * declsec.c: Removed unused variable (and related warning ;-)
12548 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12550         * iltests.il: New test for LDELEMA on an array of ref types.
12552         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
12553         all ldelema's on reftypes.
12554         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
12555         it was the wrong place to put it.
12557         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
12558         register to pop to make this cleaner, at the request of Paolo.
12560 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12562         * mini-ops.h (OP_GETHASHCODE): New op.
12564         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
12566         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
12567         operation.
12569         For a microbenchmark, this reduces the cost of Hashtable.get_Item
12570         by 25%.
12571         
12572         * mini-x86.c (mono_arch_output_basic_block): Rather than
12574         add ebp, 4
12576         Emit
12578         pop edx
12580         The first is 3 bytes while the second is 1. This saves 36 kb on
12581         mscorlib, quite a big saving. When bootstraping mcs, I was able to
12582         see a small boost because of icache locality.
12584         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
12586 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
12588         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
12589         started code sharing with the generic code.
12591 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
12593         * mini-ppc.c, cpu-g4.md: added code for direct access to
12594         tls data slots.
12596 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
12598         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
12599          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12600         to OP_TLS_GET.
12602 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
12604         * declsec.c|h: Added functions to cache the declarative stack modifiers
12605         in MonoJitInfo and to create a security frame from a MonoJitInfo 
12606         structure.
12607         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12608         created. Register internal calls for System.Security.SecurityFrame::
12609         _GetSecurityFrame and _GetSecurityStack.
12610         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12611         the definitions for the new stack walk/callback mechanism.
12612         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
12613         first security frame for LinkDemands and InheritanceDemands) and
12614         GetSecurityStack for Demands. Both use the new mono_walk_stack code
12615         from lupus.
12616         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12617         walk initialization (lupus).
12619 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12621         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12622         idiom.
12623         (handle_loaded_temps): Do not create a temporary variable for
12624         things that we know are temps. They will never be modified.
12625         (mono_spill_call): Set MONO_INST_IS_TEMP
12626         (mono_emulate_opcode): ditto
12627         (emit_tree): ditto
12628         (mono_method_to_ir.CEE_DUP): ditto
12630 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
12632         * mini.c (type_to_eval_stack_type): Make this handle the void type
12633         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12634         (emit_tree): use ip_in_bb to special case some common idioms
12635         Update all callers to pass in the IP.
12636         (mono_method_to_ir): Make CEE_CALL* do the above as well.
12638         This gives us a nice 2% speedup in mcs bootstrap.
12640         * mini-x86.c (peephole_pass): Peephole pass to make
12641         mov  [foo], eax
12642         push [foo]
12644         into
12646         mov [foo], eax
12647         push eax
12649         * mini.c (ip_in_bb): new method.
12650         (mono_method_to_ir): use this method rather than doing the hash
12651         lookup ourselves.
12653         * linear-scan.c (mono_linear_scan): When expiring actives, you
12654         don't need to keep around variables that expire on this
12655         instruction. This makes it so that:
12656              a = b + 1
12657         will turn into:
12658              store (ebx add (ebx, 1))
12659         which will become
12660              add ebx, 1
12662 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
12664         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
12665         combination to avoid doing two copies. Fix up problems with previous
12666         patch.
12668         * mini.c: Fix 64 bit warnings.
12670         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12672 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
12674         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12675         changes from the x86 code.
12677         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12679 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
12681         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12682         throwing code to reduce its size, unify the AOT and non-aot code and 
12683         get rid of relocations in the AOT case.
12685         * mini-x86.h mini.c exceptions-x86.c 
12686         (mono_arch_get_throw_corlib_exception): New arch specific function to 
12687         raise corlib exceptions which doesn't require relocations in the 
12688         caller.
12690         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12692 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
12694         * mini.c (mono_emit_method_call): Only allocate the got var when it is
12695         needed.
12697         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12698         in the AOT case.
12700 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12702         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12703         with add function when used from Inc/dec atomic 
12704         functions. Re-enabled optimization on x86.
12705         * mini-ops.h: renamed atomic_add functions to
12706         allow _add to match the Interlocked::Add and
12707         _add_next to match Interlocked::Inc/Dec.
12709 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
12711         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12712         linking of BBs to the end BB, and enabled SSAPRE also with
12713         consprop and copyprop (which was prevented by that bug).
12715 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12717         * mini-x86.c: disabling the Interlocked optimizing code. 
12719 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12721         * aot.c (load_aot_module): Move reading of got_addr after the AOT
12722         file version check.
12723         
12724 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12726         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
12727         interlocked optimization due lack of support on x86, rewrote 
12728         exchange to take into account that base may be in eax.
12729         
12730         xsp works again; activated Interlocked optimizing code.
12731         
12732 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12734         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12736 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
12738         * mini-ops.h: Add new opcodes.
12740         * mini.h: Add new patch types. Add got_var to MonoCompile.
12742         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
12743         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12744         make it work with all kinds of patchable code.
12746         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12747         address of the GOT, and referencing entries in the GOT.
12749         * mini.c: Add code to load the GOT address if needed by an opcode.
12751         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
12752         independent AOT code on the x86 using an elf-style Global Offset Table.
12754 2004-12-14  Raja R Harinath  <rharinath@novell.com>
12756         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12758 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12760         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12761         when running xsp.
12763 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
12765         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12766         of Interlocked:Increment/Decrement/Add as inline ops.
12767         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12769 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
12771         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12772         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12774 2004-12-12  Duncan Mak  <duncan@ximian.com>
12776         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12777         again. `patch_info->table_size' is no longer valid after Zoltan's
12778         commit #37636.
12780 2004-12-12  Martin Baulig  <martin@ximian.com>
12782         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12783         if we are the "real" method, ie. not an inlined method inside it.
12785 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
12787         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12788         before we look in the special fields table. This fixes
12789         ../tests/thread-static-init.cs.
12791 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12793         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
12794         for Array get_Rank and get_Length. Fixes bug #70465.
12796 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
12798         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
12799         separate structure to reduce the size of MonoJumpInfo.
12801 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
12803         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
12805 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
12807         * mini.c (mini_get_inst_for_method): Changed to allow ports
12808         to return a MonoInst instead of opcode 
12809         (renamed mini_get_opcode_for_method to better reflect the new functionality)
12810         
12811         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
12812         Allow ports to return a created MonoInst instead of op-code, will enable
12813         new optimizations.
12814         (renamed mini_get_opcode_for_method to better reflected the functionality)
12816 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
12818         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
12820 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12822         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
12823         Fixes #69985.
12825 2004-12-08  Martin Baulig  <martin@ximian.com>
12827         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
12828         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
12830 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12832         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
12833         correctly.
12835         * exceptions.cs: Disable some tests which depend on properties of x86 fp
12836         arithmetic.
12838 2004-12-08  Raja R Harinath  <rharinath@novell.com>
12840         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
12842 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
12844         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
12845         bug introduced by the previous patch.
12847 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12849         * mini-ppc.c, objectc.cs: handle large structs passed by value
12850         (fixes bug #69972).
12852 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12854         * mini-ppc.c: OP_ARGLIST implementation from
12855         Geoff Norton  <gnorton@customerdna.com>.
12857 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12859         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12860         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12862 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12864         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12866 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12868         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12869         support.
12871 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
12873         * mini-sparc.c: Zero out localled-ed memory.
12875         * iltests.il: Add tests for zeroing out localloc-ed memory.
12877 2004-12-04  Martin Baulig  <martin@ximian.com>
12879         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12880         mono_method_get_signature_full().       
12882 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
12884         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12885         and some utility functions (always for SSAPRE), integrated SSAPRE.
12886         * mini.h: Likewise.
12887         * driver.c: Added ssapre option.
12888         * ssa.c: Small fix on OP_ARG handling.
12889         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12890         * Makefile.am: Likewise.
12892 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
12894         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12895         now in the xp code.
12897         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12898         icall.
12900 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12902         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12903         
12904         * cpu-s390.md : Increase instruction length of oparglist.
12906         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12908 2004-11-30  Martin Baulig  <martin@ximian.com>
12910         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12911         virtual generic methods.  We call a special helper_compile_generic_method()
12912         icall to retrieve the method from the vtable, inflate and compile
12913         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
12915         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12917 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
12919         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12921 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
12923         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12924         Fixes #69929.
12926 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
12928         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12929         platforms with PIC aot.
12931 2004-11-28  Martin Baulig  <martin@ximian.com>
12933         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12934         Fixes gen-112.cs.
12936 2004-11-28  Martin Baulig  <martin@ximian.com>
12938         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12939         the result of mono_type_get_underlying_type() to check whether
12940         we're byref.
12942 2004-11-26  Martin Baulig  <martin@ximian.com>
12944         * mini.c
12945         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12946         in the g_assert().
12948 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
12950         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12951         the same way as the other arguments so they won't get clobbered.
12953         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
12954         calls through R11 since it is clobbered by the trampoline code.
12956 2004-11-26  Raja R Harinath  <rharinath@novell.com>
12958         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12959         pick up in-tree mscorlib.dll.
12961 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
12963         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12965         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
12966         runtime data/code are now stored in a table similar to the GOT in ELF. 
12967         This allows the code itself to be position independent.
12969         * aot.c: Fix loading of referenced assemblies after the lazy assembly
12970         loading changes.
12972         * aot.c: Attach ELF type (object/function) directives to all global
12973         symbols.
12975         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12977         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12979         * mini-amd64.h: Turn on PIC AOT code.
12981         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12982         returning the offset within an OP_AOTCONST instruction where the GOT
12983         offset needs to be added.
12985         * mini.h: Bump AOT file format version.
12987 2004-11-25  Martin Baulig  <martin@ximian.com>
12989         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12990         uninflated generic methods.
12992 2004-11-25  Martin Baulig  <martin@ximian.com>
12994         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12996 2004-11-24  Martin Baulig  <martin@ximian.com>
12998         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12999         original klass (this only applies for generic instances).
13001 2004-11-24  Martin Baulig  <martin@ximian.com>
13003         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
13004         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
13005         that array).
13007 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
13009         * mini.c (mono_method_to_ir): Disable inlining for methods containing
13010         localloc. Fixes #69678.
13012         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
13013         
13014 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
13016         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
13017         used SSE registers on pinvoke calls. Fixes #69774.
13019 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
13021         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
13022         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
13024 2004-11-23  Raja R Harinath  <rharinath@novell.com>
13026         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
13027         Refer directly to the mcs/ tree.
13029 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13031         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
13032         Check if a trampoline for a synchronized method is required. 
13034 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
13036         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
13037         with localloc if needed. Throe arithmetric exception in
13038         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
13039         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
13041 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
13043         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
13044         types before switching on type.  Fixes #69622.
13046 2004-11-19  Raja R Harinath  <rharinath@novell.com>
13048         * Makefile.am (check-local): New.  Integrate into 'make check'.
13049         (MCS,RUNTIME): Define using in-tree mono and mcs.
13050         (ILASM): New.
13051         (%.exe): Use $(ILASM).
13053 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
13055         * mini-ppc.c: adjust initial prolog size (bug #69691).
13057 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
13059         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
13060         #69664.
13062 2004-11-17  Raja R Harinath  <rharinath@novell.com>
13064         * Makefile.am (clean-local): Rename from 'clean'.
13066 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13068         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
13069         to mono_arch_is_int_overflow. 
13070         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
13071         SIGFPE events.
13073 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
13075         * declsec.c|h: New files to support declarative security attributes.
13076         Added function to check if a method has (applicable) security.
13077         * mini.c|h: Add check for declarative security attributes in
13078         mono_method_check_inlining.
13079         * Makefile.am: Added declsec.c and declsec.h to the build.
13081 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13083         * mini.c, mini.h: update to keep dynamic code info per-domain.
13085 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
13087         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
13088         (mini_init): Get rid of it from here too.
13090 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13092         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
13093         implemented OP_RETHROW (patch by Geoff Norton
13094         <gnorton@customerdna.com>).
13096 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
13098         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
13099         between appdomains.  Fixes appdomain-unload on PPC.
13101 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
13103         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13104         mini-exceptions.c: handle the new wrapper types.
13105         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
13106         token value as a MonoClass* when compiling a wrapper.
13107         mono_jit_create_remoting_trampoline now takes an additional
13108         MonoRemotingTarget parameter.
13109         
13110 2004-11-10  Martin Baulig  <martin@localhost>
13112         * mini.c (mono_method_to_ir): Use `generic_container->context'
13113         rather than creating a new one.
13115 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13117         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
13119         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
13121 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
13123         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
13124         the experimental aot cache stuff.
13126 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13128         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13129         mini-exceptions.c: update to exception clause structure changes.
13131 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13133         * exceptions-x86.c (throw_exception): Fix warnings.
13135         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
13136         for OP_RETHROW.
13138 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13140         * exceptions-sparc.c (get_throw_exception): Really fix this.
13142 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
13144         * tramp-*.c: we no longer support icalls without wrappers, so
13145         a bit of code can be removed here
13147 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
13149         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
13150         patch.
13152         * cpu-sparc.md: Add op_rethrow.
13154         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
13156         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
13158         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
13159         * mini-ops.h: Add OP_RETHROW.
13161         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
13163         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
13165 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
13166         
13167         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
13168         Makes the output much easier to read
13170 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
13172         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
13173         prevents another huge leak when compiling with ssa. Secondly, the
13174         performance of doing this rather than freeing the lists is much
13175         better. GList does a lock every time you allocate a list link,
13176         so that it can use a memory pool. So, it is better to just use
13177         a memory pool of our own.
13178         
13179         * ssa.c, linear-scan.c: replace g_list_remove_link with
13180         g_list_delete.  The remove one does not free the GList, so we were
13181         leaking memory. On -O=all --compile-all with corlib, this cut down
13182         3 MB of allocations.
13184 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
13186         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
13188         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
13190         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
13191         into a new function mono_create_jit_trampoline ().
13193 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
13195         * trace.c (get_spec): Allow tracing of classes without a namespace.
13197 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
13199         * mini.c: Fix pointer overwrite in mini_method_compile.
13201 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
13203         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
13204         The darwin ABI needs some special handling for 1 and 2 byte structs
13205         Lets use lbz/lhz instead of lwz everywhere.
13206         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
13207         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
13208         Use stb/sth for the former, and put the latter always on stack instead of in
13209         argument registers.
13211 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
13213         * trace.c (is_filenamechar): Add '_'.
13215 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
13217         * mini-s390.c: Fix prolog length to allow for large trace requirements.
13219         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
13221 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
13223         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
13224         depends on libmonogc. Fixes #68805.
13226 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
13228         * mini.c (mono_jit_free_method): Provide extra information for
13229         this error.  Currently this leaks, but will be turned into a
13230         developer option in the future.
13232 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
13234         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
13236 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
13238         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
13239         boundary. Fixes reading of PATCH_INFO_R4 and R8.
13240         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
13242 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
13244         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
13245         trampolines for AOT code.
13247 2004-10-22    <vargaz@freemail.hu>
13249         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
13250         constructed types. Fixes #68136.
13252 2004-10-21  Martin Baulig  <martin@ximian.com>
13254         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
13255         if it returns true, unwind the stack to the call instruction.
13257 2004-10-21    <vargaz@freemail.hu>
13259         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
13261         * mini.h: Bump AOT version number.
13263         * objects.cs: Add another test for unbox trampolines.
13265         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
13266         valuetype methods.
13268 2004-10-20    <vargaz@freemail.hu>
13270         * driver.c: Add SHARED to the set of optimizations tested.
13272         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
13274         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
13275         used by CEE_NEWARR.
13277         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
13279 2004-10-20  Martin Baulig  <martin@ximian.com>
13281         * mini-exceptions.c (mono_handle_exception): Call
13282         mono_debugger_handle_exception() to tell the debugger about
13283         catch/finally clauses.
13285 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
13287         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
13289         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
13290         #68447.
13292 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
13294         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
13295         methods as their native size, fixed bug #57543, #57545.
13296         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
13297         This saves a temporary register and mullw call down into 1 (minor perf
13298         increase for cases like sum = sum * 5;  This use to translate into:
13299             li r11,5
13300             mullw r28,r28,r11
13301         It now translates to
13302             mulli r28,r28,5
13304 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
13306         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
13307         #68388.
13309 2004-10-11  Martin Baulig  <martin@ximian.com>
13311         * mini.c (mono_method_to_ir): If we're a generic method, get the
13312         MonoGenericContainer from our MonoMethodNormal and create a
13313         MonoGenericContext from it.
13315 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
13317         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
13319         * basic-long.cs: Add test for checked i8->i2 cast.
13321 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13323         * inssel-ppc.brg: added a couple of speedup rules.
13325 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
13327         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
13328         to speed up rebuilds.
13330 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13332         * mini-s390.c: Minor fix to OP_OR_IMM.
13334 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
13336         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
13337         better. Fixes appdomain-unload.exe on sparc.
13339 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
13341         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
13342         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
13343         see bug 67324.
13345 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
13347         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
13349 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
13351         * mini.c: Always generate a field read/write wrapper for members
13352         of the class MarshalByRefObject since the actual instance could
13353         be a CBO.
13355 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
13357         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
13359 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
13361         * driver.c mini.h trace.c: Move the setting of the main assembly into
13362         a separate function called mono_trace_set_assembly () and call it after
13363         actually loading the main assembly. Fixes #66872.
13365 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
13367         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
13368         using the code manager.
13370 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
13372         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
13374 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
13376         * cpu-amd64.md: Fix bug in previous patch.
13377         
13378         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
13379         #66650.
13381 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
13383         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13384         mini-exceptions.c: updates for changed stack walk interface.
13386 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13388         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
13390 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
13392         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
13394 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
13396         * driver.c (mini_regression_list): Do not call mono_assembly_close 
13397         since assemblies can't be unloaded.
13398         
13399 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13401         * cpu-amd64.md: Fix more instruction lengths.
13403         * cpu-amd64.md: Fix lengths of some instructions.
13405 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
13407         * inssel.brg: Make the array ldelema check aot friendly.
13409 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13411         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
13413         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
13415 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
13417         * mini-x86.c: Fix build.
13419         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
13420         mono_type_get_underlying_type () helper function to simplify code.
13421         
13422 2004-09-09  Martin Baulig  <martin@ximian.com>
13424         * mini-amd64.c: Don't access `type->data.klass' directly, call
13425         mono_class_from_mono_type() instead since the type may be a
13426         generic instance.
13428 2004-09-09  Martin Baulig  <martin@ximian.com>
13430         * mini-amd64.c (get_call_info): Fix support for generic instances.
13431         (add_valuetype): Use mono_class_from_mono_type() to get the class
13432         since we can be a generic instance.
13434 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
13436         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
13438 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13440         * liveness.c: reset spill costs on each scan: bug 62107
13442 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
13444         * exceptions-sparc.c (mono_arch_find_jit_info): remove
13445         unnecessary line that doesn't compile
13447 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
13449         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
13450         trampolines, make them call an error function so people can fix their
13451         code.
13453 2004-09-06  Martin Baulig  <martin@ximian.com>
13455         * mini.c (mono_method_to_ir): When initializing locals, handle a
13456         generic instances like a valuetype if it's a valuetype and like a
13457         class if it's a class.
13459 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13461         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
13462         stack. Fixes #64674.
13464         * exceptions.cs: Add test for unwinding of call arguments.
13466 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
13468         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
13469         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
13470         set the carry/borrow flag). The sparc and s390 implementations
13471         can now use optimized versions (and simplify the code). ppc bugfixes.
13473 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13475         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
13477 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
13479         * inssel-amd64.brg: Remove leftover 32 bit rule.
13481         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
13483 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
13485         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
13486         mono_arch_find_jit_info functions into a new function. Fix a memory
13487         leak.
13489         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
13490         refactored code.
13491         
13492 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13494         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
13495         as well.
13496         
13497         * exceptions.cs: Add array size tests.
13499         * mini.c: Allocate a separate icall wrapper for each arity of 
13500         mono_array_new_va. Fixes #59509.
13502         * exceptions.cs: Add testcase for 64578.
13504         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
13506         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
13507         
13508 2004-09-02  Martin Baulig  <martin@ximian.com>
13510         * mini.c (mono_method_to_ir): When initializing the locals, call
13511         handle_initobj() on the generic instance itself, not its
13512         underlying type.
13514 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13516         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
13517         MonoJitInfo for dynamic methods.
13519         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
13521         * mini.c: Add support for freeing JIT data for dynamic methods.
13522         
13523 2004-09-01  Martin Baulig  <martin@ximian.com>
13525         * mini-x86.c (is_regsize_var): Added support for generic
13526         instances.
13527         (mono_arch_emit_prolog): Make this compile again, use
13528         `x86_push_imm_template (code)'.
13530 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
13532         * mini-x86.c: make all push_imm instructions that get
13533         patched always emit the long form
13535 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
13537         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
13538         in a per-domain hash.
13540         * mini-amd64.c (merge_argument_class_from_type): Handle generic
13541         types.
13543 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
13545         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
13546         work.
13547         
13548         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
13549         work.
13551         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
13552         Beginnings of SSE2 support.
13554         * exceptions.cs: Add more tests for checked int<->uint casts.
13556 2004-08-28  Martin Baulig  <martin@ximian.com>
13558         * mini-x86.c (mono_arch_instrument_epilog): Added support for
13559         generic instances.
13561         * mini.c
13562         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
13563         Handle generic instances recursively.
13565 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13567         * iltests.il: test for conv.u8 on a constant
13569 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13571         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
13572         LCONV_x4 (shrun_32 (membase)).
13574 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13576         * inssel-x86.brg: c&p rules for push/setret of long
13578 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13580         * inssel-x86.brg: c&p rules for compare (base, regvar) and
13581         compare (regvar, base)
13583         * inssel-x86.brg: more burg love
13585         * inssel.brg: more cleanup
13587         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
13589 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13591         * basic-long.cs, basic-calls.cs: new tests for optimization.
13593 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
13595         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
13596         patch.
13598 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13600         * mini-amd64.c (read_tls_offset_from_method): Add another case.
13601         
13602 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
13604         * inssel.brg (mini_emit_memcpy): use 
13605         NO_UNALIGNED_ACCESS to disable memcpy optimization
13607 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13609         * mini-amd64.c: Handle generic types in various places.
13611         * mini.c (mono_method_to_ir): Handle generic types in init locals.
13613 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
13615         * mini.c (handle_box): Fix warning.
13617         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13619         * mini-amd64.h: Enable the emit_state optimization.
13621         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13623         * mini-amd64.c: Add some new 64 bit peephole opts.
13625         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13627         * cpu-amd64.md: sreg1 of div instructions must be %rax.
13629         * mini-amd64.c: Register allocator fixes.
13631         * mini.c: Add an optimization to emit_state to avoid allocation of new
13632         registers on some platforms.
13634 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
13636         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13638         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13639         allocation. Fixes #63085.
13641         * basic-long.cs: Add new regression test.
13643         * mini-amd64.c: Register allocator improvements.
13645 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
13647         * mini-amd64.c (read_tls_offset_from_method): Add another code
13648         sequence.
13650         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13651         instruction sequence for nullifying class init trampolines.
13653         * objects.cs: Add new regalloc test.
13655         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13657 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13659         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13660         
13661         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13662         arguments.
13664         * driver.c: Fix profiling after TLS changes.
13665         
13666         * driver.c (mono_main): Set mono_stats.enabled if needed.
13668         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13669         CEE_BOX.
13671 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
13673         * mini-x86.c: use a 1 op rather than a 2 op tls access
13674         instruction -> faster.
13676 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13678         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13679         x86 backend.
13681 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13683         * exceptions-sparc.c (throw_exception): fix typo
13685 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13687         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13688         set tree->dreg correctly with tls. Allow any
13689         register to be used.
13691         * mini-x86.c (read_tls_offset_from_method): add new code
13692         generation pattern seen with GCC.
13695 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13697         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13698         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13699         exceptions-sparc.c: fix some performance issues in exception
13700         handling and setting of the stack trace for exceptions that were
13701         already thrown.
13703 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13705         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
13706         x86 backend.
13707         
13708         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
13709         registers.
13711 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13713         This patch inlines tls access, when possible.
13714         
13715         * mini.h: new arch functions for TLS intrinsics.
13716         All platforms updated with a stub.
13718         * mini.c: use the new intrinsics
13720         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
13721         arch specific intrinsic for tls variables
13723 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13725         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
13726         under windows.
13728 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13730         * mini.c: thread local allocation
13732 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
13734         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13736         * Makefile.am: Link against the static version of libmonogc.
13737         
13738         * Makefile.am: Link the static versions of the convenience libraries
13739         into the mono executable.
13741         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13743 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
13745         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13746         on integer overflow.
13748         * mini-amd64.c: Reorganize function call code.
13750         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13752 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13754         * inssel-x86.brg: use xor eax,eax.
13755         
13756         * basic.cs: new tests
13758 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13760         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13761         in exception throwing code.
13762         
13763 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13765         * inssel-x86.brg: use xor esi,esi.
13767 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13769         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13770         can trace methods compiled during mini_init () too.
13772         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
13773         CEE_CONV_U4.
13775 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13777         * Makefile.am: static link on x86 (r=zoltan)
13779 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13781         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13782         code since it causes some programs to fail.
13784 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
13786         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13788 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13790         * mini.c: ovfops_op_map - add STACK_OBJ case for
13791         CONV_I 
13792         * basic.cs: add test_0_pin_string as test
13793         case for above.
13795 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13797         * Makefile.am: build C# if srcdir != builddir
13799 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13801         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
13802         fall-through blocks.
13804 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13806         * driver.c: enable loop by default again and include abcrem in -O=all.
13808 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
13810         * iltests.il: Add some localloc tests.
13812         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
13814         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
13815         Fixes #62574.
13817         * inssel-amd64.brg: Add some optimizations.
13819         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
13820         for gcc-3.4.
13822         * Makefile.am: Statically link mono against libmono on AMD64.
13823         
13824         * mini-amd64.c inssel-amd64.brg: Optimizations.
13826 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
13828         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
13830         * tramp-amd64.c: Patch calling code in trampolines.
13832 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
13834         * mini-amd64.c: pinvoke struct passing fixes.
13836 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
13838         * mini-sparc.c: redo change, make mono_arch_cpu_init call
13839         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
13841 2004-08-05  Duncan Mak  <duncan@ximian.com>
13843         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13844         CEE_LDELEM_ANY.
13846 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13848         * mini-amd64.c (emit_move_return_value): Move return value for normal
13849         calls too.
13851 2004-08-05  Martin Baulig  <martin@ximian.com>
13853         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13854         `type->type'; just modify `type' itself when dealing with enums
13855         and generic instances.
13856         (check_call_signature): Make `simple_type' a `MonoType *'.
13858 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13860         * mini.c: Use OP_PADD to add offsets to addresses.
13862         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13864 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
13866         * mini-sparc.c (mono_arch_emit_epilog): fix check
13867         for folding last op into restore instruction
13869 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13871         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13872         helper methods using the code manager.
13873         
13874         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13876         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13878 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13879         
13880         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13881           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13883         * mini-s390.c: fix tail processing
13885 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13887         * mini-ppc.c: mul.ovf.un exception name fix.
13889 2004-08-03  Martin Baulig  <martin@ximian.com>
13891         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13892         instances; before jumping to `handle_enum', also modify `ptype'.
13894 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
13896         * cpu-sparc.md: fcall maximal length too small.
13898 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
13900         * mini-amd64.c mini.h: Add initial support for passing/returning 
13901         structures to/from pinvoked methods.
13903 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13905         * mini-ppc.c: reg allocator fix.
13907 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
13909         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13911         * inssel.brg: Optimize memset on 64 bit machines.
13913         * mini-amd64.c: Fix some vararg cases.
13915 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13917         * mini-s390.c: Corrected macro in emit_float_to_int
13919         * s390-abi.cs: Tests to exercise the s390 ABI
13921 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13923         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13924         caller saved regs.
13926         * basic.cs: Add a test for add.ovf.un.
13928 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
13930         * mini-sparc.c: add case for OP_IDIV_UN
13932 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13934         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13935         
13936         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13938 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
13940         * basic.cs: regression tests.
13942         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13943         regressions.
13945 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13947         * basic.cs: Add a new test.
13949         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
13950         and AOT. Various fixes and optimizations.
13952         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13954 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13956         * mini-ppc.c: make sure temp regs are not used for global reg
13957         allocation.
13959 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13961         * cpu-sparc.md: conv_i8 fix for 64bits
13963         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13965 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
13966         
13967         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13968         add opcode for cmp BYTE PTR [eax], imm.
13970         * inssel.brg: Make memcpy and memset takes bases.
13972 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13974         * *-amd64.*: More AMD64 work.
13975         
13976 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13978         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13979         add a compare-not-equal opcode.
13980         
13981 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13983         * mini.c: Use mono_init_from_assembly instead of mono_init.
13984         
13985 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13987         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13989         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13991         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13993         * inssel.brg: 64 bit fixes.
13995         * mini.h (MonoCallInst): Add some AMD64 specific data.
13997         * mini.h: Add some OP_P opcodes.
13999 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
14001         * basic.cs: tests for 61797 and 61740
14003 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
14005         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
14006         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
14008 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
14010         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
14012         * *-amd64*.*: Ongoing AMD64 work.
14014 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
14016         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
14018         * *-amd64*: Ongoing AMD64 work.
14020         * mini-arch.h: Add AMD64 support.
14022         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
14024         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
14026         * mini-ops.h: Add new opcodes.
14028         * Makefile.am: Add AMD64 support.
14030         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
14031         rules into the inssel-long*.brg files.
14033         * *-amd64.*: Add beginnings of AMD64 backend.
14035 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
14037         * mini.c (print_dfn): commenting out the code that prints
14038         the cil. With -O=deadce, this makes -v -v crash.
14039         
14040         * cpu-pentium.md: make checkthis have a length of 2
14042 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
14044         * mini-sparc.h: fix implementations of __builtin
14045         functions for Sun compiler for V9.
14047 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
14049         * mini.c: use the new stelem.ref wrapper
14050         * exceptions.cs, arrays.cs: new stelem.ref tests
14052 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14054         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
14055         new XSP should work with these changes).
14057 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
14058         
14059         * inssel-{long32,x86,}.brg: trivial optimizations.
14060         
14061 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
14063         * mini.c: load value when emitting box operation in
14064         constrained calls.
14066 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
14068         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
14069         is one byte shorter than cmp DWORD PTR [eax], 0.
14071 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14073         * inssel-ppc.brg: arguments on the stack are always
14074         relative to the stack pointer (spotted by Neale Ferguson).
14076 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14078         * exceptions-x86.c: delay appending the method name to the trace until
14079         after mono_jit_info_table_find is called, as this gets the real
14080         MonoMethod.
14082 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
14084         * aot.c: register roots
14086 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14088         * aot.c : I could just use PLATFORM_WIN32 flag.
14090 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14092         * aot.c : Reverting the previous fix. This time it broke linux build.
14094 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14096         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
14098 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
14100         * mini.c (handle_stack_args): Remove some more debugging code.
14101         
14102         * mini.c (handle_stack_args): Remove debug output left in by mistake.
14104         * driver.c mini.h aot.c: Allow additional options to be specified with
14105         --aot and pass them to mono_compile_assembly.
14107         * aot.c: Add experimental code to AOT compile all loaded assemblies
14108         on demand and save the code into a cache in the filesystem.
14110         * aot.c: Add support for more wrapper methods.
14111         
14112         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
14113         58863.
14115         * cpu-*.md: Remove removed opcodes.
14117         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
14118         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
14119         related icalls to marshal.c.
14121 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
14123         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
14125         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
14127         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
14129 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
14130         * liveness.c: If liveness is recomputated we need to reset the information
14131         for each variable. This way, if the liveness range has been narrowed
14132         by optimizations that happened after the last computation, we can return
14133         a smaller range.
14134         
14135         For example, if you have
14136         
14137         {
14138                 int i = 0;
14139                 
14140                 // Tons of code that does not affect i
14141                 
14142                 i = foo ();
14143                 ...
14144         }
14145         
14146         i = 0 is dead code and will be removed by SSA. However, when
14147         linear scan gets to the code, i will still appear to be live
14148         throughout the entire block. This prevents good register allocation.
14150 2004-07-06  Martin Baulig  <martin@ximian.com>
14152         * debug-mini.c (mono_debug_init_method): Allow
14153         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
14154         (mono_debug_add_icall_wrapper): New method.
14156         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
14158 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
14160         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
14161         optimization.
14163 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
14165         * aot.c (mono_aot_load_method): Fix loading of debug info.
14167 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14169         * aot.c: Add logging support.
14171 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14173         * mini.h: Add prototype for mono_print_method_from_ip.
14175         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
14177         * inssel.brg: 64 bit fixes.
14179         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
14180         inssel-long32.brg.
14182         * Makefile.am: Add SPARC64 support.
14184 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14186         * aot.c: Fix alignment problems on 32 bit platforms.
14188 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14190         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
14191         SPARC64.
14193         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
14194         problems.
14196         * mini.h: Bump AOT file version. Some 64 bit fixes.
14198 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14200         * inssel-sparc.brg: Add new rule to avoid register moves.
14202         * inssel.brg: Add ldind_to_load_membase helper function.
14204 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
14206         * mini.c: OffsetToStringData intrinsic.
14207         
14208 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14210         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
14212         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
14213         regression tests.
14215         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
14216 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14218         * mini.c: reinstated mono_compile_get_interface_var()
14219         on x86, too, since the change breaks the Gtk# build there as well.
14221 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14223         * driver.c: remove loop from the default optimizations: it seems to
14224         interact badly with some of the other options (see bug #60613).
14226 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
14228         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
14229         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
14231 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
14233         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
14234         vararg-using methods.
14236 2004-06-21  Martin Baulig  <martin@ximian.com>
14238         * mini/mini-exceptions.c
14239         (mono_handle_exception): Added `gpointer original_ip' argument.
14240         After calling mono_unhandled_exception(), call
14241         mono_debugger_unhandled_exception() and if that returns true,
14242         restore the context and return.
14244 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14246         * mini-ppc.c: prefer the use of relative branches so
14247         they won't need to be patched in aot code (patch from Patrick Beard).
14249 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14251         * aot.c: patch from Patrick Beard to make the output assembly
14252         more correct for the MacOSX assembler. Small tweak to
14253         generate sane images on Linux/PPC, too.
14255 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14257         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
14258         case until bug #59509 is fixed (shows up in #60332).
14260 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14262         * mini.c: make sure the needed wrappers are compiled, too, with
14263         precomp.
14265 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
14267         * driver.c: remove NPTL reference in --version output.
14269 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14271         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
14272         generate valid assembly for the Mach-O assembler.
14274 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14276         * driver.c: don't include abcrem in the all optimization specifier
14277         since it slows down jit compilation too much for now.
14279 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
14281         * mini.c: use BIGMUL only if both operands have the same signage.
14282         * iltests.il: Test for bug 60056. (errors related to signage in
14283         BIGMUL).
14285         r=lupus.
14287 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
14289         * mini.c, aot.c: memory leak fixes.
14291 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14293         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
14295 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
14297         * Makefile.am: remove the -static hack completely, it links in
14298         statically glib as well.
14300 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
14302         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
14303         * exceptions.cs: make it compile with new mcs/csc.
14305 2004-06-03 Massimiliano Mantione <massi@ximian.com>
14306         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
14307         and added relevant test case.
14309 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14311         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
14312         regressions in gtk-sharp.
14314 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
14316         * exceptions.cs: New regression tests.
14318         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
14320 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
14322         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
14324 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
14326         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
14328         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
14330 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
14332         * mini.c (mono_jit_runtime_invoke): Init class in this
14333         method instead of trusting mono_jit_compile_method to
14334         do the work (because wrappers can be in object class)
14336 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
14338         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
14340         * basic-long.cs: New regression test.
14342 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
14344         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
14345         and div/rem checks.
14347 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
14349         * Makefile.am: fix miguel's change to build mono statically against
14350         libmono (track build dependencies).
14352 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14354         * cfold.c: Some glib versions do not have G_MININT32.
14356 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
14358         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
14359         with precision of tan, atan, sin and cos, and implemented related
14360         regressions tests (fixes bug 54467, but one new problem appeared and
14361         is not fixed yet).
14363 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14365         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
14367         * exceptions.cs: Add test for constant folding && division by zero.
14369         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
14370         since driver.c is in libmono too, so the optimization was useless.
14372         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
14373         variable to driver.c so the compiler can emit more efficient code to
14374         access them.
14376 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14378         * Makefile.am: don't distribute generated inssel.[ch] files.
14380 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
14382         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
14383         into the default appdomain. Fixes #58707.
14385         * jit-icalls.c: Remove the broken approximation for truncl, doing
14386         no conversion is better.
14388         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
14389         Fixes #58863.
14391 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14393         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
14394         of the mcrxr instruction which is not available on some processors
14395         even if it's documented to be. Implement add and sub overflow correctly
14396         (still not complete for long unsigned). Speed up icalls a bit.
14398 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
14400         * mini.c (mono_jit_compile_method_with_opt): Make sure that
14401         we run .cctor in the current domain instead of target_domain.
14402         
14403         Fixes bug #58558, .cctor not being called in -O=shared.
14405 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14407         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
14409 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
14411         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
14412         which can be done with an imm8, do it that way.
14413         (mono_arch_output_basic_block): ditto for a jmp
14414         (mono_arch_emit_prolog): Computate maximum offset of a label.
14416 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
14418         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
14419         now tries to allocate prefered physical reg's for virtual
14420         regs. This reduces the number of emited spills/loads with
14421         20-30% on our core assemblies.
14423 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14425         * jit-icalls.c: truncl() is not needed and trunc() is
14426         the correct thing to do anyway (bug #58287).
14428 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
14430         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
14431         if available.
14433 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
14435         * driver.c: enable loop optimizations by default.
14437 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14439         * mini-x86.c: fix calc of max loop size when aligning loops start.
14441 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
14443         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
14444         the stack.
14446 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
14448         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
14449         should set carry.
14451         * basic-long.cs: Add tests for add/subtract of immediates with carry.
14453         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
14454         
14455         * mini.c (inline_method): Allways inline some wrappers even if the cost
14456         is too large. Fixes #58785.
14458         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
14459         
14460 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
14462         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
14463         (crichton@gimp.org). Beginning of support for sparc/linux.
14465         * mini-sparc.c: Optimize retrieval of LMF address.
14467 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
14469         * exceptions-ppc.c:  handle alloca in methods with clauses.
14471 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
14473         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
14475 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
14477         * mini.c: Delegate most of the abort signal work to 
14478           mono_thread_request_interruption, which also handles Stop and Suspend
14479           states.
14481 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
14483         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
14484         supports the save/restore lmf opcodes.
14486 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
14488         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
14489         by gcc-3.4 as well.
14491         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
14493 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14495         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
14496         methods which contain array accesses.
14498         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
14499         boundaries. Fixes #58537.
14501         * iltests.il: Add regression test for #58537.
14503 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14505         * mini-x86.c (mono_arch_local_regalloc): Last part of
14506         fix for bug #58633 (releasing register to early).
14508 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
14510         * basic-long.cs: Add new regression test.
14512 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14514         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
14515         register too early on the chain.
14517 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14519         * mini.c (create_helper_signature): Use a helper function to reduce
14520         the code which needs to be written. Also set the calling convention of
14521         icalls on windows. Fixes #57840.
14523 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14525         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
14526         exceptions-ppc.c: added helper function to get the instruction address
14527         from a signal handler context.
14529 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14531         * helpers.c: use g_get_tmp_dir. Invokes happyness 
14532         from gonzalo.
14534 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14536         * helpers.c: Add new env variable to pass args to objdump.
14537         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
14539 2004-05-17  Radek Doulik  <rodo@ximian.com>
14541         * Makefile.am (common_sources): added abcremoval.h so it get
14542         disted and daily mono packages on go-mono.com will build again
14544 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
14546         * abcremoval.c: Fixed coding style, added copyright header.
14548         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
14550         * mini.h: Added prototype for abc removal main function.
14552         * build_relations_propagation_table.pl: Added copyright header.
14554 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14556         * basic-long.cs: reg test for complex ceq_long bug.
14558 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14560         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
14561         reg in long and clob case (bug #58343). Fixed/added comments.
14563 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
14565         * mini.c (mono_jit_runtime_invoke): Follow new convention
14566         of calling the invoke method with an function pointer.
14568 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
14570         * ChangeLog: Fix author of memory leak patch.
14572 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
14574         * Makefile.am: fix make dist as well...
14577 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
14579         * cfold.c: Made so that conversions from pointer to int4 are no-ops
14580         on archs where pointers are 4 bytes long.
14582         * Makefile.am: Added abcremoval.c source file.
14584         * abcremoval.c: Added abcremoval.c.
14586         * abcremoval.h: Added abcremoval.h.
14588         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
14590         * inssel.brg: Enabled bounds check removal.
14592         * mini.c: Added support for abcrem optimization.
14594         * mini.h: Added abcrem optimization label.
14596         * driver.c: Added support for abcrem optimization.
14598         * propagated_relations_table.def: Added propagated_relations_table.def.
14600 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14602         * mini.c, cfold.c: fix style.
14604 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14606         * mini.c: handle issue with the low-level implementation of
14607         some long opcodes (bug #54209).
14609 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
14611         * basic.cs: test for my new cmov stuff.
14613 2004-05-13      Patrik Torstensson
14615         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14616         opt and added peephole documentation.
14618 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14620         * tramp-ppc.c: rewrote the generic trampoline code.
14622 2004-05-11      Patrik Torstensson
14624         * mini-x86.c: optimize long shl/shr asm code (one less branch)
14626 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14628         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14630         * mini.h mini.c dominators.c: Applied patch from Derek Woo
14631         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14633         * mini.c: Add new icalls for AsAny marshalling.
14635 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14637         * tramp-ppc.c, mini-ppc.c: more cleanups.
14639 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14641         * mini.c: no warnings.
14643 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14645         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14647 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14649         * mini.c: In the thread abort signal handler, if the thread is in the
14650         process of being stoped, don't throw the Abort exception, just stop the
14651         thread.
14653 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14655         * tramp-ppc.c: removed old code.
14657 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14659         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14660         do some simple speed optimizations on ppc.
14662 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14664         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14665         and large offsets in load/store.
14667 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14669         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14670         it causes regressions.
14672 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14674         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14675         support.
14677 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14679         * jit-icalls.c: remove warnings.
14680         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14681         speedups for unsafe code.
14683 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
14685         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14687 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
14689         * basic-calls.cs: Add new regression test.
14691         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14692         more portable.
14694         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14696         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14697         is no longer used.
14699 2004-05-06      Patrik Torstensson
14701         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14702         long reg allocation in any reg (not only eax:edx) and implemented 
14703         long shl/shr ops in asm instead of helpers.
14705 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14707         * mini-sparc.h: Fix warnings.
14709         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14710         stack.
14712         * mini-exceptions.c (mono_handle_exception): Call the filter in a
14713         separate statement for clarity.
14715         * mini-sparc.c: Update status.
14717 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
14719         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
14720         here.
14722 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14724         * inssel-ppc.brg: another small pre-release workaround:
14725         we don't do overflow detection for long_sub_un.
14727 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14729         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14730         (also works around a weird ppc bug: 57957).
14732 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14734         * tramp-ppc.c: trampoline fixes.
14736 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
14738         * mini-ppc.c: fixed typos.
14740 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14742         * mini-ppc.c, exceptions-ppc.c: more code saves registers
14743         at the top of the stack. Fixed typos. Use a frame registers
14744         for all the methods with exception clauses.
14746 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14748         * exceptions-ppc.c: restore fp registers.
14750 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14752         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14753         order from the stack top (moved the stack room to save the
14754         return value for trace after the param area). Fixed corruption
14755         in restoring registers on unwind.
14757 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14759         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14761 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14763         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14764         and prolog/epilog for methods that use it. Allow
14765         enough param area room for varargs methods. Fix miguel's
14766         breakage in exception handling.
14768 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14770         * Makefile.am: run genmdesc only on current arch.
14772 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14774         * exceptions-x86.c:
14775         * mini-x86.h: fix the build on windows.
14777 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14779         * 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.
14781         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14783         * mini-exceptions.c: New file.
14784         
14785         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14786         Move some parts of the x86 exception handling code to an 
14787         arch-independent file so it can be shared with other ports.
14789 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14791         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
14793 2004-04-26  David Waite  <mass@akuma.org>
14795         * driver.c: remove comma from end of enumeration declaration
14797 2004-04-26  Jackson Harper  <jackson@ximian.com>
14799         * driver.c: parse config file before loading first assembly. This
14800         allows the user gac to be enabled/disabled. 
14801         
14802 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
14804         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
14805         simpler mechanism: we do not care what is encoded initially
14806         (branch absolute or relative), we care about the code and its
14807         target.  I kept the old code for reference for now.
14809         The new code tries first to determine if the jump is anywhere in
14810         the -/+32 absolute meg range, if it succeeds, it encodes using the
14811         absolute branch;  If not, it tried to find something in the
14812         relative range, if not, it uses the handle_thunk code. 
14814 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
14816         * exceptions-ppc.c: use the correct ip register on macosx.
14818 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
14820         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
14822 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
14824         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
14825         Raise exception on integer divide by zero by hand since the hw
14826         doesn't support it. Handle NaNs in FP compares.
14828 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
14830         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
14831         code reducing duplication between the platforms and enabled
14832         signal exception handling (on linux for now).
14834 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
14836         * exceptions-ppc.c: more macosx support.
14838 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14840         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
14842 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14844         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
14846 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
14848         * iltests.il: more tests.
14850 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14852         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14853         vars as well.
14855 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14857         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14859 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14861         * liveness.c: Mark variables as volatile in all basic blocks reachable
14862         from exception clauses.
14864 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14866         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14867         inlining.
14869 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
14871         * iltests.il, basic.cs: more tests for regalloc.
14873 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14875         * iltests.il: Some tests for register allocation modifications
14876         I have locally.
14878 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
14880         * exceptions.cs: Add regression test for bug #56782.
14882         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14883         original stack trace if an exception is rethrown. Fixes #56782. Oh,
14884         the beauty of fixing the same thing in 5 different files...
14886 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
14888         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14889         methods.
14891 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14893         * mini.c: Add support for STRWLPARRAY marshalling convention.
14895 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14897         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14898         to init the context to setup the regs pointer).
14900 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14902         * exceptions-ppc.c: more exceptions work.
14904 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14906         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14907         not allowed.
14909 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14911         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14912         can use the memory directly.
14914         * cpu-pentium.md: Update documentation from a post from Zoltan. 
14916         add x86_add_membase, x86_sub_membase, x86_mul_membase
14918 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14920         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14921         GENERAL_REGS they were also hardcoded for all PPC ports.
14923         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14925         Remove hard-coded limit for floating point registers, use
14926         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14928         Notice that in MacOS X calling conventions you can fit a lot more
14929         floating point values in registers, so I should update the PInvoke
14930         test to excercise the passing of floating point values on the
14931         stack (currently broken).
14932         
14933 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
14935         * tramp-ppc.c (create_trampoline_code): Added
14936         JUMP_TRAMPOLINE_SIZE. 
14937         (ppc_magic_trampoline): Follow the pattern from
14938         x86_magic_trampoline: if code is set to zero, return. 
14939         (create_trampoline_code): Always pass MonoMethod to the jump
14940         trampoline, before it was passing a null.
14941         (mono_arch_create_jump_trampoline): Implement the jump stub, could
14942         share the code with mono_arch_create_jit_trampoline. 
14944         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14945         implemented.
14946         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14947         implemented.  
14949         * cpu-g4.md: Added length for jmp instruction, the worst case
14950         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14951         for save_lmf).
14953 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14955         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14957 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
14959         * mini.c: Only set bblock->real_offset when adding a new bblock, and
14960         before each IL instruction.
14962         * mini.c (CEE_BOX): Fix warnings.
14964 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14966         * mini.c: removed a few unused vars and extra whitespace.
14968 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
14970         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14971         checks.
14972         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14973         index.
14974         (OP_GETCHR): use the above
14975         (CEE_LDELEMA): use the above.
14977         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14978         version of the generic impl.
14979         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14980         (CEE_LDELEMA): use the above.
14982 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14984         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14985         Fixes #56317.
14987         * iltests.il: Added new regression test for #56317.
14989 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14991         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14992         under NetBSD. Fixes #56450.
14994         * liveness.c (update_gen_kill_set): Fix previous patch.
14996 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14998         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
15000 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
15002         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
15003         ldsfld and ldsflda.
15005         * inssel-sparc.brg: Add more optimizations.
15007         * mini-sparc.c: Replace multiply/divide with shifts if possible.
15009 2004-04-01  Martin Baulig  <martin@ximian.com>
15011         * mini.c (handle_box): New static function; moved the
15012         implementation of CEE_BOX here.
15013         (mono_method_to_ir): Added `constrained_call' variable.
15014         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
15015         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
15016         mono_method_get_constrained() to get the method.
15018 2004-04-01  Martin Baulig  <martin@ximian.com>
15020         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
15021         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
15022         (mono_method_to_ir): We don't need these macros anymore since
15023         mono_class_get_full() already takes care of it. 
15025 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15027         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
15028         use @function (as doesn't accept #function here) and check the return
15029         value of system and stop if fails.
15031 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15033         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
15035 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
15037         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
15039         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
15041         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
15042         #56223.
15044         * basic-long.cs: Add test for negation of Int64.MinValue.
15046 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
15048         * mini-sparc.c: Update status.
15050         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
15052         * exceptions-sparc.c: Fix return value in filters.
15054         * inssel-sparc.brg: Fix register allocation in some rules.
15056 2004-03-28  Martin Baulig  <martin@ximian.com>
15058         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
15059         if neccessary.  
15061 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
15063         * mini-x86.c (mono_arch_patch_code): Fix warnings.
15064         
15065         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
15066         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
15067         remove unused conv_u4 opcode.
15069         * mini-x86.c: Remove valgrind workaround since it slows down things
15070         even when mono is not run under valgrind.
15072 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
15074         * mini-sparc.c: Update status.
15076         * inssel-sparc.brg: Add some optimizations.
15078         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
15079         future delay slot filling. Add support for varargs, tail calls and JMP.
15081         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
15082         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
15084         * inssel.brg: Fix register allocation in OP_ARGLIST.
15086         * inssel.brg: Fix warnings.
15088 2004-03-25  Martin Baulig  <martin@ximian.com>
15090         * mini.c (inflate_generic_field): Removed.
15091         (mini_get_method): Removed, use mono_get_method_full(),
15092         (mini_get_class): Removed, use mono_class_get_full().
15093         (mono_method_to_ir): Pass our generic context to
15094         mono_field_from_token().        
15096 2004-03-25  Martin Baulig  <martin@ximian.com>
15098         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
15099         of a `MonoMethod *'.
15100         (mini_get_method): Take a `MonoGenericContext *' instead
15101         of a `MonoMethod *'.
15102         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
15103         a new local variable called `generic_context' which holds the
15104         current `MonoGenericContext *'; use it to lookup things.
15106 2004-03-24  Martin Baulig  <martin@ximian.com>
15108         * mini.c (mini_get_class): New static method; if we're inside a
15109         generic instance, inflate the class if neccessary.
15110         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
15112 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
15114         * iltests.il: New regression test for #55976.
15116         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
15117         #55976.
15119 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15121         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
15122         output.
15124 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15126         * liveness.c: Consider SSA stores as well as loads when making vars
15127         volatile.
15129         * exceptions.cs: New regression tests for register allocation.
15130         
15131 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
15133         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
15134         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
15135           domain lock only to protect puntual access to data structures.
15136           Added access lock for sighash, jit_icall_hash_name, 
15137           jit_icall_hash_addr and domain->code_mp.
15139 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
15141         * driver.c: Print SIGSEGV handling method.
15143         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
15145         * mini.c (setup_jit_tls_data): Handle case when this is called
15146         multiple times for a thread.
15148         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
15149         is different from fbxx_un. Fixes #54303. Also use constants instead of
15150         magic numbers in a lot of places.
15152 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
15154         * exceptions.cs: Fix cctor test when --regression is used.
15156 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
15158         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
15159         for Linux/ppc.
15161 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15163         * inssel-ppc.brg: fixed register assignments for some rules.
15165 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15167         * exceptions.cs: Add test for exceptions in static constructors.
15169         * mini.c (mono_jit_compile_method_with_out): Move the calling of
15170         static constructors outside the domain lock. Fixes #55720.
15172 2004-03-17  Martin Baulig  <martin@ximian.com>
15174         * mini.c (get_generic_field_inst): Removed, this'll never happen.
15175         (inflate_generic_field): Take the `MonoMethod *' instead of the
15176         `MonoClass *' and added support for generic method.
15177         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
15178         have a `field->parent->gen_params', only inflate the field if it's
15179         an open constructed type.
15181 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15183         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
15184         exception object instead of the preconstructed ones.
15186 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15188         * mini.c: reverted changed to sigsegv_signal_handler commited
15189         accidentally in the previous patch.
15191 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15193         * mini.c:
15194         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
15195         running --aot with an old assembly.
15197 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
15199         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
15200         point values.
15202         * mini-sparc.c: Add support for v9 branches with prediction.
15204 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
15206         * mini.c (mini_init): #warning is GNUC only
15208         * mini-sparc.h: implement __builtin_frame_address
15209         and __builtin_return_address for Sun C compiler
15211 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
15213         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
15215 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
15217         * basic-calls.cs: Add test for unaligned byref long argument passing.
15219         * mini-ops.h: Add sparcv9 compare and branch instructions.
15221         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
15222         v9 instructions if we have a v9 cpu.
15224         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
15225         registers for global allocation.
15227         * exceptions-sparc.c: Fixes.
15228         
15229 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
15231         * liveness.c (mono_analyze_liveness): Optimized version.
15233         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
15235         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
15236         sparc work.
15238         * basic-float.cs basic-calls.cs: New regression tests.
15240 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
15242         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
15243         sigaltstack implementation.
15245         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
15246         
15247         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
15248         stuff if SIGSEGV_ON_ALTSTACK is not defined.
15250 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
15252         * mini.c: Fix warnings.
15253         
15254         * mini.c (mono_resolve_patch_target): New function which contains the
15255         arch independent part of the patching process.
15257         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
15258         patching code to a separate function.
15260 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
15262         * mini.c (add_signal_handler): ifdef out on Windows
15264 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
15266         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
15267         cpu-sparc.md: Add exception handling support + other fixes.
15269         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
15270         typed GC detection in --version.
15272         * basic.cs exceptions.cs: New regression tests.
15274         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
15275         the arch specific code can store data during a compilation.
15277         * mini-ops.h: Add OP_SETFRET.
15279         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
15280         function, register a separate icall for each arity, so the icalls can
15281         get a wrapper.
15282         
15283         * mini.c (mono_print_tree): Print negative offsets in a more readable
15284         form.
15285         
15286         * mini.c: Make signal handling work on sparc.
15287         
15288         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
15290         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
15292         * jit-icalls.c: Emulate truncl by aintl on solaris.
15294         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
15296 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
15298         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
15300 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
15302         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
15303         a MarshalByRef type, inline a method that performs the check, taking into
15304         account that the object can be a proxy. Also implemented tow new opcodes:
15305         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15306         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
15307         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15309 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
15311         * mini-ppc.c: if a relative branch displacement is too big
15312         but it points to and area reachable with an absolute branch, 
15313         avoid the thunks.
15315 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15317         * mini.c: optimize small copies in cpblk.
15319 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
15321         * basic-calls.cs basic-float.cs: New regression tests.
15323         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
15324         negative offsets from %fp. Implement localloc. Fix local register 
15325         allocation. Fix the case when the this argument needs to be saved to
15326         the stack. Implement some missing opcodes.
15328 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
15330         * mini.c (mini_method_compile): Reenable global regalloc in methods
15331         with exception handlers.
15333         * linear-scan.c (mono_varlist_sort): Fix warning.
15335         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
15337         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
15338         regalloc costs.
15340         * liveness.c: Make all variables uses in exception clauses volatile, to
15341         prevent them from being allocated to registers. Fixes #42136.
15343 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
15345         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
15346         causes regressions.
15348         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
15349         argument to mono_arch_regalloc_cost.
15351         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
15352         precisely.
15354 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
15356         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
15357         Make the cost of allocating a variable to a register arch dependent.
15359         * basic-calls.cs: Fix compilation of tests.
15360         
15361         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
15362         helper function to cut back on the number of #ifdefs needed.
15364         * mini-ppc.c: Fix compilation.
15366         * basic-calls.cs: New regression tests.
15368         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
15370         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
15371         of l0 since that is callee saved.
15373         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
15374         to virtual calls.
15376         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
15377         of delay instruction.
15379         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
15381         * mini.h (MonoCallInst): Add 'virtual' flag.
15383         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
15385 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
15387         * *.cs: New regression tests.
15389         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
15390         work.
15392         * mini.c (mono_runtime_install_handlers): Fix build.
15394         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
15395         'signal_stack_size' members.
15397         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
15398         alternate signal stack.
15400         * exceptions-x86.c: Add stack overflow handling.
15402         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
15403         functions to arch independent code.
15405         * mini.c (mono_print_tree): Print more detailed info for load_membase
15406         opcodes.
15407         
15408 2004-02-23  Martin Baulig  <martin@ximian.com>
15410         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
15412 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15414         * mini-x86.c: fixed reg allocation for div/rem.
15416 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
15418         * driver.c (mono_main): Report some configuratio options on --version.
15420 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
15422         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
15423         low in the address space. Correctly flush memory in thunks where we
15424         output native code.
15426 2004-02-20  Martin Baulig  <martin@ximian.com>
15428         * mini.c (mini_get_method): New static method; inflate all generic
15429         methods and methods in open generic instances.
15430         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
15431         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
15433 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15435         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
15437         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
15439 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
15441         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
15443         * mini-sparc.c (flushi mono_arch_output_basic_block): make
15444         it compile using Sun's compiler.
15446 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15448         * 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.
15450         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
15452 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15454         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
15455         code.
15456         * mini-ppc.c: handle calls outside of the allowed range with thunks
15457         allocated using the code manager.
15458         * tramp-ppc.c: use the code manager to hold generated native code.
15459         Fixed the magic trampoline to just patch vtable entries.
15461 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
15463         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
15464         independent file.
15466 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
15468         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
15469         PPC.
15471         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
15472         if we have a working __thread implementation.
15474         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
15475         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
15477 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
15479         * mini-x86.c: Fix compilation under gcc 2.
15480         
15481 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
15483         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
15484         contains a call to the wrapped function.
15486         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
15487         OP_<CALL>_IMM opcodes, and use them under X86.
15488         
15489         * mini.c (mono_jit_find_compiled_method): Fix warning.
15491         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
15493         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
15495         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
15496         functionality to mini.c.
15498         * mini.c (mono_create_jump_trampoline): New function to create a jump
15499         trampoline. Return a compiled method instead of a trampoline if it
15500         exists. Add a cache for jump trampolines.
15502         * mini.c (mono_jit_find_compiled_method): New function to return a
15503         compiled method if it exists.
15505         * mini-x86.c: Call mono_create_jump_trampoline instead of 
15506         mono_arch_create_jit_trampoline.
15508         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
15509         a jump trampoline. Fixes #52092.
15510         
15511 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
15513         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
15514         which is not up-to-date. Add check_corlib_version () instead.
15516         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
15517         have to call it.
15518         
15519         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
15520         since newer valgrind versions do not need it.
15522         * mini.c (mono_jit_compile_method_with_opt): New helper function to
15523         compile a method with a given set of optimizations.
15525         * mini.c: Compile icall wrappers on-demand instead of at startup.
15527         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
15528         wrapper for an icall.
15530 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
15532         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
15533         #54063.
15535         * iltests.il: Add test for non-empty stack before switch instruction.
15537 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
15539         * mini.c: Add support for new stringbuilder marshalling conventions.
15541         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
15543 2004-02-01  Martin Baulig  <martin@ximian.com>
15545         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
15546         in `ginst->mtype_argv'.
15548 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
15550         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
15551         facilitate grepping.
15553 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
15555         * mini.c: fixed buglet in initobj generic implementation for references.
15557 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
15559         * Makefile.am: make the version script conditional.
15560         * jit-icalls.c: handle missing truncl().
15562 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
15564         * exceptions.cs: Add more tests for double->int conversion.
15566         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
15567         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
15569 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
15571         * driver.c: make --verbose --version emit an error
15572         if the loaded corlib doesn't match the runtime version.
15574 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
15576         * mini-ppc.h: export ppc_patch().
15577         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
15578         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
15579         on par or better than on MacOSX.
15581 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
15583         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
15584         mono_lookup_pinvoke_call.
15586         * mini-x86.c: Under windows, the default pinvoke calling convention is
15587         stdcall. Fixes #52834.
15589         * mini.c (optimize_branches): Add an upper bound to the number of
15590         iterations to prevent infinite loops on strange loops. Fixes #53003.
15592 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
15594         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
15595         and ISINST. Fixes #52093.
15597         * objects.cs (test_0_vector_array_cast): New tests.
15598         
15599 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
15601         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15602         checking in Array.Set ().
15604         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15605         #52590.
15607         * object.cs (test_0_multi_array_cast): New regression test.
15609 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15611         * exceptions-ppc.c: fix build on Linux/PPC.
15613 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
15615         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15616         running under valgrind.
15617         (x86_magic_trampoline): Fix build bustage.
15619         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15620         negative values as well. This is needed for the encoding of the line number
15621         info, since sometimes the line numbers are not in increasing order.
15623 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
15625         * cpu-pentium.md (localloc): Increase the size of the localloc 
15626         instruction since it is a loop under Win32.
15628         * debug-mini.c (record_line_number): Get rid of unneccesary memory
15629         allocation.
15631 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
15633         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
15634         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
15635         Max Horn (max@quendi.de). Fix file names in comments.
15637 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
15639         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15640         avoid stack overflow.
15641         (replace_usage): Avoid uninitialized variable warnings.
15643         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15644         and taking the address of valuetype variables.
15646 2004-01-03  Patrik Torstensson
15648         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15649         for other purposes than FP later on.
15651 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
15653         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15654         of tail calls.
15656 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15658         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15660 2003-12-30  Patrik Torstensson <p@rxc.se>
15662         * mini-x86.h: Decreased number of availiable fp regs.
15663         Solves corner cases with FP spilling.
15665 2003-12-23  Patrik Torstensson <p@rxc.se>
15667         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15668         for floating point stack tracking / spilling on x86. 
15669         Fixes bug #49012.
15670         
15671         * basic-float.cs: added float mul overflow test.
15673 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
15675         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15677 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15679         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15680         supports for cond branches that overflow the immediate
15681         overflow offset. mcs can compile simple programs.
15683 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15685         * exceptions-ppc.c: exception handling support wip:
15686         finally handlers get run on exception.
15688 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
15690         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
15691         profiling.
15693 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15695         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15696         initial support for stack walking and unwinding.
15698 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
15700         * driver.c (mono_main): Make corlib-out-of-sync message more 
15701         descriptive. Also remove verify_corlib call.
15703 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15705         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
15706         not overlap with other call's arguments, too.
15708 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15710         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
15711         move to arch-specific code the choice of arch-specific
15712         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15713         * mini.c: ensure emulation calls will not interleave
15714         with other calls.
15716 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15718         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
15719         the magic trampoline stack frame is dropped before executing
15720         the new method.
15722 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15724         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
15725         and integer to fp conversions. Added support for overflowing
15726         arguments on the stack. Reserve a couple more registers as temps.
15727         Added support for aot compilation (as output still needs to be
15728         tweaked, though).
15730 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15732         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15733         Don't overwrite return register in some corner cases.
15735 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
15737         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15738         static constructors when AOT compiling.
15740         * driver.c (mono_main): Call mono_check_corlib_version.
15742 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15744         * cpu-g4.md, basic.cs: fixed div target register.
15746 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15748         * mini-ppc.c, basic.cs: shl_imm fix with test.
15750 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15752         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
15753         structures by value. Misc fixes.
15754         * objects.cs: more tests.
15756 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15758         * mini-ppc.c: lconv.ovf.i implemented.
15760 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15762         * mini.c:
15763         (mini_init): don't error out if someone already called g_thread_init.
15765 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15767         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15768         to be any type per the spec. Fix abnormal memory usage when
15769         the same object is repeatedly thrown.
15771 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15773         * mini.c: check for overruns in IL code.
15775 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
15777         * TODO: Add/remove some todo entries.
15779 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
15781         * driver.c (mono_main): Call mono_verify_corlib.
15783 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
15785         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
15786         This has been moved to mini.c
15787         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15788         type being casted is marshalbyref it could be a proxy, so instead of
15789         emitting the type check code, emit a call to a runtime method that will
15790         perform the check by calling CanCastTo if needed.
15792 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
15794         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
15795         methods with large stack frames under Win32.
15797 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
15799         * Makefile.am: Distribute regression tests.
15801         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
15802         at the end instead of inserting each variable into the sorted list.
15804         * linear-scan.c (mono_varlist_sort): New helper function.
15805         
15806 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15808         * mini.c: ensure arguments and locals are within bounds.
15810 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15812         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
15813         related fixes.
15815 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15817         * mini.c (mono_cprop_copy_values): Fix crash.
15819         * aot.c: Set verbosity back to 0.
15820         
15821 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15823         * regalloc.c: complete memory leak fix by Laurent Morichetti
15824         (l_m@pacbell.net).
15826 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15828         * driver.c (main_thread_handler): Revert the previous patch.
15830         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
15831         under valgrind.
15833         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
15834         memory from the memory pool.
15836         * driver.c (main_thread_handler): Turn on all optimizations when
15837         --aot is used.
15839         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
15840         an array for better performance.
15842         * regalloc.c (mono_regstate_assign): Fix memory leak.
15844         * debug-mini.c (mono_debug_serialize_debug_info): New function to
15845         serialize the debug info.
15847         * debug-mini.c (mono_debug_add_aot_method): New function to load the
15848         debug info from the serialized representation.
15850         * aot.c: Save debug info into the generated file and load it when 
15851         loading a method.
15853         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15855 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15857         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15858         More FP-related fixes.
15860 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15862         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15863         and register allocation buglet. Hello world now runs.
15865 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15867         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15868         * tramp-ppc.c: fixed class init trampoline.
15869         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15871 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15873         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15874         mini.c: more ppc changes/fixes.
15876 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15878         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15879         Also optimize the case when the arguments are the same in the caller 
15880         and in the callee.
15882         * iltests.il: Add tests for tail calls with valuetype arguments.
15884 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15886         * mini-ppc.c: fixes for struct return type.
15888 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15890         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
15891         mono_spillvar_offset() to arch-specific code.
15893 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15895         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15897 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15899         * exceptions-x86.c: Fix stack space leaks.
15900         
15901         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15902         registers from the lmf if the method has save_lmf set.
15904 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
15906         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15907         of icall wrappers into InvokeInDomain, since these are now per-domain.
15909 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15911         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15912         make some opcode emulation and intrinsic ops enabled/disabled 
15913         according to the architecture. More fixes.
15915 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15917         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15919 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15921         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15922         arch-specific handling for 'this' and struct return type to
15923         arch-specific code.
15925 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15927         * aot.c: prevent divide by zero error when reporting (it happened with
15928         Accessibility.dll).
15930 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
15932         * mini.h (inst_switch): Remove unused macro.
15934 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15936         * aot.c:
15937         (load_aot_module): free 'info->methods' and 'info' properly. No more
15938         "free(): invalid pointer blah" messages when you have an old aot
15939         compiled assembly.
15941 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
15943         * jit-icalls.c, mini.c: Added support for context static fields.
15945 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15947         * mini.c (mono_method_blittable): Methods which set LastError are not 
15948         blittable either. Fixes #51108.
15949         
15950 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15952         * mini.c: flush icache.
15953         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15955 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15957         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15959 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
15961         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15962         safe on IA32.
15964         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
15965         vararg calls.
15967         * inssel.brg (CEE_MKREFANY): Fix AOT case.
15969 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
15971         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
15972         instruction when the result is discarded.
15974         * iltests.il (test_0_div_regalloc): New regression test.
15976         * arrays.cs: Fix compilation error.
15978 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15980         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15981         float rules to inssel-x86.brg: sane architectures with FP registers
15982         don't need to implement these rules.
15984 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15986         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15988 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15990         * mini.h, inssel-long32.brg: fixed endianess issues in int64
15991         implementation of 32 bit systems.
15993 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15995         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15996         (Jeroen Zwartepoorte).
15998 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16000         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
16001         the caller and the callee matches.
16002         
16003         * mini.c (mono_method_to_ir): Add comment.
16005         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
16006         signbit is missing on some platforms.
16008 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
16010         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
16012         * mini.c (setup_jit_tls_data): Call the new function.
16013         
16014         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
16016         * mini-x86.c: Add experimental support for fast access to the lmf
16017         structure under NPTL/Linux 2.6.x.
16019 2003-11-06  Martin Baulig  <martin@ximian.com>
16021         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
16022         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
16023         the debugger.
16025 2003-11-02  Martin Baulig  <martin@ximian.com>
16027         * mini.c (inflate_generic_field): New static method.
16028         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
16029         generic instance and the field is declared in a generic type, call
16030         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
16032 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
16034         * mini.h mini.c (mono_method_same_domain): New function to return
16035         whenever the caller and the callee are in the same domain.
16037         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
16039 2003-10-30  Martin Baulig  <martin@ximian.com>
16041         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
16042         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
16043         method parameters.
16044         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
16045         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
16047 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
16049         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
16050         propagation.
16052         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
16053         object here, so it is in the correct appdomain etc.
16055 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
16057         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
16058         already done.
16059         (mono_method_to_ir): Avoid freeing the type created returned from
16060         mono_type_create_from_typespec, since it is put into an internal cache
16061         by the function. Fixes pointer.exe.
16063         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
16064         trampolines for icalls and pinvokes as well. Fixes #33569.
16066 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
16068         * mini.c: Update after appdomain changes.
16070         * mini.c (mono_jit_compile_method_inner): Allways compile native
16071         method wrappers in the root domain, since there can only be one
16072         instance of them, whose address is stored in method->info.
16074 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
16076         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
16077         environment variable. Instead detect automatically whenever running
16078         under valgrind using the magic macro RUNNING_ON_VALGRIND from
16079         valgrind.h.
16081 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
16083         * trace.c, trace.h: New files that implement the new trace option
16084         parsing. 
16086         * driver.c: Document new --trace options.
16088         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
16089         mini-x86.c: Apply:
16091         -       if (mono_jit_trace_calls)
16092         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
16094         * mini.h: prototypes.
16095         
16096 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
16098         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
16100         * mini.c inssel.brg: Implement typedefbyref opcodes.
16102         * mini.c (mono_jit_compile_method): Remove unused local variable.
16104         * mini.c (mono_jit_compile_method_inner): Ditto.
16105         
16106 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
16108         * tramp-x86.c (x86_class_init_trampoline): Fix build.
16109         
16110         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
16112 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
16114         * mini.c (mono_no_aot): Remove unused global variable.
16116         * mini.c: Thread safety fixes.
16118 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
16120         * mini.c (mono_create_class_init_trampoline): Add a lock around
16121         class_init_hash_addr.
16123         * arrays.cs (test_0_newarr_emulation): Add new regression test for
16124         #30073.
16126         * mini.c: Decompose the NEWARR instruction before decomposing its
16127         arguments. Fixes #30073.
16129 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
16131         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
16132         convention.
16134 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
16136         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
16138         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
16140         * driver.c: Add support for compiling icall wrappers to --compile.
16142 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
16144         * inssel.brg: The empty value in class->interface_offsets is -1, not
16145         0. Fixes #49287.
16147 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
16149         * objects.cs: New test for 'is' operator on an array of interfaces.
16151 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16153         * tramp-ppc.c: update trampoline code to support jumps
16154         and class initialization.
16156 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
16158         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
16160         * inssel.brg (OP_UNBOXCAST): Fix #46027.
16162         * inssel.brg (OP_UNBOX): Remove unused rule.
16164         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
16165         region instead of one for each method. Fixes #47813.
16167 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
16169         * exceptions.cs (test_0_nested_finally): New regression test for
16170         nested exception handlers.
16172         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
16174         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
16176         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
16177         inlining.
16179         * mini.c (mono_method_check_inlining): Make the inlining limit 
16180         configurable by an environment variable.
16181         
16182         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
16184         * mini.h: Bump AOT file version.
16186         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
16187         token, store the image along with the token, since the token might not 
16188         refer to the same image as the method containing the relocation, 
16189         because of inlining.
16191 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
16193         * mini.c (mono_precompile_assemblies): New function to compile
16194         all methods in all loaded assemblies.
16196         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
16198         * regalloc.h regalloc.c (MonoRegState): Change the type of 
16199         iassign and fassign to int*, since they can contain large negative
16200         values if the register is spilled. Also added some comments. Fixes
16201         #45817.
16203         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
16204         under Win32. Fixes #42964.
16206 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
16208         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
16210         * aot.c: Added support for AOT compiling methods which contain calls
16211         to wrappers. Currently, only remoting-invoke-with-check wrappers are
16212         handled.
16213         
16214         * driver.c (compile_all_methods): Run the compilation in a thread
16215         managed by mono. Fixes #44023.
16217         * mini.c (mono_codegen): Print full method name in verbose output.
16219         * mini-x86.c (mono_arch_patch_code): Fix warning.
16220         
16221         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
16222         jumps, since the method we are jumping to might be domain-specific.
16224         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
16226 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16228         * inssel.brg: string chars are unsigned.
16230 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
16232         * TODO: New todo item.
16234         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
16235         which calls mono_runtime_class_init and patches the call site to
16236         avoid further calls.
16237         (mono_arch_create_class_init_trampoline): New arch specific function 
16238         to create a class init trampoline.
16239         (create_trampoline_code): Generalized so it can create
16240         class init trampolines as well.
16242         * mini.c (helper_sig_class_init_trampoline): New helper variable.
16243         (mono_create_class_init_trampoline): New function to create and cache
16244         class init trampolines.
16245         (mono_find_class_init_trampoline_by_addr): New function to lookup the
16246         vtable given the address of a class init trampoline. Used by the
16247         patching process.
16248         (mono_codegen): Generate a call to a trampoline instead of
16249         mono_runtime_class_init in LDSFLD[A].
16250         (mono_codegen): Add relocations for the new trampoline.
16251         
16252         * mini.h mini-x86.c aot.c: Added a new relocation type: 
16253         MONO_PATCH_INFO_CLASS_INIT.
16255         * mini.h: Bump AOT version number.
16257         * aot.c: Create a copy of the loaded code instead of using the original
16258         so methods which call each other will be close in memory, improving
16259         cache behaviour.
16260         
16261         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
16262         patch since it breaks the regression tests.
16263         
16264         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
16265         for the register saving instruction sequence since the 
16266         frame_state_for function in glibc 2.3.2 don't seem to detect it.
16268 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
16270         * TODO: Fix todo item && remove another.
16272 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
16274         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
16275         previous checkin.
16277         * aot.c: Moved the check for MONO_LASTAOT into the initialization
16278         function of the module.
16280         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
16281         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
16282         --no-aot command line option.
16284 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
16286         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
16287         by Bernie Solomon (bernard@ugsolutions.com).
16289         * inssel.brg: Refactor the interface offset table related code into
16290         its separate functions and add support for the AOT case.
16292 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
16294         * aot.c (mono_aot_get_method_inner): Fix memory leak.
16295         
16296         * aot.c: Added mono_aot_verbose variable and made all debugging
16297         output depend on the value of this variable.
16299         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
16300         method_label and info_label.
16302         * mini.h mini-x86.c aot.c: Added a new relocation type 
16303         MONO_PATCH_INFO_IID for klass->interface_id.
16305         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
16306         the MonoJitInfo structure.
16308         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
16309         a non-root appdomain in shared mode.
16311 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16313         * aot.c: make aot loader less verbose. Remove free of unused variable.
16315 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
16317         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
16319         * .cvsignore: Added *.dll.
16321         * mini.c (mono_print_tree_nl): New function callable while debugging.
16323         * mini.c (mono_print_code): Export this.
16325         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
16326         patched code.
16328 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
16330         * mini.h (MonoCompile): Added 'jit_info' field.
16332         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
16333         the cfg structure, since it is needed by the AOT compiler.
16335         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16337         * aot.c: A major rewrite. Changes include:
16338         - save exception tables for methods which have them.
16339         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
16340         to g_module_symbol.
16341         - reworked the file format so it is now much smaller and needs
16342         fewer relocation entries.
16343         
16344 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16346         * aot.c (load_aot_module): Fix build bustage on platforms without
16347         Boehm GC.
16349 2003-09-04  Martin Baulig  <martin@ximian.com>
16351         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
16353 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16355         * TODO: Some new optimization ideas.
16357         * aot.c: Move AOT module loading logic here from mono_assembly_open.
16359         * aot.c: Save the optimization flags used to compile the code into
16360         the AOT module.
16362         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
16363         support emitting domain specific code.
16364         
16365         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
16366         no longer domain neutral. It can be made domain neutral by compiling 
16367         with --optimize=shared.
16369         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
16370         between appdomains.
16372         * driver.c mini.h mini.c: New --no-aot debugging option which disables
16373         loading of AOT code.
16375         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
16376         
16377         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
16378         if there is no domain neutrality information.
16380 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
16382         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
16383         format version into the generated library.
16385         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
16386         callee method into the caller since one of them could be shared.
16388         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
16389         system exceptions from AOT code now works.
16391         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
16392         method if it is domain neutral and the callee is not.
16394         * graph.c (cfg_emit_one_loop_level): Fix warning.
16396 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
16398         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
16399         last checkin.
16401 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
16403         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
16404         is needed  by code which is executed before mono_runtime_init ().
16405         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
16406         
16407         * mini.c (mono_thread_abort): Fix warning.
16408         (mono_jit_compile_method): Call static constructor in the AOT case too.
16410         * aot.c (mono_compile_assembly): Fix warning.
16412 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16414         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
16416 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
16418         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
16420         * cpu-pentium.md: Fix the length of call opcodes so they include the
16421         ESP restoring instruction. Fixes #47968.
16423 2003-08-28  Martin Baulig  <martin@ximian.com>
16425         * mini-x86.c (mono_arch_call_opcode): Added support for
16426         MONO_TYPE_GENERICINST.
16428         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
16430 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
16432         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
16433         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
16435         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
16436         metadata_section.
16438 2003-08-26  Martin Baulig  <martin@ximian.com>
16440         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
16441         when reporting an error, set this to the actual error location.
16442         (mono_method_to_ir): Report the correct error location if
16443         get_basic_blocks() returned an error.
16445 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
16447         * mini.c (mono_type_blittable): OBJECT is not blittable.
16448         (mono_method_blittable): Methods which have marshalling descriptors
16449         are not blittable either. Fixes #47842.
16451 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
16453         * driver.c mini.c: Use an environment variable instead of a global 
16454         variable. Also fix the build.
16456         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
16457         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
16458         reporting this. 
16460         * driver.c mini.c: Added --with-valgrind option to turn off some
16461         code which prevents mono from running under valgrind.
16463         * mini.c (mono_emit_call_args): Fixed warning.
16465         * mini.c (mono_emulate_opcode): Fixed warning.
16467 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16469         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
16470         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
16471         regalloc.c, regalloc.h: specify available registers in arch-specific
16472         code and support floats in the regallocator (patch by Laurent Morichetti 
16473         <l_m@pacbell.net>)
16475 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16477         * mini.c: mono_thread_current() can be called only after
16478         mono_runtime_init(): rearrange code to not call it early on.
16480 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16482         * mini.c: allocate jump tables in the code mempools.
16484 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16486         * mini.c, mini.h: make sure per-thread data allocated by the jit is
16487         freed.
16489 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
16491         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
16492         12 to 16.  This fixes bug #47453.
16495 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16497         * mini-ppc.c: fixed indexed load and unsigned compares.
16499 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
16501         * mini.c: reenabled installation of handler for
16502           thread abort signal.
16504 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16506         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
16507         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
16508         until it's fixed and actually useful.
16510 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16512         * inssel-long32.brg: couple more opcodes implemented.
16514 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16515         
16516         * mini-sparc.c: Even more opcodes implemeted.
16518 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
16520         * mini-sparc.c: More opcodes implemented.
16522 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
16524         * mini-sparc.c: More opcodes implemented.
16526 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16528         * inssel-sparc.brg: Add some needed rules.  Direct
16529         copy from PPC.
16530         * Makefile.am: Use inssel-sparc.brg
16531         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
16532         an assert happy for now.
16534 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
16536         * mini-sparc.c: Fixed compile errors.
16537         * exceptions-sparc.c: Same.  We now produce a mono binary 
16538         on sparc-linux.  Yea.
16540 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
16542         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
16543         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
16544         They compile, but do not work.
16546 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16548         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
16549         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
16550         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
16551         (ct@gentoo.org).
16553 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16555         * mini.c: more opcodes implemented and better support for generics.
16557 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16559         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
16560         * mini.c, mini.h: first cut at generics support: some new instructions 
16561         added and changed the behaviour of some of the existing ones.
16563 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
16565         * mini.c: Removed definition of metadata_shared mutex here.
16567 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16569         * mini-x86.c: make vararg calls work for instance methods.
16571 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16573         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
16574         returns the arguments in a separte list, now.
16576 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16578         * aot.c, mini.c: updates for array type representation changes.
16580 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
16582         * mini.c: register function to perform jit shutdown.
16584 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16586         * mini.c: use a faster allocator if possible.
16588 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16590         * aot.c: some cleanups and portability changes.
16592 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16594         * mini.c: use faster allocation for CEE_BOX if possible.
16596 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16598         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
16599         Moved inlined mempcy code to its own function so that is can be
16600         reused. Added an inline memset function as well (optimized initobj).
16601         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16603 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16605         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16607 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16609         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16610         arch code can setup the cpu for CLR execution, if needed.
16611         We use it on x86 to set the precision of FP operations.
16613 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16615         * mini.c: disable some optimizations if we can guess they'll cost too
16616         much for a given method.
16618 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16620         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16621         
16622 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16623         * mini.h mini.c mini-x86.c: Added instruction level coverage 
16624         info collection support.
16626 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16628         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16629         is now implemented in the profiling API. Get rid of a couple of
16630         unnecessary global variables.
16632 2003-06-15  Nick Drochak <ndrochak@gol.com>
16634         * basic-long.cs: tests for negative values for bigmul, and unsigned.
16635         * cpu-g4.md: add op_bigmul and op_bigmul_un
16636         * cpu_pentium.md: add op_bigmul_un
16637         * inssel-long32.brg: add rule for unsigned bigmul
16638         * mini-ops.h: define OP_BIGMUL_UN
16639         * mini-x86.c: THE BUG: handle (un)signed properly
16640         * mini.c: choose unsigned opcode if needed.
16641         This set of patches fixes bug #44291
16643 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
16645         * mini.c (optimize_branches): improved to handle all kinds of
16646         conditional branches.
16648 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16650         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16651         don't raise exceptions.
16653 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16655         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16656         to arch-specific files.
16658 2003-06-09  Martin Baulig  <martin@ximian.com>
16660         * Makefile.am (libs): Added $(LIBGC_LIBS).
16662 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16664         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16665         and OP_ATAN (fixes bug#44293).
16667 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16669         * Makefile.am, mini-x86.c: rename cpu description array to
16670         pentium_desc, since some compilers define the 'pentium' preprocessor
16671         symbol.
16673 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
16675         * mini.c (mini_select_instructions): add explicit branch if the
16676         following block is not the false target of a conditional branch -
16677         we need this with any optimization that reorder or remove bblocks
16679         * mini.c (optimize_branches): bug fixes
16681 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
16683         * mini.c (mono_method_to_ir): inline static readonly fields
16685         * ssa.c (fold_tree): start cfold support for long (very simple
16686         cases only)
16688         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16690 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16692         * inssel.brg: fixed memcpy (bug #44219).
16694 2003-06-05  Dick Porter  <dick@ximian.com>
16696         * driver.c: Set the glib log levels to not abort if g_message
16697         recurses.
16699         g_set_prgname() has to happen before mini_init() so that the
16700         process handle gets the info.
16701         
16702 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16704         * driver.c: add intrins to the default optimizations to get wider
16705         exposure.
16707 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16709         * mini.h: some large basic blocks will overflow a 16-bit
16710         integers for symbolic registers.
16712 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16714         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16715         (mono_arch_output_basic_block): fix bug 43499 
16717 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16719         * mini.c: kill duplicated definition of mono_debug_format.
16721 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
16723         * mini-x86.c, arrays.cs: fixed register allocation bug.
16725 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16727         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16729         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16731 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16733         * mini.c:
16734         (print_method_from_ip): also print source location information if
16735         available.
16737 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
16739         * mini.c (mono_find_block_region): bug fix in region code
16740         (mini_method_compile): enable removing unreachable code again, but
16741         only in methods without exception clauses.
16743 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16745         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16746         Implemented arglist opcode and handling of TypedReference type.
16747         Fixed x86 call convention when a structure is returned.
16748         Minimal support for calling static vararg methods.
16750 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
16752         * mini.c (mini_method_compile):  always remove unreachable code,
16753         because the code in them may be inconsistent  (access to dead
16754         variables for example).
16756 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16758         * driver.c, debug-mini.c: warning fixes.
16760 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16762         * Makefile.am, jit.h, mini.h: install header for embedding mono.
16764 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16766         * mini.c: thread-static fields are registered in mono_class_vtable(),
16767         so ensure the function is called before checking for them.
16769 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
16771         * mini.c (optimize_branches): fix for bug 43586
16773         * jit-icalls.c (mono_llmult_ovf): added an additional check for
16774         overflow (fixes Bug #43639)
16776 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16778         * mini.c, objects.cs: allow the use of stobj for primitive types.
16780 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16782         * mini.c: be less strict about argument checking until we support
16783         running the verifier.
16785 2003-05-27  Nick Drochak <ndrochak@gol.com>
16787         * basic-long.cs: tests for (ulong)int * (ulong)int also
16788         * mini.c: use the same trick for (ulong)int * (ulong)int
16790 2003-05-27  Nick Drochak <ndrochak@gol.com>
16792         * basic-long.cs: add regression test for (long)int * (long)int
16793         * cpu-pentium.md: add op_bigmul specification
16794         * inssel-long32.brg: add OP_BIGMUL rule
16795         * mini-ops.h: add OP_BIGMUL
16796         * mini-x86.c: register allocator: handle case where src1 needs to be
16797         in EAX.
16798         * mini.c: substitute special BIGMUL opcode in the tree for 
16799         (long)int * (long)int
16801 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16803         * jit-icalls.c: call the type ctor on field access if needed.
16805 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16807         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
16808         to a method (including results of ldelema, bug#43207).
16810 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
16812         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
16813         colors to show exception handler blocks.
16815         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
16816         (fix for pinvoke7.cs).
16818 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16820         * mini.h, mini.c: ensure correct initialization order for types that
16821         require it. Prepare for lazy compilation of jit icall wrappers.
16822         Provide a name for opcode emulation to reduce unneeded mallocing.
16824 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16826         * mini-x86.c: better register restoring code and profiling
16827         support for tail calls.
16829 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16831         * mini.h, driver.c: prepare for leaf methods optimization.
16833 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16835         * mini.c: get targets of branches before converting a method.
16837 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
16839         * mini.c (optimize_branches): added some experimental code (disbaled) 
16841 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
16843         * mini.c (optimize_branches): fix branch to branch optimization 
16845         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
16847         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
16849         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
16851         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16852         if needed.
16854 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
16856         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16857         enable use of interface variables again.
16859         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16860         I1 to registers because there is no simply way to sign extend 8bit
16861         quantities in caller saved registers on x86.
16863         * inssel-float.brg: set costs of some rules to 2 so
16864         that monobure always select the arch. specific ones if supplied,
16865         regardless of the order we pass the files to monoburg.
16867 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16869         * mini.c, mini-x86.c: since the magic trampoline for jumps
16870         can't patch the code directly, we do it as soon as the
16871         method gets compiled.
16873 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16875         * mini-x86.c, mini.h: introduce a new patching method
16876         to support CEE_JMP and tail calls.
16877         * mini.c: obey tail.call. Don't precompile methods target
16878         of CEE_JMP.
16879         * tramp-x86.c: new trampoline code to handle methods
16880         reached through a jump.
16882 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
16884         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16885         bit values to registers
16887 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
16889         * mini.c (mono_compile_get_interface_var): share interface
16890         variables if possible.
16892 2003-05-16  Martin Baulig  <martin@ximian.com>
16894         * debug-mini.c (mono_init_debugger): New function to initialize
16895         the debugger.  This is not in the debugger since it needs to
16896         access some of mini's internals.
16898 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16900         * mini.c (mono_method_to_ir): inlining fixes/cleanups
16902 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16904         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16905         for value type handling.
16907 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16909         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16910         (mono_method_check_inlining): enable inlining of all kinds of wrappers
16912 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
16914         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16915           the constructor through a proxy.
16917 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16919         * jit-icalls.c, inssel.brg: fixes to array element address
16920         calculations.
16922 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
16924         * mini-x86.c (is_regsize_var): allocate pointer to registers
16926 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16928         * driver.c: fixed typo, added intrins to the set of optimizations
16929         tested with regressions.
16931 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16933         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16934         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16935         test case.
16937 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
16939         * inssel.brg: remove some common pop instructions without side effects
16941 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16943         * inssel-x86.brg: fixed thinko in int to double conversions.
16945 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16947         * mini.c, jit-icalls.c: added runtime thread-static variable support.
16949 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16951         * inssel-long32.brg: two more missing instructions.
16953 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
16955         * mini.c (mono_emit_call_args): set the cil_code for all arguments
16956         if not already set.
16958 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
16960         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16961         correctly.
16963         * basic-float.cs: Added tests for negative zero.
16965 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16967         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16968         a couple of missing operations for long casts, with test cases.
16970 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16972         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16974 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
16976         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16977         code size estimation.
16979 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
16981         * mini.c (mono_jit_create_remoting_trampoline): make it work with
16982         abstract methods (fix bug 42542)
16984         * aot.c: add ability to handle array types
16985         
16986 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
16988         * mini.c: Call the _specific versions of the object allocation
16989         functions if possible.
16991 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16993         * driver.c: call setlocale ().
16995 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16997         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16998         windows build.
17000 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
17002         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
17004         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
17005         wrappers (fix bug 42122)
17007 2003-05-04  Martin Baulig  <martin@ximian.com>
17009         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
17011         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
17012         s/mini_set_defaults/mono_set_defaults/g.
17014 2003-05-04  Martin Baulig  <martin@ximian.com>
17016         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
17018 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17020         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
17021         (reported by Don Roberts).
17023 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
17025         * mini.c: temporarily work around two bugs for this release.
17027 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17029         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
17030         that contains -export-dynamic and it makes using the ld script
17031         useless.
17032         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
17034 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17036         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
17037         specific cpu.
17039 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17041         * mini.c: make sure leave calls all the needed finally blocks,
17042         even when the target jumps out of multiple exception clauses.
17044 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17046         * ldscript, Makefile.am: add linker script to reduce the number of
17047         exported symbols (should also fix the issues with libwine defining
17048         some of the same symbols in io-layer).
17050 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
17052         * driver.c (mini_main): Avoid assertion when no file name is given on 
17053         the command line.
17055 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
17057         * driver.c: added --version/-V command line option.
17058         Added the inline optimization in the regression tests.
17060 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17062         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
17063         to the type in the method signature (fixes bug#42134).
17065 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
17067         * mini.c: when inlining, check this is not null only when needed (bug #42135).
17069 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
17071         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
17073 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17075         * driver.c: fixed bug #42100.
17077 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
17079         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
17081 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17083         * mini.c: moved most of the code required to do inlining to its own
17084         function so it can be reused. Inline also ctors if appropriate.
17086 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
17088         * Makefile.am: Link with -export-dynamic so shared libs loaded by
17089         the runtime can call mono API functions.
17091 2003-04-27  Martin Baulig  <martin@ximian.com>
17093         * debug-mini.c (mono_debug_init_method): Added
17094         `guint32 breakpoint_id' argument; if the method has a breakpoint,
17095         send a notification to the debugger.
17097         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
17098         running in the Mono Debugger, just pass the breakpoint number to
17099         mono_debug_init_method().
17101         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
17103 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
17105         * mini.c: allow some more unsafe compares.
17107 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17109         * mini-x86.c, Makefile.am: make distcheck works (partially from
17110         a patch by Richard Lee <r.h.lee@attbi.com>).
17111         * regset.c, regset.h: removed, they are unused.
17113 2003-04-25  Dick Porter  <dick@ximian.com>
17115         * driver.c: Usage reports the name as 'mono' not 'mini'
17116         * exceptions-x86.c: Build and run on freebsd
17118 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17120         * Makefile.am: install the program with the 'mono' name and
17121         the library as libmono instead of mini and libmini.
17123 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17125         * driver.c: provide the APIs for the embedding interface of the old jit.
17127 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
17129         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
17131 2003-04-23  Martin Baulig  <martin@ximian.com>
17133         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
17135         * driver.c: Added `--debug' command line argument to enable
17136         debugging support.
17138 2003-04-23  Martin Baulig  <martin@ximian.com>
17140         * debug.[ch]: Removed.  The code is now in
17141         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
17143         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
17144         last six months.
17146 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
17148         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
17150 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17152         * mini.c:
17153         (mini_cleanup): moved mono_runtime_cleanup call after the call to
17154         mono_domain_finalize.
17155         (mini_method_compile): use mono_method_profile* if the the option is
17156         enabled.
17158 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
17160         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17161         methods with their wrapper.
17163         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17164         methods with their wrapper.
17166         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
17167         their wrapper.
17169         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
17170         wrapper.
17172         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
17173         methods.
17175 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
17177         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
17179 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
17181         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
17182         of the mempool. This is slightly faster and uses less memory
17184 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17186         * mini.c: avoid O(n) allocation for variables.
17188 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17190         * mini.c: handle items on the stack after inlining methods.
17192 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17194         * mini.c: make the method->opcode optimization dependent
17195         on MONO_OPT_INSTRINS and do it lazily.
17197 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17199         * driver.c: print overall results at the end of regression run.
17201 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17203         * inssel.brg: don't overwrite symbolic registers.
17205 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17207         * inssel-x86.brg: fix conversion from long to float.
17209 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
17211         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
17213 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
17215         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
17217         * driver.c: Added --print-vtable option as in the old JIT.
17219 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17221         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
17223 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
17225         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
17227 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
17229         * mini.c regalloc.c regalloc.h: Fix memory leak.
17231 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
17233         * aot.c (mono_aot_get_method): register all used strings
17235 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17237         * mini.c: always intern strings references with ldstr at compile time.
17239 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17241         * Makefile.am: add BUILT_SOURCES.
17243 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17245         * driver.c: give a better error message when the assembly to execute
17246         doesn't have an entry point.
17248 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
17250         * Makefile.am: added hack for automake
17252         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
17253         correct sematics.
17255         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
17257 22003-04-07  Martin Baulig  <martin@ximian.com>
17259         * Makefile.am: Added Makefile.am.
17261         * debugger-main.c: Removed, this is now in the debugger where it
17262         belongs.
17264         * mini.pc.in: Call this package `mini' for the moment.