2008-11-15 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
2
3         * unwind.h: New file, contains definitions for stack unwinding.
4
5         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
6         to cfg->unwind_ops.
7         
8         * aot-compiler.c: Generalize the emitting of unwind information to use the
9         information in cfg->unwind_ops.
10
11         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
12
13         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
14         AOT method frames. Enable writing symbols for methods by default.
15
16 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
17
18         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
19         and make it work with vectors of element sizes 1, 2 and 4.
20
21         * simd-intrinsics.c: Enable getter for all vectors with element size
22         1, 2 or 4.
23
24         * simd-methods.h: Add the names of other getters.
25
26         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
27
28         * cpu-x86.md: Same.
29
30         * mini-x86.c: Same.
31
32 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
33
34         * mini-ppc.h: portability fix.
35
36 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
37
38         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
39         buggy and will overwrite it.
40
41 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
42
43         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
44         Use it to emit local symbols for all methods so AOTed methods show up with
45         their full name in gdb/valgrind output.
46
47 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
48
49         * mini-ppc.c: portability fixes.
50
51 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
52
53         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
54         entries out of the if (!generic_shared...) code so it is always done.
55         (mono_class_init_trampoline): Do the patching when running under valgrind
56         too, newer versions of valgrind have no problems with it.
57
58 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
59
60         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
61         further sections.
62
63 2008-11-13  Mark Probst  <mark.probst@gmail.com>
64
65         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
66         filters.
67
68 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
69
70         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
71
72 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
73
74         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
75
76         * cpu-x86.md: Same.
77
78         * mini-x86.c: Same.
79
80         * simd-intrinsics.c: Same.
81
82 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
83
84         * simd-intrinsics.c: Enable constructor intrinsics for all types.
85
86 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
87
88         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
89         to work with more Vector types.
90
91 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
92
93         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
94         store the elemens directly instead of using and intermediate.
95
96 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
97
98         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
99
100         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
101         to preserve %eax for aot plt trampolines.
102
103         * aot-compiler.c (compile_method): Don't skip synchronized methods.
104         (encode_method_ref): Flag synchronized methods so they won't go through
105         the AOT trampoline.
106
107         * aot-compiler.c: Additional work to support AOTing synchronized methods/
108         wrappers.
109
110         * cpu-ia64.md (jmp): Increase max length.
111
112 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
113
114         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
115         open generic classes.
116
117         * aot-compiler.c: Enable the ELF writer on ELF platforms.
118
119         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
120         box+brtrue optimization since it causes test failures on x86.
121
122 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
123
124         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
125
126         * cpu-x86.md: Same.
127
128         * mini-x86.c: Same.
129
130         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
131         for simd ctor values. 
132
133         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
134         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
135
136 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
137
138         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
139         LogicalRightShift.
140
141         * simd-instrincs.c: Same.
142
143         * basic-simd.cs: Same.
144
145 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
146
147         * ratests.cs: Add more tests.
148
149         * regalloc2.c (add_spill_code): Handle more corner cases.
150
151 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
152
153         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
154         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
155         both the source an destination of an instruction.
156
157 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
158
159         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
160         wapihandles.c: more portability changes.
161
162 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
163
164         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
165         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
166         safe to execute in a signal handler and the kernel provides better
167         the info in /proc/self/smaps. Avoid the assert on sigaction during
168         cleanup.
169
170 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
171
172         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
173         do the bblock linking hack if it is actually needed.
174
175         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
176         up linking.
177
178         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
179         crash problem is fixed.
180
181         * branch-opts.c (mono_remove_critical_edges): Link up newly added
182         bblocks.
183
184         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
185         for catch clauses.
186         (mini_method_compile): Set the starting value of next_vreg to 
187         MAX_IREGS + MAX_FREGS when using globalra.
188
189         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
190         filter clauses with BB_EXCEPTION_HANDLER.
191
192         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
193
194 2008-11-10  Mark Probst  <mark.probst@gmail.com>
195
196         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
197         space for stdcall.  Fixes regressions on Win32.
198
199 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
200
201         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
202         bblocks.
203         (linear_scan): Remove an assert which doesn't seem to be needed.
204
205         * local-propagation.c (mono_local_deadce): Avoid a call to
206         MONO_DELETE_INS which would screw up the instruction linking.
207
208         * mini.c (mono_decompose_op_imm): Make this work with globalra.
209
210         * regalloc2.c: Upgrade to work the current JIT code.
211
212 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
213
214         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
215         case.
216
217         * aot-runtime.c: Remove some dead code.
218
219         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
220         consistency.
221         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
222
223         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
224         trampolines using sscanf since atoi doesn't work on large unsigned values.
225
226         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
227         Initialize code_size.
228
229 2008-11-08  Mark Probst  <mark.probst@gmail.com>
230
231         * method-to-ir.c (mini_emit_inst_for_method): Make
232         Interlocked.CompareExchange work for Int arguments on 32 bit
233         archs, as well.
234
235 2008-11-07  Mark Probst  <mark.probst@gmail.com>
236
237         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
238
239 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
240
241         * main.c Fix MSVC build.
242
243         Contributed under MIT/X11 license.
244
245 2008-11-06  Mark Probst  <mark.probst@gmail.com>
246
247         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
248         alignment larger than 8 bytes are aligned correctly, too.
249
250         * mini.c: Honor the min_align field of MonoClass when laying out
251         the stack.
252
253 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
254
255         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
256
257         * aot-compiler.c (emit_plt): Fix a warning.
258         
259         * aot-compiler.c: Implement ARM support in the binary writer.
260
261 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
262
263         * basic-simd.cs: Add test for getter with byref arg.
264         Fix the naming of a few tests.
265         Add missing checks to a test.
266
267 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
268
269         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
270
271         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
272         most of the full-aot support for monitor enter/exit trampolines.
273
274         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
275         enter/exit trampoline creation functions.
276
277         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
278         make dist.
279
280 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
281
282         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
283         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
284         implement the needed functionality without adding crap to the runtime.
285
286 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
287
288         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
289         non-x86 builds.
290
291         * mini.c (mono_build_date): New global version holding the build date in
292         string format.
293         
294         * Makefile.am (buildver.c): Generate a file containing the build date.
295
296         * main.c: Set the build date from the generated file.
297
298         * mini.c (mono_get_runtime_build_info): New helper function returning build
299         information in a string format.
300         
301         * driver.c (mono_main): Print the build date in --version.
302
303         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
304         file when the bind-to-runtime-version option is used.
305
306 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
307
308         * simd-intrinsics.c: Fix bug when using getters and byref args. 
309
310 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
311
312         * simd-methods.h: Rename prefetch methods.
313
314         * simd-intrinsics.c: Same.      
315
316 2008-11-05  Mark Probst  <mark.probst@gmail.com>
317
318         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
319         sizes.
320
321 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
322
323         * aot-compiler.c: Use the bundled elf header files instead of depending on
324         the system one.
325         
326         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
327         mempool.
328
329         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
330         on every call.
331
332 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
333
334         * cpu-x86.md: Add store nta ops.
335
336         * mini-ops.h: Same.
337
338         * mini-x86.c: Same.
339
340         * mini.h: Add an enum for simd prefetch modes.
341
342         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
343         of store. Use the changed code to support store nta.
344
345         * simd-intrinsics.c: Add prefetch ops for all vector types.
346
347 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
348
349         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
350         threads.
351         
352         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
353         names.
354
355         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
356         trampolines.
357
358 2008-11-04  Mark Probst  <mark.probst@gmail.com>
359
360         * mini-x86.c: Fixed commit.
361
362 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
363
364         * aot-compiler.c (emit_plt): Align the plt section only on x86.
365
366 2008-11-04  Mark Probst  <mark.probst@gmail.com>
367
368         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
369         and MONITOR_EXIT, for the ASM fastpaths.
370
371         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
372         available.
373
374         * mini.c, patch-info.h: Signature and patch infos for
375         Monitor.Enter/Exit trampolines.
376
377         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
378
379         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
380         Monitor.Enter/Exit ASM fastpath for Linux.
381
382 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
383
384         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
385
386         * objects.cs: Add a new test.
387         
388         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
389
390         * aot-runtime.c (load_method): Run class initialization in the PLT case even
391         if MONO_LOG_LEVEL is set.
392
393         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
394
395         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
396
397         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
398         
399         * aot-compiler.c: Change the relocation code to use virtual addresses instead
400         of file offsets. Align the sections belonging to the data segment to 
401         PAGESIZE.
402
403 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
404
405         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
406         elf.h. Port it to amd64.
407
408 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
409
410         * driver.c: Enable SIMD by default.
411
412 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
413
414         * cpu-x86.md: Add prefetch op.
415
416         * mini-ops.h: Same.
417
418         * mini-x86.c: Same.
419
420         * mini.h: Add an enum for simd prefetch modes.
421
422         * simd-methods.h: Add prefetch function names.
423
424         * simd-intrinsics.c: Add prefetch ops for all vector types.
425
426 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
427
428         * aot-compiler.c (emit_bytes): Speed this up a little.
429
430 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
431
432         * aot-compiler.c: Add JIT time etc. statistics.
433         
434         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
435
436         * mini.h (MonoCompile): Add 'got_offset' field.
437
438         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
439         method_got_offsets array.
440
441         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
442         wrappers.
443
444         * aot-compiler.c (compile_method): Add generic method instances referenced
445         by the method to the list of methods to be compiled, this is required so if
446         A<T> references B<T>, and another assembly references A<int>, then it will
447         also get a copy of B<int>.
448
449         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
450         when checking for monitor enter/exit.
451
452 2008-10-30  Mark Probst  <mark.probst@gmail.com>
453
454         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
455         for Monitor.Enter and Monitor.Exit if enabled.
456
457         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
458         Solaris.
459
460 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
461
462         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
463         of an OP_MOVE. Fixes #440046.
464
465         * basic-long.cs: Add a new test.
466
467 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
468
469         * mini.h: Add synchronization note for the managed counter-part.
470
471         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
472         returns the simd caps of the current cpu.
473
474 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
475
476         * basic-simd.cs: Remove Console.WriteLine.
477
478 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
479
480         * basic-simd.cs: New tests for Vector2ul.
481
482 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
483
484         * simd-intrinsics.c: Add new vector type Vector2ul.
485
486 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
487
488         * basic-simd.cs: New tests for Vector2l.
489
490 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
491
492         * cpu-x86.md: Add long version of most packed int ops.
493
494         * mini-ops.h: Same.
495
496         * mini-x86.h: Same.
497
498         * simd-intrinsics.c: Add new vector type Vector2l.
499
500 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
501
502         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
503
504         * simd-methods.h: Remove SN_op_BitwiseXor.
505
506 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
507
508         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
509         alignment.
510
511 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
512
513         * basic-simd.cs: Test for Vector2d.
514
515         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
516         value.
517
518 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
519
520         * cpu-x86.md: Add double version of all packed float ops.
521
522         * mini-ops.h: Same.
523
524         * mini-x86.h: Same.
525
526         * simd-intrinsics.c: Add new vector type Vector2d.
527
528         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
529
530         * simd-methods.h: Add Duplicate.
531
532 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
533
534         * basic-simd.cs: Test for packing with signed saturation.
535
536 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
537
538         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
539         found in the TYPESPEC table.
540
541 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
542
543         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
544         too.
545
546         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
547
548         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
549         instead of the RVA, since the RVA can be changed by tools like the cil 
550         stripper.
551
552         * method-to-ir.c (mono_method_to_ir2): Ditto.
553
554         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
555         (deserialize_variable): Ditto.
556
557 2008-10-25  Martin Baulig  <martin@ximian.com>
558
559         * debug-mini.c (write_variable): Use
560         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
561
562 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
563
564         * cpu-x86.md: Add unsigned variants of packd and packw.
565
566         * mini-ops.h: Same.
567
568         * mini-x86.h: Emit the right instruction for packd and packw.
569         Add unsigned variants of packd and packw.
570
571         * simd-intrinsics.c: Packd and packw were used in place of their
572         unsigned variants. Change that.
573         Add intrinsics for (Signed)PackWithSignedSaturation.
574
575         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
576
577 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
578
579         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
580
581 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
582
583         * mini-ops.h: Remove dword packed add/sub with saturation ops.
584
585         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
586
587         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
588         sse instructions.
589
590         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
591
592 2008-10-24  Mark Probst  <mark.probst@gmail.com>
593
594         * method-to-ir.c, mini.c: Special casing for the synchronized
595         wrapper for the ldtoken+GetTypeFromHandle case.
596
597 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
598
599         * mini.c (mono_replace_ins): Move this to branch-opts.c.
600
601         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
602         created/split bblocks.
603
604 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
605
606         * mini-ops.h: Add packed signed mul high.
607         
608         * cpu-x86.md: Same.
609
610         * mini-x86.c (mono_arch_output_basic_block): Same.
611
612         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
613
614         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
615
616 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
617
618         * basic-simd.cs: Tests for Vector16sb.
619
620 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
621
622         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
623
624 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
625
626         * mini-ops.h: Add packed signed min, max and compare greater.
627         
628         * cpu-x86.md: Same.
629
630         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
631         saturation.
632
633         * simd-methods.h: Add CompareGreaterThan.
634
635         * simd-methods.h: Remove CompareEquals.
636
637         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
638
639         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
640
641         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
642         CompareEqual.
643
644 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
645
646         * basic-simd.cs: Fix tests due to change in the API.
647
648 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
649
650         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
651
652 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
653
654         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
655
656         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
657         inst_offset as this has invalid values for LDADDR.
658
659 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
660
661         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
662
663         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
664
665 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
666
667         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
668         for accessing field->data.
669
670 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
671
672         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
673
674 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
675
676         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
677
678         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
679
680 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
681
682         * dominators.c (mono_compute_natural_loops): Allocate GList enties
683         from the cfg mempool.
684
685 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
686
687         * basic-simd.cs: Tests for new methods in Vector8us.
688
689 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
690
691         * mini-ops.h: Add multiply and store high.
692         
693         * cpu-x86.md: Same.
694
695         * mini-x86.c (mono_arch_output_basic_block): Same.
696
697         * simd-methods.h: Same.
698
699         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
700         and CompareEqual.
701
702 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
703
704         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
705         mono_class_setup_vtable ().
706
707         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
708         mono_class_get_vtable_entry () for accessing klass->vtable.
709
710         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
711
712         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
713         found.
714
715         * method-to-ir.c (mono_save_token_info): Don't save references made from
716         wrappers.
717
718         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
719         of generic instances.
720
721         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
722
723 2008-10-19  Mark Probst  <mark.probst@gmail.com>
724
725         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
726         OP_JMP depends on the method signature.  Calculate it properly.
727
728 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
729         
730         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
731         called directly.
732
733         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
734         instances.
735         (emit_extra_methods): Add another table mapping method indexes to 
736         offsets in the extra_method_info table.
737
738         * mini.h: Bump AOT file format version.
739         
740         * aot-runtime.c: Merge most of the code from mono_aot_get_method
741         and mono_aot_get_method_from_token () into one function.
742
743 2008-10-19  Mark Probst  <mark.probst@gmail.com>
744
745         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
746         separate counter.
747
748 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
749
750         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
751         methods.
752
753         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
754         disable_aot.
755
756         * mini.c (mono_patch_info_equal): Compare the generic context as well.
757
758         * mini.h: Bump aot file format version.
759
760         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
761         AOT file can contain native code for methods which are not in the METHOD
762         table. Generate code for non-sharable generic instances of generic methods
763         found in the METHODSPEC table.
764         
765         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
766         encoding generic type handles.
767
768         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
769         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
770
771         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
772         macros + MONO_ADD_INS.
773
774         * mini.c (mono_jump_info_token_new2): New function which takes a generic
775         context as well.
776
777         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
778
779         * mini.h: Bump aot file format version.
780
781         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
782
783 2008-10-17  Mark Probst  <mark.probst@gmail.com>
784
785         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
786         platforms, with definable stack alignment value.  Set to 16 now
787         for all platforms.
788
789         * mini.c, mini.h, driver.c: Command line option for disabling
790         stack alignment.
791
792 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
793
794         * basic-simd.cs: Tests for new methods in Vector4ui.
795
796 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
797
798         * mini-ops.h: Add packed int shuffle.
799         
800         * cpu-x86.md: Same.
801
802         * mini-x86.c (mono_arch_output_basic_block): Same.
803
804         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
805         extract mask, max, min, shuffle.
806
807         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
808
809 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
810
811         * basic-simd.cs: Tests for new methods in Vector8us.
812
813 2008-10-17  Mark Probst  <mark.probst@gmail.com>
814
815         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
816         RuntimeTypeHandle, not a TypedReference.
817
818 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
819
820         * simd-intrinsics.c: remove relocations.
821
822 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
823
824         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
825         optimizations from the x86 backend.
826
827 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
828
829         * simd-methods.h, simd-intrinsics.c: debloat method names and
830         prepare for no relocations.
831
832 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
833
834         * mini-ops.h: Add packed min/equal and sum of absolute differences.
835         
836         * cpu-x86.md: Same.
837
838         * mini-x86.c (mono_arch_output_basic_block): Same.
839
840         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
841         extract mask, max, min and sum of absolute differences.
842
843         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
844         method name.
845
846 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
847
848         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
849         Renamed one test for consistency.
850
851 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
852
853         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
854         fix to the code that deal with other blocks.
855
856 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
857
858         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
859
860 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
861
862         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
863         that deals with vreg interference. Explicitly check for OP_LDADDR to be
864         able to process the source reg.
865
866 2008-10-16  Martin Baulig  <martin@ximian.com>
867
868         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
869
870         * inssel.brg: Add `OP_HARD_NOP'.
871
872         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
873
874         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
875         `OP_HARD_NOP' instruction when running inside the debugger.
876
877         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
878         `OP_HARD_NOP' instruction when running inside the debugger.
879
880 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
881
882         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
883         now works. The issue with the regalloc tripping up no longer
884         happens.
885
886         * simd-intrinsics.c (load_simd_vreg): Same.
887
888 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
889         
890         * basic-simd.cs: Tests for new Vector8ui methods.
891
892 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
893
894         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
895         only for type. This fixes crashes where MonoInst::klass is checked
896         for ops of type != VTYPE or OBJ.
897
898         * simd-intrinsics.c (load_simd_vreg): Same.
899
900 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
901
902         * mini-ops.h: Add ops for packed shuffle/max/avg and
903         extract mask.
904         
905         * cpu-x86.md: Same.
906
907         * mini-x86.c (mono_arch_output_basic_block): Same.
908
909         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
910         extract mask.
911
912         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
913         to emit extract mask op.
914
915         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
916         to emit word shuffles.
917
918 2008-10-15  Mark Probst  <mark.probst@gmail.com>
919
920         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
921         the largest alignment needed by a variable, but at least
922         sizeof(gpointer).
923
924 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
925
926         * basic-simd.cs: Tests for the fixes in the last commit.
927
928 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
929
930         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
931         no longer handles STACK_PTR input.
932
933         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
934
935         * simd-intrinsics.c (load_simd_vreg): New function that works like 
936         get_simd_vreg   but handles STACK_PTR input.
937
938         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
939         as the input can be an arbitrary pointer.
940
941         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
942         LDADDR local optimization directly otherwise use a store op.
943
944 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
945
946         * basic-simd.cs: Tests for dup low and dup high.
947
948 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
949
950         * mini-ops.h: Add dup low and dup high ops.
951         
952         * cpu-x86.md: Same.
953
954         * mini-x86.c (mono_arch_output_basic_block): Same.
955
956         * simd-intrinsics.c (vector4f_intrinsics): Same.
957
958 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
959
960         * basic-simd.cs: Tests for recently added functionality.
961
962 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
963
964         * mini-ops.h: Add remaining sse1 fp ops.
965         
966         * cpu-x86.md: Add remaining sse1 fp ops.
967
968         * mini-x86.c (mono_arch_output_basic_block): Same.
969
970         * mini.h: Add enum for simd FP compare conditions.
971
972         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
973
974         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
975         so the backed can generate the appropriate op.
976
977 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
978         This patch squeese one more byte from the SimdIntrinsc struct.
979
980         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
981         a a shift amount intead of simply or'ing it.
982
983         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
984
985         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
986         byte so we can have an aditional flags field without increasing struct size.
987
988         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
989         against the simd_supported_versions bitmask.
990
991         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
992
993 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
994
995         * mini.c: remove rawbuffer code (the only use here is unsafe because
996         it takes locks during signal handling and the kernel now provides much
997         better info in proc/pid/smaps these days).
998
999 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
1000
1001         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
1002         OP_X86_PUSH_OBJ. Fixes #434620.
1003
1004         * objects.cs: Add a test.
1005         
1006 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
1007
1008         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
1009         that the packuswb/packusdw don't work with unsigned numbers for what
1010         would be negative numbers in signed format.
1011
1012         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
1013         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
1014
1015         * mini-ops.h: Add doubleword forms of many ops and packing ones.
1016
1017         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
1018
1019         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
1020
1021         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
1022
1023         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
1024         add more ops.
1025
1026         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
1027         version as the enum in mini.h.
1028
1029         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
1030         for sse3 ops, check the simd_version field if present. This way the code
1031         works with all versions of sse.
1032
1033 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1034
1035         * simd-intrinsics.c: Fixed intrinsic name typo.
1036
1037         * mini.h: Added missing simd exported function.
1038
1039         * basic-simd.cs: Added tests for Vector4ui.
1040         Fixed broken test for Vector16b.
1041
1042 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
1043
1044         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
1045         the max length to 64.
1046
1047 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1048
1049         * method-to-ir.c: Only do the fast virtual generic method call for
1050         non-wrapper methods.
1051
1052         * mini.h, mini-trampolines.c: The new generic virtual remoting
1053         trampoline handles virtual method calls via the vtable (as done by
1054         the fast virtual generic method calls) to remoting proxies.
1055
1056         * mini.c (mono_jit_create_remoting_trampoline): For generic
1057         methods reate a generic virtual remoting trampoline.
1058
1059         * mini-amd64.h: Enable fast virtual generic method calls again.
1060
1061 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1062
1063         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
1064         restore registers when doing tail calls.
1065
1066 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1067
1068         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
1069         Vector4ui.
1070
1071 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1072
1073         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
1074
1075 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1076
1077         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
1078
1079 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1080
1081         * basic-simd.cs: Retrofit for API changes.
1082
1083 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1084
1085         * mini-ppc.c: Handle integer stack arguments for tail calls.
1086
1087 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1088
1089         * optflags-def.h: Removed sse3 optimization.
1090
1091         * driver.c: Same.
1092
1093         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
1094         sse3.
1095
1096         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
1097
1098         * mini.h: Added enumeration with simd versions.
1099
1100         * simd-intrinsics.c (emit_intrinsics): Use the new static var
1101         for detecting SSE3.
1102
1103         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
1104
1105         * mini.c (mini_init): Call mono_simd_intrinsics_init.
1106
1107 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1108
1109         * basic-simd.cs: Added tests for Vector8u and Vector16u.
1110
1111         * basic-simd.cs: Fixed test naming.
1112
1113 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1114
1115         * mini-ops.h: Added ops for packed and saturated math, shifts
1116         and packing/unpacking.
1117
1118         * cpu-x86.md: Added descriptors for the above ops.
1119
1120         * mini-x86.c: Added code to emmit the above ops.
1121
1122         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
1123
1124 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
1125
1126         * aot-compiler.c (compile_method): Enable AOT for generic code.
1127
1128         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
1129
1130 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
1131
1132         * mini.c: add a workaround for a common screwup that ends up blamed
1133         to mono (other processes blocking signal delivery).
1134
1135 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1136
1137         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
1138         in the LDFLD/STFLD opcodes. Fixes #432673.
1139
1140         * iltests.il.in: Add a new test.
1141
1142 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
1143
1144         * mini-arm.c: attach the thread in unmanaged->managed transitions
1145         using delegates (bug #433148).
1146
1147 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1148
1149        * basic-simd.cs: Use new ShuffleSel constants.
1150
1151 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1152
1153         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
1154
1155         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
1156         only disable simd intrinsics if no sse2 is detected.
1157
1158         * optflags-def.h: Added sse3.
1159
1160         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
1161         is disabled.
1162
1163 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1164
1165         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
1166         when adding delegate-invoke wrappers.
1167
1168 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1169
1170         * Makefile.am: Reenable the simd tests.
1171
1172 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
1173
1174         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
1175           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
1176           other vreg is allocated to that hreg.
1177
1178         Contributed under MIT/X11 license.
1179
1180 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1181
1182         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
1183         yet checked in.
1184
1185 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1186
1187         * basic-simd.cs: New test suite for SIMD intrinsics.
1188
1189         * Makefile.am: Added new tests.
1190
1191 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1192
1193         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
1194
1195         * mini-ops.h: Same.
1196
1197         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
1198
1199         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
1200         using SSE2 aware opcodes.
1201
1202         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
1203         is enabled, this code path is only reachable if conversion ops are emmited after
1204         mono_method_to_ir.
1205
1206         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
1207
1208         This optimization saves 6 bytes per conversion against the old version.
1209
1210 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1211
1212         * aot-compiler.c (compile_method): Don't skip methods referencing 
1213         generic methods without a corresponding entry in token_info_hash, since
1214         encode_method_ref () can handle all generic methods now.
1215
1216         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
1217         generic context is set.
1218         
1219         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
1220         generic sharing of LDTOKEN.
1221
1222 2008-10-06  Mark Probst  <mark.probst@gmail.com>
1223
1224         * mini-amd64.h: Temporarily disabled fast virtual generic method
1225         calls because it breaks the System.Runtime.Remoting tests.
1226
1227 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1228
1229         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
1230
1231         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
1232         so inlining actually works.
1233         (check_inline_caller_method_name_limit): Ditto.
1234
1235 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
1236
1237         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
1238         64 bit safety (from Olaf Hering and Andreas Färber).
1239
1240 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1241         
1242         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
1243         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
1244         unused virtual call support code.
1245
1246         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
1247         
1248         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
1249         which can't use aot trampolines.
1250         (decode_patch): Don't create aot trampolines for methods which can't use
1251         them.
1252
1253         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
1254         use aot trampolines.
1255
1256         * mini.h: Bump AOT image format version.
1257         
1258 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
1259
1260         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
1261         to save_token_info () since cmethod is inflated for constrained calls.
1262
1263         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
1264
1265 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
1266
1267         * Makefile.am: Add build rules for ppc64.
1268         This avoids the build failing at pedump with unresolved symbols
1269         due to lack of arch_sources. Instead it will now fail earlier
1270         due to lack of cpu-ppc64.md.
1271
1272         Contributed under MIT/X11 license.
1273
1274 2008-10-04  Mark Probst  <mark.probst@gmail.com>
1275
1276         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
1277         tail calls.
1278
1279         * iltests.il.in: Add test case for tail call with many arguments.
1280
1281 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1282
1283         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
1284         to the fast virtual generic method code until the aot case is fixed.
1285
1286 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1287
1288         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
1289
1290 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1291
1292         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
1293         thunks.
1294
1295 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1296         
1297         * simd-intrinsics.c: Forgot to add this one.
1298
1299         * mini-codegen.c: Fix macro in case SIMD is not supported.
1300
1301 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1302         
1303         This patch land initial JIT support for simd intrinsics.
1304
1305         * mini-x86.h: Added new define to make --enable_minimal work on x86.
1306
1307         * Makefile.am: Added simd-intrinsics.c
1308
1309         * simd-intrinsics.c: New file with simd instrinsic related
1310         code.
1311
1312         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
1313
1314         * cpu-x86.md: Add simd related instructions.
1315
1316         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
1317
1318         * driver.c: Added two new --regression variants.
1319
1320         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
1321
1322         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
1323
1324         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
1325         extract some complicated logic to helper functions.
1326
1327         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
1328
1329         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
1330
1331         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
1332         the specialized simplification pass.
1333
1334         * method-to-ir.c (mono_spill_global_vars): Use new macro.
1335
1336         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
1337
1338         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
1339         table.
1340
1341         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
1342         if MONO_ARCH_NEED_SIMD_BANK is defined.
1343
1344         * mini-ops.h: Added the new simd ops.
1345
1346         * mini-x86.c: Added mono_arch_xregname.
1347
1348         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
1349
1350         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
1351
1352         * mini-x86.h: Define simd related MONO_ARCH macros.
1353
1354         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
1355
1356         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
1357
1358         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
1359         MONO_CLASS_IS_SIMD to deal with simd related IR.
1360
1361         * mini.h (MonoInst): Added spill_var to the backend union.
1362
1363         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
1364
1365         * mini.h: Added forward declarations of the new simd fuctions.
1366
1367         * optflags-def.h: Added new optimization names SIMD.
1368
1369         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
1370
1371         * regalloc.h: Added support for working with 3 register banks.
1372
1373         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
1374
1375         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
1376
1377 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
1378
1379         * mini-exceptions.c: remove 64 bit related ifdef clutter.
1380
1381 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1382
1383         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
1384         instead of one on 64 bit systems.
1385
1386         * method-to-ir.c: Remove unused includes.
1387
1388 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
1389
1390         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
1391         cfg->used_int_regs, since the two are different on arm.
1392
1393 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1394
1395         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
1396         mono_method_get_vtable_index() to get the vtable index.
1397
1398 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1399
1400         * method-to-ir.c (mono_method_to_ir2): Don't create native
1401         wrappers for array methods, because they're never called (and if
1402         they were called they wouldn't work).
1403
1404 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1405
1406         * method-to-ir.c (mono_method_to_ir2): Array methods are
1407         special-cased and must not be invoked indirectly via the (M)RGCTX
1408         when generic sharing is turned on.  Fixes #431413.
1409
1410 2008-10-01  Mark Probst  <mark.probst@gmail.com>
1411
1412         * method-to-ir.c: When generic sharing is active, call
1413         non-interface virtual generic methods via the standard trampoline.
1414
1415         * mini-trampolines.c: Handle virtual generic shared methods.
1416
1417         * mini.h, mini-x86.c, mini-x86.h: New argument for
1418         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
1419         method thunks and which is the trampoline to call if the lookup
1420         fails.  Enable the virtual generic method thunk for x86.
1421
1422         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
1423         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
1424         argument but assert that it's NULL, because these archs don't yet
1425         implement the virtual generic method thunk.  Changes in the IMT
1426         thunk data structures.
1427
1428 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
1429
1430         * aot-compiler.c (emit_globals): Avoid invalid characters in
1431         the static linking symbol.
1432
1433         * objects.cs: Add a test for the range check optimization. Fix warnings.
1434
1435         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
1436         optimization from the current JIT.
1437
1438         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
1439         later in decompose_array_access_opts () to allow more optimizations.
1440
1441         * method-to-ir.c (mono_handle_soft_float): Rename this to 
1442         mono_decompose_soft_float () for consistency.
1443
1444         * mini-ops.h: Fix arguments of OP_STRLEN.
1445
1446         * method-to-ir.c (save_cast_details): Extract the cast details saving code
1447         into a separate function.
1448         (reset_cast_details): Ditto.
1449         (handle_unbox): Save cast details. Fixes #431254.
1450
1451         * method-to-ir.c: Remove some obsolete FIXMEs.
1452
1453 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1454
1455         * ir-emit.h (alloc_dreg): Write a warning before crashing.
1456
1457 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1458
1459         * mini-codegen.c: More work on macros to make them
1460         ready for multiple regbanks.
1461
1462 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1463
1464         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
1465
1466         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
1467
1468 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1469
1470         * mini-codegen.c (mono_spillvar_offset): Proper support for
1471         multiple regbanks.
1472
1473 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1474
1475         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
1476         the stack overflow changes.
1477
1478 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1479
1480         * mini-codegen.c: Make all bank macros depend on reg_bank.
1481
1482         * mini-codegen.c (mono_local_regalloc): Make free mask
1483         initialization regbank aware.
1484
1485 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1486
1487         * mini-codegen.c (mono_local_regalloc): Extract callee
1488         mask selection to a function and make it regbank aware.
1489
1490 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1491
1492         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
1493         code to deal with many regbanks.
1494
1495 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1496
1497         * mini-codegen.c: More fp->regbank changes.
1498
1499 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1500
1501         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
1502         of a hardcoded constant.
1503
1504 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1505
1506         * method-to-ir.c (type_from_stack_type): Fix typo.
1507
1508 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
1509
1510         * mini-ia64.c (emit_move_return_value): Convert float return values to
1511         double.
1512
1513         * objects.cs: Add a new test.
1514         
1515         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
1516         VARARG methods to fix an assert later.
1517
1518         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
1519         end so it at least compiles.
1520
1521 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1522
1523         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
1524
1525 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
1526
1527         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
1528         optimization to a new function (emit_optimized_ldloca_ir) and enable
1529         it for both ldloca and ldloca_s.
1530
1531 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1532
1533         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
1534         gshared CASTCLASS code.
1535
1536         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
1537         amd64, where the libc stack unwinder encounters stack frames referring to
1538         native code in unmapped memory.
1539
1540         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
1541         sharing.
1542
1543         * generics.cs: Add new test.
1544
1545 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
1546
1547         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
1548         add a check that one of the ARM_FPU_ constants is defined.
1549
1550         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
1551         
1552         * mini-exceptions.c: Fix build on non-altstack platforms.
1553
1554         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
1555         sharing of vtypes.
1556
1557         * ir-emit.h: Add a comment to NEW_PCONST.
1558
1559         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1560
1561         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1562
1563         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1564         after the changes to MonoJitDomainInfo.
1565
1566 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1567
1568         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1569
1570 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1571
1572         * mini-ppc.c: Compiler warning fixes.
1573
1574 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1575
1576         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1577         for pinvokes.
1578
1579 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1580
1581         * exceptions-ppc.c, mini-ppc.h: Compile
1582         mono_arch_handle_altstack_exception() on Darwin, too.
1583
1584 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1585
1586         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1587         work on archs which don't have generic sharing implemented, only
1588         without the vtable_arg.
1589
1590 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1591
1592         * mini.c: Added comment explaining why delegate ctor icall
1593         wrappers are compiled.
1594
1595 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1596
1597         * mini.c: Don't produce trampolines to delegate ctor icall
1598         wrappers but compile them upfront.
1599
1600 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1601
1602         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1603         runtime-set function when going back to managed code. Currently this
1604         is used to set back the protection on the soft ovf pages and/or to
1605         throw the stack overflow exception that happened in unmanaged code.
1606
1607 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1608
1609         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1610         runtime-set function when going back to managed code. Currently this
1611         is used to set back the protection on the soft ovf pages and/or to
1612         throw the stack overflow exception that happened in unmanaged code.
1613
1614 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1615
1616         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1617         the support code for restoring stack protection after stack overflows
1618         that happen in unmanaged code. Don't set the exec permission on the
1619         soft overflow area.
1620
1621 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
1622
1623         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1624         delegate->method_ptr is set. Fixes #428054.
1625
1626 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1627
1628         * tests.cs: Rename to ratests.cs.
1629
1630         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
1631         emit_get_rgctx_... functions.
1632
1633 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1634
1635         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1636
1637 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1638
1639         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1640         before asserting that method is sharable.
1641
1642 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1643
1644         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1645         whether method needs a static RGCTX wrapper used instead of
1646         complex conditions.
1647
1648         * generic-sharing.c, mini.h: A few functions moved to
1649         metadata/generic-sharing.c.
1650
1651 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1652
1653         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1654         Generic code sharing for value types, which essentially means
1655         treating value type methods like static methods.  The RGCTX is
1656         passed in the same way.
1657
1658 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1659
1660         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1661         opcode when creating multi-dimensional arrays of open types.
1662
1663         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1664         open generic types.
1665
1666         * generics.cs: Add a test.
1667
1668         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1669
1670 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1671
1672         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1673
1674         * mini.c (mini_method_compile): Set it when running under the debugger. 
1675
1676         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
1677         vreg optimization if the flag is set.
1678
1679         * driver.c (mono_main): Add --attach= option to pass options to
1680         the attach agent.
1681
1682         * mini.c (sigquit_signal_handler): Start the attach agent.
1683
1684         * ssapre.c: Disable this to save space since it is not yet ported to
1685         linear IR.
1686
1687         * regalloc2.c: Disable this to save space.
1688
1689         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1690
1691 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1692
1693         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1694         the -v option useful again.
1695
1696 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1697
1698         * mini-amd64.c (mono_arch_output_basic_block): Add support for
1699         --break-at-bb.
1700
1701         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1702         arrays of arrays. Fixes #428406.
1703
1704         * method-to-ir.c (mini_emit_castclass): Ditto.
1705
1706         * objects.cs: Add new test.
1707         
1708 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
1709
1710         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1711         was wrong at it choked against target_type_is_incompatible for byref types.
1712
1713 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1714
1715         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
1716         places.
1717
1718 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1719
1720         * mini-exceptions.c: update a few more exceptions-related counters.
1721
1722 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1723
1724         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1725         new functions to allocate from persistent mempools.
1726
1727 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1728
1729         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
1730         multiple register banks in the future.
1731
1732         * mini-codegen.c (mono_local_regalloc): Fix a warning.
1733
1734 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
1735
1736         * mini.c (type_to_eval_stack_type): Remove duplicated function.
1737
1738         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1739
1740         * mini.h: Export type_to_eval_stack_type.
1741
1742         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1743         is only ins->klass of byref types.
1744
1745 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
1746
1747         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
1748         (mini_emit_memcpy2): Ditto.
1749
1750         * mini-amd64.c: Fix a warning.
1751
1752 2008-09-21  Mark Probst  <mark.probst@gmail.com>
1753
1754         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
1755         linking.
1756
1757 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
1758
1759         * method-to-ir.c: Extract stloc micro-optimization to a
1760         function and apply it to all cases.
1761
1762 2008-09-19  Mark Probst  <mark.probst@gmail.com>
1763
1764         * method-to-ir.c: Don't fail generic code sharing in cases we
1765         already support.
1766
1767 2008-09-18  Mark Probst  <mark.probst@gmail.com>
1768
1769         * mini-ppc.c: Handle structs in tailcalls on Darwin.
1770
1771 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
1772
1773         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
1774         implementation.
1775
1776 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
1777
1778         * trace.c: make tracing more useful and correct, with per-thread
1779         id and indent info.
1780
1781 2008-09-15  Mark Probst  <mark.probst@gmail.com>
1782
1783         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
1784         doing a method call and the argument is an R4.
1785
1786 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
1787
1788         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
1789         generic methods.
1790
1791 2008-09-13  Mark Probst  <mark.probst@gmail.com>
1792
1793         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
1794
1795 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
1796
1797         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
1798         (MONO_JUMP_TABLE_FROM_INS): Ditto.
1799
1800 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1801
1802         * driver.c: Add a --agent argument (not supported yet) to load managed
1803         agent assemblies before loading the main assembly, similarly to how the
1804         Java VM handles agents.
1805
1806 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1807
1808         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
1809         function to do stack layout of local variables.
1810
1811 2008-09-11  Mark Probst  <mark.probst@gmail.com>
1812
1813         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
1814         calculation.
1815
1816 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
1817
1818         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
1819         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
1820         JIT if DISABLE_JIT is defined.
1821
1822         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
1823         defined.
1824
1825 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1826
1827         * iltests.il.in: Disable the fconv test on PPC (the result is
1828         undefined according to ECMA).
1829
1830 2008-09-10  Mark Probst  <mark.probst@gmail.com>
1831
1832         * iltests.il.in: Enable tail call tests for PPC.
1833
1834         * mini.h: Add variable for storing incoming valuetype argument
1835         addresses for tail calls.
1836
1837         * mini-ppc.c: Implement valuetype arguments and return values for
1838         tailcalls on Linux.
1839
1840 2008-09-09  Mark Probst  <mark.probst@gmail.com>
1841
1842         * mini-ppc.c: Partially implement tail calls (struct arguments and
1843         return values not supported).
1844
1845         * method-to-ir.c: Enable tail calls on PPC.
1846
1847 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
1848
1849         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
1850         runtime-invoke wrappers to work around the problem of them getting
1851         assigned to a random class.
1852
1853         * aot-runtime.c (mono_aot_get_method): Ditto.
1854         
1855 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
1856
1857         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
1858         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
1859
1860 2008-09-07  Mark Probst  <mark.probst@gmail.com>
1861
1862         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
1863         until they're implemented properly.
1864
1865         * exceptions-ppc.c: Use arch-independent exception-handling code
1866         instead of custom one.
1867
1868         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
1869         for Linear IR.
1870
1871         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
1872
1873         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
1874         applies when __powerpc__ is defined.
1875
1876 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
1877
1878         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
1879         methods to their code to avoid computing the full name of wrappers and
1880         doing a lookup in a string hash table.
1881
1882 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1883
1884         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
1885         we identify bblocks before method_to_ir () is ran.
1886
1887         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
1888         Also avoid optimizing branches pointing to themselves.
1889
1890         * mini.c (mini_method_compile): Ditto. Fixes #422947.
1891
1892 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
1893
1894         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
1895
1896 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
1897
1898         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
1899         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
1900         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
1901         'buf'.
1902
1903         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
1904         jumped to the same entry in plt_jump_table.
1905
1906 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
1907
1908         * method-to-ir.c (initialize_array_data): Handle field with RVA from
1909         dynamic images.
1910
1911 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
1912
1913         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
1914         other assignment can be if converted. Saves 1.5% on corlib size and fixes
1915         #421807.
1916
1917 2008-08-29  Geoff Norton  <gnorton@novell.com>
1918
1919         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
1920         segment, and doesn't properly handle .space as .text.  Fixes
1921         AOT Mach/ARM
1922
1923 2008-08-29  Geoff Norton  <gnorton@novell.com>
1924
1925         * mini.c: Disable the mach exception handler when running on 
1926         ARM
1927
1928 2008-08-29  Geoff Norton  <gnorton@novell.com>
1929
1930         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
1931         globals on Darwin/ARM
1932
1933 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
1934
1935         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
1936         since too many things depend on it. Instead, call 
1937         mono_runtime_set_no_exec ().
1938         
1939         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
1940         the new JIT.
1941
1942         * aot-compiler.c: Add an 'asm-only' AOT option.
1943
1944         * mini.c: Avoid initializing the runtime when doing AOT compilation.
1945                 
1946         * aot-compiler.c (compile_method): Disable gshared support for now as it
1947         doesn't yet work.
1948
1949 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1950
1951         * mini-amd64.h : Fix a compiler warning.
1952
1953         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
1954           Changed to use a callback function to retrieve the unwind info.
1955           This avoids problems observed when code blocks were removed by
1956           unloading an app domain.
1957
1958         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
1959           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
1960           to work properly.
1961
1962         Contributed under MIT/X11 license.
1963
1964 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
1965
1966         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
1967           case to keep the stack aligned to 8.
1968
1969         Contributed under MIT/X11 license.
1970
1971 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
1972
1973         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
1974         avoid repeated linear searches.
1975
1976 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
1977
1978         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
1979         methods it can't handle.
1980         
1981         * aot-compiler.c (add_method): Avoid adding a method twice.
1982         (add_wrappers): Add runtime invoke wrappers for all methods.
1983
1984         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
1985         function to create an aot-compatible version of this trampoline.
1986
1987         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
1988
1989 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
1990
1991         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
1992
1993         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
1994         with a generic sharing failure.
1995
1996         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
1997
1998         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
1999         CEE_RETHROW. Fixes #419634.
2000
2001         * mini.c (mono_method_to_ir): Ditto.
2002
2003         * exceptions.cs: Add a new test.
2004         
2005         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
2006         to mono_type_stack_size_internal () since some callers might not pass in
2007         an rgctx.
2008
2009         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
2010         instrument_prolog. Fixes #419878.
2011
2012         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
2013         doubles in soft float mode volatile.
2014
2015 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
2016
2017         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
2018
2019         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
2020         to handle soft float correctly.
2021
2022         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
2023         the fast path.
2024
2025         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
2026
2027         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
2028         to sp, since the generics catch code requires it.
2029
2030         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
2031         copying.
2032
2033         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
2034         mono_arch_emit_imt_argument ().
2035
2036         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
2037
2038         * mini-arm.c tramp-arm.c: Generic sharing updates.
2039
2040 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
2041
2042         * mini-arm.c: Fix the arm build.
2043
2044         * generic-sharing.c (mini_type_get_underlying_type): New helper function
2045         handling enums, generic instances and generic sharing.
2046         (mini_type_stack_size_full): Ditto.
2047
2048         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
2049         
2050         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
2051
2052         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
2053
2054         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
2055         trampolines.
2056
2057         * mini-arm.c: Various small generic sharing changes.
2058
2059         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
2060         this for x86.
2061         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
2062         custom code.
2063
2064         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
2065         helper function to return a generic class init trampoline.
2066
2067         * method-to-ir.c mini.c: Use it.
2068         
2069         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
2070         arch-specfic function to return a generic class init trampoline.
2071
2072         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
2073         the GENERIC_CLASS_INIT custom code.
2074
2075         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
2076         a fatal error, not a sharing failure.
2077
2078         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
2079         needed.
2080
2081         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
2082         trampoline argument from MONO_ARCH_VTABLE_REG.
2083
2084         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2085         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2086         argument, and pass the vtable in VTABLE_REG.
2087
2088         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2089         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2090         argument, and pass the vtable in VTABLE_REG.
2091         (mono_arch_create_trampoline_code_full): Remove some special casing for
2092         the rgctx fetch trampoline.
2093
2094         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
2095         Fixes #419273.
2096
2097         * iltests.il: Add a test for it.
2098
2099 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
2100
2101         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
2102
2103         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
2104         no longer needed.
2105
2106         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
2107         use mono_jit_info_table_find () to avoid recursion.
2108         (mono_delegate_trampoline): Add a sync wrapper here.
2109
2110         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
2111         here.
2112
2113         * mini.c (mono_method_to_ir): Ditto.
2114         
2115         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
2116         add_sync_wrapper argument. Don't add a sync wrapper here.
2117         (mono_create_jump_trampoline): Don't add a sync wrapper here.
2118
2119         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
2120         
2121 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2122
2123         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
2124           of nonvolatile registers back from MonoContext to CONTEXT.
2125
2126         Contributed under MIT/X11 license.
2127
2128 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2129
2130         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
2131           arguments on Winx64 there are only 4 argument registers.  For this
2132           logic to work the last argument must be pulled from the stack.  
2133
2134         Contributed under MIT/X11 license.
2135
2136 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
2137
2138         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2139
2140         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
2141         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
2142         encode/decode_method_ref ().
2143
2144         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
2145
2146         * aot-runtime.c (decode_patch): Ditto.  
2147
2148         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
2149         MONO_PATCH_INFO_METHOD.
2150
2151         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
2152         MonoGenericJitInfo.
2153
2154         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
2155         MonoGenericJitInfo.
2156
2157         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
2158
2159         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
2160         one from the caller.
2161
2162         * aot-runtime.c (decode_generic_inst): New function to decode and
2163         return a interned generic inst.
2164         (decode_klass_ref): Use it.
2165         (decode_method_ref): Ditto.
2166
2167         * aot-compiler.c (emit_exception_debug_info): Save 
2168         jinfo->has_generic_jit_info too.
2169
2170 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2171
2172         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
2173
2174         * iltests.il.in: Add a test for fconv_to_i.
2175
2176         * liveness.c: Disable the liveness2 pass for now to save space.
2177
2178         * regalloc2.c: Include mempool-internals.h to fix warnings.
2179
2180         * aot-compiler.c (encode_method_ref): Encode the context of generic
2181         instance methods.
2182
2183         * aot-runtime.c (decode_method_ref): Inflate generic methods using
2184         the context saved in the aot file.
2185
2186         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2187
2188         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2189
2190         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
2191         volatile so they won't be optimized away.
2192
2193 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
2194
2195         * ssa.c:
2196         * ssa2.c:
2197         * mini.c:
2198         * regalloc2.c:
2199         * dominators.c: Remove duplicated functions that now are in
2200         mempool-internals.h.
2201
2202 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2203
2204         * aot-compiler.c: Fix warnings.
2205
2206         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
2207
2208         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
2209
2210         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
2211         as the patch type.
2212
2213         * mini.c (mono_resolve_patch_target): Ditto.
2214         
2215         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
2216         (encode_klass_ref): Add support for encoding VARs/MVARs.
2217
2218         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
2219
2220         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
2221         the handling of the got entries into a separate 'decode_got_entry' function.
2222         Add support for RGCTX_FETCH.
2223
2224         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
2225         clobbered by the trampoline code.
2226
2227         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
2228         not clobbered by the indirect calling code.
2229
2230 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2231
2232         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
2233         to fix the build.
2234
2235 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
2236
2237         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
2238         signature using the compilation mempool otherwise we would leak it.
2239
2240 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2241
2242         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
2243         mono_emit_abs_call ().
2244
2245         * patch-info.h: Add GENERIC_CLASS_INIT.
2246
2247         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
2248
2249         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
2250         as their target as a near call.
2251
2252         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
2253         ABS handling code.
2254         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
2255
2256         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
2257         call to a runtime function described by a patch.
2258
2259         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
2260         mono_emit_abs_call, this has the advantage that the ABS handling code in
2261         mono_codegen () can handle them both, and can handle other stuff in the
2262         future without additional code.
2263
2264         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
2265         entry.
2266         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
2267         abs addresses.
2268
2269         * mini.h: Add missing bblock related prototypes.
2270
2271         * mini.h (MonoCompile): Remove unused reverse_inst_list and
2272         reverse_inst_list_len fields.
2273
2274         * mini.c: Refactor this file a bit by moving branch optimizations to 
2275         branch-opts.c.
2276
2277         * method-to-ir.c: Merge generic sharing changes missed earlier.
2278
2279         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
2280
2281         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
2282         shared patches. Process METHODCONST as a shared patch.
2283
2284         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
2285         as it crashes on the 2.0 mscorlib.
2286
2287         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
2288         to cause crashes.
2289         
2290         * aot-compiler.c: Use is_plt_patch () in a few additional places.
2291         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
2292         by IMT.
2293
2294         * aot-compiler.c: Reorganize the got handling code to be a bit more
2295         understandable.
2296
2297 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2298
2299         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
2300         mono_patch_info_equals/hash, and use it to massively simplify
2301         get_plt_index ().
2302
2303         * mini.c (mono_patch_info_hash): Simplify this and add support for
2304         more patch types.
2305
2306         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
2307
2308         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
2309         handling code, since an offset is not enough to identify a trampoline.
2310
2311         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
2312
2313 2008-08-17  Mark Probst  <mark.probst@gmail.com>
2314
2315         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
2316
2317         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
2318
2319         * mini-ops.h: Argument and result types for OVF_CARRY ops.
2320
2321         * decompose.c: PPC decompositions for various ops.
2322
2323         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
2324
2325 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2326
2327         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
2328         call the generic trampoline code using a call, instead of a jump, to
2329         remove some special casing from the generic trampoline code.
2330
2331         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
2332         (mono_codegen): Ditto.
2333
2334         * aot-compiler.c aot-runtime.c: Ditto.
2335
2336         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
2337
2338         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
2339         helper function to find the offset corresponding to a lazy fetch trampoline.
2340
2341         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
2342         when doing generic sharing.
2343
2344         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
2345         places.
2346         
2347         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
2348         mini-trampolines.c to be with the other trampoline creation functions.
2349
2350         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
2351         as it is equal to method->signature in most cases, add a 
2352         mono_emit_method_call_full variant which takes a signature and an imt
2353         argument as well.
2354
2355 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
2356
2357         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
2358         to this function, since it could be computed easily from the method 
2359         argument.
2360         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
2361         more.
2362
2363         * method-to-ir.c mini.c: Remove references to 
2364         compile_generic_method_wo_context.
2365
2366         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
2367         generic method calls.
2368         
2369         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
2370         dimensional non-szarrays.
2371
2372         * mini.c (mini_init): Register mono_array_new_1.
2373
2374         * jit-icalls.c (mono_array_new_1): New jit icall.
2375
2376         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
2377         pointing to the method.
2378
2379         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
2380         method addresses belonging to METHOD_JUMP patches in the 
2381         jump_target_got_slot_hash.
2382         (mono_aot_load_method): Ditto.
2383
2384         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
2385         METHOD_JUMP patches.
2386
2387         * mini.c (mini_create_jit_domain_info): New helper function which 
2388         initializes/frees domain->runtime_info.
2389         (mini_free_jit_domain_info): Ditto.
2390         (mini_init): Install the domain hook functions with the runtime.
2391
2392         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
2393         information maintained by the JIT.
2394
2395         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
2396         insertion into jump_table_hash into mono_codegen (), also implement proper
2397         locking.
2398
2399         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
2400         tail calls, it is already done by the aot code.
2401         
2402         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
2403         mechanism on amd64.
2404
2405         * iltests.il.in: Make the jmp test a bit more complex.
2406
2407         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
2408         generic instances which doesn't have a token.
2409
2410         * aot-runtime.c (decode_method_ref): Ditto.
2411         
2412         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
2413         can handle this case now.
2414         (handle_box): Ditto.
2415
2416 2008-08-15  Geoff Norton  <gnorton@novell.com>
2417
2418         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
2419         debugging check.
2420
2421 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
2422
2423         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
2424         calling generic methods.
2425
2426         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
2427
2428         * aot-runtime.c (decode_patch_info): Ditto.
2429
2430         * mini.c (mono_resolve_patch_target): Ditto.
2431         
2432         * patch-info.h: Add METHOD_RGCTX.
2433
2434         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
2435
2436 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
2437
2438         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
2439         arguments in registers.
2440
2441         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
2442         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
2443
2444         * mini.c (mini_method_compile): Abort aot compilation for generic
2445         methods if generic sharing is disabled.
2446         
2447         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
2448         an mrgctx.
2449
2450         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
2451         requiring an mrgctx.
2452
2453         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
2454         store instructions when converting a vcall to a normal call.
2455
2456         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
2457         mono_arch_find_jit_info.
2458
2459 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
2460
2461         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
2462         avoid calling mono_method_full_name () for every method even if the
2463         env var is not set.
2464         (check_inline_caller_method_name_limit): Ditto.
2465
2466 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2467
2468         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
2469         assemblies in one run.
2470
2471         * aot-compiler.c (mono_compile_assembly): Only print out a count of
2472         skipped methods if it is not 0.
2473
2474         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
2475
2476 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2477
2478         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
2479           MONO_ARCH_HAVE_UNWIND_TABLE.
2480
2481         Contributed under MIT/X11 license.
2482
2483 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2484
2485         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
2486           from default optimizaton list on Winx64.
2487
2488         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
2489
2490         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
2491           the LMF from the MonoJitTlsData structure.
2492
2493         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
2494
2495         Contributed under MIT/X11 license.
2496
2497 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2498
2499         * mini.c (sigsegv_signal_handler): Fix the build.
2500
2501         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
2502         assembly->aot_module.
2503
2504         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
2505         hash table. This simplifies and speeds up a lot of code, and fixes support
2506         for .netmodules.
2507
2508         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
2509         with the runtime.
2510
2511         * mini-exceptions.c: Ditto.
2512         
2513         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
2514         'native_offset' argument, since these are computed in the 
2515         mono_find_jit_info () function.
2516
2517         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
2518         is used by exceptions-ppc.c.
2519
2520         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
2521         mono_arch_find_jit_info ().
2522         
2523         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
2524         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
2525         generic code in mini-exceptions.c.
2526
2527 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
2528
2529         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
2530
2531         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
2532         
2533         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
2534         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
2535         called while holding the loader lock. Fixes #415608.
2536         (mono_aot_get_method_from_token_inner): Ditto.
2537
2538 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2539
2540         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
2541         to reduce differences between this and the generic implementation in
2542         mini-exceptions.c.
2543         (ves_icall_get_frame_info): Ditto.
2544
2545         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
2546
2547         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
2548         longer neccesarry.
2549
2550         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
2551         mono_arch_get_call_filter () and make it non-static, for consistency with the
2552         other architectures.
2553
2554 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
2555
2556         * mini.c:
2557         * local-propagation.c:
2558         * mini-x86.c: Correct the name of arch defines.
2559
2560 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2561
2562         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2563         NO_EMULATE_LONG_SHIFT_OPS define.
2564
2565 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2566
2567         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2568         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2569
2570         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2571         MACH fixes. Merged from the 2.0 branch.
2572
2573         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2574
2575         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2576         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2577
2578         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2579
2580         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2581         mono_marshal_get_native_wrapper () signature changes.
2582
2583 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
2584
2585         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2586         conversion bug under arm.
2587
2588 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2589
2590         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2591
2592         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2593         with overflow checking.
2594
2595 2008-08-05  Marek Habersack  <mhabersack@novell.com>
2596
2597         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2598         to the genmdesc.pl file
2599
2600 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
2601
2602         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2603         arg_array in the soft-float versions of the LOAD/STORE macros.
2604
2605         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2606         implementation.
2607
2608         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2609
2610 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2611
2612         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2613         a float HFA. Fixes #413621.
2614
2615 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
2616
2617         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2618         frame_size to args_size. Fixes build.
2619
2620 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2621
2622         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2623         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2624
2625         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2626         the stack are not unaligned. Fixes #413247.
2627         
2628 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2629
2630         * mini.c: update jitted methods performance counters.
2631
2632 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2633
2634         * mini-exceptions.c: increase the exceptions thrown performance
2635         counter in mono_handle_exception ().
2636
2637 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
2638
2639         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2640         can work with netmodules.
2641
2642 2008-07-28  Geoff Norton  <gnorton@novell.com>
2643
2644         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
2645         regression tests.
2646
2647 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2648
2649         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2650         correct place.
2651
2652 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
2653
2654         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2655           The float param registers and other param registers must be the 
2656           same index on Windows x64.
2657
2658         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
2659           ArgValuetypeAddrInIReg argument case.  Setting the argument
2660           op to OP_VTARG_ADDR (OP_REGOFFSET)).
2661
2662         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
2663           variable computed above as the copy length for arguments of storage
2664           type ArgValuetypeAddrInIReg.
2665
2666         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
2667           ArgValuetypeAddrInIReg argument case.  This case will rely on
2668           mono_arch_emit_outarg_vt to emit the correct code later in the process.
2669
2670         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
2671           a 32 byte stack allocation for all calls.  We will omit the adjustment for
2672           jump and tail call instructoins as they do not follow the typical call behavior.
2673
2674         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
2675           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2676           local variable and pass the local variable by reference to the called method.
2677
2678         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
2679           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
2680           of a struct is passed in a register it must be saved with the other
2681           volatile argument on the stack.
2682
2683         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
2684           frame pointer the stack adjustment value must be saved to the unwind 
2685           info structure.
2686
2687         Contributed under MIT/X11 license.
2688
2689 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2690
2691         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2692         which got lost in the merge.
2693
2694 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2695
2696         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2697         build.
2698
2699         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2700         
2701         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2702         icalls, since they won't be patched.
2703
2704         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2705         different code sequence when running under valgrind to prevent some valgrind
2706         errors.
2707
2708         * iltests.il.in: Add new regression test.
2709
2710         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2711         end with a throw.
2712
2713         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2714         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2715
2716         * iltests.il.in: Add new test.
2717
2718         * aot-compiler.c: Fix some warnings.
2719
2720         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2721         Fixes #412494.
2722
2723 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2724
2725         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2726         (mini_usage_jitdeveloper): Add a missing --wapi option.
2727
2728 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2729
2730         * mini-codegen.c: Simplify the is_fp macros.
2731         (free_up_ireg): Remove, use free_up_reg instead.
2732         (free_up_reg): Fix the fp case.
2733
2734 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2735
2736         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2737         lowered earlier.
2738
2739         * exceptions-x86.c: Merge some changes which seemed to have got lost
2740         in the linear-ir merge.
2741
2742         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2743
2744         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2745         long vreg volatile even if the variable was already created.
2746
2747         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
2748         volatile variables.
2749
2750 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2751
2752         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
2753
2754         * mini.c (mono_jit_compile_method_inner): Add support for 
2755         MONO_EXCEPTION_BAD_IMAGE.
2756
2757         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
2758         mini_method_get_context () returns NULL. Fixes #356531.
2759
2760         * mini.c (mono_method_to_ir): Ditto.
2761         
2762         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
2763         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
2764
2765 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2766
2767         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
2768         in the LDFTN implementation.
2769
2770 2008-07-25  Mark Probst  <mark.probst@gmail.com>
2771
2772         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
2773         code, patch calls to icalls, too, even if they're not in the
2774         shared generic code hash.  Fixes #411962.
2775
2776 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2777
2778         * cpu-x86.md: Increase the length of the fcall opcodes.
2779
2780         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
2781         calls returning floats.
2782
2783         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
2784         on NEWARR.
2785         
2786         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
2787         missed earlier.
2788
2789         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
2790         into the domain->method_code_hash.
2791
2792         * aot-compiler.c: Fix win32 build.
2793
2794         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
2795         
2796         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
2797         gshared NEWARR implementation.
2798
2799         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
2800
2801         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
2802         can be used outside of method_to_ir.
2803
2804         * mini.h (MonoCompile): Add arg_types field.
2805
2806         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
2807         
2808         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
2809         the values of the local arg_array and param_types array.
2810
2811 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2812
2813         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
2814         got accesses might only get generated later when NEWOBJ is decomposed.
2815         
2816         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
2817         looking up the native code of the target method when a delegate is called
2818         for the first time.
2819
2820         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
2821         optimization.
2822
2823         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
2824
2825         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
2826         AOT work on platforms without a working dlsym implementation.
2827
2828         * mini.h: Bump AOT image format version.
2829         
2830 2008-07-24  Mark Probst  <mark.probst@gmail.com>
2831
2832         * mini-exceptions.c: Free a MonoType with
2833         mono_metadata_free_type() instead of g_free().
2834
2835         * aot-runtime.c: Free a MonoType.
2836
2837 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
2838
2839         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
2840         optimization.
2841
2842         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
2843         fp stack on x86.
2844
2845 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
2846         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
2847         profiler hook.
2848
2849 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2850
2851         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
2852         NEWOBJ calls on valuetypes.
2853
2854         * iltests.il.in: Add new test.
2855
2856         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
2857
2858 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2859
2860         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
2861         is no longer needed.
2862
2863         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
2864         non register sized integer arguments.
2865         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
2866         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
2867         emit_memcpy2 ().
2868
2869         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
2870         CEE_MONO_RETOBJ.
2871         
2872         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
2873         two a binop with different sized arguments is emitted.
2874
2875         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
2876         instruction in the ins==NULL case.
2877
2878 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
2879
2880         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
2881
2882         * mini-x86.c: Fix osx build.
2883
2884         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
2885         opcodes as well.
2886
2887         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
2888         instruction for non int sized variables.
2889
2890         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
2891         implementation.
2892
2893 2008-07-23  Robert Jordan  <robertj@gmx.net>
2894
2895         * method-to-ir.c: Fix MSVC build.
2896
2897 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
2898
2899         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
2900         a non int sized type, widen it to an int since newer versions of gcc seem to
2901         generate code which needs this.
2902
2903         * ssa2.c abcremoval2.c: Fix warnings.
2904
2905         * *: Merge the Linear IR branch.
2906
2907         The original branch is at trunk/branches/vargaz/mini-linear-il, and
2908         the ChangeLog file there describes all the changes done over the years. 
2909         Further documentation can be found at www.mono-project.com/Linear_IL.
2910
2911 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2912
2913         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2914           The float param registers and other param registers must be the 
2915           same index on Windows x64.
2916
2917         Contributed under MIT/X11 license.
2918
2919 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
2920
2921         * mini.c: Make the previous fix GC safe.
2922
2923 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
2924
2925         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
2926
2927 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
2928
2929         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
2930           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
2931           ArgValuetypeAddrInIReg instead.
2932
2933         Contributed under MIT/X11 license.
2934
2935 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
2936
2937         * mini-codegen.c (get_register_spilling): Fix a warning.
2938
2939 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
2940
2941         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
2942         for types which the initialization fails. Raises the provided exception
2943         at the right stop after cleanup.
2944
2945 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
2946
2947         * aot-compiler.c: Free most of the memory allocated during compilation.
2948
2949         * mini.c (mini_parse_debug_options): Fix a leak.
2950         
2951         * mini.c (mini_method_compile): Don't add the method to the jit info tables
2952         during aot compilation.
2953
2954 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
2955
2956         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
2957         it has too much register pressure.
2958
2959 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
2960
2961         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
2962
2963 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2964
2965         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2966         on x86.
2967
2968         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
2969         on amd64 similar to the way it is done on arm.
2970
2971         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
2972
2973         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
2974         consistency, normalize error messages, avoid loading aot-only modules in
2975         normal mode.
2976
2977         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
2978         for consistency.
2979
2980         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
2981
2982 2008-07-11  Martin Baulig  <martin@ximian.com>
2983
2984         * debug-debugger.h
2985         (MonoDebuggerInfo): Add `interruption_request'.
2986
2987 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
2988
2989         * aot-compiler.c (emit_plt): Remove some dead code.
2990
2991         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
2992
2993         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
2994         return the plt info offset belonging to a given plt entry.
2995
2996         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
2997         mono_aot_get_plt_info_offset.
2998         
2999         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
3000         similar to the amd64 code by makeing jumps through a separate jump table 
3001         instead of embedding the jump addresses into the code.
3002
3003 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
3004
3005         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
3006         method.
3007
3008 2008-07-10  Martin Baulig  <martin@ximian.com>
3009
3010         * mini.c (mini_method_compile): Disable generics sharing when
3011         running in the debugger.
3012
3013 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3014
3015         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
3016
3017         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
3018         the local register allocator from running out of registers on x86 when 
3019         using aot.
3020
3021 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
3022
3023         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
3024         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
3025         C4146.
3026
3027         Contributed under MIT/X11 license.
3028
3029 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3030
3031         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
3032         speed up the assembler.
3033
3034 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3035
3036         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
3037         support.
3038
3039         * mini.c: Move the soft float handling macros a bit earlier, add 
3040         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
3041         place.
3042
3043         * mini.h: Add prototype for mono_arch_fixup_jinfo.
3044
3045         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
3046         read-only to help catch code allocation requests.
3047         
3048         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
3049         and turn it off when using --aot-only or when compiling with --aot=full.
3050
3051         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
3052         jump table for switches from the normal domain mempool, not the code
3053         manager.
3054
3055         * mini-trampolines.c (get_unbox_trampoline): New function to return an
3056         unbox trampoline which handles aot-only mode too.
3057
3058         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
3059         an AOTed unbox trampoline.
3060
3061         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
3062
3063 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3064
3065         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
3066         ""
3067
3068         Contributed under MIT/X11 license.
3069
3070 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3071
3072         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
3073           the unwind information for the method at the end of the allocated block.
3074           
3075         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
3076           MonoCompileArch to hold the unwind info for SEH on Winx64
3077         
3078         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
3079           frame pointer info for the method being compiled.
3080           
3081         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
3082           the call to mono_exception_from_token.
3083           
3084         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
3085           storing the method prolog information in a format that the Winx64 SEH can understand.  This
3086           information is stored a the end of the method block because it is all 32-bit offset based.
3087
3088         Contributed under MIT/X11 license.
3089
3090 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3091
3092         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
3093
3094         * wapihandles.c: Fix warnings.
3095
3096         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
3097         mode.
3098
3099         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
3100         mono_jit_compile_method in aot-only mode since that calls the type 
3101         initializer.
3102         
3103         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
3104         get_delegate_invoke_impl in aot-only mode.
3105
3106         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
3107
3108 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
3109
3110         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
3111
3112         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
3113         is on by default.
3114
3115         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
3116
3117         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
3118         init trampoline from the AOT file as well.
3119
3120         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
3121         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
3122         code.
3123
3124         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
3125         mono_init.
3126
3127         * exceptions-amd64.c: Add _full variants for the remaining exception code
3128         creation functions as well, allow emission of relocatable code, remove
3129         caching since that is now done by the caller.
3130
3131         * mini-exceptions.c: Add _full variants for the remaining exception code
3132         creation functions as well, add aot-only support.
3133
3134         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
3135         if we can determine a proper token for them.
3136         (add_wrappers): Add a few more wrappers.
3137         (emit_method_code): Remove some dead code.
3138         (emit_trampolines): Emit exception code too.
3139
3140         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
3141
3142         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
3143         mono_array_new_va which avoids varargs.
3144
3145         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
3146
3147         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
3148         mono_arch_create_specific_trampoline () in all places.
3149
3150         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
3151         a bit so it can be used for other things as well.
3152         
3153         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
3154         on demand as well.
3155
3156         * exceptions-amd64.c: Rename the caching from the exception code creation
3157         functions, it is done by the caller instead.
3158         
3159         * exceptions-amd64.c: Change the signature of the exception code creation 
3160         functions to allow the creation of relocatable code later.
3161
3162         * mini-exceptions.c: Add a set of functions to query the various 
3163         runtime-generated exception functions.
3164
3165         * mini.c mini-exceptions.c: Use the newly added functions instead of the
3166         mono_arch_.. () functions.
3167         
3168 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3169
3170         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
3171
3172         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
3173
3174         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
3175         (mini_get_vtable_trampoline): Ditto.
3176
3177         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
3178         code in the AOT case by returning the code size and a list of relocations to
3179         the caller.
3180
3181         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
3182
3183 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
3184
3185         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
3186           clean the stack.
3187
3188         Contributed under MIT/X11 license.
3189
3190 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3191
3192         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
3193         so the buffer size can be computed correctly. Fixes #404735.
3194
3195         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
3196         normally as cfg->debug_info is already freed.
3197
3198 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
3199
3200         * mini-amd64.c: For calls returning vtypes in registers, don't store
3201         the return address on the stack, instead allocate a separate local for
3202         it. Fixes #404729.
3203
3204 2008-07-05  Mark Probst  <mark.probst@gmail.com>
3205
3206         * mini-trampolines.c, mini.h: Add an argument to
3207         mono_create_jit_trampoline_in_domain() for turning off the adding
3208         of the sync wrapper.
3209
3210         * mini.c: Use the JIT trampoline without sync instead of
3211         ldftn_nosync in static RGCTX invoke wrappers so that the call can
3212         be patched.
3213
3214 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3215
3216         * driver.c: Turn on GSHARED optimization by default.
3217
3218 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
3219
3220         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
3221         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
3222
3223         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
3224         create a variant of the generic trampoline code callable from AOTed trampolines.
3225
3226         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
3227         trampoline code callable from AOTed trampolines.
3228
3229         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
3230
3231 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3232
3233         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
3234         pass-through manner.
3235
3236         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
3237         and don't fail sharing for them anymore.
3238
3239         * mini-exceptions.c: Handle exceptions in shared generic methods.
3240
3241         * generic-sharing.c: When checking the context of a generic
3242         method, also check its class's context.  Don't treat wrappers as
3243         sharable.
3244
3245         * mini-trampolines.c: Some code factored out to
3246         metadata/generic-sharing.c.  Handle the MRGCTX case.
3247
3248         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
3249         we must deal with the method being of another instantiation of the
3250         class.  Add static rgctx invoke wrappers to generic methods.
3251
3252 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3253
3254         * mini.c: Provide all jit infos of generic shared methods with a
3255         generic jit info.
3256
3257         * mini-exceptions.c: Handle the new situation that a generic info
3258         might be available, but not info about the this/vtable/mrgctx
3259         variable.
3260
3261 2008-07-03  Mark Probst  <mark.probst@gmail.com>
3262
3263         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
3264         generic methods.
3265
3266 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
3267
3268         * dominators.c (check_dominance_frontier): Fix a warning.
3269
3270         * mini.h: Add some missing prototypes.
3271
3272         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
3273
3274         * driver.c (mono_jit_init_version): Correct the comments since the first
3275         argument should be the name of the root domain, not a filename.
3276
3277         * aot-runtime.c (make_writable): Error out if this is called while running
3278         with --aot-only.
3279         (load_aot_module): Ditto.
3280
3281         * aot-compiler.c: Really fix the computation of method indexes.
3282
3283         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
3284         optimizations as this is no longer called frequently.
3285
3286         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
3287         method and the invoke impl code and pass it to the delegate trampoline instead of
3288         just the delegate class.
3289
3290 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
3291
3292         * aot-compiler.c: Fixup the computation of method indexes.
3293         (add_wrappers): Create the base methods of the runtime invoke wrappers using
3294         the method builder infrastructure.
3295
3296         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
3297         has no header.
3298
3299         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
3300         mode, load the method right away instead of creating a trampoline.
3301
3302         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
3303
3304         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
3305         some checks a bit.
3306
3307 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
3308
3309         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
3310         (mono_aot_load_method): Use method_index instead of method->token.
3311
3312         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
3313         can handle icalls etc. properly.
3314
3315         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3316
3317         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
3318
3319         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
3320         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
3321         JIT_ICALL_ADDR patch type.
3322
3323         * patch-info.h: Add JIT_ICALL_ADDR patch type.
3324
3325         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
3326         request flag.
3327         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
3328
3329         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
3330
3331 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
3332
3333         * mini.c: Use domain->jit_code_hash_lock for controlling access to
3334         domain->jit_code_hash.
3335
3336 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
3337
3338         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
3339
3340 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
3341
3342         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
3343         get_this_arg_from_call, let it compute it when needed.
3344
3345         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
3346         gsctx from code only when needed.
3347
3348         * mini-trampolines.c (get_generic_context): Rename this to 
3349         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
3350         it can be called by the arch backends.
3351
3352         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
3353
3354 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
3355
3356         * driver.c (mono_main): Add experimental --aot-only command line option.
3357
3358         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
3359         set.
3360
3361 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
3362
3363         * driver.c (DllMain): Remove mono_module_handle.
3364
3365         Contributed under MIT/X11 license.
3366
3367 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
3368
3369         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
3370         for emitting methods which are not in the source assembly. Detect and report
3371         failure of assembling+linking.
3372         
3373         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
3374
3375         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
3376
3377 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
3378
3379         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
3380
3381 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
3382
3383         * mini.h: Remove some obsolete prototypes.
3384
3385         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
3386
3387 2008-06-24  Mark Probst  <mark.probst@gmail.com>
3388
3389         * mini.c (get_object_generic_inst): Variable-sized arrays are not
3390         supported by Visual Studio, so use alloca().
3391
3392 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
3393
3394         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
3395         Fixes #402585.
3396
3397 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3398
3399         * mini.c: Fail sharing of a generic method if it contains an open
3400         catch clause (because we don't pass MRGCTXs yet).
3401
3402 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3403
3404         * mini.c: When compiling a method with generic sharing, insert the
3405         method instantiated with an all-Object generic context into the
3406         jit info table, instead of the context of the first instantiation
3407         of the method we happen to compile.
3408
3409 2008-06-18  Martin Baulig  <martin@ximian.com>
3410
3411         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
3412         `major_version' and `minor_version'.
3413
3414 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3415
3416         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
3417         mono_method_is_generic_sharable_impl() takes an additional
3418         argument specifying whether to treat type variables as reference
3419         types.
3420
3421 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3422
3423         * mini.h: Removed obsolete prototypes.
3424
3425 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3426
3427         * mini.c: Don't fail generic sharing for initobj and sizeof - we
3428         already handle them.
3429
3430 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3431
3432         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
3433         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
3434         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
3435         tramp-x86.c: Added a MonoGenericContext* argument to
3436         mono_arch_get_unbox_trampoline() so that it can call other
3437         functions which require it.
3438
3439 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3440
3441         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
3442         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
3443         mono_arch_get_this_arg_from_call() takes a
3444         MonoGenericSharingContext* as well.
3445
3446 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3447
3448         * mini.c: Factor out code for emitting unbox into emit_unbox() and
3449         implement generic sharing of unbox.
3450
3451 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3452
3453         * mini.c: Don't compute the vtable to determine whether a field is
3454         special static, because it might not work for open types.
3455
3456 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3457
3458         * mini.c: Removed the unused token_type and token_source arguments
3459         from get_runtime_generic_context_ptr().
3460
3461 2008-06-17  Marek Habersack  <mhabersack@novell.com>
3462
3463         * mini.c (ADD_BINOP): fix the build
3464
3465 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
3466
3467         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
3468         a widening op.
3469
3470 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3471
3472         * mini.h: Removed class relations enum that's not used anymore.
3473
3474 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3475
3476         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
3477
3478         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
3479         the lazy fetch trampoline access code.
3480
3481 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
3482
3483         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
3484
3485 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
3486
3487         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
3488
3489         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
3490
3491         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
3492
3493 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3494
3495         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
3496         intrinsics.
3497
3498         * mini-ops.h: Add MIN/MAX_UN opcodes.
3499
3500         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
3501         intrinsics.
3502
3503         * basic-math.cs: Add more min/max tests.
3504
3505         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3506
3507 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3508
3509         * mini.c: Small fix in the prologue of emit_castclass.
3510
3511 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3512
3513         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3514
3515         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
3516         do not work even for unsigned types. Fixes #400014.
3517
3518         * basic-math.cs: Add regression tests for unsigned Min/Max.
3519
3520 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3521
3522         * mini.c: Added additional context_used argument to several
3523         functions, which will be needed for sharing generic methods.  Use
3524         GET_RGCTX macro wherever appropriate.  Declare only one
3525         context_used in mono_method_to_ir().
3526
3527 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3528
3529         * mini.c, generic-sharing.c: Removed generic class relations.
3530
3531         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
3532         functions due to MRGCTX changes.
3533
3534 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3535
3536         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
3537         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
3538         with calculated IMT.
3539
3540         * mini.c: Generic sharing of calls via generic interfaces.
3541
3542         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
3543         generic method with non-constant MonoGenericContext*.  Instead,
3544         the context is taken out of the method itself.
3545
3546 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3547
3548         * mini.c: Generic sharing of ldvirtftn.
3549
3550 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3551
3552         * mini.c: Generic sharing of ldftn.
3553
3554 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3555
3556         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3557
3558 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3559
3560         * mini.c: Generic sharing of the special case of ldtoken followed
3561         by a call to GetTypeFromHandle.
3562
3563 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3564
3565         * mini.c: Generic sharing of box for nullable types.
3566
3567 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3568
3569         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3570         are passed on the stack. Fixes #324807.
3571
3572 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
3573
3574         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3575         for the ArgValuetypeAddrInIReg case.
3576
3577         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
3578         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
3579
3580         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
3581         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
3582         local variable and pass the local variable by reference to the called method.
3583           
3584         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
3585         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3586
3587         Contributed under MIT/X11 license.
3588
3589 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
3590
3591         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3592
3593         * debug-mini.c (mono_debug_print_vars): Release memory after printing
3594         everything.
3595
3596 2008-06-10  Martin Baulig  <martin@ximian.com>
3597
3598         * debug-mini.c
3599         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3600
3601 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
3602
3603         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3604         possible error when no arguments are passed.
3605
3606         Contributed under MIT/X11 license.
3607
3608 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
3609
3610         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3611         where the file name is NULL.
3612
3613 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
3614
3615         * mini.c: Fix s390 build.
3616
3617 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
3618
3619         * trace.c (mono_trace_parse_options): Fix warnings.
3620
3621         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3622
3623 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
3624
3625         * mini.c (remove_block_if_useless): Avoid printing the method name.
3626         
3627         * mini.c: Remove needless setting of ins->cil_code which is now done by 
3628         MONO_INST_NEW.
3629
3630         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3631         LMF. Not yet used.
3632
3633         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3634         translated code after it has been patched.
3635
3636 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
3637
3638         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3639         avoid problems during code patching on SMP systems.
3640         (emit_call): Avoid adding a patch info which is already added by 
3641         emit_call_body.
3642         (mono_arch_emit_exceptions): Ditto.
3643
3644 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
3645
3646         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3647         MONO_TYPE_ISSTRUCT already checks for it.
3648
3649 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
3650
3651         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
3652           structs with floats on Winx64 the float registers are not used.  
3653           The integer registers are always used..
3654         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
3655           only one register will be used and only if the size of the struct 
3656           is 1,2,4, or 8 bytes.
3657
3658         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
3659           to work for Winx64.
3660
3661         Contributed under MIT/X11 license.
3662
3663 2008-06-05  Martin Baulig  <martin@ximian.com>
3664
3665         * debug-debugger.c (debugger_lookup_class): Also call
3666         mono_class_setup_methods() here; we're only called from RTI.
3667
3668 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
3669
3670         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3671         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3672         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3673         Post-process object files and add dtrace-generated object, if necessary.
3674
3675         Contributed under MIT/X11 license.
3676
3677 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3678
3679         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
3680         element class.
3681
3682         * mini.c: Generic sharing for unbox.any and castclass.
3683
3684 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3685
3686         * mini.c: Ignore tailcall prefix in shared generic code and when
3687         doing calls which require a vtable/rgctx argument.
3688
3689 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3690
3691         * mini.c: Don't free the JIT info.
3692
3693         * driver.c: Changes in the JIT info table testing code.
3694
3695 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3696
3697         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
3698         interruption. Fix some warnings.
3699
3700         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3701         interruption_checkpoint.
3702
3703 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3704
3705         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3706         from embedding applications.
3707
3708 2008-06-02  William Holmes  <billholmes54@gmail.com>
3709
3710         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
3711           reserving 32 bytes on the stack when making calls. 
3712
3713         Contributed under MIT/X11 license.
3714
3715 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
3716
3717         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3718         the linear IL branch.
3719
3720         * driver.c: Print out more information for --version on arm.
3721
3722 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
3723
3724         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3725         bb_exit instead, since out of line bblocks might not actually be emitted
3726         out-of-line.
3727         
3728         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3729         maximum epilog size for out of line bblocks if tracing is enabled.
3730
3731         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3732
3733 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
3734
3735         * arrays.cs: Regression tests for allocating arrays with negative sizes.
3736
3737 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
3738
3739         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3740         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
3741         opcodes.
3742
3743 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
3744
3745         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3746         the 'value' to store is a constant.
3747
3748         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
3749
3750         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
3751         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
3752
3753 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
3754
3755         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
3756         for accessing method->generic_container.
3757
3758 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
3759
3760         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
3761         
3762         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
3763
3764         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
3765
3766         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
3767         fails.
3768
3769 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
3770
3771         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
3772
3773         * mini.c: Handle the case when mono_class_vtable () fails.
3774
3775 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
3776         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
3777         the stat profiler.
3778
3779 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3780
3781         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
3782         together with domain sharing.
3783
3784 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3785
3786         * mini.c: Treat callvirts to final methods like non-virtual calls
3787         when doing generic sharing, i.e. look them up in the runtime
3788         generic context.
3789
3790 2008-05-22  Mark Probst  <mark.probst@gmail.com>
3791
3792         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
3793         with computed types (for generic sharing).
3794
3795         * mini.c: Generic sharing for mkrefany and refanyval.
3796
3797 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
3798
3799         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
3800         possible.
3801
3802         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
3803         the generic sharing code.
3804         
3805         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
3806         when needed.
3807
3808 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3809
3810         * mini.h: Remove the declaration of mono_aot_init_vtable ().
3811
3812 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
3813
3814         * driver.c: updated copyright date
3815
3816 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
3817
3818         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
3819         needed.
3820
3821 2008-05-19  Martin Baulig  <martin@ximian.com>
3822
3823         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
3824         pointing to the new `_mono_debug_using_mono_debugger' variable.
3825
3826         * driver.c
3827         (mono_main): Check mono_debug_using_mono_debugger() rather than
3828         the `MONO_INSIDE_MDB' environment variable to check whether we're
3829         inside the debugger.
3830
3831 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
3832
3833         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
3834         argument.
3835
3836 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
3837
3838         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
3839
3840         * mini.c: Added mini_assembly_can_skip_verification. This
3841         function checks if the assembly requested to skip verification. 
3842         Fixes part of #387274.
3843
3844 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
3845
3846         * mini.c (mini_get_method): Disable the check for open generic classes when
3847         using generic sharing.
3848
3849         * generics.cs: Add a test for #387034.
3850
3851         * mini.c (mini_get_method): Check whenever the method class is an open generic
3852         type, and return NULL in that case, causing a verification error. Fixes
3853         #384123.
3854
3855 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3856
3857         * driver.c (mono_main): Revert r102623. The right
3858         thing to do is to enable the verifier under verifiable
3859         unless a --security flag was passed.
3860
3861         We need this non-trivial behavior for --verify-all otherwise
3862         mcs-compileall won't be able to use it. As it needs everything to
3863         be verified under validil.
3864
3865 2008-05-06  Martin Baulig  <martin@ximian.com>
3866
3867         Fix #383749.
3868
3869         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
3870         (mono_debugger_thread_cleanup): Likewise.
3871         (mono_debugger_extended_notification): Likewise.
3872
3873 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3874
3875         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
3876         against both inflated and non-inflated methods. We need to check against the
3877         generic definition for cases where the instantiated method is not visible.
3878         We need to check against the inflated types for cases where the instantiation
3879         changes any super type. This fixes #382986.
3880
3881         Note that this doesn't need to be applied to other parts of mono_method_to_ir
3882         that check for visibiliy as generic params only appears as the type subject
3883         of tokens on call opcodes. Field manipulation and ldftn must always
3884         target an exact type.
3885
3886 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
3887
3888         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
3889         if no related --security flag is passed.
3890
3891 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3892
3893         * mini-arch.h: Prepare support for ppc64.
3894
3895         Contributed under MIT/X11 license.
3896
3897 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3898
3899         * aot-runtime.c: Prepare support for ppc64.
3900
3901         Contributed under MIT/X11 license.
3902
3903 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
3904
3905         * mini-ops.h: Prepare support for ppc64.
3906
3907         Contributed under MIT/X11 license.
3908
3909 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
3910
3911         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
3912
3913         Contributed under MIT/X11 license.
3914
3915 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
3916
3917         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
3918         assemblies, since aot_name is not a full path, causing us to load MS.NET 
3919         assemblies on windows.
3920
3921 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
3922
3923         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
3924         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
3925         * main.c: Use UTF-8 encoded command line instead of Windows default code
3926         page on Windows to support Unicode.
3927         * driver.c (DllMain): New function for mixed-mode assembly support.
3928         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
3929         export __stdcall functions without decoration.
3930
3931         Contributed under MIT/X11 license.
3932
3933 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3934
3935         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
3936         saving it very early.
3937
3938 2008-04-28  Mark Probst  <mark.probst@gmail.com>
3939
3940         * mini.h, mini.c: Lots of code for accessing the old RGCTX
3941         deleted.  The only way to access the new RGCTX is via the
3942         trampline.
3943
3944         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
3945         vtable instead of the RGCTX to static methods.
3946
3947         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
3948         accessing the new RGCTX.
3949
3950         * generic-sharing.c: There is no separation between self, type
3951         arguments and other types in the RGCTX anymore.
3952
3953 2008-04-25  Jonathan Chambers <joncham@gmail.com>
3954
3955         * mini-amd64.c (add_general): Remove previous stack adjustment.
3956         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
3957         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
3958         for 32 bytes of stack space reserved for all calls.
3959         
3960         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
3961         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
3962         adjustment.
3963         
3964         Code contributed under MIT/X11 license.
3965
3966 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
3967
3968         * mini.c (mini_method_verify): Only verify non-inflated methods, check
3969         against the root definition, peeling out method and type instantiations.
3970         Cache verify success results, code that fails verification is still
3971         checked multiple times.
3972
3973 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
3974
3975         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
3976
3977 2008-04-23  Jonathan Chambers <joncham@gmail.com>
3978
3979         * mini-amd64.c (add_general): Always increment stack on Win64.
3980         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
3981         on Win64.
3982         
3983         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
3984         stack based argument handling on Win64.
3985         
3986         Code contributed under MIT/X11 license.
3987
3988 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
3989
3990         * Makefile.am (version.h): Add support for git-svn.
3991
3992 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
3993
3994         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
3995         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
3996         avoiding allocations and libc functions which might deadlock.
3997         
3998         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
3999         'no-gdb-backtrace' option is set.
4000
4001         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
4002
4003         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
4004
4005 2008-04-21  Martin Baulig  <martin@ximian.com>
4006
4007         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
4008         and `get_lmf_addr'; `notification_address' is no longer a pointer.
4009
4010 2008-04-21  Martin Baulig  <martin@ximian.com>
4011
4012         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
4013         `thread_vtable', `event_handler_ptr' and `event_handler'.
4014
4015 2008-04-21  Martin Baulig  <martin@ximian.com>
4016
4017         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
4018         allows delayed initialization of the `executable_code_buffer' when
4019         attaching.
4020
4021 2008-04-21  Martin Baulig  <martin@ximian.com>
4022
4023         * mini.h (mono_debugger_create_notification_function): Removed.
4024         * tramp-*.c (mono_debugger_create_notification_function): Removed.
4025
4026         * mdb-debug-info64.s
4027         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4028
4029         * mdb-debug-info32.s
4030         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4031
4032         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
4033         currently only works on x86 and x86_64, so don't create it on ppc.
4034
4035 2008-04-21  Martin Baulig  <martin@ximian.com>
4036
4037         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
4038
4039         * mini.c
4040         (mini_method_compile): In the fp elimination check, check
4041         `debug_options.mdb_optimizations' in addition to
4042         mono_debug_using_mono_debugger().       
4043
4044         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
4045         disable some JIT optimizations which are only disabled when
4046         running inside the debugger.
4047         Added `--help-debug' option to describe the debugging options.
4048         (parse_debug_options): New static function to parse the `--debug'
4049         options, so we can easily add more stuff in future.
4050
4051 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
4052
4053         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
4054         the method has no body.
4055
4056 2008-04-19  Jonathan Chambers <joncham@gmail.com>
4057
4058         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
4059         assembly is not allowed in MSVC 64-bit compiler. 
4060         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
4061         as we get floating point exceptions everywhere.
4062         
4063         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
4064         correctly align arguments for call to throw_exception.
4065         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
4066         
4067         Code contributed under MIT/X11 license.
4068
4069 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
4070
4071         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
4072
4073 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
4074
4075         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
4076
4077         * mini-amd64.c (NEW_INS): Set cil_code.
4078
4079         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
4080         from mini-amd64.c so all debugger related logic is in one place.
4081
4082         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
4083         later won't have a random ip assigned to them.
4084
4085 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
4086
4087         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
4088         the arch specific function initializes code_size.
4089         (mono_create_delegate_trampoline): Ditto.
4090
4091         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
4092         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
4093         platforms.
4094
4095         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
4096         running under the debugger.
4097
4098         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
4099         debugger.
4100
4101         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
4102         debugger. Also move the disabling of optimizations here from driver.c.
4103         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
4104         debugger.
4105
4106         * mini.h (MonoCompile): Add a few new flags.
4107
4108 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
4109
4110         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
4111         so the cil_code field of created MonoInst's is properly set.
4112         (mini_select_instructions): Ditto.
4113
4114         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
4115         (MONO_INST_NEW_CALL): Ditto.
4116
4117         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
4118         in many places so the ins->cil_code field is properly initialized.
4119
4120         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
4121         place.
4122
4123 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
4124
4125         * mini.c (mini_method_compile): Print a different message when compiling a 
4126         shared method.
4127         
4128         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
4129         > 1.
4130
4131 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4132
4133         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
4134         SSE2 instructions.
4135
4136         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
4137         
4138 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4139
4140         * mini.c (handle_stack_args): Make this return void since its return value was
4141         never used. Also set cfg->unverifiable for invalid IL instead of calling
4142         G_BREAKPOINT ().
4143
4144 2008-04-10  Mark Probst  <mark.probst@gmail.com>
4145
4146         * mini.c: Make sure "this" is live in catch clauses with type
4147         variables in shared generic code.
4148
4149 2008-04-08  Mark Probst  <mark.probst@gmail.com>
4150
4151         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
4152         generic_class_is_reference_type() to ensure the proper behaviour
4153         when sharing generic code and the type in question is a type
4154         argument.
4155
4156 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4157
4158         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
4159         race conditions when printing thread dumps. Fixes #377738.
4160
4161 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
4162         
4163         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
4164         shows up when both MonoInst arguments can cause aliasig.
4165         There is likely no way in the current JIT to trigger this problem, but
4166         it showed up in the development of generics sharing, when in a new
4167         opcode both args of an OP_GROUP can be aliases (addresses of a local).
4168         When the generics sharing code will be committed, its tests will be
4169         valid also for this bug.
4170
4171 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4172
4173         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
4174         PATCH_INFO_METHOD.
4175
4176         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
4177         NULL.
4178
4179 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
4180
4181         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
4182         use a more detailed exception message for InvalidCastException.
4183
4184         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
4185
4186         * driver.c (mono_main): Add --debug=casts option to turn on better 
4187         InvalidCastException message details.
4188
4189         * mini.c (mini_get_debug_options): New helper function to return the address of
4190         the debug_options variable.
4191
4192         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
4193         the jit_tls TLS variable.
4194
4195         * mini.c (mono_jit_tls): New TLS variable.
4196
4197         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
4198         option is used.
4199
4200 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
4201
4202         * mini.h: Removed verifer related stuff. This code was moved to verify.c
4203
4204         * mini.c: Removed verifer related stuff, code moved to verify.c.
4205
4206         * driver.c: Using code from verify.c instead of mini.c.
4207
4208 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
4209
4210         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
4211         longer valid.
4212
4213 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
4214
4215         * mini.c (check_for_method_verify): Enabling verification of
4216         corlib if mono_verify_all is set. Bugs in the verifier preventing that
4217         have been fixed.
4218
4219 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
4220
4221         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
4222         caller saved registers as well.
4223         
4224         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
4225         saved registers as well.
4226
4227 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
4228
4229         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
4230
4231         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
4232         code.
4233
4234 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
4235
4236         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
4237         to get_call_info.
4238         (get_call_info): Take a gsctx argument instead of 'cfg'.
4239
4240 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
4241
4242         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
4243         mono_verify_all is set.
4244
4245         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
4246
4247         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
4248
4249 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
4250
4251         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
4252         an exception.
4253
4254         * driver.c mini.c mini.h: Add a --verify-all development option to test the
4255         verifier and the code generated by the compiler.
4256
4257 2008-03-25  Mark Probst  <mark.probst@gmail.com>
4258
4259         * mini.c: Generic sharing of the non-nullable case of the box
4260         instruction.
4261
4262 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
4263
4264         * inssel.brg: Fix the build.
4265
4266         * iltests.il.in: Add a test for lconv.ovf.u8.un.
4267
4268 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
4269
4270         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
4271         Array:Address. Fixes #372410.
4272
4273         * iltests.il.in: New tests for readonly prefix.
4274
4275 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
4276
4277         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
4278         mini-trampolines.c.
4279
4280         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
4281         mini-exceptions.c.
4282
4283         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
4284         
4285         * mini.c (mono_decompose_op_imm): New helper function.
4286
4287         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
4288         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4289         return value.
4290
4291         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4292         mono_arch_output_basic_block. Fix warnings.
4293
4294         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
4295         for now.
4296
4297 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
4298
4299         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
4300         since the extra frame is now detected automatically inside the loop.
4301
4302         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
4303         opts which are now in mono_peephole_ins ().
4304         
4305         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
4306
4307         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
4308         frames and skip duplicate managed-to-native frames. Fixes #367665.
4309
4310         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4311         opts which are now in mono_peephole_ins ().
4312         (mono_arch_peephole_pass_2): Ditto.
4313
4314         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
4315
4316         * mini-codegen.c (mono_peephole_ins): New helper function containing the
4317         arch independent peephole optimizations.
4318
4319         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4320         opts which are now in mono_peephole_ins ().
4321
4322         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
4323         
4324         * mini-s390.c (mono_arch_output_basic_block): Fix build.
4325
4326         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
4327         pattern.
4328
4329         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
4330         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
4331         opcode. 
4332
4333 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
4334
4335         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
4336         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4337         return value.
4338
4339         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4340         mono_arch_output_basic_block. Fix warnings.
4341
4342 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4343
4344         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4345         conv.ovf.u.un.
4346
4347 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4348
4349         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4350         conv.ovf.u.un.
4351
4352         * iltests.il: Add new tests.
4353
4354 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
4355
4356         * mini.c: Removed Windows version macros.
4357
4358 2008-03-20  Mark Probst  <mark.probst@gmail.com>
4359
4360         * generic-sharing.c: Put reflection types in the extensible part
4361         of the runtime generic context.
4362
4363         * mini.c: Generic sharing of the GetTypeHandle special case of the
4364         ldtoken instruction.
4365
4366 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4367
4368         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
4369
4370         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
4371         
4372         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
4373         consistency with the other version on the linear IR branch.
4374
4375         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
4376
4377         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
4378
4379         * iltests.il.in: Add new tests.
4380
4381 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
4382
4383         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
4384
4385         * iltests.il.in: Add new tests.
4386
4387 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4388
4389         * mini.c: Two variables with the same name were declared in
4390         nesting contexts and one wasn't initialized.  Fixed.
4391
4392 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4393
4394         * mini.c: Generic sharing of the initobj instruction.
4395
4396 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4397
4398         * mini.c: make the test to optimize ldtoken from typeof() more
4399         precise.
4400
4401 2008-03-18  Mark Probst  <mark.probst@gmail.com>
4402
4403         * mini.c: Generic sharing of the initobj instruction for reference
4404         types.
4405
4406 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4407
4408         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
4409         the mono_breakpoint_clean_code() code to perform bound checks.
4410
4411 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
4412
4413         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
4414         mono_arch_patch_callsite() to include the start of the managed method
4415         to be able to perform bound checks.
4416
4417 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4418
4419         * mini.c: Generic sharing for the isinst instruction.
4420
4421 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4422
4423         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4424         inssel-long32-mips.brg: Added opcodes for doing indirect calls
4425         with the runtime generic context argument.
4426
4427         * mini.c: Share calls to several types of unsharable methods by
4428         putting the address of the method code in the runtime generic
4429         context and doing an indirect call.
4430
4431         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4432         to switches.
4433
4434 2008-03-16  Mark Probst  <mark.probst@gmail.com>
4435
4436         * generic-sharing.c: Change due to a change in the runtime genric
4437         context API.
4438
4439 2008-03-15  Martin Baulig  <martin@ximian.com>
4440
4441         * tramp-x86.c
4442         (mono_arch_nullify_class_init_trampoline): Add call to
4443         mono_breakpoint_clean_code() to make things work when running
4444         inside the debugger.
4445
4446         * tramp-amd64.c
4447         (mono_arch_nullify_class_init_trampoline): Add call to
4448         mono_breakpoint_clean_code() to make things work when running
4449         inside the debugger.
4450
4451 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4452
4453         * inssel-long.brg (reg): Fix 64 bit build.
4454
4455 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4456
4457         * mini.c, mini.h: Share static generic code by passing it an
4458         implicit argument pointing to the runtime generic context.
4459
4460         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4461         inssel-long32-mips.brg: New opcodes for calling shared static,
4462         which need to be passed the runtime generic context.
4463
4464         * mini-amd64.c, mini-x86.c: Save the runtime generic context
4465         argument on the stack in the prologue if needed.  New function for
4466         finding the runtime generic context argument from the registers
4467         saved by the trampoline.
4468
4469         * mini-amd64.h, mini-x86.h: Specify which register to use for the
4470         runtime generic context argument.
4471
4472         * tramp-amd64.c: Also restore the register used for the runtime
4473         generic context argument.
4474
4475         * mini-trampoline.c: Resolve shared static calls by consulting the
4476         runtime generic context via the new argument.
4477
4478         * generic-sharing.c: Add an argument to sharability-checking
4479         functions that specifies whether type variables should be treated
4480         as sharable type arguments.
4481
4482         * inssel-x86.brg: Removed a superfluous, buggy rule.
4483
4484         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4485         to switches.
4486
4487 2008-03-14  Martin Baulig  <martin@ximian.com>
4488
4489         * debug-debugger.c (main_thread_handler): Call
4490         mono_runtime_run_main() without sending any notifications.
4491
4492         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
4493
4494 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4495
4496         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
4497
4498 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4499
4500         * tramp-x86.c: Fixed register restore offsets in the trampoline
4501         code for ECX and EDX.
4502
4503 2008-03-12  Geoff Norton  <gnorton@novell.com>
4504
4505         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
4506         different ucontext_t implementations.
4507         * exceptions-arm.c: Use the above defines to get exceptions working on 
4508         iPhone (based on a patch by Luke Howard lukeh@padl.com)
4509         * mini-arm.c: Implement iPhone icache support (based on a patch by
4510         Luke Howard lukeh@padl.com)
4511
4512 2008-03-12  Mark Probst  <mark.probst@gmail.com>
4513
4514         * mini.c: Enable generic sharing of calls to non-static
4515         non-interface non-generic non-value-type methods.
4516
4517         * mini-trampolines.c: Resolve calls from shared generic code.
4518
4519 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
4520
4521         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
4522
4523         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
4524
4525 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
4526
4527         * mini.c: some fixes for the AOT compiler.
4528
4529 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4530
4531         * cpu-amd64.md: Add clob:1 to some float opcodes.
4532
4533 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
4534
4535         * mini.h: Added MiniVerifierMode enumeration.
4536
4537         * mini.c: Added mini_verifier_set_mode to control
4538         the usage of the new verifier.
4539
4540         * mini.c (mono_method): Integrated the new verifier.
4541
4542         * driver.c: Extended --security option with validil and
4543         verifiable options to activate the new verifier.
4544
4545 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4546
4547         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
4548         optimization to ctors taking 0 or 2 arguments too.
4549
4550         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
4551         a bit.
4552
4553         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
4554
4555         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4556
4557 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
4558
4559         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4560         non-aot case as well.
4561
4562         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4563
4564         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4565         changes.
4566
4567         * aot-compiler.c (encode_patch): Ditto.
4568
4569         * mini.h (G_MININT32): Fix the definition of this.
4570
4571 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
4572
4573         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4574
4575         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4576
4577 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4578
4579         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
4580         methods returning vtypes in registers.
4581         (mono_arch_allocate_vars): Ditto.
4582
4583         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4584
4585         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
4586
4587         * generics.cs: Add a test from the linear IR branch.
4588
4589         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4590
4591         * mini.c (inline_method): Cache failed inline attempts.
4592
4593 2008-03-04  Mark Probst  <mark.probst@gmail.com>
4594
4595         * mini.c: For shared methods of generic classes put the location
4596         of "this" into the MonoGenericJitInfo.
4597
4598         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4599         register out of a MonoContext by register number.  Add the generic
4600         sharing context as an argument to mono_arch_find_this_argument().
4601
4602         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4603         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4604         for new arch function.
4605
4606         * mini-exception.c: Handle open exception clauses in shared
4607         generic code.
4608
4609         * mini-trampolines.c: Supply additional argument to
4610         mono_arch_find_this_argument().
4611
4612 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4613
4614         * Makefile.am (regtests): Run the bench.exe tests last.
4615
4616 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
4617
4618         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4619         a bit.
4620
4621 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
4622
4623         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4624         with MS.
4625
4626         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4627         
4628         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4629
4630         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4631         whose class has no cctor.
4632
4633         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4634
4635 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
4636
4637         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4638         unverified.
4639
4640 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
4641
4642         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4643         to be in sync with the code on the linear IR branch.
4644
4645         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4646
4647         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4648
4649 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
4650
4651         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4652
4653         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4654
4655         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4656
4657         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4658
4659         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4660         
4661         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4662         body.
4663
4664 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
4665
4666         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4667         OP_LOADR4_MEMBASE emission.
4668
4669         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4670         (mono_spillvar_offset_float): Ditto.
4671
4672         * mini-mips.c (mono_arch_emit_prolog): Ditto.
4673
4674         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
4675         emission.
4676
4677         * basic-long.cs: Add regression tests for them.
4678
4679         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
4680         use.
4681         (mono_arch_allocate_vars): Fix representation of single-precision float
4682         argument.
4683         (mono_arch_output_basic_block): Ditto.
4684
4685         * inssel-mips.brg: Ditto, remove duplicate items.
4686
4687         * mini-mips.c (emit_load_volatile_arguments): New function to handle
4688         arguments of tail calls as on other platforms.
4689         (mono_arch_output_basic_block): Handle tail calls.
4690
4691         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4692         register.
4693
4694         * objects.cs (test_5_pass_static_struct): Add test for it.
4695
4696         Contributed under MIT/X11 license.
4697
4698 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
4699
4700         * Makefile.am: Use gmcs for compiling the regression tests.
4701
4702         * *.2.cs *.2.il: Rename to *.cs and *.il.
4703
4704 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
4705
4706         * regalloc.h: Make the vassign array smaller.
4707
4708         * mini.c (mini_method_compile): Remove an unused field in cfg.
4709
4710         * mini-codegen.c: Add a bunch of micro optimizations.
4711
4712 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
4713
4714         * regalloc.h: Remove some unused fields.
4715
4716 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
4717
4718         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4719
4720         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4721
4722 2008-02-22  Mark Probst  <mark.probst@gmail.com>
4723
4724         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4725
4726         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4727         trampoline: Fetch an entry from the runtime generic context.  If
4728         it's NULL, jump to the actual trampoline to fill the runtime
4729         generic context.  Otherwise, return it.
4730
4731         * mini.c: Call the lazy fetch trampoline to get entries out of the
4732         runtime generic context.
4733
4734         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4735         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4736         tramp-sparc.c: Stubs for the lazy fetch trampoline.
4737
4738 2008-02-21  Mark Probst  <mark.probst@gmail.com>
4739
4740         * mini.c: Fetch data out of the extensible part of the runtime
4741         generic context instead of calling a helper function.
4742
4743         * generic-sharing.c: Some functions moved into
4744         metadata/generic-sharing.c.  Helper function for fetching other
4745         types now checks and asserts against extensible rgctx (just for
4746         debugging purposes - the helper function isn't called anymore
4747         unless for debugging).
4748
4749 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4750
4751         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
4752         for tail calls up to the point that the tests in iltests.exe run. Also add a
4753         dummy CKFINITE implementation.
4754         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
4755         needed for trampoline LMF frames.
4756
4757         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
4758         trampoline LMF frames.
4759
4760 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
4761
4762         * mini.c (inline_method): clean any pending loader error when inlining fail.
4763         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
4764
4765 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
4766
4767         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
4768
4769         * aot-runtime.c (decode_patch_info): Ditto.
4770
4771         * mini.c (mono_resolve_patch_target): Ditto.
4772         
4773         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
4774         icall wrappers.
4775
4776         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
4777         
4778         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
4779         if it references an icall address.
4780
4781 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
4782
4783         * cpu-s390x.md: Remove some more unused opcodes.
4784         
4785         * cpu-s390x.md: Remove some unused opcodes.
4786
4787         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
4788         mono_op_imm_to_op ().
4789
4790         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
4791         instead of a switch statement.
4792         
4793         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
4794         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
4795
4796         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
4797         
4798         * mini-codegen.c: Remove unused mono_regstate2_... functions.
4799
4800         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
4801         -1.
4802
4803 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
4804
4805         * driver.c (mono_main): Improve error reporting when an assembly cannot be
4806         opened. Fixes #362607.
4807
4808         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
4809
4810         * iltests.il.in: Add a test for static methods in interfaces.
4811
4812 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
4813
4814         * genmdesc.c (build_table): Fix a crash on older glib versions.
4815
4816         * cpu-sparc.md: Remove some unused opcodes.
4817         
4818         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
4819         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
4820
4821         * cpu-amd64.md: Remove some unused opcodes.
4822
4823         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
4824         like the other opcodes.
4825
4826 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
4827
4828         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
4829
4830         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
4831
4832         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
4833         variables 'cfg' instead of 'm' for consistency.
4834
4835         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
4836
4837         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
4838         argument holding the vtype return address, to avoid the ambigious use of
4839         cfg->ret for this purpose.
4840
4841         * mini.c (NEW_RETLOADA): Use vret_addr if set.
4842
4843         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
4844         
4845         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
4846         new mono_print_ins () function which only takes one argument.
4847
4848 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
4849
4850         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
4851         macro arguments.
4852
4853 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
4854
4855         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
4856
4857         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
4858
4859         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
4860         opcodes and other small changes.
4861
4862         * mini-ops.h: Add some new opcodes from the linear IR branch.
4863
4864         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
4865
4866         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
4867         opcodes, use the REG_MEMBASE opcodes instead.
4868         
4869         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
4870         opcodes, use the REG_MEMBASE opcodes instead.
4871         
4872         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
4873         linear IR branch.
4874
4875         * mini.c (mono_op_imm_to_op): New helper function.
4876
4877         * mini-ops.h: Add some opcodes from linear IR branch.
4878
4879 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
4880
4881         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
4882         <tsv@solvo.ru>.
4883
4884 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
4885
4886         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
4887         OP_ICONV_TO_R4/R8.
4888
4889         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
4890
4891 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
4892
4893         * aot-compiler.c (emit_method_code): Add an assert.
4894
4895         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
4896         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
4897         methods.
4898
4899 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
4900
4901         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
4902         some load/store opcodes so they are consistent. 
4903         (mono_arch_emit_prolog): Simplify some code.
4904
4905         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
4906
4907         * objects.cs: Add tests for large argument offsets on ARM.
4908
4909         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
4910         stack offsets. Fixes #359651.
4911
4912         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
4913
4914         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
4915
4916         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
4917
4918         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
4919
4920         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
4921
4922         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
4923         rid of CEE_CONV_R_UN.
4924
4925         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
4926
4927 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
4928
4929         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
4930
4931         * mini.c (mono_normalize_opcodes): Add some more opcodes.
4932
4933         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
4934
4935         * cpu-amd64.md: Remove some unused opcodes.
4936
4937         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
4938
4939         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
4940
4941         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
4942         arch specific functions for its parts. Call the peephole pass after local
4943         regalloc so the prolog can compute a more accurate max_offset.
4944         
4945         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
4946         the corresponding OP_I/OP_L opcodes.
4947
4948         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
4949
4950         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
4951
4952 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4953
4954         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
4955         as they are handled in mini.c.
4956
4957         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
4958         
4959         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
4960         case since it is handled in mini.c.
4961
4962         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
4963
4964         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
4965
4966         * *.c: Use the new opcodes in the IR and back end code.
4967
4968         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
4969
4970         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
4971
4972 2008-02-06  Mark Probst  <mark.probst@gmail.com>
4973
4974         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
4975         an assert because it has a race condition.
4976
4977 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
4978
4979         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
4980
4981         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
4982
4983         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
4984
4985         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
4986         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
4987
4988 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
4989
4990         * cpu-amd64.md (move): Correct the maximum size of move.
4991
4992 2008-02-05  Mark Probst  <mark.probst@gmail.com>
4993
4994         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
4995         the generic class init trampoline to return quickly if the class
4996         is already inited.
4997
4998 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
4999
5000         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
5001         issues where an 32 bit callsite cannot be patched by a 64 bit address.
5002
5003 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
5004
5005         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
5006         branch.
5007
5008 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
5009
5010         * objects.cs: Add some soft-float tests.
5011
5012         * mini.c: Fix a couple more soft-float issues.
5013
5014         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
5015
5016         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
5017         avoid a REX prefix.
5018
5019 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
5020
5021         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
5022         exception happens while compiling a virtual method.
5023
5024 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
5025
5026         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
5027         
5028         * mini-sparc.c: Fix build.
5029
5030         * mini-sparc.c (get_call_info): Add support for generic sharing.
5031
5032         * mini-exceptions.c: Add a FIXME.
5033
5034 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
5035
5036         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
5037         altstack handling code.
5038
5039         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
5040         
5041         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
5042
5043         * mini-s390.c: Add support for generic sharing.
5044
5045         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5046         Fix CAS on s390.
5047         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5048
5049         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
5050
5051         * mini-s390x.c: Add support for generic sharing.
5052         
5053         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5054         Fix CAS on ia64.
5055         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5056
5057         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
5058         can be used since it takes a 16 bit signed immediate.
5059
5060         * inssel-s390x.brg: Fix OP_SETRET.
5061
5062         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
5063
5064         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
5065
5066         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
5067
5068         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
5069
5070         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
5071         in one place.
5072
5073         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
5074         stuff.
5075
5076         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
5077         of the unused mono_arch_patch_delegate_trampoline stuff.
5078
5079 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
5080
5081         * basic-long.cs: Move the fp related tests to basic-float.cs.
5082
5083         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
5084
5085         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
5086
5087         * basic-calls.cs: Add a test for proper float argument passing.
5088
5089         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
5090         if the context corresponds to an exception received through a signal.
5091
5092         * exceptions.cs: Add a test for nullref handling at the start of a try
5093         clause.
5094
5095         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
5096
5097         * jit-icalls.c (mono_break): New JIT icall.
5098
5099         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
5100
5101         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
5102
5103 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
5104
5105         * cpu-*.md: Get rid of unused opcodes.
5106
5107         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
5108
5109         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
5110         by all platforms.
5111
5112         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
5113         define.
5114
5115         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
5116         the arch independent trampoline code in mini-trampolines.c.
5117
5118         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
5119
5120         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
5121
5122         * mini-s390.h: Remove an unused define.
5123         
5124         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
5125         the arch independent trampoline code in mini-trampolines.c.
5126
5127         * mini-arm.c (mono_arch_emit_prolog): Fix build.
5128
5129 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
5130
5131         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
5132
5133         * mini-s390.c (mono_arch_emit_prolog): Fix build.
5134
5135         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
5136
5137         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
5138
5139         * cpu-amd64.md: Use smaller sizes for int opcodes.
5140
5141         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
5142
5143         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
5144         objects.cs.
5145
5146         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
5147         debugging.
5148
5149         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
5150         instead of though a pointer to save an indirection when accessing elements of
5151         the array.
5152
5153         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
5154         some typos.
5155         (NOT_IMPLEMENTED): New helper macro.
5156         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
5157         of a bb.
5158
5159         * *.c: Use the new helper macro.
5160
5161 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
5162
5163         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
5164
5165 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
5166
5167         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
5168         stack slots.
5169
5170 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
5171
5172         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
5173         profiling is enabled.
5174         
5175         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
5176         the end.
5177         (mono_arch_emit_prolog): Add more first bblock optimizations.
5178
5179         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
5180         in order if possible.
5181         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
5182         bblock, since the arguments are still in their original registers.
5183
5184         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
5185
5186 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
5187
5188         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
5189         as well.
5190
5191         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
5192         offset 0.
5193
5194         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
5195
5196         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
5197         process async exceptions received while in unmanaged code.
5198
5199         * mini.c (mini_init): Install a callback with the runtime which will be called
5200         when a thread receives an async exception while in unmanaged code.
5201
5202         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
5203
5204         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
5205
5206 2008-01-16  Wade Berrier  <wberrier@novell.com>
5207
5208         * cpu-g4.md:
5209         * cpu-arm.md:
5210         * cpu-s390x.md:
5211         fix build
5212
5213 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5214
5215         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
5216         compilation with sun cc.
5217
5218         * cpu-*.md: Fix the build.
5219
5220         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
5221
5222         * mini-amd64.h: Add some comments to the MonoLMF structure.
5223
5224         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
5225         
5226         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
5227         in the LMF structure if possible. This saves two instructions in the
5228         managed->native wrappers.
5229
5230         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
5231
5232 2008-01-16  Mark Probst  <mark.probst@gmail.com>
5233
5234         * generic-sharing.c: New type argument lookup code which uses the
5235         runtime generic context template.
5236
5237 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
5238
5239         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
5240
5241         * mini-arm.c (add_general): Fix arm eabi parameter passing.
5242         (mono_arch_output_basic_block): Fix localloc implementation.
5243
5244         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
5245
5246         * mini-ia64.c (peephole_pass): Fix ia64 build.
5247
5248         * mini-amd64.c (peephole_pass): Fix a warning.
5249         
5250         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
5251         at a constant offset from sp/fp.
5252
5253         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
5254         instead of obtaining it from *lmf in the managed method case.
5255
5256 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
5257
5258         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
5259
5260 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
5261
5262         * mini.h (MonoInstList): New type.
5263         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
5264         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
5265         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
5266         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
5267         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
5268         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
5269         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
5270         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
5271         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
5272         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
5273         MONO_INST_LIST_FOR_EACH_ENTRY,
5274         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
5275         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
5276         mono_inst_list_first, mono_inst_list_last,
5277         mono_inst_list_next, mono_inst_list_prev): New instruction
5278         list handling interfaces.
5279         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
5280         list head 'ins_list'.
5281         (MonoInst): Replace next pointer with list head 'node'.
5282         (MonoCallInst): Make 'out_args' a MonoInstList.
5283         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
5284         (MonoCompile): Delete reverse_inst_list and
5285         reverse_inst_list_len.
5286         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
5287         mono_arch_lowering_pass, mono_arch_local_regalloc,
5288         mono_arch_output_basic_block, mono_arch_emit_prolog):
5289         Convert to new instruction lists.
5290         (insert_after_ins): Delete.
5291         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
5292         instruction lists.
5293         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
5294         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
5295         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
5296         mono_emulate_opcode, mono_emit_load_got_addr,
5297         inline_method, mono_method_to_ir, mono_print_bb_code,
5298         print_dfn, decompose_pass, nullify_basic_block,
5299         replace_out_block_in_code, remove_block_if_useless,
5300         merge_basic_blocks, move_basic_block_to_end,
5301         try_unsigned_compare, optimize_branches, mono_print_code,
5302         mini_select_instructions, remove_critical_edges): Likewise.
5303         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
5304         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
5305         mono_arch_output_basic_block, mono_arch_emit_prolog):
5306         Likewise.
5307         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
5308         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5309         mono_arch_output_basic_block): Likewise.
5310         (inst_list_prepend, insert_after_ins): Delete.
5311         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
5312         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
5313         instruction lists.
5314         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
5315         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
5316         mono_arch_emit_prolog): Likewise.
5317         * cfold.c (mono_constant_fold): Likewise.
5318         * liveness.c (visit_bb, mono_analyze_liveness,
5319         optimize_initlocals): Likewise.
5320         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
5321         * graph.c (mono_draw_code_cfg): Likewise.
5322         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
5323         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
5324         mono_ssa_cprop): Likewise.
5325         * abcremoval (get_relations_from_previous_bb, process_block):
5326         Likewise.
5327         * local-propagation (mono_cprop_invalidate_values,
5328         mono_local_cprop_bb): Likewise.
5329         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
5330         peephole_pass, mono_arch_output_basic_block,
5331         mono_arch_emit_prolog): Likewise.
5332         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
5333         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5334         mono_arch_emit_prolog): Likewise.
5335         (insert_after_ins): Delete.
5336         * aliasing.c (print_code_with_aliasing_information,
5337         mono_build_aliasing_information, mono_aliasing_deadce):
5338         Convert to new instruction lists.
5339         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
5340         peephole_pass, NEW_INS, mono_arch_lowering_pass,
5341         mono_arch_local_regalloc, mono_arch_output_basic_block):
5342         Likewise.
5343         (insert_after_ins): Delete.
5344         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
5345         peephole_pass, mono_arch_output_basic_block): Convert to
5346         new instruction lists.
5347         * mini-codegen (InstList, inst_list_prepend,
5348         insert_after_ins): Delete.
5349         (insert_before_ins, get_register_force_spilling,
5350         get_register_spilling, free_up_ireg, free_up_reg,
5351         create_copy_ins, create_spilled_store, alloc_int_reg,
5352         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
5353         to new instruction lists.
5354         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
5355         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5356         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
5357         (insert_after_ins): Delete.
5358         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
5359         mono_arch_local_regalloc, mono_arch_output_basic_block,
5360         mono_arch_call_opcode): Convert to new instruction lists.
5361         (insert_after_ins): Delete.
5362         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
5363         peephole_pass, mono_arch_output_basic_block,
5364         mono_arch_emit_prolog): Convert to new instruction lists.
5365
5366 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
5367
5368         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
5369
5370         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
5371         Fixes #353182.
5372
5373         * Makefile.am (version.h): Make this work with non-bash shells.
5374
5375 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
5376
5377         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
5378
5379 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
5380
5381         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
5382         the InitializeArray optimization.
5383
5384 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
5385
5386         * mini.c driver.c: Don't include os/gc_wrapper.h.
5387
5388 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
5389
5390         * mini.c (print_jit_stats): Print GC statistics if available.
5391
5392 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
5393
5394         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
5395
5396 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
5397
5398         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
5399
5400 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
5401
5402         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
5403         
5404         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5405
5406         * driver.c (mono_main): Ditto.
5407
5408 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
5409
5410         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
5411
5412         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
5413         in the vtable can't be encoded.
5414         (compile_method): Ditto.
5415
5416 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
5417
5418         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
5419         defined.
5420
5421         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
5422         lmf->rbp.
5423
5424         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
5425         the top LMF entry belongs to the current method.
5426
5427         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
5428
5429 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
5430
5431         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
5432         
5433         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
5434
5435         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
5436
5437         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
5438
5439         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
5440
5441         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
5442         implementation.
5443
5444         * basic-float.cs: Add an ulong->double cast test.
5445
5446 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
5447
5448         * mini.c (mono_method_to_ir): Fix a warning.
5449
5450 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
5451
5452         * mini-ops.h: Add OP_SWITCH.
5453
5454         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
5455         CEE_SWITCH in back-end code, use OP_SWITCH instead.
5456
5457 2007-12-11  Geoff Norton  <gnorton@novell.com>
5458
5459         * mini-s390x.c: Minor change to the MAX() define to allow
5460         it to compile with other gcc versions.
5461
5462 2007-12-11  Geoff Norton  <gnorton@novell.com>
5463
5464         * cpu-s390x.md:
5465         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
5466
5467 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5468
5469         exceptions-arm.c (mono_arch_get_restore_context): Restore
5470         the frame pointer.
5471
5472         exceptions-arm.c (throw_exception): Save the frame pointer.
5473         This is a partial fix for #323747. Only the client side is
5474         fixed.
5475
5476 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5477
5478         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
5479         was using an unrelated variable to log the class which
5480         needed the cctor to be called. This was crashing on arm.
5481
5482 2007-12-09  Robert Jordan  <robertj@gmx.net>
5483
5484         * mini-x86.c (mono_arch_emit_epilog):
5485         Consider all kinds of 64-bit types. Fixes #323114.
5486
5487 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
5488
5489         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
5490
5491 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5492
5493         * mini-amd64.c (peephole_pass): Add a missing instruction check.
5494
5495 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5496
5497         * mini.c: run type ctor before allocating an object, not only
5498         when running it's constructor method (fixes at least part of bug #342507).
5499
5500 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5501         
5502         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
5503         
5504         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
5505         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
5506         function.
5507
5508         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
5509         mono_generic_class_init_trampoline () the same as it is done with the other
5510         trampolines.
5511
5512         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
5513         aot-runtime.c aot-compiler.c: Implement AOT support.    
5514
5515 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5516
5517         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
5518         build for archs which don't have the vtable trampoline defined
5519         yet.
5520
5521 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5522
5523         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
5524
5525         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
5526
5527         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
5528
5529         * tramp-<ARCH>.c: Use the new helper function.
5530
5531 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5532
5533         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
5534         trampoline call, which takes a vtable argument.
5535
5536         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
5537         OP_TRAMPCALL_VTABLEs like other calls.
5538
5539         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
5540         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
5541         call.  Implemented a support function which fetches the vtable
5542         from a register set.
5543
5544         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
5545         Implemented a generic class init trampoline, using the
5546         OP_TRAMPCALL_VTABLE opcode.
5547
5548         * mini.c: Implemented static field access when sharing generic
5549         code.  This implies initing the class using the new
5550         OP_TRAMPCALL_VTABLE call.
5551
5552 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5553
5554         * mini.c: Don't compile methods with sharing enabled if their
5555         classes are disabled for sharing.
5556
5557 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5558
5559         * inssel.brg: Add a missing sign extension to the GETCHR and array access
5560         opcodes. Fixes #346563.
5561
5562         * objects.cs: Add a new test.
5563
5564         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5565
5566         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5567         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5568
5569 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5570
5571         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5572
5573 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
5574
5575         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5576         code stream.
5577
5578 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
5579
5580         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5581
5582         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
5583         optimization in the AOT case.
5584         
5585 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
5586
5587         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5588         
5589         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5590
5591         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5592
5593         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5594
5595         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5596         is created by the inlined delegate ctor.
5597
5598         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
5599
5600         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5601
5602 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
5603
5604         * cpu-x86.md: Fix the length of ckfinite.
5605
5606 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
5607
5608         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5609         
5610         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5611         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5612
5613         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5614
5615         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
5616         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5617
5618 2007-11-28  Martin Baulig  <martin@ximian.com>
5619
5620         * mini-x86.c
5621         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5622         after creating the trampoline.
5623
5624 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
5625
5626         * aot-runtime.c (load_aot_module): Check runtime version if needed.
5627
5628         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5629         the same version.
5630
5631         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5632         instead of the calling method to help AOT.
5633
5634         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5635
5636 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
5637
5638         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5639         is defined.
5640
5641 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
5642
5643         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5644         
5645         * aot-compiler.c (compile_method): Correct check for generic method definitions.
5646         (encode_method_ref): No need to handle generic method definitions specially.
5647
5648         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5649
5650         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
5651         decode_klass_info.
5652
5653         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5654         encode_klass_info.
5655         (compile_method): Enable generic sharing.
5656
5657 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
5658
5659         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5660         (mini_method_compile): Add preliminary support for AOTing shared generic code.
5661
5662         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5663         generic code.
5664
5665         * mini-trampolines.c: Fix a warning.
5666
5667         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5668         NEW_PCONST.
5669         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5670         (generic_class_is_reference_type): Remove unused function.
5671
5672         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5673         in the generic vtable trampoline case.
5674
5675         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
5676         
5677         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
5678         return an AOT method based on a vtable slot.
5679
5680         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
5681
5682         * mini.c (mini_get_vtable_trampoline): Export this.
5683
5684 2007-11-22  Martin Baulig  <martin@ximian.com>
5685
5686         * debug-debugger.h
5687         (MonoDebuggerInfo): Move `debugger_version' up.
5688
5689 2007-11-22  Martin Baulig  <martin@ximian.com>
5690
5691         * mini-amd64.c
5692         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5693
5694         * mini-trampolines.c
5695         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5696         after compiling the method.
5697
5698 2007-11-20  Martin Baulig  <martin@ximian.com>
5699
5700         * debug-mini.c
5701         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5702         (mono_debugger_remove_breakpoint): Likewise.
5703         (mono_debugger_check_breakpoints): Likewise.
5704
5705         * debug-debugger.c: Implement the new breakpoint interface here.
5706
5707 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
5708
5709         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5710         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5711
5712         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
5713
5714 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
5715
5716         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5717
5718         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5719         mini.c.
5720
5721         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5722         mini.c.
5723
5724         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5725         returning a vtype in a register.
5726
5727         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5728         here from the arch specific code.
5729
5730         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5731         mini.c.
5732
5733         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5734         (mono_arch_emit_prolog): Increment maximum prolog size.
5735
5736         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5737         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5738
5739         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
5740         MonoGenericSharingContext.
5741
5742         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
5743         MonoGenericSharingContext. Allocate memory from the cfg mempool.
5744
5745 2007-11-15  Mark Probst  <mark.probst@gmail.com>
5746
5747         * mini.c, mini.h, generic-sharing.c: Functions for producing code
5748         which extract fields out of the runtime generic context.  Full
5749         sharing of the NEWARR opcode.
5750
5751 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
5752
5753         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
5754         --enable-minimal=ssa.
5755
5756 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
5757
5758         * mini-trampolines.c (mono_delegate_trampoline): Update after 
5759         mono_marshal_get_delegate_invoke () signature change.
5760
5761 2007-11-13  Mark Probst  <mark.probst@gmail.com>
5762
5763         * mini.c: Removed the shared context in favor of the generic
5764         sharing context.  Allocate the MonoJitInfo structure with room for
5765         the generic sharing context if it's needed.
5766
5767         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
5768         domain-internals.h now.
5769
5770         * mini-x86.c: Pass the generic sharing context to get_call_info ().
5771
5772         * generic-sharing.c: Several changes for working without a shared
5773         context and instead operating on open types instead.
5774
5775 2007-11-12  David S. Miller  <davem@davemloft.net>
5776
5777        * inssel-sparc.brg: Fix double instruction emit.
5778
5779 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
5780
5781         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
5782         Get/Set/Address methods.
5783         
5784         * mini.c debug-debugger.c mini-trampolines.c: Update after 
5785         mono_marshal_get_delegate_invoke signature change.
5786
5787 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5788
5789         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
5790         This can happens with dynamic methods. Fixes the other bug in #322722.
5791
5792 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
5793
5794         * tramp-arm.c (mono_arch_patch_callsite): Support patching
5795         BX call sequence.
5796
5797         * mini-arm.c (arm_patch): Implement patching of BX call
5798         sequence. Fixes one of the bugs in #322722.
5799
5800 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
5801
5802        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
5803        under Linux.  We only need to flush every 32-byte cache line.    
5804
5805 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
5806
5807         * mini.c:
5808         move_basic_block_to_end: Add branches when needed, eventually creating
5809         a new BB.
5810         optimize_branches: added a parameter that tells if it's ok to create
5811         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
5812         and avoid calling move_basic_block_to_end when it's not ok.
5813         Fixes bug 318677.
5814
5815 2007-11-07  Mark Probst  <mark.probst@gmail.com>
5816
5817         * mini.c: Abort inlining call to InitializeArray if something
5818         looks wrong.  Let the icall handle it, which now has proper safety
5819         checks.
5820
5821 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
5822
5823         * mini.c (mono_spill_call): add support for soft-float.
5824
5825         * mini.c (mono_method_to_ir): add support for soft-float
5826         to inlined functions that return float.
5827
5828         * mini.c (mono_method_to_ir): add support for soft-float
5829         to cee_stsfld opcode on float fields.
5830
5831 2007-11-05  Geoff Norton  <gnorton@novell.com>
5832
5833         * mini-x86.h: Fix the structure access for X86 Leopard.
5834
5835
5836 2007-11-05  Martin Baulig  <martin@ximian.com>
5837
5838         * mini-trampolines.c
5839         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
5840         after compiling the method to notify the debugger.
5841
5842 2007-11-05  Martin Baulig  <martin@ximian.com>
5843
5844         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
5845
5846 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
5847
5848         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
5849         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
5850
5851 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
5852
5853         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
5854         native-to-managed wrappers.
5855         
5856 2007-11-01  Geoff Norton  <gnorton@novell.com>
5857
5858         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
5859         members.
5860
5861 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
5862
5863         * mini.c, mini-x86.c: when getting back from unmanaged code
5864         to managed via a marshaled delegate we also need to set the
5865         right domain.
5866
5867 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
5868
5869         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
5870         for amd64.
5871
5872 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
5873
5874         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
5875         let the debugger or other external agents to tell the JIT when
5876         a sw breakpoint has been inserted in the code that the JIT needs
5877         to be able to inspect.
5878
5879 2007-10-31  Martin Baulig  <martin@ximian.com>
5880
5881         * debug-debugger.h
5882         (MonoDebuggerInfo): Remove `runtime_class_init'.
5883
5884 2007-10-30  Martin Baulig  <martin@ximian.com>
5885
5886         * debug-mini.h
5887         (mono_debugger_thread_created): Added `MonoThread *' argument.
5888         (mono_debugger_extended_notification): New public method.
5889         (mono_debugger_trampoline_compiled): New public method.
5890
5891         * debug-mini.c
5892         (MonoDebuggerThreadInfo): Added `thread' and
5893         `extended_notifications' fields.
5894
5895         * debug-debugger.c
5896         (debugger_executable_code_buffer): New static variable.
5897
5898         * debug-debugger.h
5899         (MonoDebuggerInfo): Added `executable_code_buffer',
5900         `executable_code_buffer_size', `breakpoint_info_area',
5901         `breakpoint_table' and `breakpoint_table_size'.
5902
5903 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
5904
5905         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
5906         that IP  either is an unused value or the vtable pointer. IMT 
5907         calls use vtable + offset now. Reduced by almost half the size
5908         of IMT entries.
5909
5910 2007-10-26  Jonathan Chambers <joncham@gmail.com>
5911
5912         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
5913         defines to access param registers. Replace long usage with
5914         gsize as sizeof(long) != sizeof(void*) on Win64.
5915
5916         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
5917         on Win64. Fix intrinsic, use _AddressOfReturnAddress
5918         instead of non-existant _GetAddressOfReturnAddress.
5919
5920         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
5921         param registers. Save/restore %rdi and %rsi in MonoLMF.
5922
5923         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
5924         param registers. Modify (throw_exception) signature to take 
5925         %rdi and %rsi on Win64. 
5926
5927         Code is contributed under MIT/X11 license.
5928
5929 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
5930
5931         * helpers.c: unlink debugging output files.
5932
5933 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
5934
5935         * mini.c: Move mono_create_ftnptr () to object.c.
5936
5937 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
5938
5939         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
5940         optional. This function can now be used to disassemble code generated
5941         outside the JIT such as trampolines and IMT thunks.
5942
5943         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
5944
5945         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
5946         vtable pointer from a ldr instruction.
5947
5948         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
5949         new IMT call sequence.
5950
5951         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
5952         call sequence for interface invocations.
5953
5954         * mini-arm.c (mono_arch_emit_imt_argument): added, required
5955         for imt support. This function is empty since IMT on ARM requires no
5956         special handling on the IR side.
5957
5958         * mini-arm.c (mono_arch_find_imt_method): added, required for
5959         imt support.
5960
5961         * mini-arm.c (mono_arch_find_this_argument): added, required
5962         for imt support.
5963
5964         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
5965         a ldr instruction to load a value stored in the code stream.
5966
5967         * mini-arm.c (mono_arch_build_imt_thunk):added, required
5968         for imt support.
5969
5970
5971 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
5972
5973         * mini.c (mini_init): Install the jump trampoline callback.
5974
5975 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5976
5977         * mini-trampolines.c: handle synchronized methods with the common
5978         vtable trampoline (bug #335601).
5979
5980 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
5981
5982         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
5983
5984         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
5985         64 bit platforms.
5986
5987         * mini-ia64.h mini-ia64.c: Add support for IMT.
5988
5989         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
5990         prolog. Fixes #331958.
5991
5992 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
5993
5994         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
5995
5996 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
5997
5998         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
5999         trampoline.
6000
6001 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6002
6003         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
6004         trampoline.
6005
6006 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
6007
6008         * mini-x86.c, mini-x86.h: x86 support for the common vtable
6009         trampoline.
6010
6011 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6012
6013         * mini-trampolines.c: changed the magic rampoline to understand
6014         the common vtable trampoline method: the method to invoke is
6015         determined by the vtable displacement of the call.
6016
6017 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6018
6019         * mini.c, mini.h: register the common vtable trampoline if the
6020         architecture supports it.
6021
6022 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6023
6024         * cpu-amd64.md: use the correct max length for tls_get.
6025
6026 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
6027
6028         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
6029         CEE_STELEM_ANY. Fixes #333696.
6030
6031 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6032
6033         * exceptions-x86.c: provide more graceful handling of the case where
6034         we followed a bogus function pointer from managed code (bug #332866).
6035
6036 2007-10-11  Mark Probst  <mark.probst@gmail.com>
6037
6038         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
6039         replaces the generic_shared flag and will carry more information
6040         in the future.
6041
6042         * generic-sharing.c: Added mini_type_stack_size() which allows
6043         allows open types if given a generic sharing context.
6044         mini_get_basic_type_from_generic() takes a
6045         MonoGenericSharingContext* instead of a MonoCompile* now.
6046
6047         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
6048         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
6049         mini-sparc.c, mini-x86.c: Trivial changes required by the two
6050         changes above.  Just passing arguments through to the right
6051         places.
6052
6053 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6054
6055         * mini-arm.c: unify the call emission to emit_code_seq().
6056
6057 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
6058
6059         * tramp-arm.c: reduced the trampoline size.
6060
6061 2007-10-10  Mark Probst  <mark.probst@gmail.com>
6062
6063         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
6064         variable handling out of arch-specific code.
6065
6066 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
6067
6068         * mini-arm.c: implemented fast delegate dispatch.
6069
6070 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6071
6072         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
6073         that fp elimination is turned off if the space required by locals is too
6074         big. Fixes #331958.
6075
6076 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6077
6078         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
6079         ARM to the new style trampoline.
6080
6081 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6082
6083         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
6084
6085         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
6086
6087 2007-10-09  Martin Baulig  <martin@ximian.com>
6088
6089         * debug-debugger.h
6090         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
6091         `field_info_offset_offset'.     
6092
6093 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
6094
6095         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
6096         removed more internal usage of the r11 register and made it available
6097         to the register allocator.
6098
6099 2007-10-08  Mark Probst  <mark.probst@gmail.com>
6100
6101         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
6102         when sharing generics and treat type variables as references.
6103
6104 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6105
6106         * mini-ppc.c: started removing the internal uses of register r11
6107         to eventually allow the register allocator to manage it as an
6108         additional available register.
6109
6110 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6111
6112         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
6113
6114 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
6115
6116         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
6117         specific trampolines as they are not performance critical as a jump
6118         target (maybe align as before only for AOT code?). This saves about
6119         200 KB of native code on x86 for monodevelop startup.
6120
6121 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6122
6123         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
6124         monodevelop startup.
6125
6126 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
6127
6128         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
6129
6130         * mini-sparc.h mini-sparc.c: Implement IMT support.
6131
6132         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
6133         its smaller and doesn't clobber sparc_g1.
6134
6135         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
6136
6137 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6138
6139         * mini-ppc.c: optimized the size of the IMT thunks a bit.
6140
6141 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6142
6143         * mini-ppc.c: implemented fast delegate invocation.
6144
6145 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
6146
6147         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
6148
6149 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6150
6151         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
6152         code to the new style trampoline in preparation for IMT support.
6153
6154 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6155
6156         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
6157         systems already. This also reduces the specific trampiline sizes and
6158         prepares for the use of r12 as the IMT identifier register.
6159
6160 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6161
6162         * mini-mips.h: endianess fix (simplified from a patch by
6163         Thomas Kunze <thommy@tabao.de>, bug #323737).
6164
6165 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6166
6167         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
6168         to access ucontext fields and enable netbsd support
6169         (partially from Magnus Henoch <mange@freemail.hu>).
6170
6171 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6172
6173         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
6174         use the preprocessor from the CPP env var if it is set.
6175
6176 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6177
6178         * mini-trampolines.c: fixed an assertion and moved it earlier in the
6179         code, before interface_offset gets used.
6180
6181 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
6182
6183         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
6184         mono_class_setup_vtable () before accessing klass->vtable.
6185
6186 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
6187
6188         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
6189         hackish.
6190
6191 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6192
6193         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
6194         IMT slots (this saves hundreds of KB of memory in programs like
6195         IronPython and Monodevelop).
6196
6197 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6198
6199         * mini.c: print the delegate counter.
6200
6201 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
6202
6203         * mini-x86.c: make it easier to enable the debugging code for IMT
6204         slots.
6205
6206 2007-09-28  Martin Baulig  <martin@ximian.com>
6207
6208         * debug-debugger.h
6209         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
6210         `mono_method_klass_offset' and `mono_method_token_offset'.
6211
6212 2007-09-20  Mark Probst  <mark.probst@gmail.com>
6213
6214         * mini.c: First generics sharing implementation.  Can only share
6215         in very simple cases.  If sharing doesn't work it falls back to
6216         dedicated compilation.
6217
6218         * mini.h: Flag in MonoCompile to specify whether generic
6219         compilation is shared.  Flags enum for marking which generic inst
6220         of a context is used.  Prototypes for helper functions.
6221
6222         * generic-sharing.c: Helper functions for generic method sharing.
6223
6224         * optflags-def.h: Optimization flag (gshared) for enabling generic
6225         method sharing added.
6226
6227         * Makefile.am: generic-sharing.c added.
6228
6229 2007-09-19 Daniel Nauck <dna@mono-project.de>
6230
6231         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
6232
6233 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
6234         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
6235         fixes bug 325507.
6236
6237 2007-09-19  Martin Baulig  <martin@ximian.com>
6238
6239         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
6240         mono_debug_cleanup() is now part of mono_cleanup().
6241
6242 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
6243
6244         * driver.c (mono_main): Fix a warning.
6245
6246 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
6247
6248         * aot-compiler.c: Optimize various parts when processing large assemblies.
6249         Fixes ##325568.
6250
6251         * mini.c (mono_patch_info_hash): Improve hash function.
6252
6253 2007-09-14  Jonathan Chambers <joncham@gmail.com>
6254
6255         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
6256         
6257         Code is contributed under MIT/X11 license.
6258
6259 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6260
6261         * mini.c (mini_init): Fix a leak.
6262
6263         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
6264
6265 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6266
6267         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
6268
6269 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6270
6271         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
6272
6273 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
6274
6275         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
6276         variance tests.
6277
6278         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
6279
6280         * mini.c (handle_alloc): Enable managed allocators in AOT code.
6281
6282         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
6283
6284         * aot-runtime.c (decode_patch_info): Ditto.
6285
6286 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6287
6288         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
6289         static case. Cache delegates in architecture specific code, 
6290         based on number of parameters.
6291         
6292         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
6293         in architecture specific code, based on number of parameters.
6294         
6295         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
6296         caching happen in architecture specific code now.
6297         
6298         Code is contributed under MIT/X11 license.
6299
6300 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6301
6302         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
6303         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
6304         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
6305
6306         Code is contributed under MIT/X11 license.
6307
6308 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6309         * mini.c: (mono_thread_abort) Fixed bug #82416.
6310
6311 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6312
6313         * mini.: hook the new managed GC allocation feature into the JIT.
6314
6315 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6316
6317         * mini.c: implementation for the new runtime tls opcode.
6318
6319 2007-09-11  Martin Baulig  <martin@ximian.com>
6320
6321         * debug-debugger.h
6322         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
6323         `mono_method_inflated_offset'.
6324
6325 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
6326
6327         * driver.c mini.h mini.c: Add a new devel command line option for injecting
6328         async exceptions into a method.
6329
6330         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
6331         purpose of testing whenever the unwinder works at every instruction.
6332
6333 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
6334
6335         * mini.c: check accessibility of method used in ldftn (fixes
6336         bug #82635).
6337
6338 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
6339
6340         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
6341
6342         * inssel.brg: Fix a warning.
6343
6344 2007-09-03  Martin Baulig  <martin@ximian.com>
6345
6346         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
6347         now takes the `main_method' as argument.
6348
6349 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
6350
6351         * cpu-sparc.md (endfilter): Add missing src1:i argument.
6352
6353 2007-08-30  Jonathan Chambers <joncham@gmail.com>
6354
6355         * driver.c: include the cil-coff.h header on Windows.
6356         
6357         Code is contributed under MIT/X11 license.
6358
6359 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6360
6361         * mini.c, driver.c: don't include the cil-coff.h header.
6362
6363 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6364
6365         * mini.c: flag places that needs fixes fo soft-float support.
6366
6367 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
6368
6369         * mini.h, inssel-float.brg: fix soft-float constant loads on big
6370         endian systems (partially from Dean Jenkins, bug #81924).
6371
6372 2007-08-28  Mark Probst  <mark.probst@gmail.com>
6373
6374         * mini.c (check_linkdemand): Remove embedded reference object in
6375         call to LinkDemandSecurityException.
6376         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
6377         with an IntPtr instead of a reference object.
6378
6379 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
6380
6381         * mini.c (handle_initobj): Handle alignment properly.
6382
6383         * inssel.brg (mini_emit_memset): Ditto. 
6384
6385         * inssel.brg (mini_emit_memcpy): Ditto. 
6386
6387         * inssel-sparc.brg: Ditto.              
6388
6389         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
6390
6391 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
6392
6393         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
6394         exceptions raised in unmanaged code. Fixes part of #82594.
6395
6396 2007-08-24  Mark Probst  <mark.probst@gmail.com>
6397
6398         * mini.c (mono_method_to_ir), declsec.c
6399         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
6400
6401 2007-08-22  Martin Baulig  <martin@ximian.com>
6402
6403         * debug-mini.h
6404         (MonoDebuggerThreadInfo): New typedef.
6405         (mono_debugger_thread_table): New global variable.
6406         (mono_debugger_thread_created): New public function.
6407         (mono_debugger_thread_cleanup): New public function.
6408
6409         * debug-debugger.h
6410         (MonoDebuggerInfo):
6411         - removed `get_current_thread' and `lookup_assembly'.
6412         - removed `data_table'.
6413         - added `thread_table'.
6414
6415         * mini.c
6416         (mono_thread_start_cb): Call mono_debugger_thread_created().
6417         (mono_thread_attach_cb): Likewise.
6418         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
6419         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
6420         initial domain.
6421
6422         * driver.c (mono_main): Move mono_debug_init() up, before calling
6423         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
6424
6425 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6426
6427         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
6428         together when passing several arguments of type double (gives a small
6429         speedup and saves a few bytes of generated code).
6430
6431 2007-08-20  Jb Evain  <jbevain@novell.com>
6432
6433         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
6434
6435 2007-08-20  Jb Evain  <jbevain@novell.com>
6436
6437         * mini.c (mono_method_to_ir): throw MethodAccessException
6438         and FieldAccessException instead of InvalidProgramException.
6439
6440 2007-08-20  Mark Probst  <mark.probst@gmail.com>
6441
6442         * mini.c: CoreCLR security checks.
6443
6444         * mini.h: Removed MonoSecurityMode (moved to
6445         metadata/security-manager.h) and mono_security_mode global var
6446         (replaced by set/get functions in security-manager.h).
6447
6448         * driver.c: Added "core-clr-test" security mode for testing.  Used
6449         set-function for setting security mode.
6450
6451 2007-08-17  Mark Probst  <mark.probst@gmail.com>
6452
6453         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
6454         the new jit_info_table.
6455
6456         * driver.c: Test code for the new jit_info_table (enabled by the
6457         define MONO_JIT_INFO_TABLE_TEST).
6458
6459 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
6460
6461         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6462         detection of call <REG> instruction sequence. Fixes build on freebsd.
6463
6464 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
6465
6466         * mini-exceptions.c: Fix a warning.
6467
6468 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
6469
6470         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
6471         stack overflow handling code on amd64 too.
6472
6473         * mini-exceptions.c (mono_setup_altstack): Make this use 
6474         mono_thread_get_stack_bounds ().
6475
6476         * mini-x86.h: Disable sigaltstack on solaris x86.
6477
6478 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
6479
6480         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
6481
6482 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
6483
6484         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
6485
6486 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
6487
6488         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
6489
6490         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
6491
6492 2007-08-03  Neale Ferguson <neale@sinenomine.net>
6493
6494         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
6495         due to alignment.
6496
6497 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6498
6499         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
6500         to be emitted (bug #82281).
6501
6502 2007-08-01  Martin Baulig  <martin@ximian.com>
6503
6504         Merged the `debugger-dublin' branch.
6505
6506         * debug-debugger.h (MonoDebuggerInfo):
6507         Removed the `old_*' compatibility entries.
6508         Added `debugger_version' and `data_table'.
6509         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
6510         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
6511
6512         * debug-mini.c
6513         (MiniDebugMethodBreakpointInfo): Add `address_list'.
6514         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
6515         instead of a `gconstpointer'.
6516         (mono_debugger_insert_method_breakpoint): Return a
6517         `MonoDebugMethodAddressList *'.
6518
6519 2007-06-28  Martin Baulig  <martin@ximian.com>
6520
6521         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6522
6523 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
6524
6525         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
6526         __builtin_frame_address () since it is broken on older gcc versions.
6527
6528 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6529
6530         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
6531         on the stack overflow handling and made the managed stack overflows
6532         catchable in most cases using soft guard pages.
6533         * exceptions-x86.c: added code to restore the protection in the soft
6534         guard pages at the end of exception handling.
6535
6536 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
6537
6538         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
6539
6540 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6541
6542         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
6543         exception handling.
6544
6545 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6546
6547         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
6548         signal handling support until it has been ported to the new mechanism.
6549         * mini.c: fixed stack overflow detection and use the new
6550         architecture code  to handle signals on the altstack.
6551
6552 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6553
6554         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
6555         stack overflows on the alt stack.
6556
6557 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6558
6559         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6560         stack overflows on the alt stack.
6561
6562 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6563
6564         * exceptions-ppc.c: cleanup preparing for altstack support.
6565
6566 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6567
6568         * exceptions-arm.c: cleanup preparing for altstack support.
6569
6570 2007-07-27  Mark Probst  <mark.probst@gmail.com>
6571
6572         * mini.c (print_jit_stats): Output hazard pointer stats.
6573
6574 2007-07-26  Mark Probst  <mark.probst@gmail.com>
6575
6576         * driver.c, mini.c: Replaced security mode flags with a single
6577         enum variable.
6578
6579 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6580
6581         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6582
6583 2007-07-25  Mark Probst  <mark.probst@gmail.com>
6584
6585         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6586         (which doesn't do anything yet) for activating Core CLR
6587         (Silverlight) security.
6588
6589 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6590
6591         * mini-codegen.c: work around a possible gcc bug on arm.
6592
6593 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6594
6595         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6596         message for platforms that don't support AOT compilation.
6597
6598 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6599
6600         * mini.h, mini.c, driver.c: temporary smcs hack.
6601
6602 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6603
6604         * mini-arm.h, mini-arm.c: arm EABI fixes.
6605
6606 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
6607
6608         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6609         case.
6610
6611         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6612         trampolines taking a method argument.
6613
6614         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6615
6616         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6617         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6618
6619         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6620         JIT compilation throws an exception. Fixes #82050.
6621
6622 2007-07-19  Mark Probst  <mark.probst@gmail.com>
6623
6624         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6625         with the MONO_EXCEPTION_ defines.
6626
6627 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
6628
6629         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6630         #82117.
6631         
6632         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6633         the cause of an assertion.
6634
6635 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6636
6637         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6638         removed.
6639
6640 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
6641
6642         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6643         assert. Should fix #82103.
6644
6645 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
6646
6647         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6648         here too. Fixes #82095.
6649
6650         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6651         addresses.
6652
6653         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6654
6655         * mini-amd64.h: Enable IMT for amd64.
6656         
6657         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6658
6659 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
6660
6661         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6662
6663 2007-07-12  Mark Probst  <mark.probst@gmail.com>
6664
6665         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6666         as soon as check_linkdemand sets an exception_type.
6667
6668 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6669
6670         * mini-x86.c: fixed offsets for IMT call sequence.
6671         * mini-x86.h: enable IMT again.
6672
6673 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6674
6675         * trace.c (mono_trace_enter_method): Decode MonoType too.
6676
6677         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
6678
6679         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
6680
6681         * mini-amd64.c: Add preliminary IMT implementation.
6682         
6683 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6684
6685         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6686         understand the new IMT-base interface invocation (thanks to
6687         Daniel Nauck for the report and the remote debugging session).
6688
6689 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6690
6691         * mini-x86.c: size and speed optimizations for the IMT bsearch.
6692
6693 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6694
6695         * Makefile.am (aotcheck): Make this actually use the AOTed code.
6696
6697 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6698
6699         * mini-trampolines.c: implement AOT IMT support.
6700         * mini-x86.h: enable IMT support for wider testing.
6701
6702 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6703
6704         * inssel.brg (emit_imt_argument): Add aot support here.
6705
6706         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6707
6708 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6709
6710         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6711         of the IMT implementation, partially from massi, with my
6712         implementation of the bsearch sequence. Disabled by default until
6713         the AOT code is implemented.
6714
6715 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6716
6717         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6718
6719         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6720
6721 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6722
6723         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6724         arch-independent IMT JIT code from Massimiliano
6725         Mantione (massi@ximian.com) with small cleanups from me.
6726
6727 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6728
6729         * Makefile.am: fix svn invocation to get the svn revision to be
6730         independent of the local language (build fix).
6731
6732 2007-07-09  Mark Probst  <mark.probst@gmail.com>
6733
6734         * mini.c (inline_method): Reset cfg->exception_type if the
6735         inlining is aborted.  Fixes: 82049.
6736
6737 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6738
6739         * mini.c: remove assert from exception handling code when exception_ptr
6740         is not set.
6741
6742 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6743
6744         * mini.c (mono_codegen): Add an assert.
6745
6746         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
6747         enter and leave code.
6748         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
6749
6750 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6751
6752         * mini-ppc.c: fixed memory corruption for localloc(0)
6753         (bug #81852).
6754
6755 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6756         
6757         * mini.c: Fix warnings.
6758
6759 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
6760
6761         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
6762         to emit better double->int conversions.
6763
6764 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6765
6766         * mini.c: the provided Min/Max optimizations are valid for unisgned
6767         ints.
6768
6769 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
6770
6771         * 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
6772
6773 2007-06-28  Miguel de Icaza  <miguel@novell.com>
6774
6775         * mini.c (mono_running_on_valgrind): Add support for reporting the
6776         method and  its boundaries to valgrind.
6777
6778 2007-06-28  Martin Baulig  <martin@ximian.com>
6779
6780         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6781
6782 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
6783
6784         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
6785
6786         * generic.2.cs: Add new test case.
6787
6788 2007-06-25  Martin Baulig  <martin@ximian.com>
6789
6790         Merged the `debugger-dublin' branch.
6791
6792         * debug-mini.c
6793         (mono_debugger_insert_method_breakpoint): New public method.
6794         (mono_debugger_remove_method_breakpoint): Likewise.
6795         (mono_debugger_check_breakpoints): New static method.
6796         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
6797
6798         * debug-debugger.h (MonoDebuggerInfo):
6799         Renamed (to keep backward compatibility in the vtable):
6800         `insert_breakpoint' -> `old_insert_breakpoint'.
6801         `remove_breakpoint' -> `old_remove_breakpoint'.
6802         `create_string' -> `old_create_string'.
6803         `lookup_class' -> `old_lookup_class'.
6804         `lookup_type' -> removed; changed into a dummy field.
6805         `lookup_assembly' -> `old_lookup_assembly'.
6806         Added (same functionality, but different signature):
6807         `create_string', `lookup_class', `lookup_assembly'
6808         Added new:
6809         `get_method_addr_or_bpt', `remove_method_breakpoint',
6810         `runtime_class_init'.
6811
6812         * debug-debugger.c: Merged the `debugger-dublin' branch.
6813
6814 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
6815
6816         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
6817         well.
6818         (peephole_pass): Likewise.
6819
6820 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
6821
6822         * driver.c: hopefully make setaffinity work also for ancient
6823         versions of linux.
6824
6825 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
6826
6827         * driver.c : win32 build fix.
6828
6829 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6830
6831         * driver.c: check for the MONO_NO_SMP env var and bind to a single
6832         processor if it is set.
6833
6834 2007-06-21  Martin Baulig  <martin@ximian.com>
6835
6836         * debug-mini.h: New file.
6837
6838         * debug-mini.c
6839         (mono_debugger_insert_breakpoint_full): Moved here from
6840         ../metadata/mono-debug-debugger.c.
6841         (mono_debugger_remove_breakpoint): Likewise.
6842         (mono_debugger_breakpoint_callback): Likewise.
6843
6844 2007-06-15  Raja R Harinath  <rharinath@novell.com>
6845
6846         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6847         changes in MonoGenericClass.
6848
6849 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
6850
6851         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
6852
6853 2007-06-14  Raja R Harinath  <rharinath@novell.com>
6854
6855         * jit-icalls.c (mono_helper_compile_generic_method): Update to
6856         removal of MonoGenericMethod.
6857
6858 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6859
6860         * mini-exceptions.c: hooks for the exception events profiling API.
6861
6862 2007-06-14  Randolph Chung  <tausq@debian.org>
6863
6864         * Makefile.ma: Add hppa target.
6865         * mini-arch.h: Include mini-hppa.h
6866         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
6867         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
6868         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6869
6870 2007-06-14  Randolph Chung  <tausq@debian.org>
6871
6872         * inssel.brg: Add rules for "chained" compare-branch operations so that
6873         a single compare op can affect multiple branches.  Adjust cost for
6874         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
6875         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
6876         cost for some rules so that they can more easily be overridden by
6877         per-arch rules (with fixes from lupus).
6878         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6879
6880 2007-06-13  Randolph Chung  <tausq@debian.org>
6881
6882         * mini-ops.h: Reorder branch ops so that they match the order of the
6883         corresponding CEE_* ops.  The code expects them this way.
6884         Add new ops for HPPA target.
6885         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6886
6887 2007-06-13  Randolph Chung  <tausq@debian.org>
6888
6889         * mini-exceptions.c: Handle cases where the stack grows towards
6890         larger addresses.
6891         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
6892
6893 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6894
6895         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
6896         counter.
6897         * driver.c: explain where a non-matching corlib is found.
6898
6899 2007-06-13  Mark Probst  <mark.probst@gmail.com>
6900
6901         * mini.c (print_jit_stats): Output dynamic code allocation stats.
6902
6903 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
6904
6905         * mini-exceptions.c: Generate a method profile leave event during
6906         an exception to ensure that the profiler gets notified.
6907
6908 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
6909
6910         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
6911         branch.
6912
6913         * cpu-amd64.md: Add long_and/or/xor opcodes.
6914
6915 2007-06-06  Wade Berrier  <wberrier@novell.com>
6916
6917         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
6918         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
6919         length of instruction shr_imm (expected 8, got 10)
6920
6921 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
6922
6923         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
6924
6925 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6926
6927         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6928         MonoInternalHashTable again (fixed bug in the internal hash table
6929         code).
6930
6931 2007-06-06  Mark Probst  <mark.probst@gmail.com>
6932
6933         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
6934         Have to figure out what makes it crash the SWF regression.
6935
6936 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
6937
6938         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
6939
6940 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6941
6942         * mini.c: optimize out the type check when storing null in a
6943         reference array.
6944
6945 2007-06-04  Mark Probst  <mark.probst@gmail.com>
6946
6947         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
6948         MonoInternalHashTable.
6949
6950 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
6951
6952         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
6953         signed integer methods.
6954
6955 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6956
6957         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
6958         permanently since the current approach doesn't work.
6959
6960 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
6961
6962         * inssel.brg (stmt): Only call delegate->invoke_impl if 
6963         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
6964
6965 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6966
6967         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
6968         the sreg2==rdx case.
6969         
6970         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
6971         account if it contains a rex prefix.
6972         (peephole_pass): Handle OP_FMOVE as well.
6973
6974 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
6975
6976         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
6977         as it causes regressions.
6978
6979 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
6980
6981         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
6982         static case as well.
6983
6984         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
6985
6986         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6987         (mono_arch_get_this_arg_from_call): Ditto.
6988
6989         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
6990
6991         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
6992         invoke_impl field.
6993
6994         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
6995         (mono_arch_get_this_arg_from_call): Ditto.
6996
6997         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
6998         
6999         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
7000         try to create optimized invoke code and use that for further invocations. 
7001         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
7002
7003         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
7004
7005 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
7006
7007         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
7008         sealed classes or methods.
7009         *devirtualization.cs: tests for the new optimization
7010
7011 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
7012
7013         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
7014         by the update_volatile () function.
7015
7016 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
7017
7018         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
7019         require it.
7020
7021         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
7022
7023 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
7024
7025         * mini.c: Add configure checks for header files.
7026         * mini-x86.c: Add configure checks for header files.
7027         * trace.c: Add configure checks for header files.
7028         * aot-runtime.c: Add configure checks for header files.
7029         * aot-compiler.c: Add configure checks for header files.
7030         * driver.c: Add configure checks for header files.
7031         * mini-codegen.c: Add configure checks for header files.
7032         
7033         Code is contributed under MIT/X11 license.
7034
7035 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
7036
7037         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
7038         icompare_imm -128 + op_iclt. Fixes #81703.
7039
7040 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
7041
7042         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
7043
7044 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
7045
7046         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
7047         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
7048         so that all isinst checks now use "interface_bitmap".
7049
7050 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
7051
7052         * cpu-amd64.md (jmp): Fix a warning.
7053
7054         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
7055
7056         * basic.cs: Add new regression test.
7057
7058         * basic.cs: Remove test which is now in basic-long.cs.
7059
7060         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
7061
7062         * basic-long.cs: Add new test.
7063         
7064 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
7065
7066         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
7067
7068 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
7069
7070         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
7071
7072         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
7073         places.
7074         
7075         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
7076         throwing code a bit.
7077
7078         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
7079         the exception throwing code a bit.
7080
7081         * mini-x86.c (get_call_info): Allocate result from a mempool.
7082
7083 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
7084
7085         * aot-compiler.c (find_typespec_for_class): Fix the assert.
7086
7087         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
7088
7089         * mini.h (MonoCompile): Add 'token_info_hash' field.
7090
7091         * mini.c: Save token->method associations during compilation so the AOT 
7092         compiler can use it.
7093         
7094         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
7095         which reference generic classes and methods.
7096
7097 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
7098
7099         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
7100
7101         * aot-compiler.c (compile_method): Fix a typo in a comment.
7102
7103         * aot-runtime.c (decode_cached_class_info): Skip generic types.
7104
7105         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
7106         everything generic.
7107
7108         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
7109
7110 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
7111
7112         * mini.h (MonoCompile): Add 'args' field.
7113
7114         * mini.c (mono_compile_create_vars): Store variables representing the arguments
7115         into cfg->args.
7116
7117         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
7118
7119 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
7120
7121         * mini.c (mono_compile_get_interface_var): Remove this unused function.
7122
7123         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
7124
7125         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
7126         opcodes for some opcodes.
7127
7128         * mini.h *.brg *.c: Use the new opcodes.
7129
7130 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
7131
7132         * mini.h: Bumped aot revision.
7133
7134         * inssel.brg: modified code generation of type checks for interfaces
7135         to use the new "MonoClass.interface_bitmap" instead of the old
7136         "MonoClass.interface_offsets".
7137
7138 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
7139
7140         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
7141
7142 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
7143
7144         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
7145         64 bit platforms.
7146
7147 2007-04-27  Neale Ferguson <neale@sinenomine.net>
7148
7149         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
7150
7151 2007-04-27  Wade Berrier  <wberrier@novell.com>
7152
7153         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
7154         mini.h) to fix build.
7155
7156 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
7157
7158         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
7159         
7160         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
7161         causes the corlib unit tests to fail.
7162
7163 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
7164
7165         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
7166
7167         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
7168
7169         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
7170         opcodes to the comparison relations.
7171
7172         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
7173         opcodes to their types.
7174         
7175         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
7176
7177         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
7178         it in cfg->arch.cinfo.
7179
7180         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
7181
7182         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
7183         cfg->cil_offset_to_bb.
7184
7185 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
7186
7187         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
7188         created becase of initlocals.
7189
7190 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
7191
7192         * mini-alpha.c cpu-alpha.md: More alpha port work from 
7193         Sergey Tikhonov <tsv@solvo.ru>.
7194
7195 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
7196
7197         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
7198
7199 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
7200
7201         * cpu-s390.md (break): Correct the length of break instruction.
7202
7203 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7204
7205         * mini.c: fix a couple of soft-float issues and comments.
7206
7207 2007-04-15  Miguel de Icaza  <miguel@novell.com>
7208
7209         * trace.c (is_filenamechar): - is also a filename char.
7210
7211 2007-04-15  Neale Ferguson <neale@sinenomine.net>
7212
7213         * mini-s390.c: Correct checking for enum type in return value processing.
7214
7215 2007-04-14  Raja R Harinath  <rharinath@novell.com>
7216
7217         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
7218         (version.h): Makefile is in the build directory.
7219
7220 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
7221
7222         * mini-amd64.h: fix for assertion failure on Solaris/amd64
7223
7224 2007-04-11  Martin Baulig  <martin@ximian.com>
7225
7226         * mini.c (can_access_member): Fix handling of generic classes;
7227         fixes #81259.
7228
7229 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
7230
7231         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
7232
7233 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
7234
7235         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
7236
7237 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7238
7239         * mini-codegen.c: make sure the right spill amount is
7240         used for fp or integer registers (fixes the float_sub_spill() on ppc).
7241
7242 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
7243
7244         * mini-ppc.c: fixes for the fp_branch_nan test.
7245
7246 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
7247
7248         * basic.cs: Comment out new test which still fails on ia64.
7249
7250 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7251
7252         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
7253
7254 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7255
7256         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
7257
7258 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
7259
7260         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
7261         on 64 bit machines. Fixes part of #80738.
7262
7263         * basic.cs: Add regression test.
7264
7265 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7266
7267         * inssel.brg basic.cs: Revert previous change to fix build.
7268
7269         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
7270         platforms.
7271         
7272         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
7273
7274         * basic.cs: Add new regression test.
7275
7276 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7277
7278         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
7279         many arguments.
7280
7281 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7282
7283         * cpu-s390x.md: Correct length of break instruction.
7284
7285 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7286
7287         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
7288         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
7289
7290 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
7291
7292         * *.c: Begin WIN64 port.
7293         * mini.c:  Use correct register in profiler.
7294         * mini-amd64.c: No inline assembly on Win64.
7295         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
7296         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
7297         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
7298         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
7299         mono_arch_ip_from_context for Win64.
7300         
7301         Contributed under MIT/X11 license.
7302
7303 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
7304
7305         * exceptions-amd64.c (seh_handler): Ditto.
7306
7307         * exceptions-x86.c (seh_handler): Fix a memory leak.
7308
7309 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
7310
7311         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
7312         mini-s390x.c: fixed peephole optimizations to deal
7313         correctly with 1 and 2 byte reload avoidance.
7314
7315 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
7316
7317         * cpu-s390.md, cpu-s390x.md: update localloc length.
7318
7319 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7320
7321         * cpu-g4.md: added missing descriptions.
7322
7323 2007-03-14  Miguel de Icaza  <miguel@novell.com>
7324
7325         *  Makefile.am: Add support so the tail tests are not executed on
7326         PowerPC as that is a known limitation of the PowerPC port.
7327
7328 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7329
7330         * runmdesc.bat:  Move to msvc directory.
7331         
7332 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7333
7334         * runmdesc.bat:  Run executable that was produced by the current
7335         target and sent via an argument.
7336         
7337 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
7338
7339         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
7340         #81102.
7341
7342         * generics.2.cs: Add regression test.
7343
7344 2007-03-09  Wade berrier  <wberrier@novell.com>
7345
7346         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
7347
7348 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
7349
7350         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
7351         AOT code depends on this.
7352
7353 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7354
7355         * mini.c: more precise tracking of types in the eval stack
7356         (part of fix for bug #81044).
7357
7358 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
7359
7360         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
7361
7362         * aot-compiler.c (encode_patch): Remove an obsolete comment.
7363
7364 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
7365
7366         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
7367
7368         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
7369
7370 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
7371
7372         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
7373         a pointer on 64 bit systems. Fixes #80190.
7374
7375         * iltests.il: Add new regression test.
7376
7377 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7378
7379         * mini.c: inline a constant for Environment.IsRunningOnWindows.
7380
7381 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
7382
7383         * trace.c: Remove an erroneous alignemnt check when tracing.
7384           Fixes --trace on OSX86.
7385
7386 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7387
7388         * mini-$(arch).h: initialize SP in context for all the archs.
7389
7390 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
7391
7392         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
7393         regressions in the thread tests.
7394
7395 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
7396
7397         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
7398         - fixed implementation of LOCALLOC opcode
7399         - implemented non-un compare for floats
7400         - code cleanup
7401         - implementation of FDIV and CKFINITE opcodes
7402         - fixes for latest mono updates
7403         - additional arch opcodes
7404
7405 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7406
7407         * Makefile.am: simplify and merge rules for cross-compilation.
7408
7409 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
7410
7411         * local-propagation.c: Actually *apply* the fix for bug 80591...
7412
7413 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7414
7415         * mini-exceptions.c: backuot part of the last change
7416         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
7417
7418 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
7419         * inssel.brg: Fix bug 59286.
7420
7421
7422 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
7423
7424         * mini-exceptions.c: patch from Zoltan to correctly check for
7425         stack boundaries (using the stack register, not the frame register),
7426         fixes bugs #80724, #79717.
7427
7428 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
7429
7430         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
7431         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
7432
7433         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
7434         presence of frame pointer elimination.
7435
7436 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
7437         
7438         * mini-x86.h: NetBSD UCONTEX_REG defines.
7439
7440 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
7441
7442         * inssel-amd64.brg: Fix amd64 build.
7443
7444 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
7445
7446         * mini.h: remove extern to workaround what looks likes gcc bug 26905
7447         on amd64.
7448
7449 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
7450
7451         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
7452         ends.
7453
7454         * mini-<ARCH>.c: Use mono_is_regsize_var ().
7455
7456 2007-01-30 Mark Mason <mason@broadcom.com>
7457
7458            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
7459            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
7460            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
7461            beginning support for CEE_JMP [not quite working yet]
7462            * tramp-mips.c: LMF handling now works
7463         
7464 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
7465
7466         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
7467
7468         * mini.h (NULLIFY_INS): New macro.
7469
7470 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7471
7472         * mini.c: statistical profiler fix for windows, patch
7473         from Tor Lillqvist (tml@novell.com).
7474
7475 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
7476         * local-propagation.c: Fix bug 80591.
7477
7478 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7479
7480         * Makefile.am: put back the --export-dynamic option as with
7481         the previous gmodule flags (thanks to Robert Jordan).
7482
7483 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
7484
7485         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
7486
7487         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
7488         simplify and speed up the local register allocator. Also rename some fields
7489         like iassign->vassign.
7490         
7491         * regalloc.c: Remove some functions which are no longer used since their
7492         inlined version is in mini-codegen.c.
7493         
7494         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
7495
7496         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
7497
7498 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
7499
7500         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
7501         narrowing. Fixes #80622.
7502
7503         * iltests.il: Add new regresssion test. 
7504
7505 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7506
7507         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
7508         debug-debugger.c, debug-debugger.h: warning fixes.
7509         * driver.c: updated copyright year and made it fit in one line.
7510
7511 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
7512
7513         * aot-runtime.c: updated to use mono-dl instead of gmodule.
7514
7515 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
7516
7517         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
7518
7519         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
7520
7521         * iltests.il: Add new test for bug #80507.
7522
7523 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7524
7525         * mini-arm.h: use soft-float also on vfp for now.
7526
7527 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7528
7529         * mini.c: fix some more soft-float issues.
7530
7531 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
7532
7533         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
7534
7535 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
7536         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
7537         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
7538         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
7539
7540 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
7541
7542         * mini-arm.c: typo fix.
7543
7544 2007-01-23  Neale Ferguson <neale@sinenomine.net>
7545
7546         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
7547
7548 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
7549
7550         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
7551         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
7552
7553         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
7554
7555         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
7556
7557         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7558         
7559         * inssel.brg: Fix a warning.
7560
7561         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7562
7563         * abcremoval.c ssa.c ssapre.c: Update after this change.
7564         
7565         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7566
7567         * dominators.c (df_set): Use mono_bitset_union_fast.    
7568
7569 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7570
7571         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7572         mini-codegen.c: reduce relocations and memory usage for the cpu
7573         description.
7574
7575 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
7576
7577         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7578
7579         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7580         to reduce their size.
7581
7582 2007-01-19 Mark Mason <mason@broadcom.com>
7583
7584         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7585         * mini-mips.c: more configuration macros, support long conditional branches, additional
7586         asserts, fix epilog instrumentation.
7587         * mini-mips.h: use standard stack walk
7588         * cpu-mips.md: increase size of div, rem and conditional branches
7589         
7590 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7591
7592         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7593         to cpu spec data.
7594
7595 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
7596
7597         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7598         (compile_method): Ditto.
7599
7600         * aot-runtime.c (decode_klass_info): Ditto.
7601
7602         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7603         needed by the code generated by inssel.brg. Also fix a warning.
7604
7605 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7606
7607         * mini.c: deal with enums that become genericinsts by
7608         being nested in a generic class (bug #79956).
7609
7610 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7611
7612         * mini.c: match the generic definition to check for
7613         private access with generic types (bug #78431).
7614
7615 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7616
7617         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7618         to make life easier for people cross-compiling that insist on not
7619         using scratchbox.
7620
7621 2007-01-17 Mark Mason <mason@broadcom.com>
7622
7623         * inssel-long.brg: patch to deal with mips missing flags
7624         * inssel-long32-mips.brg: implement overflow checks
7625         * insset-mips.brg: implement overflow checks
7626         * mini-mips.h: implement conditional exception handling
7627         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7628           Remove unused code, minor cleanups.
7629         * exceptions-mips.c: minor cleanups
7630         * mini-ops.h: add mips conditional exception ops
7631         * cpu-mips.md: add mips conditional exception ops
7632
7633         
7634 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7635
7636         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7637         to deal with mips missing of flags.
7638
7639 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7640
7641         * exceptions-ppc.c: execute fault handlers.
7642
7643 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7644
7645         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7646
7647 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7648
7649         * mini.c: handle also floating point values in initialize_array.
7650
7651 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7652
7653         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7654         array initialization and make it conditional on the intrins option.
7655
7656 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7657
7658         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7659         relocations and put the patch info names close to the enum definition.
7660
7661 2007-01-15 Mark Mason <mason@broadcom.com>
7662
7663         * basic.cs, exceptions.cs: break up large tests to increase debugability.
7664
7665 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7666
7667         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7668
7669 2007-01-12  Raja R Harinath  <rharinath@novell.com>
7670
7671         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7672
7673 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7674
7675         * Makefile.am: distribute the mips sources.
7676
7677 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7678
7679         * mini-codegen.h: handle bug #80489 here, by excluding ecx
7680         directly.
7681
7682 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
7683
7684         * cpu-x86.md: back out for now as this triggers other regressions.
7685
7686 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7687
7688         * cpu-x86.md: force src1 and dest regpair for long shift instructions
7689         to eax:edx, so ecx can't get allocated to them (bug #80489).
7690
7691 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7692
7693         * mini.c, mini-exceptions.c: enabled running fault handlers
7694         (bug #80469).
7695
7696 2007-01-03  Miguel de Icaza  <miguel@novell.com>
7697
7698         * driver.c: If nothing fail, do not use the string "failed",
7699         because it makes it very annoying to view test result logs on the
7700         web. 
7701
7702 2006-12-30  Miguel de Icaza  <miguel@novell.com>
7703
7704         * debug-debugger.c (mono_debugger_main): Rename "main" to
7705         "main_method" to prevent a warning.
7706
7707         Remove a warning for unused field.
7708
7709 2006-12-28  Martin Baulig  <martin@ximian.com>
7710
7711         * debug-debugger.c
7712         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7713
7714 2006-12-22  Martin Baulig  <martin@ximian.com>
7715
7716         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7717         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7718         seperate `.mdb_debug_info' section, so we can access it from the
7719         debugger even if the binary is stripped.
7720
7721         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7722         from the `.mdb_debug_info' here to prevent the linker from
7723         removing that section.
7724
7725         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7726         mdb-debug-info64.s.
7727
7728 2006-12-19  Robert Jordan  <robertj@gmx.net>
7729
7730         * mini-x86: enable the code to return small structures in
7731         registers for FreeBSD as well. Fixes bug #80278.
7732         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7733
7734 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7735
7736         * mini-x86.c: align the stack when calling the profiler
7737         function instrumenting the prolog (on OSX).
7738
7739 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7740
7741         * mini.c: emit a break opcode where Debugger.Break () is called.
7742
7743 2006-12-13  Miguel de Icaza  <miguel@novell.com>
7744
7745         * mini.c (mono_method_to_ir): Provide useful information on this
7746         assert, to prevent others from debugging like I did.
7747
7748 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7749
7750         * mini.c: enable code which was incorrectly commented
7751         (bug #80235).
7752
7753 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7754
7755         * mini-x86.c: enable on OSX, too, the code to return small
7756         structures in registers.
7757
7758 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
7759
7760         * mini-x86.c: remove the use of the dynamic code manager here, too.
7761
7762 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
7763
7764         * mini.h, debug-debugger.c, tramp-*.c: fixed 
7765         mono_debugger_create_notification_function() to use
7766         mono_global_codeman_reserve () instead of a dynamic code manager.
7767
7768 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
7769
7770         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
7771         ves_array_element_address() jit icall and use a generated
7772         managed method instead (which is about 4 times faster for a rank 3
7773         array access).
7774
7775 2006-11-29  Mark Mason  <mason@broadcom.com>
7776
7777         * basic-calls.cs: additional tests for passing
7778         structures as function arguments.
7779
7780 2006-11-29  Mark Mason  <mason@broadcom.com>
7781
7782         * mini-mips.h: disable custom exception handling
7783         * mini-mips.c: throw/rethrow should use jalr to call
7784         exception stubs.  Fixed bug with passing structures
7785         by value. More support for tracing floating point
7786         functions.
7787
7788 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7789
7790         * mini.c: fixed typo in the soft-float ldind.r4 handling
7791         (bug #80086).
7792
7793 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7794
7795         * mini.c, mini.h, driver.c: added --runtime command line
7796         option to select a different runtime than the autodetected one.
7797         * jit.h: added API for embedders to initialize with a specific
7798         runtime version.
7799
7800 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
7801
7802         * mini.c: handle also boxing of r4 values (bug #80024).
7803
7804 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
7805
7806         * mini-ppc.c: force indirect calls until we reserve
7807         enough address space for all the generated code.
7808
7809 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
7810
7811         * exceptions-arm.c: workaround bugs in the libc definition
7812         of struct ucontext.
7813
7814 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
7815
7816         * inssel.brg: fixes from me and Mark Mason.
7817
7818 2006-11-23  Dick Porter  <dick@ximian.com>
7819
7820         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
7821         semaphore display now we've fixed the initial value
7822
7823 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7824
7825         * inssel.brg: partially revert the last change to fix the build.
7826
7827 2006-11-21  Mark Mason  <mason@broadcom.com>
7828
7829         * inssel.brg: Add and use compare-and-branch macros to support
7830         architectures that do not have condition code registers (ie. MIPS).
7831         * *-mips.{c,brg,md}: Fix copyright statements
7832
7833 2006-11-20  Mark Mason  <mason@broadcom.com>
7834
7835         * Makefile.am: remove mini-codegen.c from list of MIPS sources
7836         * mini.c: Allow GET_CONTEXT to be specified by the arch port
7837         * mini.h: Added declaration for mono_print_ins()
7838         * mini-codegen.c: added ins_spec initializer for MIPS
7839         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
7840         vreg to be virtual and hreg to be non-virtual.
7841         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
7842         is not yet working/implemented correctly.
7843         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
7844         non-static, fixup calls to print_ins() from other parts in the file.
7845
7846 2006-11-20  Mark Mason  <mason@broadcom.com>
7847
7848         * basic-calls.cs: added tests for passing structures as arguments
7849         to calls.
7850
7851 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
7852
7853         * inssel-long32.brg: optimize signed division by power of two.
7854
7855 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
7856
7857         * mini-arm.c: added support for interworking with thumb code
7858         (mono must be still be built using the ARM instruction encoding).
7859
7860 2006-11-19  Miguel de Icaza  <miguel@novell.com>
7861
7862         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
7863         verifier has different rules for it.   Fixes a few verifier issues
7864         in the test suite.
7865
7866         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
7867         at the end, so people know what happened.
7868
7869 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
7870
7871         * brach-opts.c: in optimize_exception_target() make sure we
7872         are in a catch clause (fixes bug #79871).
7873
7874 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7875
7876         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
7877         more soft-float support fixes.
7878
7879 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
7880
7881         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
7882         that are passed half on the stack and half in registers.
7883
7884 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
7885
7886         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
7887         more mips integration work from Mark E Mason 
7888         <mark.e.mason@broadcom.com>.
7889
7890 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
7891
7892         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
7893         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
7894         tramp-mips.c: added sources for the mips port, not
7895         integrated in the build yet. Contributed by
7896         Mark E Mason <mark.e.mason@broadcom.com>.
7897
7898 2006-11-14  Neale Ferguson <neale@sinenomine.net>
7899
7900         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
7901
7902 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
7903
7904         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
7905         put the soft-float rules in its own file since it seems to
7906         break s390 compilation.
7907
7908 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
7909
7910         * mini-arm.c: fixed wrnings.
7911
7912 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
7913
7914         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
7915         inssel-arm.brg: ARM support for soft-float.
7916
7917 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
7918
7919         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
7920         loads and stores of 32 bit fp values.
7921
7922 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
7923
7924         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
7925
7926         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
7927         works. Fixes #79852 and #79463.
7928
7929 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
7930
7931         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
7932         more soft-float support WIP and fixes.
7933
7934 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
7935
7936         * mini-arm.c: some VFP updates.
7937
7938 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
7939
7940         * mini-exceptions.c: 0 is a valid local var offset in some
7941         architectures, don't assert (bug #78508).
7942
7943 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
7944
7945         * exceptions-arm.c: fixed off by one error in stack walk code.
7946
7947 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
7948
7949         * mini.h, mini.c: more precise tracking of type load exceptions.
7950
7951 2006-11-03  Robert Jordan  <robertj@gmx.net>
7952
7953         * Makefile.am: [WIN32] Add monow.exe target.
7954         * driver.c: [WIN32] Don't detach the console when debugging.
7955         Fixes bug #79797.
7956         
7957 2006-10-30  Miguel de Icaza  <miguel@novell.com>
7958
7959         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
7960
7961 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
7962
7963         * aot-compiler.c (emit_method_info): Add a case missed earlier.
7964
7965         * driver.c (mini_regression): Fix --regression with AOT.
7966
7967         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
7968
7969 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
7970
7971         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
7972
7973         * mini-sparc.h: Don't use sigaction on sparc/linux.
7974
7975         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
7976
7977         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
7978
7979         * mini-exceptions.c: Add proper include files for getpid ().
7980
7981 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
7982
7983         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
7984         address instead of a MonoJitInfo* to avoid decoding the exception info for the
7985         method.
7986
7987         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
7988         name cache to reduce its size.
7989
7990         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
7991
7992 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
7993
7994         * mini-x86.c: Save/restore the current LMF structure more efficiently using
7995         the mono_lmf TLS variable.
7996
7997         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
7998         trampoline lmf frames.  
7999
8000         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
8001
8002 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
8003
8004         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
8005         the mono_lmf TLS variable.
8006
8007         * mini-exceptions.c: Access the LMF structure through accessors.
8008
8009         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
8010         variable instead of in jit_tls->lmf.
8011
8012         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
8013         
8014         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
8015         trampoline lmf frames.
8016
8017         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
8018
8019 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
8020
8021        * mini.c trace.c mini-x86.c: Revert these too.
8022         
8023        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
8024        signature change.
8025
8026 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
8027
8028         * genmdesc.c: removed now dead code.
8029
8030 2006-10-09  Robert Jordan <robertj@gmx.net>
8031
8032         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
8033
8034 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
8035
8036         * mini.h: do not leave gaps in the opcode values.
8037
8038 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
8039
8040         * jit-icalls.h: flag functions as internal here, too.
8041
8042 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
8043
8044         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
8045         functions with the internal attribute.
8046
8047 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
8048
8049         * aot-compiler.c: fclose the file descriptor in the profile read loop.
8050
8051 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
8052
8053         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
8054         for soft-float.
8055
8056 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
8057
8058         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
8059         tail calls as on other platforms.
8060
8061         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
8062
8063         * iltests.il: Add a few tailcall tests.
8064
8065 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8066
8067         * driver.c: fix loop for old compilers (bug #79521).
8068
8069 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
8070
8071         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
8072
8073         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
8074
8075         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
8076         metadata without any code.
8077
8078         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
8079         more precise debugging information using gdb.
8080
8081 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
8082
8083         * inssel-ia64.brg: Make the helper methods static.
8084
8085 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8086
8087         * inssel-x86.brg: make the helper methods static.
8088
8089 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
8090
8091         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
8092
8093 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8094
8095         * mini.c: updates for monoburg changes.
8096         * inssel.brg: make a few helper functions static as they should.
8097
8098 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
8099
8100         * Makefile.am: Move mini-codegen.c to common_sources.
8101
8102 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8103
8104         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
8105         instructions.
8106         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
8107         mini-ppc.h: port to use the common local register allocator.
8108
8109 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8110
8111         * mini.h: Remove the comment too then.
8112
8113 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
8114
8115         * mini.h: put back backend.data which is to be used shortly and
8116         doesn't increase the size of MonoInst. If any 64 bit arch aligned
8117         pointers on 4 byte boundaries it'd have much bigger issues running
8118         and you can ifdef it out anyway.
8119
8120 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8121
8122         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
8123         MonoInst size by 4 bytes on 64 bit machines.
8124
8125 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8126
8127         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
8128         replacement with more meaningful field names. Arch maintainers, please
8129         check the assigned names are good enough for your arch.
8130
8131 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8132
8133         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
8134         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
8135
8136 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8137
8138         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
8139         relocations and memory requirements, put the optimization flags
8140         definitions in their own file.
8141
8142 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
8143
8144         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
8145
8146         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
8147
8148 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
8149
8150         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
8151
8152 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
8153
8154         * inssel.brg: use the correct function to get the size of an item
8155         in an array, given an element class.
8156         * aot-compiler.c: do not access class->class_size directly.
8157
8158 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8159
8160         * mini.h, debug-mini.c: added a debugging function to print
8161         info about local variables and arguments in a jitted method.
8162
8163 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
8164
8165         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8166
8167         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
8168
8169 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8170
8171         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
8172         inner and outer loops when passing vtypes.
8173
8174 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
8175
8176         * mini-ppc.c: take into account the cpu errata for cache flushing
8177         which caused some random errors (bug #79381).
8178
8179 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8180
8181         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
8182         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
8183
8184 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
8185
8186         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
8187         loaded.
8188
8189         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
8190         freebsd ports tree.
8191
8192         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
8193         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
8194
8195         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
8196         displacement.
8197
8198 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
8199
8200         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
8201
8202 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
8203
8204         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
8205         macro does not have to be changed during debugging.
8206
8207         * 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>.
8208
8209         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
8210
8211         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
8212         
8213         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
8214         MONO_ARCH_NO_EMULATE_MUL is defined.
8215
8216         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
8217
8218         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
8219
8220         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
8221
8222         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
8223         
8224 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
8225
8226         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
8227         stuff to mini-exceptions.c where it is used.
8228
8229         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
8230         setup code, the real one is in mini-exceptions.c.
8231
8232         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
8233         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
8234         some changes from the freebsd ports tree.
8235
8236         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
8237         constants.
8238         
8239         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
8240
8241 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
8242
8243         * mini.c: on Linux, check for /proc to be mounted
8244         (bug# 79351, novell bug#201204).
8245
8246 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
8247
8248         * mini.c: handle cases where pthread_attr_getstack() behaves
8249         incorrectly (bug #78096).
8250
8251 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
8252
8253         * mini-arm.c: support larger stack frames (bug #79272).
8254
8255 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
8256
8257         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
8258
8259         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
8260         tokens.
8261
8262         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
8263         mono_class_from_name () to find a class from its name.
8264
8265         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
8266
8267 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
8268
8269         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
8270
8271 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
8272
8273         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
8274
8275 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
8276
8277         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
8278         callinfo->trampoline.
8279
8280         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
8281         fixes #79271.
8282         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
8283         future.
8284
8285 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
8286
8287         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
8288
8289 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
8290
8291         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
8292         stats.method_trampolines, it is already done by the generic trampoline code.
8293
8294         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
8295         
8296 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
8297
8298         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
8299
8300         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
8301
8302         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
8303
8304         * mini.c (print_jit_stats): Print mscorlib mempool size too.
8305         
8306         * mini.c (print_jit_stats): Print new stats.
8307
8308         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8309
8310 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
8311
8312         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
8313         Address on two dimensional arrays. Fixes #78729.
8314
8315         * mini.h (MonoCompile): Add a 'skip_visibility' field.
8316
8317         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
8318         a method.
8319
8320         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
8321
8322         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
8323         #79130.
8324         
8325         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
8326         a race condition.
8327         (mini_get_ldelema_ins): Ditto.
8328
8329 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
8330
8331         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
8332         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
8333         Fixes #79213.
8334
8335 2006-08-29 Neale Ferguson <neale@sinenomine.net>
8336
8337         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
8338         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
8339
8340         * exceptions-s390x.c: Cosmetic change.
8341
8342         * tramp-s390.c: Fix warning.
8343
8344         * cpu-s390.md: Correct length of mul_imm.
8345
8346 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8347
8348         * aot-compiler.c: added binary writer with ELF backend
8349         implementation (only on Linux/x86 for now).
8350
8351 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8352
8353         * Makefile.am: Don't run net 2.0 AOT tests.
8354
8355         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
8356         (mono_compile_assembly): Skip net 2.0 assemblies as well.
8357
8358         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
8359
8360 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8361
8362         * aot-compiler.c: simplified and refactored the asm-writing code
8363         to allow different backends.
8364
8365 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8366
8367         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8368
8369         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
8370         little. Share patches of type TYPE_FROM_HANDLE as well.
8371
8372         * mini.c (mono_patch_info_equal): New helper function.
8373         (mono_patch_info_hash): Ditto.
8374
8375         * aot-compiler.c (emit_method_code): Fix s390 build.
8376
8377         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
8378         is not handled because it is stored as a flag and not as a type ctor. Fixes
8379         #79016.
8380
8381 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
8382
8383         * aot-compiler.c: Fix computation of GOT slot statistics.
8384         
8385         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
8386         Also remove support for not PIC AOT.
8387
8388         * mini.h: Bump AOT file format version.
8389
8390         * objects.cs: Add a test for #78990.
8391
8392         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
8393         (peter.dettman@iinet.net.au). Fixes #79087.
8394
8395         * basic-long.cs: Add a test for the above.
8396
8397 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
8398
8399         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
8400         
8401         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
8402         code somewhat.
8403
8404 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
8405
8406         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
8407         exceptions.
8408
8409 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
8410
8411         * mini.c: Don't verify COM proxy invoke calls
8412         
8413
8414 2006-08-10  Dick Porter  <dick@ximian.com>
8415
8416         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
8417         which process is holding semaphores locked.
8418
8419 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
8420
8421         * mini-ia64.c mini-amd64.c: Fix #79027.
8422
8423         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
8424
8425         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
8426
8427         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
8428         implicit arguments in a vararg call. Fixes #79027.
8429
8430 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
8431
8432         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
8433         (mono_get_array_new_va_signature): Ditto.
8434
8435 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
8436
8437         * aot-runtime.c: Call init_plt lazily.
8438
8439         * inssel-long.brg: Fix unsigned long->int conversion.
8440
8441         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
8442
8443         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
8444         that most data is now in the .rss/.data section.
8445
8446 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
8447
8448         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
8449
8450         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
8451
8452         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
8453
8454         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
8455
8456         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
8457         virtual call. Fixes #79010.
8458
8459         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
8460         and use the result as the this argument in the real call.
8461
8462         * generics.2.cs: Add a new test for #79010.
8463         
8464 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
8465
8466         * mini-x86.c: Fix a warning.
8467
8468         * aot-compiler.c: Add a bunch of statistics.
8469
8470         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
8471
8472 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
8473
8474         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
8475
8476 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
8477
8478         * 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>.
8479
8480 2006-07-13  Miguel de Icaza  <miguel@novell.com>
8481
8482         * mini.c (mono_method_to_ir): Obtain the original method in the
8483         CIL stream and use this to perform validation.
8484
8485         Fixed: #78816
8486
8487 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
8488
8489         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
8490         (mono_arch_call_opcode): Ditto.
8491
8492         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
8493         #78826.
8494
8495         * mini.c (mono_patch_info_dup_mp): New helper function.
8496         
8497         * aot-compiler.c (compile_method): Fix some of the memory allocated during
8498         compilation. Fixes #78827.
8499
8500 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
8501
8502         * declsec.c: Use original security informations for
8503           MONO_WRAPPER_MANAGED_TO_MANAGED.
8504
8505 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
8506
8507         * mini.c: Allow Com Interop methods/classes and
8508         don't verify COM wrapper calls
8509         
8510
8511 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
8512
8513         * inssel-long32.brg: Fix long->i4 checked conversion.
8514
8515         * exceptions.cs: Add a test for the above.
8516
8517 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
8518
8519         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
8520
8521         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
8522         leaks.
8523
8524         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
8525         #78775.
8526
8527 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
8528
8529         * mini.c: Fix solaris/x86 exception handling.
8530
8531         * Makefile.am: Get rid of $(ICU_LIBS).
8532
8533 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
8534
8535         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
8536         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
8537         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
8538
8539         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
8540
8541         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
8542         this function causes a SIGSEGV.
8543
8544 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
8545
8546         * mini.c: Remove unused solaris/x86 includes.
8547
8548 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
8549
8550         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
8551
8552 2006-06-20  Jb Evain  <jbevain@gmail.com>
8553
8554         * cpu-g4.md: fix max length of start_handler instruction.
8555
8556 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
8557         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8558
8559 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
8560         * ssa.c: Fixed bug 78653 for SSA based deadce.
8561         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8562         MonoInst.flags, used in SSA based deadce.
8563         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8564         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8565
8566 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8567
8568         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8569         it can end up using non executable memory on ppc64 systems
8570         running ppc32 userspace (fix from Johannes Berg).
8571
8572 2006-06-14  Dick Porter  <dick@ximian.com>
8573
8574         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8575         4.1.1
8576
8577 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
8578         * mini.c: Made so that inline is locally disabled if it would
8579         trigger a .cctor, because too many apps depend on this behavior
8580         (which seems to be also the one of the MS CLR).
8581
8582 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
8583
8584         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8585         No idea why this worked before.
8586
8587         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8588         which branch to outer exception clauses since they could skip the
8589         inner finally clauses. Fixes #78633.
8590
8591         * exceptions.cs: Add a test for the above.
8592
8593         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8594         Fixes #78629.
8595
8596         * iltests.il: Add a test for the above.
8597
8598 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
8599
8600         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8601         after the end of a try bblock, to prevent asserts in mini_method_compile ().
8602
8603         * iltests.il: Add a test for the above.
8604
8605 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
8606
8607         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8608         
8609         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8610         methods as instrinsics.
8611
8612 2006-06-09  Wade Berrier <wberrier@novell.com>
8613
8614         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8615         (simple-cee-ops.h ssapre-mini-ops.h)
8616
8617 2006-06-09  Neale Ferguson <neale@sinenomine.net>
8618
8619         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8620         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8621         instruction).
8622         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8623         * cpu-s390x.md: Fix max. length values for a couple of instructions.
8624
8625 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
8626
8627         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8628
8629 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
8630
8631         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8632         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8633         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8634         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8635         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8636         of opcodes, so that bug 78549 should not happen again.
8637         * ssapre.c: Updated to use the renamed files.
8638
8639 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
8640
8641         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
8642         in OP_ATOMIC_EXCHANGE_I4.
8643
8644 2006-06-07  Wade Berrier <wberrier@novell.com>
8645
8646         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
8647         in mono_debugger_create_notification_function)
8648
8649 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
8650
8651         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8652         
8653         * mini.c (type_from_stack_type): Disable some changes which do not
8654         seem to work.
8655
8656         * driver.c: Reenable opts.
8657
8658         * mini.h (MonoStackSlot): New structure to keep track of the verification state
8659         of the evaluation stack.
8660         
8661         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8662         evaluation stack trace at entry to the bblock.
8663
8664         * mini.c (merge_stacks): New function to perform verification of stack merges.
8665         Turned off by default.
8666
8667         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8668         STACK_MP.
8669         
8670 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
8671
8672         * local-propagation.c: Fixed bug 78549.
8673
8674 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
8675
8676         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
8677
8678 2006-06-02  Miguel de Icaza  <miguel@novell.com>
8679
8680         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
8681         tramp-arm.c, tramp-ia64.c
8682         (mono_debugger_create_notification_function): Update signature to
8683         new signature and use new protocol for creating the notification
8684         function.  
8685
8686         Should fix the build.
8687
8688 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
8689
8690         * exceptions-ppc.c (mono_jit_walk_stack)
8691         (ves_icall_get_frame_info): Fix the build
8692
8693 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
8694
8695         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8696
8697 2006-05-31  Raja R Harinath  <rharinath@novell.com>
8698
8699         * il2tests.2.il: New file for generics CIL tests.  Add test for
8700         #78019.
8701         * Makefile.am: Update.
8702
8703         Fix #78019
8704         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8705         to nullable types.
8706
8707 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
8708
8709         * aliasing.c: Fixed bug 78311.
8710
8711 2006-05-29  Martin Baulig  <martin@ximian.com>
8712
8713         * mini-exceptions.c (mono_find_jit_info): When computing the
8714         native offset, check whether we're actually inside the method's
8715         code; call mono_debug_print_stack_frame() to format the frame.
8716         (ves_icall_System_Exception_get_trace): Call
8717         mono_debug_print_stack_frame() to format the stack frame.
8718         (ves_icall_get_trace): Update to the new debugging API.
8719         (mono_jit_walk_stack_from_ctx): Likewise.
8720         (ves_icall_get_frame_info): Likewise.
8721
8722         * mini.c (get_method_from_ip): Use the new debugging API.
8723         (mono_print_method_from_ip): Likewise.
8724
8725         * exceptions-ppc.c
8726         (mono_jit_walk_stack): Use the new debugging API.
8727         (ves_icall_get_frame_info): Likewise.   
8728
8729 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
8730
8731         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8732
8733 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
8734
8735         * mini.c: Added "limitator" to inline for debugging.
8736
8737 2006-05-24  Martin Baulig  <martin@ximian.com>
8738
8739         * debug-debugger.c (mono_debugger_init): Create a private,
8740         malloc()-based code manager for the notification function and
8741         intentionally leak it on exit.  This fixes the crash-on-exit race
8742         condition.
8743
8744         * tramp-amd64.c
8745         (mono_debugger_create_notification_function): Added
8746         `MonoCodeManager *' argument.
8747
8748         * tramp-x86.c
8749         (mono_debugger_create_notification_function): Added
8750         `MonoCodeManager *' argument.
8751
8752 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
8753
8754         * aliasing.c: Fixed 64 bit issue.
8755         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8756         default since all known bugs are fixed (one more time!).
8757
8758 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8759
8760         * mini.c: write barrier support.
8761
8762 2006-05-23  Martin Baulig  <martin@ximian.com>
8763
8764         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
8765         check at the top of the file.
8766
8767 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
8768
8769         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
8770         reverting changes without reason and without changelog entries.
8771
8772 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
8773
8774         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
8775         to a few opcodes. Fixes #78439.
8776
8777         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
8778         consistency with other archs.
8779
8780         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
8781
8782 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
8783
8784         * debug-debugger.c: fix the build.
8785
8786 2006-05-17  Martin Baulig  <martin@ximian.com>
8787
8788         * debug-debugger.c
8789         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
8790         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
8791         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
8792         (debugger_attach): Call GC_mono_debugger_add_all_threads().
8793
8794 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
8795
8796         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
8797
8798 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
8799
8800         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
8801         MONO_TYPE_GENERICINST.
8802         
8803         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
8804         MONO_TYPE_GENERICINST.
8805
8806 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
8807
8808         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
8809         #78325.
8810
8811 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
8812
8813         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
8814         mempool.
8815         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
8816
8817 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
8818
8819         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
8820         mono_trace_cleanup ().
8821
8822         * iltests.il: Fix problem with the newly added test.
8823
8824         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
8825         due to register constraints, free up the previous hreg. Fixes #78314.
8826
8827         * iltests.il: Add new test for #78314.  
8828
8829         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
8830         Interlocked.Add. Fixes #78312.
8831
8832         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
8833         
8834 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
8835
8836         * inssel.brg (mini_emit_virtual_call): Fix a warning.
8837
8838 2006-05-05  Martin Baulig  <martin@ximian.com>
8839
8840         * debug-mini.c (mono_debug_open_block): New method.
8841
8842         * mini-amd64.c
8843         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8844         the beginning of each basic block.
8845
8846         * mini-x86.c
8847         (mono_arch_output_basic_block): Call mono_debug_open_block() at
8848         the beginning of each basic block.
8849
8850 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8851
8852         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8853         default until I understand why they break the build on amd64.
8854
8855 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
8856
8857         * mini.c (mini_cleanup): Call mono_cleanup ().
8858
8859         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
8860         errors.
8861
8862 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
8863
8864         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
8865         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
8866         default since all known bugs are fixed, and I cannot reproduce bug
8867         77944... I'm asking Matt Hargett to test again after this commit.
8868
8869 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
8870
8871         * mini-codegen.c: Fixed typo that thrashed inline.
8872
8873 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
8874
8875         * dominators.c (compute_dominators): Avoid using a worklist since
8876         it is not correct in some cases. Instead, iterate over all bblocks as
8877         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
8878
8879 2006-04-28  Miguel de Icaza  <miguel@novell.com>
8880
8881         * mini.c (mono_jit_compile_method_inner): Use
8882         mono_prepare_exception_from_error that resets the value
8883         internally.
8884
8885 2006-04-27  Miguel de Icaza  <miguel@novell.com>
8886
8887         * mini.c: Move the mini_loader_error_to_exception to metadata. 
8888         
8889 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8890
8891         * aliasing.c: Fixed bug 78210.
8892
8893 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
8894
8895         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
8896         default until all their problems (or the ones they trigger) are fixed.
8897
8898 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
8899
8900         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
8901         
8902         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
8903         as loaded only after resolving patches since that could invoke the same method.
8904
8905         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
8906
8907         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
8908         functions.
8909
8910         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
8911         AOT loader.
8912
8913         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
8914         stack.
8915
8916         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
8917         made from AOT code through the PLT table.
8918
8919         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
8920         holding the plt offset when a call is made to the aot plt trampoline.
8921         
8922 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8923
8924         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
8925         amd64 AOT support.
8926
8927         * Makefile.am (common_sources): Fix build breakage.
8928
8929         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
8930         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
8931         intra-assembly calls if possible.
8932         
8933         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
8934
8935         * mini-trampolines.c: Handle PLT entries.
8936
8937         * mini.c: Avoid creating a GOT var for calls.
8938
8939         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
8940         from mscorlib code.
8941
8942         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
8943         from mscorlib code.
8944
8945         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
8946         AOT code.       
8947
8948         * mini.h: Bump AOT file format version.
8949         
8950         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
8951         covers more cases.
8952
8953 2006-04-25  Martin Baulig  <martin@ximian.com>
8954
8955         * driver.c: Disable copyprop, consprop and inline when running
8956         inside the debugger.
8957
8958 2006-04-25  Martin Baulig  <martin@ximian.com>
8959
8960         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
8961         with `get_current_thread' and added `detach'.
8962         (MonoDebuggerMetadataInfo): Added `thread_size',
8963         `thread_tid_offset', `thread_stack_ptr_offset' and
8964         `thread_end_stack_offset'.
8965
8966 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
8967
8968         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
8969         aot-runtime.c.
8970
8971         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
8972         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
8973
8974         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
8975
8976         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
8977
8978         * aot.c: Add support for ADJUSTED_IID.  
8979
8980 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
8981
8982         * aot.c (emit_method_order): Don't align method_order_end.
8983
8984         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
8985         the interface ID changes.
8986
8987 2006-04-21  Dick Porter  <dick@ximian.com>
8988
8989         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
8990         cleaning up a thread.  Fixes the new part of bug 77470.
8991
8992 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
8993
8994         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
8995         to managed wrapper.
8996                      
8997 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
8998
8999         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
9000         
9001         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
9002         SIGSEGV. Fixes #78072.
9003
9004         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
9005         unregister our SIGABRT handler.
9006
9007 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
9008
9009         * mini.c: Disabled inline where it can alter the call stack in a
9010         way visible from managed code.
9011         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
9012         default.
9013
9014 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
9015
9016         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
9017         on other platforms. Fixes #78089.
9018
9019 2006-04-13  Martin Baulig  <martin@ximian.com>
9020
9021         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
9022         determine whether we're inside the debugger.
9023
9024         * debug-debugger.h
9025         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
9026
9027 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
9028
9029         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
9030         handler clauses. Fixes #78024.
9031
9032         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
9033         in the CALL_MEMBASE opcodes. Fixes #78088.
9034         (mono_arch_get_vcall_slot_addr): Ditto.
9035
9036 2006-04-10  Martin Baulig  <martin@ximian.com>
9037
9038         * debug-debugger.c: The thread handling code has now been moved
9039         into ../metadata/threads.c.
9040
9041 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9042
9043         * driver.c (mono_main): Fix --with-gc=none build.
9044
9045         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
9046         (mono_spillvar_offset_float): Ditto.
9047         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
9048         hreg, not when its !global, since on ia64, there is a third category: stacked
9049         registers.      
9050
9051 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
9052
9053         * mini.c: set MonoInst->klass for load field address and a few other
9054         places.
9055
9056 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9057
9058         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
9059
9060 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
9061
9062         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
9063         the branch opt changes.
9064
9065 2006-04-06  Dick Porter  <dick@ximian.com>
9066
9067         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
9068         
9069         * wapihandles.c (mini_wapi_seminfo): 
9070         * driver.c (mono_main): Add semaphore info option
9071
9072 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
9073
9074         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
9075         branch optimization changes. Fixes #78009.
9076
9077 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9078
9079         * mini.c: ignore accessibility of methods in managed->native wrappers.
9080
9081 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
9082
9083         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
9084         
9085         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
9086
9087 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
9088
9089         * mini.c: Modify the branch optimizations to preserve the invariant that
9090         the entries inside the in_bb and out_bb arrays are unique.
9091         (mono_unlink_bblock): Avoid creation of new arrays.
9092
9093 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
9094
9095         * mini.c (mono_unlink_bblock): Fix regression caused by previous
9096         change (#77992).
9097
9098 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
9099
9100         * mini.c (optimize_branches): Remove the "optimizations" in
9101         the cbranch1/cbranch2 -> branch cases which were causing several
9102         problems in the past. Fixes #77986.
9103
9104 2006-03-31  Chris Toshok  <toshok@ximian.com>
9105
9106         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
9107         default optimizations :(
9108
9109 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
9110
9111         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
9112         branch.
9113
9114 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
9115
9116         * local-propagation.c: Added comments to structs and removed
9117         "Mono" prefixes from local tree mover types.
9118
9119 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
9120
9121         * Makefile.am (arch_sources): Define this for each architecture so 
9122         libmono_la_SOURCES is defined in one place.
9123
9124 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
9125
9126         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
9127         from handles/.
9128
9129 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
9130
9131         * driver.c: print the GC name supplied by configure.
9132
9133 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
9134
9135         * local-propagation.c: Added tree mover, and moved here all the
9136         local propagation code from mini.c
9137         * mini.c: Added support for treeprop, and moved all the local
9138         propagation code to local-propagation.c
9139         * mini.h: Added support for treeprop
9140         * driver.c: Added support for treeprop, enabled consprop, copyprop,
9141         treeprop, inline and deadce by default
9142         * Makefile.am: Added local-propagation.c
9143
9144 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
9145
9146         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
9147
9148 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
9149
9150         * debug-debugger.c: make it compile without the Boehm GC.
9151
9152 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9153
9154         * mini.c: fixed issue with mismatch when an icall is registered
9155         with multiple names but same address.
9156
9157 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9158
9159         * declsec.c, mini-exceptions.c: use write barrier to set reference
9160         fields of managed objects.
9161
9162 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9163
9164         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
9165         (can_access_internals): Fix a warning.
9166
9167         * mini.c (print_method_from_ip): Rename this to 
9168         mono_print_method_from_ip so it gets exported.
9169
9170         * trace.c: Deal with strings inside StringBuilder's containing garbage
9171         and fix memory leaks. Fixes #77848.
9172
9173 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9174
9175         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
9176         fixes #77787.
9177
9178 2006-03-16 Neale Ferguson <neale@sinenomine.net>
9179         
9180         * mini-s390.c: Remove OP_X86_TEST_NULL.
9181
9182 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9183
9184         * mini.c: use the correct GetHashCode() for the moving collector.
9185
9186 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
9187
9188         * liveness.c: Regalloc spill cost tuning.
9189
9190 2006-03-15 Neale Ferguson <neale@sinenomine.net>
9191         
9192         * mini-s390x.h: Correct S390_LONG macro.
9193
9194         * mini-s390x.c: Cleanup unused code.
9195
9196 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
9197
9198         * jit-icalls.h: New file.
9199
9200         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
9201         icalls and include that instead of including jit-icalls.c.
9202
9203         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
9204         OP_X86 opcodes.
9205
9206 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
9207
9208         * mini.c: when checking for member accessibility, also check for
9209         friend assemblies and for explicit interface implementations.
9210
9211 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
9212
9213         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
9214
9215         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
9216
9217         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9218         common cases are done first.    
9219
9220         * mini-ops.h: Only define platform specific opcodes on the given platform.
9221
9222         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
9223         branch.
9224         
9225 2006-03-14  Martin Baulig  <martin@ximian.com>
9226
9227         Revert Paolo's change from r57348:
9228
9229         * mini.h: don't use gboolean for bitfields.
9230         * mini.c: verifier changes for fields and methods accessibility.
9231
9232 2006-03-13  Neale Ferguson <neale@sinenomine.net>
9233
9234         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
9235
9236         * mini-s390x.c: Fix conv_r_un.
9237
9238         * cpu-s390, cpu-s390x.md: Fix lengths.
9239
9240 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9241
9242         * mini.c: nested types have access to all the nesting
9243         levels, not just the enclosing types.
9244
9245 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9246
9247         * mini.c: added a few more verification checks.
9248
9249 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
9250
9251         * liveness.c: Merge optimizations from the linear-il branch.
9252
9253 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9254
9255         * mini-ia64.c (emit_call): Add a comment.
9256
9257         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
9258
9259         * tramp-ia64.c: Fix some warnings.
9260
9261 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9262
9263         * mini.h: don't use gboolean for bitfields.
9264         * mini.c: verifier changes for fields and methods accessibility.
9265
9266 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9267
9268         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
9269         lazy icall wrapper changes.
9270
9271         * dominators.c: Replace all the dominator algorithms with faster
9272         ones from the linear-il branch.
9273
9274         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
9275         the mempool.
9276
9277         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9278         common cases are done first.
9279
9280         * mini-amd64.c: Fix some warnings.
9281
9282         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
9283         from the mempool.
9284
9285         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
9286         added code.
9287
9288         * mini.h: Add a missing prototype.
9289
9290 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
9291
9292         * mini.c: Compile icall wrappers lazily.
9293
9294         * mini-codegen.c: Use printf instead of g_print since its much faster.
9295
9296         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
9297         function.
9298
9299         * mini.c (optimize_branches): Cache the negative result from 
9300         remove_block_if_useless ().
9301
9302         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
9303         Also fix some bblock linking issues.
9304
9305         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
9306         assembly files.
9307
9308         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
9309
9310         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
9311         accessed fields first, for better cache behavior.
9312         
9313 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9314
9315         * mini.c: speedup IList<T> array accesses.
9316
9317 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
9318
9319         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
9320         inline_costs counter. Fixes #77190.
9321
9322 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
9323
9324         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
9325         trace messages. Fixes #77706.
9326
9327 2006-03-04  Martin Baulig  <martin@ximian.com>
9328
9329         * tramp-amd64.c, tramp-x86.c
9330         (mono_debugger_create_notification_function): Use
9331         mono_global_codeman_reserve() to allocate a buffer at runtime and
9332         return it.
9333
9334         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
9335
9336         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
9337         notification function at runtime and then call `initialize' in the
9338         `MONO_DEBUGGER__debugger_info' vtable.
9339
9340 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
9341
9342         * iltests.il: Fix a visibility problem.
9343
9344 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9345
9346         * driver.c, mini.c: add hooks for the counters API.
9347
9348 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9349
9350         * driver.c: show disabled options.
9351
9352 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9353
9354         * linear-scan.c: always use cost-driven selection.
9355
9356 2006-02-28  Raja R Harinath  <rharinath@novell.com>
9357
9358         * jit-icalls.c (helper_compile_generic_method): Revert change from
9359         2006-02-24.
9360
9361 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
9362
9363         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
9364
9365 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
9366
9367         * inssel.brg: style fixes, mostly to force the updated monoburg
9368         to run for people using svn.
9369
9370 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9371
9372         * mini.c: match monoburg changes.
9373
9374 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9375
9376         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
9377         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
9378         declaration in the header file.
9379
9380 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9381
9382         * helpers.c: reduce relocations and mem usage.
9383
9384 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9385
9386         * mini.h, mini-codegen.c: disable logging features if
9387         requested by configure.
9388
9389 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
9390
9391         * mini.c: tiny verifier changes.
9392
9393 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9394
9395         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
9396         cpu-pentium.md: stack alignment changes for osx/x86,
9397         partially from Geoff Norton <gnorton@customerdna.com>.
9398
9399 2006-02-24  Raja R Harinath  <harinath@gmail.com>
9400
9401         * jit-icalls.c (helper_compile_generic_method): Update to changes
9402         in metadata/class.c.
9403
9404 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
9405         
9406         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
9407         
9408         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
9409         interface calls with large offsets.
9410
9411 2006-02-23  Raja R Harinath  <rharinath@novell.com>
9412
9413         * jit-icalls.c (helper_compile_generic_method): Document the
9414         special-case we depend on so that we can inflate the method twice
9415         with the same context with no bad side-effects.
9416
9417 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9418
9419         * mini-x86.c, mini-amd64.c: fix for case when xen support
9420         is disabled.
9421
9422 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9423
9424         * mini-x86.c, mini-amd64.c: generate code to access tls items
9425         in a faster way for Xen systems.
9426
9427 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9428
9429         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
9430         updates and compilation fixes for the OSX/x86 port, mostly from
9431         Geoff Norton <gnorton@customerdna.com>.
9432
9433 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9434
9435         * inssel.brg: faster interface call implementation
9436         to sync with the interface_offsets MonoVTable changes.
9437
9438 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9439
9440         * mini.c: more verification checks.
9441
9442 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
9443
9444         * mini.c: added a few more verification checks.
9445
9446 2006-02-17      Neale Ferguson <neale@sinenomine.net>
9447
9448         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
9449         facility on the processor and use it if available.
9450
9451 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9452
9453         * driver.c, aot.c, mini.c: throw exception if the IL code is
9454         invalid or unverifiable.
9455
9456 2006-02-17  Raja R Harinath  <rharinath@novell.com>
9457
9458         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
9459         m.StructField.
9460
9461 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
9462
9463         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
9464
9465 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9466
9467         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
9468         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
9469         handling of instantiated generic valuetypes.
9470
9471 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
9472
9473         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
9474         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
9475         instead.
9476
9477         * generics.2.cs: Revert the nullable reftypes tests.
9478
9479 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
9480
9481         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
9482         using __builtin_frame_address (1) as it doesn't work in the presence
9483         of optimizations. Hopefully fixes #77273.
9484
9485         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
9486         -> generics.cs change as it doesn't work with some automake versions.
9487
9488 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9489
9490         * mini.c: handle systems that sue a different way to
9491         retrieve the stack address of the current thread.
9492
9493 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
9494
9495         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
9496         it specially in the makefile.
9497
9498         * generics.2.cs: Add tests for nullable reference types.
9499
9500 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9501
9502         * mini.c: always handle the case when mono_jit_init()
9503         is called in a thread different from the main thread,
9504         confusing libgc (bug #77309).
9505
9506 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
9507
9508         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
9509
9510 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9511
9512         * mini.c: change optimize_branches () to use a single loop
9513         and introduce a new optimization to simplify some range checks.
9514
9515 2006-02-03  Martin Baulig  <martin@ximian.com>
9516
9517         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
9518         and merged with debugger_thread_manager_add_thread().
9519         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
9520         inform the debugger about the main thread.
9521
9522 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9523
9524         * basic.cs: Add test for div.un/rem.un constant folding.
9525
9526 2006-02-03  Neale Ferguson <neale@sinenomine.net>
9527
9528         * cpu-s390x.md: correct int_xor_imm length
9529
9530 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9531
9532         * generics.2.cs: New test for #77442.
9533
9534         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
9535         #77442.
9536
9537 2006-02-02  Martin Baulig  <martin@ximian.com>
9538
9539         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
9540         <mono/metadata/mono-debug-debugger.h>   
9541
9542         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
9543
9544 2006-02-02  Martin Baulig  <martin@ximian.com>
9545
9546         * debug-debugger.h: New header file for debug-debugger.c.
9547
9548         * debug-debugger.c: Big API cleanup; don't run the managed Main()
9549         function is a separate thread anymore; add support for attaching.
9550
9551 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
9552
9553         * tramp-x86.c: Fix a warning.
9554
9555 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
9556
9557         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9558         on very large methods.
9559
9560         * aot.c (load_patch_info): Fix a warning.
9561
9562 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9563
9564         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9565         mini-ops.h: alu membase optimizations.
9566
9567 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9568
9569         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9570         to speedup StringBuilder.
9571
9572 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
9573
9574         * dominators.c (mono_compute_natural_loops): Fix detection of
9575         loop body start blocks.
9576
9577         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9578
9579 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
9580
9581         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9582         #75145.
9583
9584 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
9585
9586         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9587
9588 2006-01-25  Martin Baulig  <martin@ximian.com>
9589
9590         * debug-debugger.c: Moved the `MonoDebuggerManager' and
9591         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9592         started to cleanup this file a little bit.
9593
9594 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9595
9596         * mini.c: optimize a codepath frequently happening in generics code.
9597
9598 2006-01-23  Martin Baulig  <martin@ximian.com>
9599
9600         * Makefile.am: Only compile debug-debugger.c on supported platforms.
9601
9602         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9603         functions directly.
9604
9605         * driver.c: debug-debugger.c is only available if
9606         `MONO_DEBUGGER_SUPPORTED' is defined.   
9607
9608 2006-01-23  Martin Baulig  <martin@ximian.com>
9609
9610         * debug-debugger.c: Only enable this on platforms where the Mono
9611         Debugger is working (x86 and x86_64).
9612
9613 2006-01-21  Martin Baulig  <martin@ximian.com>
9614
9615         The Mono Debugger is now using the normal `mono' instead of the
9616         `mono-debugger-mini-wrapper' when executing managed code.
9617
9618         * debug-debugger.c: New file; previously known as
9619         debugger/wrapper/wrapper.c.
9620
9621         * debug-mini.c (mono_init_debugger): Removed.
9622
9623         * driver.c (mono_main): Added new `--inside-mdb' command line
9624         argument which is used when running inside the debugger.
9625
9626 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
9627
9628         * liveness.c (mono_analyze_liveness): Remove some unused data
9629         structures.
9630
9631 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
9632
9633         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9634
9635 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
9636
9637         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9638         depends on implementation details of monobitset.
9639
9640         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9641         Fixes #77271.
9642
9643 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
9644
9645         * liveness.c: Update after monobitset changes.
9646
9647 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
9648
9649         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9650
9651 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9652
9653         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9654
9655         * mini-s390x.c: Remove warning messages.
9656
9657 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
9658
9659         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9660
9661 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
9662
9663         * generics.2.cs: Add ldelem/stelem_any test.
9664
9665 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9666
9667         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9668
9669 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
9670
9671         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9672         
9673 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
9674
9675         * generics.2.cs: Reenable vtype tests.
9676
9677         * inssel-x86.brg: Remove an icorrect valuetype rule.
9678
9679 2006-01-06 Neale Ferguson <neale@sinenomine.net>
9680
9681         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
9682         initial support for OP_ABS.
9683
9684 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9685
9686         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9687
9688 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9689
9690         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
9691         conversion and implement LADD/LSUB.
9692
9693         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9694         architectures.
9695
9696 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9697
9698         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9699
9700         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9701         architectures.
9702
9703 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9704
9705         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
9706         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
9707         (stack walk problem).
9708
9709 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
9710
9711         * aot.c (mono_aot_load_method): Fix a warning.
9712
9713 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9714
9715         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9716
9717 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9718
9719         * iltests.il: Add test for #77148.
9720
9721         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9722         #77148.
9723
9724 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9725
9726         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9727
9728 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9729
9730         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9731         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9732
9733         * basic-long.cs: Add lconv-to-r4/r8 tests.
9734
9735 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9736
9737         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9738
9739         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9740         here as on other archs.
9741
9742 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9743
9744         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9745
9746 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9747
9748         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
9749         
9750         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
9751
9752         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
9753         instrument_prolog; Add memory_barrier instruction.
9754
9755 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
9756
9757         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
9758
9759 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
9760
9761         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
9762
9763         * aliasing.c inssel.brg: Fix warnings.
9764
9765         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
9766         could skip initialization of some parts of memory.
9767
9768         * mini.c mini-ia64.c: Fix warnings.
9769
9770         * inssel-sparc.brg: Add an implementation of lneg which actually works.
9771
9772 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
9773
9774         * aliasing.c (mono_build_aliasing_information): Add a workaround for
9775         a crash seen on sparc.
9776
9777         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
9778         
9779         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
9780
9781 2005-12-21 Neale Ferguson <neale@sinenomine.net>
9782
9783         * mini-ops.h: Add s390_backchain instruction
9784
9785         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
9786
9787         * cpu-s390.md: Add s390_backchain instruction
9788
9789         * mini-s390.c: Significant ABI changes
9790
9791         * mini-s390.h: Cater for zero length structures
9792
9793 2005-12-20 Neale Ferguson <neale@sinenomine.net>
9794
9795         * mini-s390.c: ABI fixes
9796
9797         * inssel-s390.brg: Remove debug statements
9798
9799         * cpu-s390.md: Fix length of ATOMIC_xx operations
9800
9801 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
9802
9803         * basic-float.cs: Add float<->long conversion tests.
9804
9805 2005-12-16 Neale Ferguson <neale@sinenomine.net>
9806
9807         * mini-s390.c: Fix LOCALLOC processing.
9808
9809         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
9810
9811 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
9812
9813         * iltests.il: Add tests for some opcodes not covered by the other
9814         tests.
9815
9816 2005-12-15 Neale Ferguson <neale@sinenomine.net>
9817
9818         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
9819         register loading for Tail processing; Correct trace output.
9820
9821         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
9822
9823         * cpu-s390.md: Correct size of jmp instruction. 
9824
9825 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9826
9827         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
9828
9829 2005-12-13 Neale Ferguson <neale@sinenomine.net>
9830
9831         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
9832           Bring s390 up to current level.
9833
9834 2005-12-12  Zltan Varga  <vargaz@gmail.com>
9835
9836         * generics.2.cs: Disable the newly added tests as they do not work yet.
9837         
9838         * generics.2.cs: Add valuetype tests.
9839
9840 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
9841
9842         * basic-long.cs: Add i4->u8 test.
9843
9844         * objects.cs: Add tests for JIT intrinsic.
9845
9846         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
9847         optimizations lost by a mistake.
9848
9849 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
9850
9851         * basic-long.cs: Remove a test moved to objects.cs.
9852
9853         * arrays.cs: Add more array tests.
9854
9855 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
9856
9857         * arrays.cs: Add new tests for multi-dimensional arrays.
9858
9859 2005-12-06  Raja R Harinath  <rharinath@novell.com>
9860
9861         * Makefile.am (test_sources2): Add generics.2.cs.
9862         (EXTRA_DIST): Add test_sources2.
9863
9864 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
9865
9866         Support for boxing and unboxing nullable types as well as the
9867         isinst operation on nullables, per the CLI ammendment.
9868
9869         * inssel.brg (CEE_ISINST): Special case for nullable
9870
9871         * mini.c (handle_unbox_nullable): new method
9872         (handle_box): Special case for nullable types
9873         (mono_method_to_ir): Call handle_unbox_nullable in correct
9874         places.
9875
9876         * generics.2.cs: New test suite
9877
9878         * Makefile.am: Support for regression tests with generics.
9879
9880 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
9881
9882         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
9883         allocated to registers. Fixes #76800.
9884
9885 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
9886
9887         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
9888
9889 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
9890
9891         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
9892         of platforms.
9893
9894 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
9895
9896         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
9897         objects.cs.
9898
9899         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
9900         
9901         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
9902 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
9903
9904         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
9905         single precision before storing to a single precision location.
9906
9907 2005-11-28  Raja R Harinath  <rharinath@novell.com>
9908
9909         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
9910
9911 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
9912
9913         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
9914         correct files.
9915
9916         * basic.cs: Remove test_0_byte_compares test which was moved to
9917         objects.cs a long time ago.
9918
9919 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
9920
9921         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9922
9923 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
9924
9925         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
9926         handlers are called.
9927
9928         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
9929         throwing code.
9930
9931          * mini-ia64.c: Add support for the throw->branch exception 
9932         optimization.   
9933
9934         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
9935
9936 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9937
9938         * mini.c: Enabled "fastpath" deadce :-)
9939         
9940 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
9941
9942         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
9943         alias analysis pass to support it.
9944         * mini.h: Likewise.
9945         * ssa.c: Likewise.
9946         * liveness.c: Likewise (liveness computation can use aliasing
9947         information to be more accurate).
9948         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
9949         moreover made so that "--compile-all" uses the given optimization
9950         flags and not the default ones.
9951         * aliasing.c: Alias analysis (new file).
9952         * aliasing.h: Likewise.
9953         * Makefile.am: added "aliasing.c" and "aliasing.h".
9954         
9955 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
9956
9957         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
9958         OP_L opcodes.
9959
9960 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
9961
9962         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
9963         fp >= end_of_stack exit condition, as it is not needed, and it might
9964         become true for fp eliminated frames.
9965
9966 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
9967
9968         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
9969         coded offsets.
9970
9971 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
9972
9973         * mini-arm.c: fixed alignment of doubles/longs to match
9974         the C ABI (bug #76635).
9975
9976 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
9977
9978         * aot.c: fix compilation with --enable-minimal=aot.
9979
9980 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
9981
9982         * mini-arm.c: fixed compatibility with the new
9983         floating point emulator package for compares.
9984
9985 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
9986
9987         * mini.c : reverted sig->pinvoke changes (r51396-51397).
9988
9989 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
9990
9991         * mini-exceptions.c (print_stack_frame): Output to stderr.
9992         (mono_handle_native_sigsegv): Ditto.
9993
9994 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
9995
9996         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
9997         OP_LCONV_TO_OVF_I implementation.
9998
9999         * mini-amd64.c: Add support for the throw->branch exception 
10000         optimization.
10001
10002         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
10003         when the catch clause catches a more general exception, i.e. Object.
10004
10005 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
10006
10007         * cpu-ia64.md: Remove unused opcodes.
10008
10009         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
10010         specific defines for architectures defining USE_SIGACTION.
10011
10012         * mini-ia64.c: Fix some warnings.
10013
10014         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
10015         version seemed to skip a frame.
10016
10017 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10018
10019         * mini.c: Clean up the usage of sig->pinvoke flag. Now
10020         only calls which are made to native code use this flag.
10021
10022 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
10023
10024         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
10025         varargs methods as well.
10026         
10027         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
10028         which have save_lmf set. Reorganize methods prologs a bit.
10029
10030         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
10031         debugger to the proper place.
10032
10033 2005-10-29  Martin Baulig  <martin@ximian.com>
10034
10035         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
10036         when running inside the debugger until the debugger has support
10037         for it.
10038
10039 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
10040
10041         * mini.h: Fix a warning.
10042
10043 2005-10-24  Miguel de Icaza  <miguel@novell.com>
10044
10045         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
10046         we expose publicly, this returns the string.
10047
10048 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
10049
10050         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
10051         with fp elimination.
10052
10053 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
10054
10055         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
10056         native stacktrace using the glibc 'backtrace' function if available.
10057
10058 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
10059
10060         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
10061
10062         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
10063         handle SIGSEGVs received while in native code.
10064
10065         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
10066         code, call mono_handle_native_sigsegv which will abort the runtime
10067         after printing some diagnostics, instead of converting it into a
10068         confusing NullReferenceException.
10069
10070 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
10071
10072         * cpu-pentium.md: Remove unused opcodes.
10073
10074 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
10075
10076         * mini-amd64.h (MonoLMF): Add rsp field.
10077
10078         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
10079         the lmf too.
10080
10081 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
10082
10083         * mini-codegen.c (get_register_spilling): Fix some warnings.
10084
10085 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
10086
10087         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
10088         elimination during exception handling. Enable fp elimination by
10089         default.
10090
10091         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
10092         elimination.
10093
10094 2005-10-16  Martin Baulig  <martin@ximian.com>
10095
10096         * mini-exceptions.c
10097         (mono_debugger_run_finally): New public method for the debugger.
10098
10099 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
10100
10101         * debug-mini.c (mono_debug_init_method): Fix warning.
10102
10103         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
10104         the 'exname' parameter const to fix some warnings.
10105
10106 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
10107
10108         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
10109         introduced by the previous patch.
10110
10111 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
10112
10113         * basic-float.cs: Add test for precision of float arithmetic.
10114
10115         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
10116         when loading/storing single values from/to memory.
10117
10118         * mini.c (mono_jit_compile_method_with_opt): Create the function
10119         pointers in the correct domain.
10120
10121 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
10122
10123         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
10124         introduced by previous patch.
10125         
10126         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
10127         when out_filter_idx is NULL.
10128
10129         * mini-exceptions.c: Don't run filter clauses twice during exception
10130         handling. Fixes #75755.
10131
10132 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
10133
10134         * aot.c: Add support for ldflda wrappers.
10135
10136         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
10137         #75902.
10138
10139 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
10140
10141         * mini.c, mini.h: do not consider exception handlers blocks when
10142         setting up interface variables.
10143
10144 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
10145
10146         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
10147
10148 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
10149
10150         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
10151         causes a regression.
10152
10153         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
10154
10155 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
10156
10157         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
10158         of the OP_P definitions.
10159
10160         * TODO: Add a proposal for dealing with the CEE/OP mess.
10161
10162         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
10163         optimizations from the x86 port.
10164
10165         * cpu-amd64.md: Ditto.
10166
10167         * basic.cs basic-long.cs: Add tests.
10168
10169 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
10170
10171         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
10172         Patrik Torstensson's implementation of my exception-handling
10173         optimization idea, when the exception object is not used
10174         (bug #62150).
10175
10176 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
10177
10178         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
10179         of the mul_imm optimizations from the old jit.
10180
10181 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
10182
10183         * mini.c, liveness.c: patch by Patrik Torstensson and
10184         Zoltan Varga to improve performance in methods with
10185         exception clauses.
10186
10187 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
10188
10189         * driver.c: Remove 'Globalization' entry from --version.
10190
10191 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
10192
10193         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
10194         there is a profiler interested in JIT events.
10195
10196         * aot.c: Load profile files produced by the AOT profiling module, and
10197         reorder methods based on the profiling info. Add a 'method_order' table
10198         to the AOT file to make mono_aot_find_jit_info work with the reordered
10199         methods.
10200
10201         * mini.h: Bump AOT file version info.
10202
10203 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
10204
10205         * mini-arm.h: work around what looks like a gcc bug when optimizations
10206         are enabled.
10207
10208 2005-09-28  Raja R Harinath  <rharinath@novell.com>
10209
10210         * Makefile.am (AM_CFLAGS): Don't use += to append inside
10211         conditionals.  Use ...
10212         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
10213
10214 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
10215
10216         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
10217         to determine the amount of memory to copy when passing valuetypes.
10218
10219         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
10220         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
10221
10222 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
10223
10224         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
10225         information about aot.
10226
10227 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
10228
10229         * *.c: Replace the use of {Enter,Leave}CriticalSection with
10230         macros. This will allow a deadlock debugger to easily be plugged
10231         in.
10232
10233 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
10234
10235         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
10236
10237 2005-09-27  Raja R Harinath  <rharinath@novell.com>
10238
10239         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
10240         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
10241         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
10242         ($(arch_built)) [CROSS_COMPILING]: Error out.
10243
10244 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
10245
10246         * aot.c: Add support for the no_special_static flag for classes.
10247
10248 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10249
10250         * Reapply reverted patches.
10251
10252         * *: Revert r50174 as well.
10253
10254         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
10255
10256 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10257
10258         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
10259
10260 2005-09-23  Miguel de Icaza  <miguel@novell.com>
10261
10262         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
10263         part of the SIG_HANDLER_SIGNATURE.  
10264
10265 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
10266
10267         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
10268         statistics.
10269
10270         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
10271         introduced by previous patch.
10272
10273 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
10274
10275         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
10276         saved registers too.
10277
10278         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
10279         upon the information returned by get_call_info ().
10280         
10281         * mini-x86.c (add_float): Fix stack size calculation.
10282         (mono_arch_call_opcode): Rewrite this so it works based up the
10283         information returned by get_call_info ().
10284         (mono_arch_get_this_vret_args): Ditto.
10285
10286 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
10287
10288         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
10289         in cinfo to determine the registers which need to be used.
10290
10291 2005-09-20  Miguel de Icaza  <miguel@novell.com>
10292
10293         * driver.c (mono_main): Add --server and --desktop flags. 
10294
10295 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
10296
10297         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
10298         registers as global registers.
10299
10300         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
10301         longer needed with the new register allocator.
10302
10303         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
10304
10305         * cpu-ia64.md: Remove unused opcodes.
10306         
10307         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
10308         
10309 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
10310
10311         * cpu-amd64.md: Remove unused opcodes.
10312
10313         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
10314         needed with the new register allocator.
10315
10316         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
10317         reg-reg moves.
10318
10319 2005-09-16  Raja R Harinath  <rharinath@novell.com>
10320
10321         * Makefile.am (check-local): Don't invoke semdel-wrapper.
10322
10323 2005-09-16  Martin Baulig  <martin@ximian.com>
10324
10325         * exceptions-amd64.c
10326         (throw_exception): Don't call mono_debugger_throw_exception() if
10327         we're a rethrow - see the FIXME in the code.
10328
10329 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
10330
10331         * mini.c (mono_init_exceptions): This only works on some architectures.
10332         
10333 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10334
10335         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
10336         on ia64.
10337
10338         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
10339
10340         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
10341         now in mini-exceptions.c.
10342
10343 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
10344
10345         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
10346         now in mini-exceptions.c.
10347
10348 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10349
10350         * exceptions-x86.c: Applied patch from Patrik Torstensson 
10351         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
10352
10353         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
10354         code into mini-exceptions.c. Add some assertions to it.
10355
10356 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
10357
10358         * aot.c (emit_section_change): Applied patch from "The Software Team" 
10359         (<software@solmersa.com>). Fix as errors on windows.
10360
10361 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10362
10363         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
10364         method info into the LMF.
10365
10366 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10367         
10368         * mini-ia64.c: Add proper unwind info for method epilogs.
10369
10370         * exceptions-ia64.c: Add some code to help debugging.
10371         
10372         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
10373
10374         * mini-exceptions.c: Fix warning.
10375
10376 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10377
10378         * mini.c: Really fix build.
10379
10380         * mini-x86.c mini-amd64.c: Fix build.
10381
10382 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10383
10384         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
10385
10386         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
10387         some Interlocked methods as intrinsics.
10388
10389         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
10390         for Thread methods as well.
10391
10392         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
10393
10394         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
10395
10396         * mini-ia64.c mini-x86.c mini-amd64.c 
10397         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
10398         OP_MEMORY_BARRIER.
10399         
10400         * mini.c (mono_init_exceptions): Fix build breakage.
10401
10402 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
10403
10404         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
10405         of instructions. Use the new ia64_unw_op macros for emitting unwind
10406         info.
10407
10408         * mini.c (mono_init_exceptions): Initialize exception handling
10409         related trampolines at startup.
10410
10411 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
10412
10413         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
10414
10415 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
10416
10417         * mini.c: Handle type loading errors gracefully during compilation and
10418         throw the appropriate exception.
10419
10420 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
10421
10422         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
10423         for the mono binary.
10424
10425 2005-09-09  Martin Baulig  <martin@ximian.com>
10426
10427         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
10428         the release.
10429
10430 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10431
10432         * mini-arm.h: use emulation for conv.r.un for the release.
10433
10434 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10435
10436         * mini-arm.c, objects.cs: more fixes and tests for them.
10437
10438 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10439
10440         * mini-arm.c: align structures to at least 4 bytes to be able
10441         to keep our current optimized memcpy.
10442
10443 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
10444
10445         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
10446
10447 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10448
10449         * mini.c: ignore SIGPIPE.
10450
10451 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
10452
10453         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
10454
10455         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
10456
10457 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
10458
10459         * mini.h: Add prototype for mono_allocate_stack_slots_full.
10460
10461 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10462
10463         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
10464         exception handling support.
10465         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
10466         patch by Brian Koropoff <briank@marakicorp.com>).
10467
10468 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
10469
10470         * mini.c: revert another 'optimization' which breaks when
10471         items on the eval stack need to be saved at a basic block end
10472         (bug #75940).
10473
10474 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10475
10476         * jit-icalls.c: for arrays, ensure we always provide
10477         lower bounds.
10478
10479 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
10480
10481         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
10482         
10483         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
10484
10485 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
10486
10487         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
10488         arguments in their original register.
10489
10490 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
10491
10492         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
10493         memset/memcpy.
10494
10495         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
10496         when ssapre is enabled.
10497
10498         * inssel-long.brg: Fix bug in previous patch.
10499
10500         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
10501         multiplication by a constant.
10502
10503 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
10504
10505         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
10506         icc.
10507
10508         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
10509         saving registers.
10510
10511 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
10512
10513         * inssel-arm.brg: apply changes tested by Brian Koropoff
10514         <briank@marakicorp.com>.
10515
10516 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
10517
10518         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
10519         
10520 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
10521
10522         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
10523         to the same register if dreg is just a base register.
10524         (print_ins): Improve printing of membase opcodes.
10525
10526         * inssel-x86.brg: Add optimized ldind(reg) rules.
10527
10528         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
10529
10530 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
10531
10532         * mini.c: when running under valgrind, set the stack bottom for
10533         the GC at the actual approximate stack for the app (fixes running
10534         mono with valgrind).
10535
10536 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
10537
10538         * mini.c: do no break at the first valuetype to init found
10539         (fixes bug #75791).
10540
10541 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
10542
10543         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
10544
10545 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
10546
10547         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
10548
10549 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
10550
10551         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
10552
10553 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10554
10555         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10556
10557         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10558         code.
10559
10560         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10561         code.
10562
10563         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10564         methods.
10565
10566 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10567
10568         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10569
10570 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10571
10572         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10573         in the tail recursion optimization.
10574
10575         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
10576         debug info into the assembly file.
10577
10578         * iltests.il: Add test for filter regions.
10579
10580         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10581         initial stack of filter regions. Fixes #75755.
10582
10583 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10584
10585         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10586         stack requirements.
10587
10588 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10589
10590         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10591         the check for an already compiled method on non-ia64 platforms.
10592         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10593         proper domain.
10594
10595         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10596
10597         * inssel-x86.brg: Add some optimized call rules.
10598
10599 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
10600
10601         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10602         method here.
10603
10604         * mini.h mini-trampolines.c: Pass the trampoline argument to 
10605         mono_arch_patch_delegate_trampoline.
10606
10607         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10608
10609         * mini-trampolines.c: Fix build.
10610
10611         * mini-amd64.h: Add delegate trampolines.
10612
10613         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10614
10615         * inssel-amd64.brg: Add optimized call rules.
10616         
10617         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10618
10619         * inssel-ia64.brg: Add optimized ldind(reg) rules.
10620
10621 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
10622
10623         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10624         change.
10625
10626         * mini-ia64.c: Remove LMF fixmes.
10627
10628         * mini-ia64.h: Remove most fields from LMF.
10629
10630         * inssel-ia64.brg (stmt): Fix unaligned access errors.
10631
10632         * mini-trampolines.c: Add support for IA64 function descriptors.
10633
10634         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10635         for IA64 function descriptors.
10636
10637 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10638
10639         * tramp-arm.c: patch the vtable for virtual calls. Added
10640         support code to register/unregister the LMF.
10641         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10642         more LMF work.
10643
10644 2005-08-19  Dick Porter  <dick@ximian.com>
10645
10646         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10647         bit value if needed.
10648
10649 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
10650
10651         * mini.c (mini_get_method): Move handling of wrapper data here.
10652
10653         * mini.c (mono_method_to_ir): Add support for dynamic methods.
10654
10655         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10656         virtual.
10657
10658         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
10659         bblock->code does not remain empty.
10660
10661 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
10662
10663         * arrays.cs: Add regression test for #75832.
10664
10665         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10666         rules. Fixes #75832.
10667
10668         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10669         instruction scheduling.
10670
10671 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
10672
10673         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
10674
10675 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
10676
10677         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
10678
10679         * mini-codegen.c: Fix VC build.
10680
10681         * cpu-pentium.md: Increase length of atomic_exhange_i4.
10682
10683 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10684
10685         * mini.h: fix signature for mono_register_opcode_emulation.
10686
10687 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
10688
10689         * mini.c: Get rid of most of the helper_sig_... constants using
10690         mono_create_icall_signature ().
10691
10692 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
10693
10694         * jit-icalls.c (helper_ldstr): New helper function.
10695
10696         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10697
10698         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10699         throw, load the string using a helper call instead of creating a string object.
10700
10701         * aot.c: Update after LDSTR changes.
10702
10703         * mini.h: Bump AOT file version.
10704         
10705         * aot.c: Save class size info into the AOT file. Print more statistics during
10706         compilation.
10707
10708         * mini.h: Bump AOT file version.
10709
10710         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10711         ordering of disasm cases. Fixes #74957.
10712
10713 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10714
10715         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10716         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10717         the generic code needed for the ARM port.
10718
10719 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10720
10721         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10722         inssel-arm.brg: more ARM features and fixes.
10723
10724 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10725
10726         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10727         ARM port work in progress.
10728
10729 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
10730
10731         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10732
10733         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10734
10735         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10736
10737         * inssel.brg (mini_emit_memset): Add support for unaligned access.
10738
10739         * *-ia64.*: Ongoing IA64 work.
10740         
10741         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10742
10743 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
10744
10745         * TODO: Remove out-of-data todo stuff.
10746
10747         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
10748         dead code.
10749
10750         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
10751
10752         * mini.h: Bump corlib version.
10753
10754 2005-07-27  Martin Baulig  <martin@ximian.com>
10755
10756         * mini-codegen.c
10757         (create_copy_ins): Added `const unsigned char *ip' argument; set
10758         `copy->cil_code' from it.
10759
10760 2005-07-27  Martin Baulig  <martin@ximian.com>
10761
10762         * mini-exceptions.c (mono_handle_exception): Don't call
10763         mono_debugger_handle_exception() for filters.
10764
10765 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
10766
10767         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
10768         as well.
10769
10770 2005-07-26  Martin Baulig  <martin@ximian.com>
10771
10772         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
10773
10774         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
10775         helper_compile_generic_method() if the method is actually virtual
10776         and non-final.
10777
10778 2005-07-26  Martin Baulig  <martin@ximian.com>
10779
10780         * mini.c
10781         (trampoline_code): Renamed to `mono_trampoline_code' and made it
10782         public; this is now accessed directly by the debugger.
10783         (mono_generic_trampoline_code): Removed.
10784
10785         * debug-mini.c
10786         (mono_debug_init_method): Also add interncalls and wrappers.
10787
10788 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
10789
10790         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
10791
10792 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
10793
10794         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
10795
10796 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
10797
10798         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
10799
10800 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10801
10802         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
10803         getting TLS offsets on AMD64 too.
10804
10805 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
10806
10807         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
10808
10809 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
10810
10811         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
10812         inssel-arm.brg, mini-arm.h: ARM port work in progress.
10813
10814 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
10815
10816         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
10817
10818         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
10819         to mini.c.
10820
10821         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
10822         mono_sparc_is_virtual_call ().
10823         
10824         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
10825
10826         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
10827         trampoline parameters.
10828
10829         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
10830         
10831         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
10832         to mono_arch_get_vcall_slot_addr.
10833
10834         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
10835         trampoline code.
10836
10837         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
10838
10839 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10840
10841         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
10842
10843 2005-07-19  Martin Baulig  <martin@ximian.com>
10844
10845         * exceptions-amd64.c (throw_exception): Call
10846         mono_debugger_throw_exception() here like we're doing it on i386.
10847
10848 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
10849
10850         * mini-ia64.c: Add optimized TLS access support.
10851
10852 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
10853
10854         * mini-exceptions.c: Ongoing IA64 work.
10855
10856         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
10857
10858         * mini.c: Use the default optimization set when embedding. Fixes
10859         #75194.
10860
10861 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
10862
10863         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
10864         of trampolines to a separate file.
10865
10866         * mini-trampolines.c: New file.
10867
10868         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
10869         separate file.
10870         
10871         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
10872         amd64/ia64 code.
10873
10874         * mini-codegen.c: Fix cygwin build.
10875
10876 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
10877
10878         * mini.c: Add some minor changes needed by the IA64 port.
10879
10880         * *-ia64.*: Ongoing IA64 work.
10881
10882 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
10883
10884         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
10885         trampolines into arch-independent and arch-dependent parts.
10886
10887         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
10888
10889 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
10890
10891         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
10892
10893         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
10894         the xp-regalloc-branch for amd64.
10895
10896         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
10897         xp-regalloc-branch for x86.
10898
10899 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
10900
10901         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
10902
10903 2005-07-06  Martin Baulig  <martin@ximian.com>
10904
10905         * mini.c
10906         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
10907         (mono_jit_runtime_invoke): Likewise.
10908
10909 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
10910
10911         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
10912         on x86 too.
10913         
10914         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
10915         without loading their metadata. Reorganize the file format so exception handling+
10916         debug info is kept separate from normal method info. Create MonoJitInfo 
10917         structures for methods lazily.
10918
10919         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
10920         loading metadata.
10921         (x86_class_init_trampoline): Patch AOT class init trampolines too.
10922
10923         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
10924
10925         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
10926         in AOT code.
10927
10928         * mini.h: Bump AOT file version.
10929
10930 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
10931
10932         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10933
10934 2005-07-01  Raja R Harinath  <rharinath@novell.com>
10935
10936         * Makefile.am (check-local): Call semdel-wrapper.
10937
10938 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
10939
10940         * mini-x86.c: Revert the last change as it seems to break the build..
10941
10942 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
10943
10944         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
10945         
10946         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
10947
10948 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
10949
10950         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
10951         outside of the macro, so strange stuff doesn't happen with gcc4
10952         (NEW_AOTCONST_TOKEN): Likewise.
10953
10954 2005-06-28  Martin Baulig  <martin@ximian.com>
10955
10956         * mini.c (mini_class_is_system_array): New static method; use this
10957         instead of `klass->parent == mono_defaults.array_class' everywhere
10958         since this also works for the new generic array class.
10959
10960 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
10961
10962         * inssel.brg: Remove warnings.
10963
10964 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
10965
10966         * mini-ia64.c: Ongoing IA64 work.
10967
10968         * basic-float.cs: Add float->i1 conversion test.
10969
10970         * iltests.il: Add conv.u4 test.
10971
10972 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
10973
10974         * inssel-long.brg: Fix bug caused by last change.
10975
10976 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
10977
10978         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
10979         BSDs.  Allows the x86 JIT to work on OSX86
10980
10981 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
10982
10983         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
10984         u4->i8 conversion.
10985
10986         * mini-ia64.c: Ongoing IA64 work.
10987
10988 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
10989
10990         * mini-ia64.c: Ongoing IA64 work.
10991
10992         * driver.c: Clean up jit_code_hash as well when using --regression.
10993
10994         * inssel-long.brg: Fix long->i4/u4 conversion rules.
10995
10996         * basic-long.cs: Add tests for long->u4 conversion.
10997
10998 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
10999
11000         * mini.c: Take mono_get_domainvar out of macros. This makes sure
11001         that we do not depend on undefined C behavior: the order stuff
11002         gets evaluated within an expression. Fixes mono when compiled on
11003         GCC 4.
11004
11005 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
11006
11007         * *-ia64.*: Ongoing IA64 work.
11008
11009         * aot.c: Lower memory usage while loading AOT methods.
11010
11011         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
11012
11013         * mini.h: Bump AOT file format version.
11014
11015 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
11016
11017         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
11018
11019 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
11020
11021         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
11022         not on callee assembly). Fixed some comments.
11023
11024 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
11025
11026         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
11027         it gets proper disassembly.
11028         (emit_method_info): Remove some dead code.
11029
11030         * mini.c (mini_method_compile): Allways allocate the GOT var in
11031         mono_method_to_ir for emulating opcodes.
11032
11033 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
11034
11035         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
11036         before freeing the code memory. Fixes #74990.
11037
11038         * objects.cs: Add regression test for #74992.
11039
11040         * liveness.c: Extend live ranges of arguments to the beginning of the
11041         method. Fixes #74992.
11042
11043         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
11044         so it points into the faulting instruction.
11045
11046 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
11047
11048         * jit-icalls.c (mono_imul_ovf): Add exception handling.
11049
11050         * *-ia64.*: Ongoing IA64 work.
11051
11052         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
11053
11054 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
11055
11056         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
11057
11058         * *-ia64.*: Ongoing IA64 work.
11059
11060 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
11061
11062         * basic-long.cs: Add tests for add/sub.ovf.
11063
11064         * basic.cs: Add tests for sub.ovf.
11065
11066         * *-ia64.*: Ongoing IA64 work.
11067
11068 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
11069
11070         * *-ia64.*: Ongoing IA64 work.
11071
11072         * basic.cs: Add conv.ovf.i4.un test.
11073
11074 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
11075
11076         * mini.c: (remove_block_if_useless) Fixed bug 75061.
11077         
11078 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11079
11080         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
11081
11082 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
11083
11084         * *-ia64.*: Ongoing IA64 work.
11085
11086 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11087
11088         * trace.[ch]:
11089         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
11090
11091 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
11092
11093         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
11094
11095 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
11096
11097         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
11098
11099         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
11100         of a call is callable by a near call.
11101
11102 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
11103
11104         * mini-ia64.c: Ongoing IA64 work.
11105
11106 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
11107
11108         * genmdesc.c: Make the generated array non-static.
11109
11110         * inssel-long.brg: Fix LSHR_IMM rule.
11111
11112         * *-ia64.*: Ongoing IA64 work.
11113
11114         * *-ia64.*: Ongoing IA64 work.
11115
11116 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11117
11118         * *-ia64.*: Ongoing IA64 work.
11119
11120         * *-ia64.*: Ongoing IA64 work.
11121         
11122         * mini-ia64.c: Ongoing IA64 work.
11123
11124         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
11125
11126 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11127
11128         * objects.cs basic-calls.cs: Move some tests to objects.cs.
11129         
11130         * objects.cs basic-long.cs: Move some tests to objects.cs.
11131
11132 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
11133
11134         * *-ia64.*: Ongoing IA64 work.
11135
11136         * iltests.il: Add a new test.
11137
11138         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
11139         newobj. Fixes #75042.
11140
11141 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
11142
11143         * *-ia64.*: Ongoing IA64 work.
11144         
11145         * *-ia64.*: Ongoing IA64 work.
11146         
11147         * *-ia64.*: Ongoing IA64 work.
11148
11149         * basic.cs objects.cs: Move tests accessing static variables as well.
11150
11151         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
11152
11153 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
11154
11155         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
11156
11157         * driver.c: Always print failed tests.
11158
11159         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
11160         frame pointer.
11161
11162         * *ia64*: Ongoing IA64 work.
11163
11164 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
11165
11166         * basic.cs: Add tests for add.ovf. Fix warnings.
11167
11168 2005-05-18  Miguel de Icaza  <miguel@novell.com>
11169
11170         * driver.c (mono_main): Avoid crash if no argument is passed to
11171         --break;  Do not use g_error, but f_printf.   And fix all other
11172         ocurrences of the same crash.
11173
11174 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
11175
11176         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
11177         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
11178         Fixes #74742.
11179
11180 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
11181
11182         * *-ia64.*: Add beginnings of IA64 backend.
11183
11184         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
11185
11186 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
11187
11188         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
11189         Fixes #74925.
11190
11191         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
11192
11193         * mini-amd64.c: Fix a warning.
11194
11195 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
11196
11197         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
11198         in float_neg. Fixes #74897.
11199
11200         * mini-amd64.c (emit_call): Fix another near call bug.
11201
11202 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
11203
11204         * declsec.c: Keep the appdomain information in the structure. Added a 
11205         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
11206         value gets overwritten).
11207         * declsec.h: Set the default MonoArray for the the stack to 6. Added
11208         an MonoAppDomain member to MonoSecurityFrame.
11209         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
11210         used in the stack walk. Now use a MonoArray which grow (double) when
11211         it gets full.
11212
11213 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
11214
11215         * mini.c: Re-enabled runtime cleanup, since running threads should
11216         now properly stop when exiting.
11217
11218 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
11219
11220         * mini-codegen.c: New file contaning the arch-independent local
11221         register allocator. Not used by any architectures yet.
11222
11223         * mini.h linear-scan.c: Merge some changes from the 
11224         mini-xp-local-regalloc branch.
11225
11226 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
11227
11228         * mini-amd64.c (emit_call): Fix calls to native functions when the
11229         runtime is compiled as a shared library. Fixes #74756.
11230
11231         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
11232         on a literal field. Fixes #74751.
11233
11234 2005-04-25  Raja R Harinath  <rharinath@novell.com>
11235
11236         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
11237
11238 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
11239
11240         * objects.cs: Add missing null casting test.
11241
11242 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
11243
11244         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
11245         in wrapper methods. Also rename 'address' variable to 'offset'.
11246
11247 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
11248
11249         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
11250         warnings.
11251         
11252         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
11253
11254         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
11255         work on windows.
11256
11257 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11258
11259         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
11260
11261 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11262
11263         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
11264         just the last bytes.
11265
11266 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11267
11268         * aot.c (mono_compile_assembly): Fix warning.
11269
11270         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
11271         by the _MSC_VER stuff.
11272
11273 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
11274
11275         * inssel-long.brg: Fix #74588.
11276
11277         * cpu-amd64.md: Fix #74591.
11278
11279         * iltests.il: Add new regression tests.
11280
11281 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
11282
11283         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
11284         valuetype.
11285
11286 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
11287
11288         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
11289
11290         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
11291         from Bill Middleton <flashdict@gmail.com>.
11292
11293 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
11294
11295         * arrays.cs: Add new regression test. Fix warnings.
11296
11297 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
11298
11299         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
11300         and leakage in CKFINITE.
11301
11302         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
11303         this to a null op since it is called on amd64 too.
11304
11305         * exceptions-amd64.c (get_throw_trampoline): Align stack.
11306
11307         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
11308         body since this is not used on amd64.
11309         
11310         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
11311
11312         * mini-amd64.c: Remove obsolete fixmes.
11313
11314         * mini.c (print_method_from_ip): Fix debugging support.
11315
11316 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11317
11318         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
11319         so that expressions that don't give much gain are not reduced.
11320         * ssapre.h: Likewise.
11321
11322 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
11323
11324         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
11325
11326         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
11327
11328         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
11329
11330 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
11331
11332         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
11333
11334         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
11335
11336 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
11337
11338         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
11339         stack touching.
11340
11341         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
11342
11343         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
11344
11345         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
11346
11347         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
11348         MONO_ARCH_USE_SIGACTION. Fixes #74252.
11349
11350         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
11351
11352         * mini-x86.c: Fix up stack overflow handling.   
11353
11354         * exceptions.cs: Add new regression test.
11355
11356 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
11357
11358         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
11359         mono_jit_thread_attach.
11360
11361         * mini.c (mono_method_to_ir): Verify called method is not abstract.
11362
11363 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11364
11365         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
11366         avoid calling constructors using callvirt.
11367
11368         * inssel.brg: Fix #74073.
11369
11370 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
11371
11372         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
11373         compilation with non-GCC compilers.
11374         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
11375         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
11376
11377 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
11378
11379         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
11380         klass->interface_offsets (will likely fix bug#74073).
11381
11382 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11383
11384         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
11385
11386 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
11387
11388         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
11389         to amd64_div_reg_size ().
11390         
11391         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
11392
11393 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
11394
11395         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
11396
11397 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11398
11399         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
11400
11401 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11402
11403         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
11404         
11405         * mini.c (mono_precompile_assembly): Load and precompile referenced
11406         assemblies as well. Fixes #74015.
11407
11408 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
11409
11410         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
11411
11412 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
11413
11414         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
11415         a lot of checks and (anyway) permissions cannot work until corlib is 
11416         loaded.
11417
11418 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
11419
11420         * mini-ppc.c: fixed ABI issue on sysv/ppc.
11421
11422 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
11423
11424         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
11425         calls (fixes bug#72824).
11426
11427 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11428
11429         * mini.c: fix tail recursion elimination (see test in bug#73936).
11430
11431 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
11432
11433         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
11434         some fp functions in sse2 mode.
11435
11436 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
11437
11438         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
11439
11440 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
11441
11442         * mini.h mini.c: Add mono_get_jit_tls_key ().
11443
11444         * mini-x86.c: Enable fast TLS support on windows.
11445
11446 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
11447
11448         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
11449         * mini.c: Check for p/invoke method when generating code. If a
11450         p/invoke method, or it's class, isn't decorated with [Suppress
11451         UnmanagedCodeSecurity] then generate code to call System.Security.
11452         UnmanagedDemand (only if the security manager is active).
11453
11454 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11455
11456         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
11457         last change as it seems to cause strange crashes.
11458         
11459 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11460
11461         * *.c: handle unsafe function pointers where needed.
11462
11463 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11464
11465         * mini.c (mono_jit_free_method): Remove the fixme too.
11466
11467 2005-03-15  Miguel de Icaza  <miguel@novell.com>
11468
11469         * mini.c: As discussed, make the code actually free the delegate
11470         thunk now, to enable the debugging of delegate problems, use
11471         MONO_DEBUG=1 when running Mono. 
11472
11473         This takes also care of parts of the leaks as seen by Joe.
11474
11475 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
11476
11477         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
11478         thread_tls_offset calculation.
11479
11480 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
11481
11482         * declsec.c: Reworked linkdemand checks for icall. The previous code
11483         was using the declaration code (untrusted) and didn't work as expected
11484         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
11485         specific case.
11486
11487 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
11488
11489         * iltests.il: Add new localloc test.
11490
11491         * mini-amd64.c: Handle large stack allocations the same way as on
11492         windows if stack overflow handling is working.
11493         
11494         * mini-amd64.c: Allocate the signal stack using mmap.
11495
11496         * mini.c (sigsegv_signal_handler): Fix reading of context.
11497
11498         * mini-exceptions.c: Fix up stack overflow handling.
11499
11500         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
11501
11502         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
11503
11504         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
11505
11506         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
11507
11508         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
11509         tramp_init functions as they are no longer needed.
11510
11511 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
11512
11513         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
11514         
11515         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
11516
11517         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
11518         
11519         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
11520         support that now.
11521
11522         * mini-ops.h: Add OP_LMUL_IMM.
11523
11524         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
11525         long mul/div opcodes as intrinsic.
11526
11527         * mini-amd64.c (emit_call): Handle the case when the callee might be
11528         an AOT method.
11529
11530 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
11531
11532         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
11533         extra safe.
11534         
11535         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
11536
11537         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
11538
11539 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
11540
11541         * mini.c (mono_codegen): Don't leak here, to help people running
11542         monogrind.
11543
11544 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
11545
11546         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
11547         conversions in sse2 mode.
11548
11549         * basic-float.cs: Add regression test.
11550         
11551         * mini-amd64.c: Reenable sse2.
11552
11553 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11554
11555         * mini-amd64.c: Disable sse2 until some regressions are fixed.
11556
11557 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
11558
11559         * driver.c: Copyright text should include 2005.
11560         
11561 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11562
11563         * cpu-amd64.md (load_membase): Fix more max lengths.
11564
11565 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
11566
11567         * cpu-amd64.md (load_membase): Fix max length.
11568
11569         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11570
11571         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11572
11573         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11574         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11575
11576         * basic-float.cs: Add rounding regression test.
11577
11578         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11579
11580 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
11581
11582         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11583         structures in registers for pinvoke wrappers.
11584
11585 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
11586
11587         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11588
11589 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
11590
11591         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11592         wrapper to mono_jit_thread_attach.
11593
11594         * mini.c (mini_jit_thread_attach): New jit icall.
11595
11596         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
11597         native->managed wrappers.
11598
11599         * exceptions.cs: Add new regression test.
11600
11601         * mini.c (optimize_branches): Check regions in the cbranch to throw
11602         block case as well. Fixes #73242.
11603
11604 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11605
11606         * mini.c: thread safety fixes.
11607
11608 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
11609
11610         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11611         patching stuff, since delegates use jump trampolines so there is
11612         no caller.
11613
11614         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
11615         jump trampolines.
11616         
11617         * tramp-amd64.c: Fix build.
11618
11619         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11620         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11621
11622         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11623         Rename this to mono_arch....
11624         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11625
11626         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11627
11628         * mini-amd64.c (emit_call): If both the caller and the callee is
11629         guaranteed to have 32 bit addresses, emit a normal call.
11630
11631         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11632
11633         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
11634         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11635         method_ptr inside delegates.
11636
11637 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
11638
11639         * mini.c (mono_jit_free_method): Free the method info even if the native code is
11640         invalidated. Fixes #73001.
11641
11642         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11643
11644         * mini-x86.c: Only use stdcall for pinvokes on windows.
11645
11646 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11647
11648         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11649         * mini-x86.c: remove unreliable __thread var offset detection,
11650         use the correct accessors and enable by default.
11651
11652 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
11653
11654         * mini.c (mono_jit_free_method): Fix memory leak.
11655
11656 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
11657
11658         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
11659
11660 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
11661
11662         * cpu-amd64.md: Fix lengths of atomic opcodes.
11663
11664 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11665
11666         * driver.c: try to not imply using ICU is any good.
11667
11668 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
11669
11670         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
11671         functions as inline ops.
11672
11673         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11674         some Interlocked functions as inline ops.
11675
11676         * mini.c (move_basic_block_to_end): Fix bug in last patch.
11677
11678         * mini.h (MonoBasicBlock): Reorganize fields a bit.
11679
11680         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
11681
11682         * mini.c: Add support for OP_NOT_TAKEN.
11683
11684         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
11685         structures in registers for pinvoke wrappers.
11686
11687         * mini-amd64.c: Fix warnings.
11688
11689 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
11690
11691         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11692
11693         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11694
11695         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
11696         address instead of loading the address from it.
11697
11698         * mini-x86.c: Add support for returning small structs in registers
11699         on Win32. Fixes part of #70864.
11700         
11701 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
11702
11703         * trace.c (get_token): Improve error checking.
11704
11705 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
11706
11707         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11708
11709 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
11710  
11711         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11712         it can be reused for MonoClass.
11713         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11714         _LINKDEMAND.
11715
11716 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
11717
11718         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
11719         instead of a MonoReflectionMethod. The method information wasn't used
11720         when displaying SecurityException details (but will be now).
11721
11722 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
11723
11724         * Makefile.am : windows build fix.
11725
11726 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
11727
11728         * iltests.il: Add new regression test.
11729
11730         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11731         #72522.
11732
11733 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
11734  
11735         * mini.c: Moved linkdemand check into helper function check_linkdemand
11736         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
11737         LDFTN, LDVIRTFTN).
11738
11739 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
11740
11741         * declsec.c: Added statistics counter for different kinds of 
11742         LinkDemands.
11743         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11744         (and commented) declaration.
11745         * mini.c: Added statistics counter for security Demand code 
11746         generation. Added display of security statistics.
11747
11748 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
11749
11750         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
11751         Fix compilation errors under gcc-2.95.
11752
11753 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
11754
11755         * mini.c, driver.c: Use the new jit trampoline hashtable
11756
11757 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11758
11759         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
11760
11761 2005-02-11  Martin Baulig  <martin@ximian.com>
11762
11763         * debug-mini.c (mono_debug_close_method): Free the line number array.
11764
11765 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11766
11767         * aot.c: Break up large methods into smaller ones. Share GOT slots for
11768         icalls.
11769
11770         * mini.h: Bump AOT file format version. 
11771
11772 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
11773
11774         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
11775         APTC and P/Invoke.
11776         * declsec.h: Added macros to get/set lazyly initialized security 
11777         informations about assemblies. Added new enum for different type of
11778         possible LinkDemand violation. Added function to check LinkDemands.
11779         * mini.h: Added a field to MonoCompile to hold any security violation
11780         detected when JITting a method (so it can be thrown later).
11781         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
11782         and CEE_CALLVIRT. Added code to throw exception at the end of
11783         mini_method_compile (note: the exception is unhandled right now).
11784
11785 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
11786
11787         * mini.c, jit-icalls.c: use the managed implementation of
11788         memset for initobj and memset, to avoid managed <-> unmanaged
11789         transitions.
11790
11791 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
11792
11793         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
11794         optimization if it would need a GOT var.
11795
11796         * basic.cs: Add tests for constant propagation and switch statements.
11797
11798         * ssa.c: Fix out-of-range constant propagation and switch statements.
11799
11800 2005-02-09    <vargaz@freemail.hu>
11801
11802         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
11803
11804 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
11805
11806         * cpu-amd64.md (load_membase): Fix max length of load_membase.
11807
11808 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11809
11810         * mini.c: update to new signature of mono_class_get_allocation_ftn().
11811
11812 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
11813
11814         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
11815         arithmetic operations.
11816
11817 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
11818
11819         * mini-ppc.c: add a workaround for broken user code that
11820         DllImports vararg functions with non-vararg signatures.
11821
11822 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
11823
11824         * mini.c (mono_jit_compile_method_inner): Add detection and a 
11825         meaningfull error message for assemblies written in Managed C++.
11826
11827         * tramp-amd64.c mini-amd64.h: Add support for 
11828         create_trampoline_from_token ().
11829
11830         * aot.c mini-x86.c abcremoval.c: Applied patch from
11831         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
11832
11833 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
11834
11835         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
11836         which takes a MonoImage/token as parameter instead of a MonoMethod.
11837
11838         * aot.c: Use the new trampoline for initializing vtables.
11839
11840         * aot.c: Add support for ldfld/stfld_remote wrappers.
11841
11842         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
11843         rules for compare <MEM>, IMM.
11844
11845         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
11846
11847         * aot.c: Handle inherited finalizers correctly.
11848
11849 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
11850
11851         * inssel.brg (stmt): Add a missing _setup_... ().
11852
11853         * aot.c: Save some parts of the class state to the AOT file and use it
11854         to recompute that state when a class is initialized.
11855
11856         * mini.c: Install AOT hooks into the runtime.
11857
11858         * mini.h: Bump AOT file format version.
11859         
11860         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
11861         Fixes #72148.
11862
11863         * iltests.il: Add new test.
11864
11865 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
11866
11867         * mini.c: fix typo.
11868
11869 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
11870
11871         * mini.c: setup the statistical profiler in the thread attach
11872         callback to cope with the new single thread code.
11873
11874 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
11875
11876         * mini-ppc.c: ensure we have enough room for the profiler
11877         calls (fixed bug#72084).
11878
11879 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
11880
11881         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
11882         it.
11883
11884 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11885
11886         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
11887
11888 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11889
11890         * ssapre.c: Fixed an issue with down safety (this allows IronPython
11891         to succesfully execute parrotbench).
11892         * ssapre.h: Likewise.
11893
11894 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11895
11896         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
11897         variable for stores to method arguments (fixes a SSAPRE issue).
11898
11899 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11900
11901         * mini.c: handle value types in dup, fixes gen-112.cs.
11902
11903 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
11904
11905         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
11906         sequence for calls in dynamic methods to avoid thunks.
11907
11908 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
11909
11910         * mini.c: correctly remove dynamic methods from the hashtable.
11911
11912 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
11913
11914         * driver.c: Disabled SSAPRE until fix the bug that appears
11915         in IronPython's parrotbench.
11916
11917 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
11918
11919         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
11920
11921         * mini.c (mono_method_to_ir): Revert the previous change.
11922         
11923         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
11924         when AOT compiling.
11925
11926         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
11927         mono_jit_info_table_find () etc. when running under valgrind.
11928
11929         * inssel.brg: Fix warnings.
11930
11931         * mini-exceptions.c: Fix warnings.
11932
11933 2005-01-31  Martin Baulig  <martin@ximian.com>
11934
11935         * driver.c (compile_all_methods_thread_main): Don't try to compile
11936         generic methods or anything which has type parameters.
11937
11938 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
11939
11940         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
11941
11942         * TestDriver.cs: Add --verbose flags.
11943
11944         * graph.c ssa.c: Fix 64 bit warnings.
11945         
11946         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
11947         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
11948         Fix 64 bit warnings.
11949
11950         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
11951         variable not spotted by gcc.
11952         
11953         * mini-amd64.c inssel-amd64.brg: Applied patch from  
11954         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
11955         X86_COMPARE_MEMBASE opcodes.
11956
11957         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
11958
11959 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
11960
11961         * *: MonoMethod->signature might be NULL now. You *MUST* use
11962         mono_method_signature.
11963
11964 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11965
11966         * driver.c (compile_all_methods_thread_main): Compile the methods
11967         without invoking cctors.
11968
11969 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
11970
11971         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
11972         * basic-calls.cs: test for the above.
11973
11974 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
11975
11976         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
11977         MonoJitInfo changes.
11978
11979 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
11980
11981         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
11982         eagerly if it contains dynamic methods.
11983         
11984         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
11985
11986         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
11987         trace, it is now computed by an icall from trace_ips.
11988         
11989         * mini-exceptions.c: Fix a warning.
11990
11991 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
11992
11993         * mini-exceptions.c: don't bother getting stack trace info if
11994         it's not going to be used.
11995
11996 2005-01-27  Raja R Harinath  <rharinath@novell.com>
11997
11998         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
11999         ssapre-mini-ops.h.
12000
12001 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
12002
12003         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
12004
12005         * aot.c: Avoid calling mono_method_get_header () if not needed.
12006
12007         * mini.h: Bump AOT file format version.
12008         
12009         * mini.c (mono_emit_native_call): Allocate a GOT var here.
12010
12011         * mini.c (mono_print_tree): Print more info for calls.
12012
12013 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
12014
12015         * declsec.h: Remove warning by adding missing include for marshal.h
12016
12017 2005-01-26  Martin Baulig  <martin@ximian.com>
12018
12019         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
12020         `ip' twice.
12021
12022 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
12023
12024         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
12025         flags.
12026
12027         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
12028
12029         * aot.c (mono_compile_assembly): Fix a warning.
12030
12031 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
12032
12033         * declsec.c: Look for security attributes on the original MonoMethod 
12034         (and not the wrapped one). This fix permissions on icalls.
12035
12036 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12037
12038         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12039
12040         * mini.c (mono_allocate_stack_slots): Add a fixme.
12041
12042         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12043
12044 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12045
12046         * inssel.brg: optimize casts of sealed types (more
12047         optimizations waiting for fixes in remoting).
12048
12049 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12050
12051         * inssel.brg (stmt): Add another dummy rule.
12052
12053         * driver.c: Fix warnings.
12054
12055         * driver.c (mono_main): If running under valgrind, instruct glib to use
12056         the system allocation functions so valgrind can track the memory
12057         allocated by the g_... functions.
12058
12059         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
12060
12061         * mini-ops.h: Add OP_DUMMY_STORE opcode.
12062
12063         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
12064
12065         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
12066         variables in try regions.
12067
12068         * mini.c (mini_method_compile): Don't disable optimizations on large
12069         methods when AOT compiling.
12070
12071         * mini.c (mono_allocate_stack_slots): New arch independent method to 
12072         allocate stack slots. Not yet used.
12073
12074 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
12075
12076         * debug-mini.c (mono_debug_close_method): Plug some leaks.
12077
12078 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
12079
12080         * mini-ppc.c: make the branch info relative as the code
12081         buffer can be reallocated.
12082
12083 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
12084
12085         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
12086         * driver.c: Removed the AOT/security restriction. Now initialize the
12087         security manager (in metadata) if --security is used.
12088         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
12089         rather than the pointer to declarative security, when AOT is used.
12090
12091 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
12092
12093         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
12094         basic blocks, reduced intrinsic exception throwing code size.
12095
12096 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
12097
12098         * driver.c (mini_usage): Reorder the usage screen.
12099
12100 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
12101
12102         * mini.c (mono_resolve_patch_target): Fix warning.
12103
12104 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
12105
12106         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
12107         previous patch.
12108
12109         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12110
12111         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
12112         breaks the amd64 build.
12113
12114         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
12115         register allocation. Fixes #71454.
12116
12117         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12118
12119         * arrays.cs: Add new regression test.   
12120
12121 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12122
12123         * ssapre.c: Turned usage of snprintf to GString.
12124         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
12125         (I left it on by mistake in my previous commit).
12126
12127 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
12128
12129         * mini.c, cfold.c, basic-calls.cs: preserve side effects
12130         on cond branch optimization (fixes bug# 71515).
12131
12132 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12133
12134         * abcremoval.c: Fixed bug 71062.
12135         * abcremoval.h: Likewise.
12136
12137 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12138
12139         * mini.c: Added a new functionality to optimize_branches, the removal
12140         of useless basic blocks, and fixed some problem in the removal of
12141         critical edges; some utility functions added for both purposes.
12142         * ssapre.c: Added complex expression support, and fixed bug 70637.
12143         * ssapre.h: Likewise.
12144         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
12145         enabled in SSAPRE.
12146         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
12147         * driver.c: Re-enabled SSAPRE.
12148
12149 2005-01-19  Martin Baulig  <martin@ximian.com>
12150
12151         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
12152         the result of mono_get_method_constrained().
12153
12154 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
12155
12156         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
12157         manager.
12158
12159 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
12160
12161         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
12162         be detected.  Fixes #59296.
12163
12164 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12165
12166         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
12167         which can happen. Fixes #71361.
12168
12169 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12170
12171         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
12172         manager.
12173
12174 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12175
12176         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
12177         appdomain-unload.exe to fail.
12178         
12179         * mini.c: Fix some memory leaks.
12180
12181 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
12182
12183         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
12184         Fixed bug and sped up some codepaths.
12185
12186 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12187
12188         * mini.c: Fix some memory leaks.
12189
12190         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
12191         conversion.
12192
12193         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
12194
12195         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
12196         #71320.
12197
12198         * iltests.il: Add regression test for #71320.
12199
12200 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
12201
12202         * mini.c (mono_codegen): Fix installation of profiler hooks.
12203
12204         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
12205
12206 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12207
12208         * mini.h, mini.c, cfold.c: optimize access to enum
12209         readonly fields, too. Eval conditional branches if possible
12210         to perform unreachable code removal in more cases.
12211
12212 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
12213
12214         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
12215
12216         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
12217         code manager.
12218
12219         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
12220         WinXP DEP. Fixes #71244.
12221
12222 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
12223
12224         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
12225
12226 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
12227
12228         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
12229
12230 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
12231
12232         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
12233         changes.
12234
12235         * mini.h: Bump AOT version.
12236
12237         * mini.h (MonoCompile): Change exvar to a hash table.
12238
12239         * mini.c: Allocate a separate exvar for each handler block.
12240
12241         * mini.c: Get rid of the computation of filter_lengths, its not needed.
12242
12243         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
12244         ex var with the pending exception and only throw if the two are equal.
12245         Fixes #68552.
12246         
12247         * exceptions.cs: Add tests for rethrow and nested catch clauses.
12248
12249         * mini-x86.c: Fix warnings.
12250
12251         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
12252         used by all the ports now.
12253
12254         * aot.c: Add write-symbols and save-temps options.
12255
12256 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12257
12258         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
12259
12260 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
12261
12262         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
12263         operations.
12264
12265         * tramp-s390.c: Check vtable slot belongs to the domain.
12266
12267         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
12268         as per other platforms.
12269
12270         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
12271
12272 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
12273
12274         * driver.c: we don't run the Main() code in a subthread anymore.
12275
12276 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
12277
12278         * mini.c: added experimental rtc support in the statistical
12279         profiler: if the user has the permission, more accurate statistics
12280         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
12281         The MONO_RTC value must be restricted to what the linux rtc allows:
12282         power of two from 64 to 8192 Hz.
12283
12284 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12285
12286         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
12287
12288 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
12289
12290         * mini-ppc.c: better icache flush for smp.
12291
12292 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
12293
12294         * mini-amd64.c (emit_move_return_value): Fix memory leak.
12295
12296         * mini-x86.c (get_call_info): Add the get_call_info () code from the
12297         amd64 port, not yet used.
12298
12299 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12300
12301         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
12302         a struct type.
12303
12304 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
12305
12306         * driver.c: Added --security option to activate the security manager.
12307         Right now this will allow code generation for declarative demands and
12308         is disabled when AOT is specified.
12309         * mini.c: Add code generation for declarative security demands.
12310         * mini.h: Add mono_use_security_manager as an extern gboolean.
12311
12312 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12313
12314         * aot.c (mono_compile_assembly): Speed up compilation a bit by
12315         emitting more dense assembly code.
12316
12317         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
12318         exception throwing stuff.
12319
12320 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
12321
12322         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
12323         dead code.
12324
12325         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
12326         left in by mistake.
12327
12328         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
12329         fixed.
12330
12331         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
12332
12333         * tramp-*.c: Only patch vtable slots if the object is in the current
12334         domain. Fixes appdomain-unload.exe.
12335
12336         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
12337         
12338         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
12339         x86 branch.
12340
12341 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12342
12343         * mini.c (reverse_branch_op): New helper function.
12344
12345         * mini.c (optimize_branches): Run the new optimization only on 
12346         platforms which support it. Also reverse all kinds of branches.
12347
12348         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
12349
12350         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
12351         a throw statement.
12352
12353         * mini.c (optimize_branches): Reverse not-equals branches if the false
12354         bblock is a throw. This happens a lot of time with argument checking in
12355         corlib.
12356
12357         * mini.c (mono_codegen): Add support for placing basic blocks after
12358         the function epilogue.
12359
12360         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
12361         function epilogue.
12362         
12363 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
12364
12365         * mini.c (setup_stat_profiler): Only set this up if the platform
12366         supports ITIMER_PROF.
12367
12368 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12369
12370         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
12371         previous patch.
12372
12373         * inssel.brg: Fix a warning.
12374
12375 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
12376
12377         * mini.c: added support for statistical profiler 
12378         (run with: --profile=default:stat).
12379
12380 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
12381
12382         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
12383
12384         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
12385
12386         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
12387         related to global registers from the amd64 port.
12388
12389 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
12390
12391         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
12392
12393         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
12394         with global registers.
12395         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
12396
12397         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
12398
12399 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
12400
12401         * debug-mini.c (encode_value): Fix off-by-one.
12402
12403         * aot.c (encode_value): Likewise.
12404
12405         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
12406
12407 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
12408
12409         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
12410         AOT.
12411
12412         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
12413         
12414         * aot.c (emit_method_info): Increase size of temp buffer.
12415
12416         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
12417         the AOT case.
12418
12419 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
12420
12421         * aot.c (emit_method_info): Fix build.
12422         
12423         * aot.c: Further rework of the AOT file format to reduce the size of
12424         the method info data.
12425
12426         * mini.h: Bump AOT file format version.
12427
12428 2004-12-27  Martin Baulig  <martin@ximian.com>
12429
12430         * mini.c (mini_get_method): New static method; call
12431         mono_get_method_full() and mono_get_inflated_method().
12432         (mono_method_to_ir): Use mini_get_method() instead of
12433         mono_get_method_full(). 
12434
12435 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
12436
12437         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
12438
12439 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
12440
12441         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
12442
12443         * inssel-amd64.brg: Add some optimization rules.
12444
12445 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
12446
12447         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
12448         standard not GC'd stuff is fine.
12449
12450 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
12451
12452         * aot.c: Rework the AOT file format to get rid of most of the global
12453         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
12454
12455         * mini.h: Bump AOT file format version.
12456         
12457 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
12458
12459         * mini.h: Bump AOT file format version.
12460
12461         * aot.c (mono_aot_is_got_entry): New function to determine if an 
12462         address is inside a GOT.
12463
12464         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
12465
12466         * cpu-pentium.md: Increase the maximum size of some instructions which
12467         might involve a got access.
12468         
12469         * mini.c (get_method_from_ip): Another debug helper function.
12470
12471         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
12472         when got var accesses are created during the decompose phase.
12473
12474         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
12475
12476         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
12477         argument mini_compile_method and to MonoCompile, and use this to
12478         determine whenever a given method is compiled for AOT. This allows the
12479         other methods compiled during AOT compilation to be free of AOT stuff,
12480         so the backends does not need to add special support for them by
12481         creating a fake GOT etc.
12482
12483         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
12484         longer needed.
12485
12486 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12487
12488         * mini.c (mono_method_to_ir): It turns out that some of the
12489         x-appdomain wrappers are lax with types, so just ignore this for
12490         all wrappers.
12491
12492         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
12493         at the vtable->klass. If it is non-shared code we can just use the
12494         vtable.
12495
12496 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
12497
12498         * mini-ppc.c: access MonoDomain from tls, too.
12499
12500 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
12501
12502         * declsec.c: Removed unused variable (and related warning ;-)
12503
12504 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12505
12506         * iltests.il: New test for LDELEMA on an array of ref types.
12507
12508         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
12509         all ldelema's on reftypes.
12510         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
12511         it was the wrong place to put it.
12512
12513         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
12514         register to pop to make this cleaner, at the request of Paolo.
12515
12516 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12517
12518         * mini-ops.h (OP_GETHASHCODE): New op.
12519
12520         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
12521
12522         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
12523         operation.
12524
12525         For a microbenchmark, this reduces the cost of Hashtable.get_Item
12526         by 25%.
12527         
12528         * mini-x86.c (mono_arch_output_basic_block): Rather than
12529
12530         add ebp, 4
12531
12532         Emit
12533
12534         pop edx
12535
12536         The first is 3 bytes while the second is 1. This saves 36 kb on
12537         mscorlib, quite a big saving. When bootstraping mcs, I was able to
12538         see a small boost because of icache locality.
12539
12540         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
12541
12542 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
12543
12544         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
12545         started code sharing with the generic code.
12546
12547 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
12548
12549         * mini-ppc.c, cpu-g4.md: added code for direct access to
12550         tls data slots.
12551
12552 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
12553
12554         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
12555          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12556         to OP_TLS_GET.
12557
12558 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
12559
12560         * declsec.c|h: Added functions to cache the declarative stack modifiers
12561         in MonoJitInfo and to create a security frame from a MonoJitInfo 
12562         structure.
12563         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12564         created. Register internal calls for System.Security.SecurityFrame::
12565         _GetSecurityFrame and _GetSecurityStack.
12566         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12567         the definitions for the new stack walk/callback mechanism.
12568         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
12569         first security frame for LinkDemands and InheritanceDemands) and
12570         GetSecurityStack for Demands. Both use the new mono_walk_stack code
12571         from lupus.
12572         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12573         walk initialization (lupus).
12574
12575 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12576
12577         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12578         idiom.
12579         (handle_loaded_temps): Do not create a temporary variable for
12580         things that we know are temps. They will never be modified.
12581         (mono_spill_call): Set MONO_INST_IS_TEMP
12582         (mono_emulate_opcode): ditto
12583         (emit_tree): ditto
12584         (mono_method_to_ir.CEE_DUP): ditto
12585
12586 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
12587
12588         * mini.c (type_to_eval_stack_type): Make this handle the void type
12589         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12590         (emit_tree): use ip_in_bb to special case some common idioms
12591         Update all callers to pass in the IP.
12592         (mono_method_to_ir): Make CEE_CALL* do the above as well.
12593
12594         This gives us a nice 2% speedup in mcs bootstrap.
12595
12596         * mini-x86.c (peephole_pass): Peephole pass to make
12597         mov  [foo], eax
12598         push [foo]
12599
12600         into
12601
12602         mov [foo], eax
12603         push eax
12604
12605         * mini.c (ip_in_bb): new method.
12606         (mono_method_to_ir): use this method rather than doing the hash
12607         lookup ourselves.
12608
12609         * linear-scan.c (mono_linear_scan): When expiring actives, you
12610         don't need to keep around variables that expire on this
12611         instruction. This makes it so that:
12612              a = b + 1
12613         will turn into:
12614              store (ebx add (ebx, 1))
12615         which will become
12616              add ebx, 1
12617
12618 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
12619
12620         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
12621         combination to avoid doing two copies. Fix up problems with previous
12622         patch.
12623
12624         * mini.c: Fix 64 bit warnings.
12625
12626         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12627
12628 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
12629
12630         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12631         changes from the x86 code.
12632
12633         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12634
12635 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
12636
12637         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12638         throwing code to reduce its size, unify the AOT and non-aot code and 
12639         get rid of relocations in the AOT case.
12640
12641         * mini-x86.h mini.c exceptions-x86.c 
12642         (mono_arch_get_throw_corlib_exception): New arch specific function to 
12643         raise corlib exceptions which doesn't require relocations in the 
12644         caller.
12645
12646         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12647
12648 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
12649
12650         * mini.c (mono_emit_method_call): Only allocate the got var when it is
12651         needed.
12652
12653         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12654         in the AOT case.
12655
12656 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12657
12658         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12659         with add function when used from Inc/dec atomic 
12660         functions. Re-enabled optimization on x86.
12661         * mini-ops.h: renamed atomic_add functions to
12662         allow _add to match the Interlocked::Add and
12663         _add_next to match Interlocked::Inc/Dec.
12664
12665 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
12666
12667         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12668         linking of BBs to the end BB, and enabled SSAPRE also with
12669         consprop and copyprop (which was prevented by that bug).
12670
12671 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12672
12673         * mini-x86.c: disabling the Interlocked optimizing code. 
12674
12675 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12676
12677         * aot.c (load_aot_module): Move reading of got_addr after the AOT
12678         file version check.
12679         
12680 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12681
12682         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
12683         interlocked optimization due lack of support on x86, rewrote 
12684         exchange to take into account that base may be in eax.
12685         
12686         xsp works again; activated Interlocked optimizing code.
12687         
12688 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12689
12690         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12691
12692 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
12693
12694         * mini-ops.h: Add new opcodes.
12695
12696         * mini.h: Add new patch types. Add got_var to MonoCompile.
12697
12698         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
12699         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12700         make it work with all kinds of patchable code.
12701
12702         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12703         address of the GOT, and referencing entries in the GOT.
12704
12705         * mini.c: Add code to load the GOT address if needed by an opcode.
12706
12707         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
12708         independent AOT code on the x86 using an elf-style Global Offset Table.
12709
12710 2004-12-14  Raja R Harinath  <rharinath@novell.com>
12711
12712         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12713
12714 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12715
12716         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12717         when running xsp.
12718
12719 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
12720
12721         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12722         of Interlocked:Increment/Decrement/Add as inline ops.
12723         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12724
12725 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
12726
12727         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12728         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12729
12730 2004-12-12  Duncan Mak  <duncan@ximian.com>
12731
12732         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12733         again. `patch_info->table_size' is no longer valid after Zoltan's
12734         commit #37636.
12735
12736 2004-12-12  Martin Baulig  <martin@ximian.com>
12737
12738         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12739         if we are the "real" method, ie. not an inlined method inside it.
12740
12741 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
12742
12743         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12744         before we look in the special fields table. This fixes
12745         ../tests/thread-static-init.cs.
12746
12747 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12748
12749         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
12750         for Array get_Rank and get_Length. Fixes bug #70465.
12751
12752 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
12753
12754         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
12755         separate structure to reduce the size of MonoJumpInfo.
12756
12757 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
12758
12759         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
12760
12761 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
12762
12763         * mini.c (mini_get_inst_for_method): Changed to allow ports
12764         to return a MonoInst instead of opcode 
12765         (renamed mini_get_opcode_for_method to better reflect the new functionality)
12766         
12767         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
12768         Allow ports to return a created MonoInst instead of op-code, will enable
12769         new optimizations.
12770         (renamed mini_get_opcode_for_method to better reflected the functionality)
12771
12772 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
12773
12774         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
12775
12776 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12777
12778         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
12779         Fixes #69985.
12780
12781 2004-12-08  Martin Baulig  <martin@ximian.com>
12782
12783         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
12784         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
12785
12786 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
12787
12788         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
12789         correctly.
12790
12791         * exceptions.cs: Disable some tests which depend on properties of x86 fp
12792         arithmetic.
12793
12794 2004-12-08  Raja R Harinath  <rharinath@novell.com>
12795
12796         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
12797
12798 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
12799
12800         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
12801         bug introduced by the previous patch.
12802
12803 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12804
12805         * mini-ppc.c, objectc.cs: handle large structs passed by value
12806         (fixes bug #69972).
12807
12808 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
12809
12810         * mini-ppc.c: OP_ARGLIST implementation from
12811         Geoff Norton  <gnorton@customerdna.com>.
12812
12813 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
12814
12815         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
12816         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
12817
12818 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
12819
12820         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
12821
12822 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12823
12824         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
12825         support.
12826
12827 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
12828
12829         * mini-sparc.c: Zero out localled-ed memory.
12830
12831         * iltests.il: Add tests for zeroing out localloc-ed memory.
12832
12833 2004-12-04  Martin Baulig  <martin@ximian.com>
12834
12835         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
12836         mono_method_get_signature_full().       
12837
12838 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
12839
12840         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
12841         and some utility functions (always for SSAPRE), integrated SSAPRE.
12842         * mini.h: Likewise.
12843         * driver.c: Added ssapre option.
12844         * ssa.c: Small fix on OP_ARG handling.
12845         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
12846         * Makefile.am: Likewise.
12847
12848 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
12849
12850         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
12851         now in the xp code.
12852
12853         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
12854         icall.
12855
12856 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12857
12858         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
12859         
12860         * cpu-s390.md : Increase instruction length of oparglist.
12861
12862         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
12863
12864 2004-11-30  Martin Baulig  <martin@ximian.com>
12865
12866         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
12867         virtual generic methods.  We call a special helper_compile_generic_method()
12868         icall to retrieve the method from the vtable, inflate and compile
12869         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
12870
12871         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
12872
12873 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
12874
12875         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
12876
12877 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
12878
12879         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
12880         Fixes #69929.
12881
12882 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
12883
12884         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
12885         platforms with PIC aot.
12886
12887 2004-11-28  Martin Baulig  <martin@ximian.com>
12888
12889         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
12890         Fixes gen-112.cs.
12891
12892 2004-11-28  Martin Baulig  <martin@ximian.com>
12893
12894         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
12895         the result of mono_type_get_underlying_type() to check whether
12896         we're byref.
12897
12898 2004-11-26  Martin Baulig  <martin@ximian.com>
12899
12900         * mini.c
12901         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
12902         in the g_assert().
12903
12904 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
12905
12906         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
12907         the same way as the other arguments so they won't get clobbered.
12908
12909         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
12910         calls through R11 since it is clobbered by the trampoline code.
12911
12912 2004-11-26  Raja R Harinath  <rharinath@novell.com>
12913
12914         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
12915         pick up in-tree mscorlib.dll.
12916
12917 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
12918
12919         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
12920
12921         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
12922         runtime data/code are now stored in a table similar to the GOT in ELF. 
12923         This allows the code itself to be position independent.
12924
12925         * aot.c: Fix loading of referenced assemblies after the lazy assembly
12926         loading changes.
12927
12928         * aot.c: Attach ELF type (object/function) directives to all global
12929         symbols.
12930
12931         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
12932
12933         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
12934
12935         * mini-amd64.h: Turn on PIC AOT code.
12936
12937         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
12938         returning the offset within an OP_AOTCONST instruction where the GOT
12939         offset needs to be added.
12940
12941         * mini.h: Bump AOT file format version.
12942
12943 2004-11-25  Martin Baulig  <martin@ximian.com>
12944
12945         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
12946         uninflated generic methods.
12947
12948 2004-11-25  Martin Baulig  <martin@ximian.com>
12949
12950         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
12951
12952 2004-11-24  Martin Baulig  <martin@ximian.com>
12953
12954         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
12955         original klass (this only applies for generic instances).
12956
12957 2004-11-24  Martin Baulig  <martin@ximian.com>
12958
12959         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
12960         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
12961         that array).
12962
12963 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
12964
12965         * mini.c (mono_method_to_ir): Disable inlining for methods containing
12966         localloc. Fixes #69678.
12967
12968         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
12969         
12970 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
12971
12972         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
12973         used SSE registers on pinvoke calls. Fixes #69774.
12974
12975 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
12976
12977         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
12978         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
12979
12980 2004-11-23  Raja R Harinath  <rharinath@novell.com>
12981
12982         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
12983         Refer directly to the mcs/ tree.
12984
12985 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
12986
12987         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
12988         Check if a trampoline for a synchronized method is required. 
12989
12990 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
12991
12992         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
12993         with localloc if needed. Throe arithmetric exception in
12994         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
12995         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
12996
12997 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
12998
12999         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
13000         types before switching on type.  Fixes #69622.
13001
13002 2004-11-19  Raja R Harinath  <rharinath@novell.com>
13003
13004         * Makefile.am (check-local): New.  Integrate into 'make check'.
13005         (MCS,RUNTIME): Define using in-tree mono and mcs.
13006         (ILASM): New.
13007         (%.exe): Use $(ILASM).
13008
13009 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
13010
13011         * mini-ppc.c: adjust initial prolog size (bug #69691).
13012
13013 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
13014
13015         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
13016         #69664.
13017
13018 2004-11-17  Raja R Harinath  <rharinath@novell.com>
13019
13020         * Makefile.am (clean-local): Rename from 'clean'.
13021
13022 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13023
13024         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
13025         to mono_arch_is_int_overflow. 
13026         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
13027         SIGFPE events.
13028
13029 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
13030
13031         * declsec.c|h: New files to support declarative security attributes.
13032         Added function to check if a method has (applicable) security.
13033         * mini.c|h: Add check for declarative security attributes in
13034         mono_method_check_inlining.
13035         * Makefile.am: Added declsec.c and declsec.h to the build.
13036
13037 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13038
13039         * mini.c, mini.h: update to keep dynamic code info per-domain.
13040
13041 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
13042
13043         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
13044         (mini_init): Get rid of it from here too.
13045
13046 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13047
13048         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
13049         implemented OP_RETHROW (patch by Geoff Norton
13050         <gnorton@customerdna.com>).
13051
13052 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
13053
13054         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
13055         between appdomains.  Fixes appdomain-unload on PPC.
13056
13057 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
13058
13059         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13060         mini-exceptions.c: handle the new wrapper types.
13061         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
13062         token value as a MonoClass* when compiling a wrapper.
13063         mono_jit_create_remoting_trampoline now takes an additional
13064         MonoRemotingTarget parameter.
13065         
13066 2004-11-10  Martin Baulig  <martin@localhost>
13067
13068         * mini.c (mono_method_to_ir): Use `generic_container->context'
13069         rather than creating a new one.
13070
13071 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13072
13073         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
13074
13075         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
13076
13077 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
13078
13079         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
13080         the experimental aot cache stuff.
13081
13082 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13083
13084         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13085         mini-exceptions.c: update to exception clause structure changes.
13086
13087 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13088
13089         * exceptions-x86.c (throw_exception): Fix warnings.
13090
13091         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
13092         for OP_RETHROW.
13093
13094 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13095
13096         * exceptions-sparc.c (get_throw_exception): Really fix this.
13097
13098 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
13099
13100         * tramp-*.c: we no longer support icalls without wrappers, so
13101         a bit of code can be removed here
13102
13103 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
13104
13105         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
13106         patch.
13107
13108         * cpu-sparc.md: Add op_rethrow.
13109
13110         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
13111
13112         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
13113
13114         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
13115         * mini-ops.h: Add OP_RETHROW.
13116
13117         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
13118
13119         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
13120
13121 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
13122         
13123         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
13124         Makes the output much easier to read
13125
13126 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
13127
13128         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
13129         prevents another huge leak when compiling with ssa. Secondly, the
13130         performance of doing this rather than freeing the lists is much
13131         better. GList does a lock every time you allocate a list link,
13132         so that it can use a memory pool. So, it is better to just use
13133         a memory pool of our own.
13134         
13135         * ssa.c, linear-scan.c: replace g_list_remove_link with
13136         g_list_delete.  The remove one does not free the GList, so we were
13137         leaking memory. On -O=all --compile-all with corlib, this cut down
13138         3 MB of allocations.
13139
13140 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
13141
13142         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
13143
13144         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
13145
13146         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
13147         into a new function mono_create_jit_trampoline ().
13148
13149 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
13150
13151         * trace.c (get_spec): Allow tracing of classes without a namespace.
13152
13153 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
13154
13155         * mini.c: Fix pointer overwrite in mini_method_compile.
13156
13157 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
13158
13159         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
13160         The darwin ABI needs some special handling for 1 and 2 byte structs
13161         Lets use lbz/lhz instead of lwz everywhere.
13162         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
13163         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
13164         Use stb/sth for the former, and put the latter always on stack instead of in
13165         argument registers.
13166
13167 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
13168
13169         * trace.c (is_filenamechar): Add '_'.
13170
13171 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
13172
13173         * mini-s390.c: Fix prolog length to allow for large trace requirements.
13174
13175         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
13176
13177 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
13178
13179         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
13180         depends on libmonogc. Fixes #68805.
13181
13182 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
13183
13184         * mini.c (mono_jit_free_method): Provide extra information for
13185         this error.  Currently this leaks, but will be turned into a
13186         developer option in the future.
13187
13188 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
13189
13190         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
13191
13192 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
13193
13194         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
13195         boundary. Fixes reading of PATCH_INFO_R4 and R8.
13196         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
13197
13198 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
13199
13200         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
13201         trampolines for AOT code.
13202
13203 2004-10-22    <vargaz@freemail.hu>
13204
13205         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
13206         constructed types. Fixes #68136.
13207
13208 2004-10-21  Martin Baulig  <martin@ximian.com>
13209
13210         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
13211         if it returns true, unwind the stack to the call instruction.
13212
13213 2004-10-21    <vargaz@freemail.hu>
13214
13215         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
13216
13217         * mini.h: Bump AOT version number.
13218
13219         * objects.cs: Add another test for unbox trampolines.
13220
13221         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
13222         valuetype methods.
13223
13224 2004-10-20    <vargaz@freemail.hu>
13225
13226         * driver.c: Add SHARED to the set of optimizations tested.
13227
13228         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
13229
13230         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
13231         used by CEE_NEWARR.
13232
13233         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
13234
13235 2004-10-20  Martin Baulig  <martin@ximian.com>
13236
13237         * mini-exceptions.c (mono_handle_exception): Call
13238         mono_debugger_handle_exception() to tell the debugger about
13239         catch/finally clauses.
13240
13241 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
13242
13243         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
13244
13245         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
13246         #68447.
13247
13248 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
13249
13250         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
13251         methods as their native size, fixed bug #57543, #57545.
13252         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
13253         This saves a temporary register and mullw call down into 1 (minor perf
13254         increase for cases like sum = sum * 5;  This use to translate into:
13255             li r11,5
13256             mullw r28,r28,r11
13257         It now translates to
13258             mulli r28,r28,5
13259
13260 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
13261
13262         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
13263         #68388.
13264
13265 2004-10-11  Martin Baulig  <martin@ximian.com>
13266
13267         * mini.c (mono_method_to_ir): If we're a generic method, get the
13268         MonoGenericContainer from our MonoMethodNormal and create a
13269         MonoGenericContext from it.
13270
13271 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
13272
13273         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
13274
13275         * basic-long.cs: Add test for checked i8->i2 cast.
13276
13277 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13278
13279         * inssel-ppc.brg: added a couple of speedup rules.
13280
13281 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
13282
13283         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
13284         to speed up rebuilds.
13285
13286 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13287
13288         * mini-s390.c: Minor fix to OP_OR_IMM.
13289
13290 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
13291
13292         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
13293         better. Fixes appdomain-unload.exe on sparc.
13294
13295 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
13296
13297         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
13298         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
13299         see bug 67324.
13300
13301 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
13302
13303         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
13304
13305 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
13306
13307         * mini.c: Always generate a field read/write wrapper for members
13308         of the class MarshalByRefObject since the actual instance could
13309         be a CBO.
13310
13311 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
13312
13313         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
13314
13315 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
13316
13317         * driver.c mini.h trace.c: Move the setting of the main assembly into
13318         a separate function called mono_trace_set_assembly () and call it after
13319         actually loading the main assembly. Fixes #66872.
13320
13321 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
13322
13323         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
13324         using the code manager.
13325
13326 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
13327
13328         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
13329
13330 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
13331
13332         * cpu-amd64.md: Fix bug in previous patch.
13333         
13334         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
13335         #66650.
13336
13337 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
13338
13339         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13340         mini-exceptions.c: updates for changed stack walk interface.
13341
13342 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13343
13344         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
13345
13346 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
13347
13348         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
13349
13350 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
13351
13352         * driver.c (mini_regression_list): Do not call mono_assembly_close 
13353         since assemblies can't be unloaded.
13354         
13355 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13356
13357         * cpu-amd64.md: Fix more instruction lengths.
13358
13359         * cpu-amd64.md: Fix lengths of some instructions.
13360
13361 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
13362
13363         * inssel.brg: Make the array ldelema check aot friendly.
13364
13365 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13366
13367         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
13368
13369         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
13370
13371 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
13372
13373         * mini-x86.c: Fix build.
13374
13375         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
13376         mono_type_get_underlying_type () helper function to simplify code.
13377         
13378 2004-09-09  Martin Baulig  <martin@ximian.com>
13379
13380         * mini-amd64.c: Don't access `type->data.klass' directly, call
13381         mono_class_from_mono_type() instead since the type may be a
13382         generic instance.
13383
13384 2004-09-09  Martin Baulig  <martin@ximian.com>
13385
13386         * mini-amd64.c (get_call_info): Fix support for generic instances.
13387         (add_valuetype): Use mono_class_from_mono_type() to get the class
13388         since we can be a generic instance.
13389
13390 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
13391
13392         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
13393
13394 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13395
13396         * liveness.c: reset spill costs on each scan: bug 62107
13397
13398 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
13399
13400         * exceptions-sparc.c (mono_arch_find_jit_info): remove
13401         unnecessary line that doesn't compile
13402
13403 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
13404
13405         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
13406         trampolines, make them call an error function so people can fix their
13407         code.
13408
13409 2004-09-06  Martin Baulig  <martin@ximian.com>
13410
13411         * mini.c (mono_method_to_ir): When initializing locals, handle a
13412         generic instances like a valuetype if it's a valuetype and like a
13413         class if it's a class.
13414
13415 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13416
13417         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
13418         stack. Fixes #64674.
13419
13420         * exceptions.cs: Add test for unwinding of call arguments.
13421
13422 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
13423
13424         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
13425         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
13426         set the carry/borrow flag). The sparc and s390 implementations
13427         can now use optimized versions (and simplify the code). ppc bugfixes.
13428
13429 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13430
13431         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
13432
13433 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
13434
13435         * inssel-amd64.brg: Remove leftover 32 bit rule.
13436
13437         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
13438
13439 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
13440
13441         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
13442         mono_arch_find_jit_info functions into a new function. Fix a memory
13443         leak.
13444
13445         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
13446         refactored code.
13447         
13448 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13449
13450         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
13451         as well.
13452         
13453         * exceptions.cs: Add array size tests.
13454
13455         * mini.c: Allocate a separate icall wrapper for each arity of 
13456         mono_array_new_va. Fixes #59509.
13457
13458         * exceptions.cs: Add testcase for 64578.
13459
13460         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
13461
13462         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
13463         
13464 2004-09-02  Martin Baulig  <martin@ximian.com>
13465
13466         * mini.c (mono_method_to_ir): When initializing the locals, call
13467         handle_initobj() on the generic instance itself, not its
13468         underlying type.
13469
13470 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13471
13472         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
13473         MonoJitInfo for dynamic methods.
13474
13475         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
13476
13477         * mini.c: Add support for freeing JIT data for dynamic methods.
13478         
13479 2004-09-01  Martin Baulig  <martin@ximian.com>
13480
13481         * mini-x86.c (is_regsize_var): Added support for generic
13482         instances.
13483         (mono_arch_emit_prolog): Make this compile again, use
13484         `x86_push_imm_template (code)'.
13485
13486 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
13487
13488         * mini-x86.c: make all push_imm instructions that get
13489         patched always emit the long form
13490
13491 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
13492
13493         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
13494         in a per-domain hash.
13495
13496         * mini-amd64.c (merge_argument_class_from_type): Handle generic
13497         types.
13498
13499 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
13500
13501         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
13502         work.
13503         
13504         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
13505         work.
13506
13507         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
13508         Beginnings of SSE2 support.
13509
13510         * exceptions.cs: Add more tests for checked int<->uint casts.
13511
13512 2004-08-28  Martin Baulig  <martin@ximian.com>
13513
13514         * mini-x86.c (mono_arch_instrument_epilog): Added support for
13515         generic instances.
13516
13517         * mini.c
13518         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
13519         Handle generic instances recursively.
13520
13521 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13522
13523         * iltests.il: test for conv.u8 on a constant
13524
13525 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13526
13527         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
13528         LCONV_x4 (shrun_32 (membase)).
13529
13530 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13531
13532         * inssel-x86.brg: c&p rules for push/setret of long
13533
13534 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13535
13536         * inssel-x86.brg: c&p rules for compare (base, regvar) and
13537         compare (regvar, base)
13538
13539         * inssel-x86.brg: more burg love
13540
13541         * inssel.brg: more cleanup
13542
13543         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
13544
13545 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13546
13547         * basic-long.cs, basic-calls.cs: new tests for optimization.
13548
13549 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
13550
13551         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
13552         patch.
13553
13554 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13555
13556         * mini-amd64.c (read_tls_offset_from_method): Add another case.
13557         
13558 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
13559
13560         * inssel.brg (mini_emit_memcpy): use 
13561         NO_UNALIGNED_ACCESS to disable memcpy optimization
13562
13563 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13564
13565         * mini-amd64.c: Handle generic types in various places.
13566
13567         * mini.c (mono_method_to_ir): Handle generic types in init locals.
13568
13569 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
13570
13571         * mini.c (handle_box): Fix warning.
13572
13573         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13574
13575         * mini-amd64.h: Enable the emit_state optimization.
13576
13577         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13578
13579         * mini-amd64.c: Add some new 64 bit peephole opts.
13580
13581         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13582
13583         * cpu-amd64.md: sreg1 of div instructions must be %rax.
13584
13585         * mini-amd64.c: Register allocator fixes.
13586
13587         * mini.c: Add an optimization to emit_state to avoid allocation of new
13588         registers on some platforms.
13589
13590 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
13591
13592         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13593
13594         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13595         allocation. Fixes #63085.
13596
13597         * basic-long.cs: Add new regression test.
13598
13599         * mini-amd64.c: Register allocator improvements.
13600
13601 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
13602
13603         * mini-amd64.c (read_tls_offset_from_method): Add another code
13604         sequence.
13605
13606         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13607         instruction sequence for nullifying class init trampolines.
13608
13609         * objects.cs: Add new regalloc test.
13610
13611         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13612
13613 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13614
13615         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13616         
13617         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13618         arguments.
13619
13620         * driver.c: Fix profiling after TLS changes.
13621         
13622         * driver.c (mono_main): Set mono_stats.enabled if needed.
13623
13624         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13625         CEE_BOX.
13626
13627 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
13628
13629         * mini-x86.c: use a 1 op rather than a 2 op tls access
13630         instruction -> faster.
13631
13632 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13633
13634         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13635         x86 backend.
13636
13637 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13638
13639         * exceptions-sparc.c (throw_exception): fix typo
13640
13641 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13642
13643         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13644         set tree->dreg correctly with tls. Allow any
13645         register to be used.
13646
13647         * mini-x86.c (read_tls_offset_from_method): add new code
13648         generation pattern seen with GCC.
13649
13650
13651 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13652
13653         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13654         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13655         exceptions-sparc.c: fix some performance issues in exception
13656         handling and setting of the stack trace for exceptions that were
13657         already thrown.
13658
13659 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13660
13661         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
13662         x86 backend.
13663         
13664         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
13665         registers.
13666
13667 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13668
13669         This patch inlines tls access, when possible.
13670         
13671         * mini.h: new arch functions for TLS intrinsics.
13672         All platforms updated with a stub.
13673
13674         * mini.c: use the new intrinsics
13675
13676         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
13677         arch specific intrinsic for tls variables
13678
13679 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13680
13681         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
13682         under windows.
13683
13684 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13685
13686         * mini.c: thread local allocation
13687
13688 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
13689
13690         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13691
13692         * Makefile.am: Link against the static version of libmonogc.
13693         
13694         * Makefile.am: Link the static versions of the convenience libraries
13695         into the mono executable.
13696
13697         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13698
13699 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
13700
13701         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13702         on integer overflow.
13703
13704         * mini-amd64.c: Reorganize function call code.
13705
13706         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13707
13708 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13709
13710         * inssel-x86.brg: use xor eax,eax.
13711         
13712         * basic.cs: new tests
13713
13714 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13715
13716         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13717         in exception throwing code.
13718         
13719 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13720
13721         * inssel-x86.brg: use xor esi,esi.
13722
13723 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13724
13725         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13726         can trace methods compiled during mini_init () too.
13727
13728         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
13729         CEE_CONV_U4.
13730
13731 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13732
13733         * Makefile.am: static link on x86 (r=zoltan)
13734
13735 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13736
13737         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13738         code since it causes some programs to fail.
13739
13740 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
13741
13742         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13743
13744 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13745
13746         * mini.c: ovfops_op_map - add STACK_OBJ case for
13747         CONV_I 
13748         * basic.cs: add test_0_pin_string as test
13749         case for above.
13750
13751 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13752
13753         * Makefile.am: build C# if srcdir != builddir
13754
13755 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
13756
13757         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
13758         fall-through blocks.
13759
13760 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
13761
13762         * driver.c: enable loop by default again and include abcrem in -O=all.
13763
13764 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
13765
13766         * iltests.il: Add some localloc tests.
13767
13768         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
13769
13770         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
13771         Fixes #62574.
13772
13773         * inssel-amd64.brg: Add some optimizations.
13774
13775         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
13776         for gcc-3.4.
13777
13778         * Makefile.am: Statically link mono against libmono on AMD64.
13779         
13780         * mini-amd64.c inssel-amd64.brg: Optimizations.
13781
13782 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
13783
13784         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
13785
13786         * tramp-amd64.c: Patch calling code in trampolines.
13787
13788 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
13789
13790         * mini-amd64.c: pinvoke struct passing fixes.
13791
13792 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
13793
13794         * mini-sparc.c: redo change, make mono_arch_cpu_init call
13795         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
13796
13797 2004-08-05  Duncan Mak  <duncan@ximian.com>
13798
13799         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
13800         CEE_LDELEM_ANY.
13801
13802 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13803
13804         * mini-amd64.c (emit_move_return_value): Move return value for normal
13805         calls too.
13806
13807 2004-08-05  Martin Baulig  <martin@ximian.com>
13808
13809         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
13810         `type->type'; just modify `type' itself when dealing with enums
13811         and generic instances.
13812         (check_call_signature): Make `simple_type' a `MonoType *'.
13813
13814 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13815
13816         * mini.c: Use OP_PADD to add offsets to addresses.
13817
13818         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
13819
13820 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
13821
13822         * mini-sparc.c (mono_arch_emit_epilog): fix check
13823         for folding last op into restore instruction
13824
13825 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
13826
13827         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
13828         helper methods using the code manager.
13829         
13830         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
13831
13832         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
13833
13834 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13835         
13836         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
13837           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
13838
13839         * mini-s390.c: fix tail processing
13840
13841 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
13842
13843         * mini-ppc.c: mul.ovf.un exception name fix.
13844
13845 2004-08-03  Martin Baulig  <martin@ximian.com>
13846
13847         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
13848         instances; before jumping to `handle_enum', also modify `ptype'.
13849
13850 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
13851
13852         * cpu-sparc.md: fcall maximal length too small.
13853
13854 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
13855
13856         * mini-amd64.c mini.h: Add initial support for passing/returning 
13857         structures to/from pinvoked methods.
13858
13859 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
13860
13861         * mini-ppc.c: reg allocator fix.
13862
13863 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
13864
13865         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
13866
13867         * inssel.brg: Optimize memset on 64 bit machines.
13868
13869         * mini-amd64.c: Fix some vararg cases.
13870
13871 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13872
13873         * mini-s390.c: Corrected macro in emit_float_to_int
13874
13875         * s390-abi.cs: Tests to exercise the s390 ABI
13876
13877 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13878
13879         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
13880         caller saved regs.
13881
13882         * basic.cs: Add a test for add.ovf.un.
13883
13884 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
13885
13886         * mini-sparc.c: add case for OP_IDIV_UN
13887
13888 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13889
13890         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
13891         
13892         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
13893
13894 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
13895
13896         * basic.cs: regression tests.
13897
13898         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
13899         regressions.
13900
13901 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
13902
13903         * basic.cs: Add a new test.
13904
13905         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
13906         and AOT. Various fixes and optimizations.
13907
13908         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
13909
13910 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
13911
13912         * mini-ppc.c: make sure temp regs are not used for global reg
13913         allocation.
13914
13915 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
13916
13917         * cpu-sparc.md: conv_i8 fix for 64bits
13918
13919         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
13920
13921 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
13922         
13923         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
13924         add opcode for cmp BYTE PTR [eax], imm.
13925
13926         * inssel.brg: Make memcpy and memset takes bases.
13927
13928 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13929
13930         * *-amd64.*: More AMD64 work.
13931         
13932 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13933
13934         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
13935         add a compare-not-equal opcode.
13936         
13937 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
13938
13939         * mini.c: Use mono_init_from_assembly instead of mono_init.
13940         
13941 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
13942
13943         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
13944
13945         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
13946
13947         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
13948
13949         * inssel.brg: 64 bit fixes.
13950
13951         * mini.h (MonoCallInst): Add some AMD64 specific data.
13952
13953         * mini.h: Add some OP_P opcodes.
13954
13955 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
13956
13957         * basic.cs: tests for 61797 and 61740
13958
13959 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
13960
13961         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
13962         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
13963
13964 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
13965
13966         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
13967
13968         * *-amd64*.*: Ongoing AMD64 work.
13969
13970 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
13971
13972         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
13973
13974         * *-amd64*: Ongoing AMD64 work.
13975
13976         * mini-arch.h: Add AMD64 support.
13977
13978         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
13979
13980         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
13981
13982         * mini-ops.h: Add new opcodes.
13983
13984         * Makefile.am: Add AMD64 support.
13985
13986         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
13987         rules into the inssel-long*.brg files.
13988
13989         * *-amd64.*: Add beginnings of AMD64 backend.
13990
13991 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
13992
13993         * mini.c (print_dfn): commenting out the code that prints
13994         the cil. With -O=deadce, this makes -v -v crash.
13995         
13996         * cpu-pentium.md: make checkthis have a length of 2
13997
13998 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
13999
14000         * mini-sparc.h: fix implementations of __builtin
14001         functions for Sun compiler for V9.
14002
14003 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
14004
14005         * mini.c: use the new stelem.ref wrapper
14006         * exceptions.cs, arrays.cs: new stelem.ref tests
14007
14008 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14009
14010         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
14011         new XSP should work with these changes).
14012
14013 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
14014         
14015         * inssel-{long32,x86,}.brg: trivial optimizations.
14016         
14017 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
14018
14019         * mini.c: load value when emitting box operation in
14020         constrained calls.
14021
14022 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
14023
14024         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
14025         is one byte shorter than cmp DWORD PTR [eax], 0.
14026
14027 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14028
14029         * inssel-ppc.brg: arguments on the stack are always
14030         relative to the stack pointer (spotted by Neale Ferguson).
14031
14032 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14033
14034         * exceptions-x86.c: delay appending the method name to the trace until
14035         after mono_jit_info_table_find is called, as this gets the real
14036         MonoMethod.
14037
14038 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
14039
14040         * aot.c: register roots
14041
14042 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14043
14044         * aot.c : I could just use PLATFORM_WIN32 flag.
14045
14046 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14047
14048         * aot.c : Reverting the previous fix. This time it broke linux build.
14049
14050 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14051
14052         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
14053
14054 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
14055
14056         * mini.c (handle_stack_args): Remove some more debugging code.
14057         
14058         * mini.c (handle_stack_args): Remove debug output left in by mistake.
14059
14060         * driver.c mini.h aot.c: Allow additional options to be specified with
14061         --aot and pass them to mono_compile_assembly.
14062
14063         * aot.c: Add experimental code to AOT compile all loaded assemblies
14064         on demand and save the code into a cache in the filesystem.
14065
14066         * aot.c: Add support for more wrapper methods.
14067         
14068         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
14069         58863.
14070
14071         * cpu-*.md: Remove removed opcodes.
14072
14073         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
14074         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
14075         related icalls to marshal.c.
14076
14077 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
14078
14079         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
14080
14081         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
14082
14083         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
14084
14085 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
14086         * liveness.c: If liveness is recomputated we need to reset the information
14087         for each variable. This way, if the liveness range has been narrowed
14088         by optimizations that happened after the last computation, we can return
14089         a smaller range.
14090         
14091         For example, if you have
14092         
14093         {
14094                 int i = 0;
14095                 
14096                 // Tons of code that does not affect i
14097                 
14098                 i = foo ();
14099                 ...
14100         }
14101         
14102         i = 0 is dead code and will be removed by SSA. However, when
14103         linear scan gets to the code, i will still appear to be live
14104         throughout the entire block. This prevents good register allocation.
14105
14106 2004-07-06  Martin Baulig  <martin@ximian.com>
14107
14108         * debug-mini.c (mono_debug_init_method): Allow
14109         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
14110         (mono_debug_add_icall_wrapper): New method.
14111
14112         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
14113
14114 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
14115
14116         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
14117         optimization.
14118
14119 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
14120
14121         * aot.c (mono_aot_load_method): Fix loading of debug info.
14122
14123 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14124
14125         * aot.c: Add logging support.
14126
14127 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14128
14129         * mini.h: Add prototype for mono_print_method_from_ip.
14130
14131         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
14132
14133         * inssel.brg: 64 bit fixes.
14134
14135         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
14136         inssel-long32.brg.
14137
14138         * Makefile.am: Add SPARC64 support.
14139
14140 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14141
14142         * aot.c: Fix alignment problems on 32 bit platforms.
14143
14144 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14145
14146         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
14147         SPARC64.
14148
14149         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
14150         problems.
14151
14152         * mini.h: Bump AOT file version. Some 64 bit fixes.
14153
14154 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14155
14156         * inssel-sparc.brg: Add new rule to avoid register moves.
14157
14158         * inssel.brg: Add ldind_to_load_membase helper function.
14159
14160 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
14161
14162         * mini.c: OffsetToStringData intrinsic.
14163         
14164 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14165
14166         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
14167
14168         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
14169         regression tests.
14170
14171         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
14172 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14173
14174         * mini.c: reinstated mono_compile_get_interface_var()
14175         on x86, too, since the change breaks the Gtk# build there as well.
14176
14177 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14178
14179         * driver.c: remove loop from the default optimizations: it seems to
14180         interact badly with some of the other options (see bug #60613).
14181
14182 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
14183
14184         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
14185         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
14186
14187 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
14188
14189         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
14190         vararg-using methods.
14191
14192 2004-06-21  Martin Baulig  <martin@ximian.com>
14193
14194         * mini/mini-exceptions.c
14195         (mono_handle_exception): Added `gpointer original_ip' argument.
14196         After calling mono_unhandled_exception(), call
14197         mono_debugger_unhandled_exception() and if that returns true,
14198         restore the context and return.
14199
14200 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14201
14202         * mini-ppc.c: prefer the use of relative branches so
14203         they won't need to be patched in aot code (patch from Patrick Beard).
14204
14205 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14206
14207         * aot.c: patch from Patrick Beard to make the output assembly
14208         more correct for the MacOSX assembler. Small tweak to
14209         generate sane images on Linux/PPC, too.
14210
14211 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14212
14213         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
14214         case until bug #59509 is fixed (shows up in #60332).
14215
14216 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14217
14218         * mini.c: make sure the needed wrappers are compiled, too, with
14219         precomp.
14220
14221 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
14222
14223         * driver.c: remove NPTL reference in --version output.
14224
14225 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14226
14227         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
14228         generate valid assembly for the Mach-O assembler.
14229
14230 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14231
14232         * driver.c: don't include abcrem in the all optimization specifier
14233         since it slows down jit compilation too much for now.
14234
14235 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
14236
14237         * mini.c: use BIGMUL only if both operands have the same signage.
14238         * iltests.il: Test for bug 60056. (errors related to signage in
14239         BIGMUL).
14240
14241         r=lupus.
14242
14243 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
14244
14245         * mini.c, aot.c: memory leak fixes.
14246
14247 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14248
14249         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
14250
14251 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
14252
14253         * Makefile.am: remove the -static hack completely, it links in
14254         statically glib as well.
14255
14256 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
14257
14258         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
14259         * exceptions.cs: make it compile with new mcs/csc.
14260
14261 2004-06-03 Massimiliano Mantione <massi@ximian.com>
14262         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
14263         and added relevant test case.
14264
14265 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14266
14267         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
14268         regressions in gtk-sharp.
14269
14270 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
14271
14272         * exceptions.cs: New regression tests.
14273
14274         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
14275
14276 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
14277
14278         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
14279
14280 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
14281
14282         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
14283
14284         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
14285
14286 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
14287
14288         * mini.c (mono_jit_runtime_invoke): Init class in this
14289         method instead of trusting mono_jit_compile_method to
14290         do the work (because wrappers can be in object class)
14291
14292 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
14293
14294         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
14295
14296         * basic-long.cs: New regression test.
14297
14298 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
14299
14300         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
14301         and div/rem checks.
14302
14303 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
14304
14305         * Makefile.am: fix miguel's change to build mono statically against
14306         libmono (track build dependencies).
14307
14308 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14309
14310         * cfold.c: Some glib versions do not have G_MININT32.
14311
14312 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
14313
14314         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
14315         with precision of tan, atan, sin and cos, and implemented related
14316         regressions tests (fixes bug 54467, but one new problem appeared and
14317         is not fixed yet).
14318
14319 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14320
14321         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
14322
14323         * exceptions.cs: Add test for constant folding && division by zero.
14324
14325         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
14326         since driver.c is in libmono too, so the optimization was useless.
14327
14328         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
14329         variable to driver.c so the compiler can emit more efficient code to
14330         access them.
14331
14332 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14333
14334         * Makefile.am: don't distribute generated inssel.[ch] files.
14335
14336 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
14337
14338         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
14339         into the default appdomain. Fixes #58707.
14340
14341         * jit-icalls.c: Remove the broken approximation for truncl, doing
14342         no conversion is better.
14343
14344         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
14345         Fixes #58863.
14346
14347 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14348
14349         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
14350         of the mcrxr instruction which is not available on some processors
14351         even if it's documented to be. Implement add and sub overflow correctly
14352         (still not complete for long unsigned). Speed up icalls a bit.
14353
14354 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
14355
14356         * mini.c (mono_jit_compile_method_with_opt): Make sure that
14357         we run .cctor in the current domain instead of target_domain.
14358         
14359         Fixes bug #58558, .cctor not being called in -O=shared.
14360
14361 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14362
14363         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
14364
14365 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
14366
14367         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
14368         which can be done with an imm8, do it that way.
14369         (mono_arch_output_basic_block): ditto for a jmp
14370         (mono_arch_emit_prolog): Computate maximum offset of a label.
14371
14372 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
14373
14374         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
14375         now tries to allocate prefered physical reg's for virtual
14376         regs. This reduces the number of emited spills/loads with
14377         20-30% on our core assemblies.
14378
14379 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14380
14381         * jit-icalls.c: truncl() is not needed and trunc() is
14382         the correct thing to do anyway (bug #58287).
14383
14384 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
14385
14386         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
14387         if available.
14388
14389 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
14390
14391         * driver.c: enable loop optimizations by default.
14392
14393 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14394
14395         * mini-x86.c: fix calc of max loop size when aligning loops start.
14396
14397 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
14398
14399         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
14400         the stack.
14401
14402 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
14403
14404         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
14405         should set carry.
14406
14407         * basic-long.cs: Add tests for add/subtract of immediates with carry.
14408
14409         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
14410         
14411         * mini.c (inline_method): Allways inline some wrappers even if the cost
14412         is too large. Fixes #58785.
14413
14414         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
14415         
14416 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
14417
14418         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
14419         (crichton@gimp.org). Beginning of support for sparc/linux.
14420
14421         * mini-sparc.c: Optimize retrieval of LMF address.
14422
14423 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
14424
14425         * exceptions-ppc.c:  handle alloca in methods with clauses.
14426
14427 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
14428
14429         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
14430
14431 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
14432
14433         * mini.c: Delegate most of the abort signal work to 
14434           mono_thread_request_interruption, which also handles Stop and Suspend
14435           states.
14436
14437 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
14438
14439         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
14440         supports the save/restore lmf opcodes.
14441
14442 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
14443
14444         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
14445         by gcc-3.4 as well.
14446
14447         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
14448
14449 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14450
14451         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
14452         methods which contain array accesses.
14453
14454         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
14455         boundaries. Fixes #58537.
14456
14457         * iltests.il: Add regression test for #58537.
14458
14459 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14460
14461         * mini-x86.c (mono_arch_local_regalloc): Last part of
14462         fix for bug #58633 (releasing register to early).
14463
14464 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
14465
14466         * basic-long.cs: Add new regression test.
14467
14468 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14469
14470         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
14471         register too early on the chain.
14472
14473 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14474
14475         * mini.c (create_helper_signature): Use a helper function to reduce
14476         the code which needs to be written. Also set the calling convention of
14477         icalls on windows. Fixes #57840.
14478
14479 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14480
14481         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
14482         exceptions-ppc.c: added helper function to get the instruction address
14483         from a signal handler context.
14484
14485 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14486
14487         * helpers.c: use g_get_tmp_dir. Invokes happyness 
14488         from gonzalo.
14489
14490 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14491
14492         * helpers.c: Add new env variable to pass args to objdump.
14493         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
14494
14495 2004-05-17  Radek Doulik  <rodo@ximian.com>
14496
14497         * Makefile.am (common_sources): added abcremoval.h so it get
14498         disted and daily mono packages on go-mono.com will build again
14499
14500 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
14501
14502         * abcremoval.c: Fixed coding style, added copyright header.
14503
14504         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
14505
14506         * mini.h: Added prototype for abc removal main function.
14507
14508         * build_relations_propagation_table.pl: Added copyright header.
14509
14510 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14511
14512         * basic-long.cs: reg test for complex ceq_long bug.
14513
14514 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14515
14516         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
14517         reg in long and clob case (bug #58343). Fixed/added comments.
14518
14519 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
14520
14521         * mini.c (mono_jit_runtime_invoke): Follow new convention
14522         of calling the invoke method with an function pointer.
14523
14524 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
14525
14526         * ChangeLog: Fix author of memory leak patch.
14527
14528 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
14529
14530         * Makefile.am: fix make dist as well...
14531
14532
14533 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
14534
14535         * cfold.c: Made so that conversions from pointer to int4 are no-ops
14536         on archs where pointers are 4 bytes long.
14537
14538         * Makefile.am: Added abcremoval.c source file.
14539
14540         * abcremoval.c: Added abcremoval.c.
14541
14542         * abcremoval.h: Added abcremoval.h.
14543
14544         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
14545
14546         * inssel.brg: Enabled bounds check removal.
14547
14548         * mini.c: Added support for abcrem optimization.
14549
14550         * mini.h: Added abcrem optimization label.
14551
14552         * driver.c: Added support for abcrem optimization.
14553
14554         * propagated_relations_table.def: Added propagated_relations_table.def.
14555
14556 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14557
14558         * mini.c, cfold.c: fix style.
14559
14560 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14561
14562         * mini.c: handle issue with the low-level implementation of
14563         some long opcodes (bug #54209).
14564
14565 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
14566
14567         * basic.cs: test for my new cmov stuff.
14568
14569 2004-05-13      Patrik Torstensson
14570
14571         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14572         opt and added peephole documentation.
14573
14574 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14575
14576         * tramp-ppc.c: rewrote the generic trampoline code.
14577
14578 2004-05-11      Patrik Torstensson
14579
14580         * mini-x86.c: optimize long shl/shr asm code (one less branch)
14581
14582 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14583
14584         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14585
14586         * mini.h mini.c dominators.c: Applied patch from Derek Woo
14587         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14588
14589         * mini.c: Add new icalls for AsAny marshalling.
14590
14591 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14592
14593         * tramp-ppc.c, mini-ppc.c: more cleanups.
14594
14595 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14596
14597         * mini.c: no warnings.
14598
14599 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14600
14601         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14602
14603 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14604
14605         * mini.c: In the thread abort signal handler, if the thread is in the
14606         process of being stoped, don't throw the Abort exception, just stop the
14607         thread.
14608
14609 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14610
14611         * tramp-ppc.c: removed old code.
14612
14613 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14614
14615         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14616         do some simple speed optimizations on ppc.
14617
14618 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14619
14620         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14621         and large offsets in load/store.
14622
14623 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14624
14625         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14626         it causes regressions.
14627
14628 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14629
14630         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14631         support.
14632
14633 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14634
14635         * jit-icalls.c: remove warnings.
14636         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14637         speedups for unsafe code.
14638
14639 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
14640
14641         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14642
14643 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
14644
14645         * basic-calls.cs: Add new regression test.
14646
14647         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14648         more portable.
14649
14650         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14651
14652         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14653         is no longer used.
14654
14655 2004-05-06      Patrik Torstensson
14656
14657         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14658         long reg allocation in any reg (not only eax:edx) and implemented 
14659         long shl/shr ops in asm instead of helpers.
14660
14661 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14662
14663         * mini-sparc.h: Fix warnings.
14664
14665         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14666         stack.
14667
14668         * mini-exceptions.c (mono_handle_exception): Call the filter in a
14669         separate statement for clarity.
14670
14671         * mini-sparc.c: Update status.
14672
14673 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
14674
14675         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
14676         here.
14677
14678 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14679
14680         * inssel-ppc.brg: another small pre-release workaround:
14681         we don't do overflow detection for long_sub_un.
14682
14683 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14684
14685         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14686         (also works around a weird ppc bug: 57957).
14687
14688 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14689
14690         * tramp-ppc.c: trampoline fixes.
14691
14692 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
14693
14694         * mini-ppc.c: fixed typos.
14695
14696 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14697
14698         * mini-ppc.c, exceptions-ppc.c: more code saves registers
14699         at the top of the stack. Fixed typos. Use a frame registers
14700         for all the methods with exception clauses.
14701
14702 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14703
14704         * exceptions-ppc.c: restore fp registers.
14705
14706 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14707
14708         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14709         order from the stack top (moved the stack room to save the
14710         return value for trace after the param area). Fixed corruption
14711         in restoring registers on unwind.
14712
14713 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14714
14715         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14716
14717 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14718
14719         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14720         and prolog/epilog for methods that use it. Allow
14721         enough param area room for varargs methods. Fix miguel's
14722         breakage in exception handling.
14723
14724 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14725
14726         * Makefile.am: run genmdesc only on current arch.
14727
14728 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14729
14730         * exceptions-x86.c:
14731         * mini-x86.h: fix the build on windows.
14732
14733 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14734
14735         * 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.
14736
14737         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14738
14739         * mini-exceptions.c: New file.
14740         
14741         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14742         Move some parts of the x86 exception handling code to an 
14743         arch-independent file so it can be shared with other ports.
14744
14745 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14746
14747         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
14748
14749 2004-04-26  David Waite  <mass@akuma.org>
14750
14751         * driver.c: remove comma from end of enumeration declaration
14752
14753 2004-04-26  Jackson Harper  <jackson@ximian.com>
14754
14755         * driver.c: parse config file before loading first assembly. This
14756         allows the user gac to be enabled/disabled. 
14757         
14758 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
14759
14760         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
14761         simpler mechanism: we do not care what is encoded initially
14762         (branch absolute or relative), we care about the code and its
14763         target.  I kept the old code for reference for now.
14764
14765         The new code tries first to determine if the jump is anywhere in
14766         the -/+32 absolute meg range, if it succeeds, it encodes using the
14767         absolute branch;  If not, it tried to find something in the
14768         relative range, if not, it uses the handle_thunk code. 
14769
14770 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
14771
14772         * exceptions-ppc.c: use the correct ip register on macosx.
14773
14774 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
14775
14776         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
14777
14778 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
14779
14780         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
14781         Raise exception on integer divide by zero by hand since the hw
14782         doesn't support it. Handle NaNs in FP compares.
14783
14784 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
14785
14786         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
14787         code reducing duplication between the platforms and enabled
14788         signal exception handling (on linux for now).
14789
14790 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
14791
14792         * exceptions-ppc.c: more macosx support.
14793
14794 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14795
14796         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
14797
14798 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
14799
14800         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
14801
14802 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
14803
14804         * iltests.il: more tests.
14805
14806 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14807
14808         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
14809         vars as well.
14810
14811 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14812
14813         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
14814
14815 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
14816
14817         * liveness.c: Mark variables as volatile in all basic blocks reachable
14818         from exception clauses.
14819
14820 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
14821
14822         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
14823         inlining.
14824
14825 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
14826
14827         * iltests.il, basic.cs: more tests for regalloc.
14828
14829 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14830
14831         * iltests.il: Some tests for register allocation modifications
14832         I have locally.
14833
14834 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
14835
14836         * exceptions.cs: Add regression test for bug #56782.
14837
14838         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
14839         original stack trace if an exception is rethrown. Fixes #56782. Oh,
14840         the beauty of fixing the same thing in 5 different files...
14841
14842 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
14843
14844         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
14845         methods.
14846
14847 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
14848
14849         * mini.c: Add support for STRWLPARRAY marshalling convention.
14850
14851 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
14852
14853         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
14854         to init the context to setup the regs pointer).
14855
14856 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14857
14858         * exceptions-ppc.c: more exceptions work.
14859
14860 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14861
14862         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
14863         not allowed.
14864
14865 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14866
14867         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
14868         can use the memory directly.
14869
14870         * cpu-pentium.md: Update documentation from a post from Zoltan. 
14871
14872         add x86_add_membase, x86_sub_membase, x86_mul_membase
14873
14874 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
14875
14876         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
14877         GENERAL_REGS they were also hardcoded for all PPC ports.
14878
14879         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
14880
14881         Remove hard-coded limit for floating point registers, use
14882         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
14883
14884         Notice that in MacOS X calling conventions you can fit a lot more
14885         floating point values in registers, so I should update the PInvoke
14886         test to excercise the passing of floating point values on the
14887         stack (currently broken).
14888         
14889 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
14890
14891         * tramp-ppc.c (create_trampoline_code): Added
14892         JUMP_TRAMPOLINE_SIZE. 
14893         (ppc_magic_trampoline): Follow the pattern from
14894         x86_magic_trampoline: if code is set to zero, return. 
14895         (create_trampoline_code): Always pass MonoMethod to the jump
14896         trampoline, before it was passing a null.
14897         (mono_arch_create_jump_trampoline): Implement the jump stub, could
14898         share the code with mono_arch_create_jit_trampoline. 
14899
14900         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
14901         implemented.
14902         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
14903         implemented.  
14904
14905         * cpu-g4.md: Added length for jmp instruction, the worst case
14906         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
14907         for save_lmf).
14908
14909 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
14910
14911         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
14912
14913 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
14914
14915         * mini.c: Only set bblock->real_offset when adding a new bblock, and
14916         before each IL instruction.
14917
14918         * mini.c (CEE_BOX): Fix warnings.
14919
14920 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14921
14922         * mini.c: removed a few unused vars and extra whitespace.
14923
14924 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
14925
14926         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
14927         checks.
14928         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
14929         index.
14930         (OP_GETCHR): use the above
14931         (CEE_LDELEMA): use the above.
14932
14933         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
14934         version of the generic impl.
14935         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
14936         (CEE_LDELEMA): use the above.
14937
14938 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14939
14940         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
14941         Fixes #56317.
14942
14943         * iltests.il: Added new regression test for #56317.
14944
14945 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
14946
14947         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
14948         under NetBSD. Fixes #56450.
14949
14950         * liveness.c (update_gen_kill_set): Fix previous patch.
14951
14952 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14953
14954         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
14955
14956 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
14957
14958         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
14959         ldsfld and ldsflda.
14960
14961         * inssel-sparc.brg: Add more optimizations.
14962
14963         * mini-sparc.c: Replace multiply/divide with shifts if possible.
14964
14965 2004-04-01  Martin Baulig  <martin@ximian.com>
14966
14967         * mini.c (handle_box): New static function; moved the
14968         implementation of CEE_BOX here.
14969         (mono_method_to_ir): Added `constrained_call' variable.
14970         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
14971         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
14972         mono_method_get_constrained() to get the method.
14973
14974 2004-04-01  Martin Baulig  <martin@ximian.com>
14975
14976         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
14977         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
14978         (mono_method_to_ir): We don't need these macros anymore since
14979         mono_class_get_full() already takes care of it. 
14980
14981 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14982
14983         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
14984         use @function (as doesn't accept #function here) and check the return
14985         value of system and stop if fails.
14986
14987 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14988
14989         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
14990
14991 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
14992
14993         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
14994
14995         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
14996
14997         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
14998         #56223.
14999
15000         * basic-long.cs: Add test for negation of Int64.MinValue.
15001
15002 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
15003
15004         * mini-sparc.c: Update status.
15005
15006         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
15007
15008         * exceptions-sparc.c: Fix return value in filters.
15009
15010         * inssel-sparc.brg: Fix register allocation in some rules.
15011
15012 2004-03-28  Martin Baulig  <martin@ximian.com>
15013
15014         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
15015         if neccessary.  
15016
15017 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
15018
15019         * mini-x86.c (mono_arch_patch_code): Fix warnings.
15020         
15021         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
15022         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
15023         remove unused conv_u4 opcode.
15024
15025         * mini-x86.c: Remove valgrind workaround since it slows down things
15026         even when mono is not run under valgrind.
15027
15028 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
15029
15030         * mini-sparc.c: Update status.
15031
15032         * inssel-sparc.brg: Add some optimizations.
15033
15034         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
15035         future delay slot filling. Add support for varargs, tail calls and JMP.
15036
15037         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
15038         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
15039
15040         * inssel.brg: Fix register allocation in OP_ARGLIST.
15041
15042         * inssel.brg: Fix warnings.
15043
15044 2004-03-25  Martin Baulig  <martin@ximian.com>
15045
15046         * mini.c (inflate_generic_field): Removed.
15047         (mini_get_method): Removed, use mono_get_method_full(),
15048         (mini_get_class): Removed, use mono_class_get_full().
15049         (mono_method_to_ir): Pass our generic context to
15050         mono_field_from_token().        
15051
15052 2004-03-25  Martin Baulig  <martin@ximian.com>
15053
15054         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
15055         of a `MonoMethod *'.
15056         (mini_get_method): Take a `MonoGenericContext *' instead
15057         of a `MonoMethod *'.
15058         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
15059         a new local variable called `generic_context' which holds the
15060         current `MonoGenericContext *'; use it to lookup things.
15061
15062 2004-03-24  Martin Baulig  <martin@ximian.com>
15063
15064         * mini.c (mini_get_class): New static method; if we're inside a
15065         generic instance, inflate the class if neccessary.
15066         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
15067
15068 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
15069
15070         * iltests.il: New regression test for #55976.
15071
15072         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
15073         #55976.
15074
15075 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15076
15077         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
15078         output.
15079
15080 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15081
15082         * liveness.c: Consider SSA stores as well as loads when making vars
15083         volatile.
15084
15085         * exceptions.cs: New regression tests for register allocation.
15086         
15087 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
15088
15089         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
15090         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
15091           domain lock only to protect puntual access to data structures.
15092           Added access lock for sighash, jit_icall_hash_name, 
15093           jit_icall_hash_addr and domain->code_mp.
15094
15095 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
15096
15097         * driver.c: Print SIGSEGV handling method.
15098
15099         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
15100
15101         * mini.c (setup_jit_tls_data): Handle case when this is called
15102         multiple times for a thread.
15103
15104         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
15105         is different from fbxx_un. Fixes #54303. Also use constants instead of
15106         magic numbers in a lot of places.
15107
15108 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
15109
15110         * exceptions.cs: Fix cctor test when --regression is used.
15111
15112 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
15113
15114         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
15115         for Linux/ppc.
15116
15117 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15118
15119         * inssel-ppc.brg: fixed register assignments for some rules.
15120
15121 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15122
15123         * exceptions.cs: Add test for exceptions in static constructors.
15124
15125         * mini.c (mono_jit_compile_method_with_out): Move the calling of
15126         static constructors outside the domain lock. Fixes #55720.
15127
15128 2004-03-17  Martin Baulig  <martin@ximian.com>
15129
15130         * mini.c (get_generic_field_inst): Removed, this'll never happen.
15131         (inflate_generic_field): Take the `MonoMethod *' instead of the
15132         `MonoClass *' and added support for generic method.
15133         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
15134         have a `field->parent->gen_params', only inflate the field if it's
15135         an open constructed type.
15136
15137 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15138
15139         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
15140         exception object instead of the preconstructed ones.
15141
15142 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15143
15144         * mini.c: reverted changed to sigsegv_signal_handler commited
15145         accidentally in the previous patch.
15146
15147 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15148
15149         * mini.c:
15150         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
15151         running --aot with an old assembly.
15152
15153 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
15154
15155         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
15156         point values.
15157
15158         * mini-sparc.c: Add support for v9 branches with prediction.
15159
15160 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
15161
15162         * mini.c (mini_init): #warning is GNUC only
15163
15164         * mini-sparc.h: implement __builtin_frame_address
15165         and __builtin_return_address for Sun C compiler
15166
15167 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
15168
15169         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
15170
15171 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
15172
15173         * basic-calls.cs: Add test for unaligned byref long argument passing.
15174
15175         * mini-ops.h: Add sparcv9 compare and branch instructions.
15176
15177         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
15178         v9 instructions if we have a v9 cpu.
15179
15180         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
15181         registers for global allocation.
15182
15183         * exceptions-sparc.c: Fixes.
15184         
15185 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
15186
15187         * liveness.c (mono_analyze_liveness): Optimized version.
15188
15189         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
15190
15191         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
15192         sparc work.
15193
15194         * basic-float.cs basic-calls.cs: New regression tests.
15195
15196 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
15197
15198         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
15199         sigaltstack implementation.
15200
15201         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
15202         
15203         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
15204         stuff if SIGSEGV_ON_ALTSTACK is not defined.
15205
15206 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
15207
15208         * mini.c: Fix warnings.
15209         
15210         * mini.c (mono_resolve_patch_target): New function which contains the
15211         arch independent part of the patching process.
15212
15213         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
15214         patching code to a separate function.
15215
15216 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
15217
15218         * mini.c (add_signal_handler): ifdef out on Windows
15219
15220 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
15221
15222         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
15223         cpu-sparc.md: Add exception handling support + other fixes.
15224
15225         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
15226         typed GC detection in --version.
15227
15228         * basic.cs exceptions.cs: New regression tests.
15229
15230         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
15231         the arch specific code can store data during a compilation.
15232
15233         * mini-ops.h: Add OP_SETFRET.
15234
15235         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
15236         function, register a separate icall for each arity, so the icalls can
15237         get a wrapper.
15238         
15239         * mini.c (mono_print_tree): Print negative offsets in a more readable
15240         form.
15241         
15242         * mini.c: Make signal handling work on sparc.
15243         
15244         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
15245
15246         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
15247
15248         * jit-icalls.c: Emulate truncl by aintl on solaris.
15249
15250         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
15251
15252 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
15253
15254         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
15255
15256 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
15257
15258         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
15259         a MarshalByRef type, inline a method that performs the check, taking into
15260         account that the object can be a proxy. Also implemented tow new opcodes:
15261         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15262         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
15263         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15264
15265 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
15266
15267         * mini-ppc.c: if a relative branch displacement is too big
15268         but it points to and area reachable with an absolute branch, 
15269         avoid the thunks.
15270
15271 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15272
15273         * mini.c: optimize small copies in cpblk.
15274
15275 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
15276
15277         * basic-calls.cs basic-float.cs: New regression tests.
15278
15279         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
15280         negative offsets from %fp. Implement localloc. Fix local register 
15281         allocation. Fix the case when the this argument needs to be saved to
15282         the stack. Implement some missing opcodes.
15283
15284 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
15285
15286         * mini.c (mini_method_compile): Reenable global regalloc in methods
15287         with exception handlers.
15288
15289         * linear-scan.c (mono_varlist_sort): Fix warning.
15290
15291         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
15292
15293         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
15294         regalloc costs.
15295
15296         * liveness.c: Make all variables uses in exception clauses volatile, to
15297         prevent them from being allocated to registers. Fixes #42136.
15298
15299 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
15300
15301         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
15302         causes regressions.
15303
15304         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
15305         argument to mono_arch_regalloc_cost.
15306
15307         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
15308         precisely.
15309
15310 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
15311
15312         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
15313         Make the cost of allocating a variable to a register arch dependent.
15314
15315         * basic-calls.cs: Fix compilation of tests.
15316         
15317         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
15318         helper function to cut back on the number of #ifdefs needed.
15319
15320         * mini-ppc.c: Fix compilation.
15321
15322         * basic-calls.cs: New regression tests.
15323
15324         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
15325
15326         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
15327         of l0 since that is callee saved.
15328
15329         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
15330         to virtual calls.
15331
15332         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
15333         of delay instruction.
15334
15335         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
15336
15337         * mini.h (MonoCallInst): Add 'virtual' flag.
15338
15339         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
15340
15341 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
15342
15343         * *.cs: New regression tests.
15344
15345         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
15346         work.
15347
15348         * mini.c (mono_runtime_install_handlers): Fix build.
15349
15350         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
15351         'signal_stack_size' members.
15352
15353         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
15354         alternate signal stack.
15355
15356         * exceptions-x86.c: Add stack overflow handling.
15357
15358         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
15359         functions to arch independent code.
15360
15361         * mini.c (mono_print_tree): Print more detailed info for load_membase
15362         opcodes.
15363         
15364 2004-02-23  Martin Baulig  <martin@ximian.com>
15365
15366         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
15367
15368 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15369
15370         * mini-x86.c: fixed reg allocation for div/rem.
15371
15372 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
15373
15374         * driver.c (mono_main): Report some configuratio options on --version.
15375
15376 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
15377
15378         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
15379         low in the address space. Correctly flush memory in thunks where we
15380         output native code.
15381
15382 2004-02-20  Martin Baulig  <martin@ximian.com>
15383
15384         * mini.c (mini_get_method): New static method; inflate all generic
15385         methods and methods in open generic instances.
15386         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
15387         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
15388
15389 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15390
15391         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
15392
15393         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
15394
15395 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
15396
15397         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
15398
15399         * mini-sparc.c (flushi mono_arch_output_basic_block): make
15400         it compile using Sun's compiler.
15401
15402 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15403
15404         * 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.
15405
15406         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
15407
15408 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15409
15410         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
15411         code.
15412         * mini-ppc.c: handle calls outside of the allowed range with thunks
15413         allocated using the code manager.
15414         * tramp-ppc.c: use the code manager to hold generated native code.
15415         Fixed the magic trampoline to just patch vtable entries.
15416
15417 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
15418
15419         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
15420         independent file.
15421
15422 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
15423
15424         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
15425         PPC.
15426
15427         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
15428         if we have a working __thread implementation.
15429
15430         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
15431         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
15432
15433 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
15434
15435         * mini-x86.c: Fix compilation under gcc 2.
15436         
15437 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
15438
15439         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
15440         contains a call to the wrapped function.
15441
15442         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
15443         OP_<CALL>_IMM opcodes, and use them under X86.
15444         
15445         * mini.c (mono_jit_find_compiled_method): Fix warning.
15446
15447         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
15448
15449         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
15450
15451         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
15452         functionality to mini.c.
15453
15454         * mini.c (mono_create_jump_trampoline): New function to create a jump
15455         trampoline. Return a compiled method instead of a trampoline if it
15456         exists. Add a cache for jump trampolines.
15457
15458         * mini.c (mono_jit_find_compiled_method): New function to return a
15459         compiled method if it exists.
15460
15461         * mini-x86.c: Call mono_create_jump_trampoline instead of 
15462         mono_arch_create_jit_trampoline.
15463
15464         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
15465         a jump trampoline. Fixes #52092.
15466         
15467 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
15468
15469         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
15470         which is not up-to-date. Add check_corlib_version () instead.
15471
15472         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
15473         have to call it.
15474         
15475         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
15476         since newer valgrind versions do not need it.
15477
15478         * mini.c (mono_jit_compile_method_with_opt): New helper function to
15479         compile a method with a given set of optimizations.
15480
15481         * mini.c: Compile icall wrappers on-demand instead of at startup.
15482
15483         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
15484         wrapper for an icall.
15485
15486 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
15487
15488         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
15489         #54063.
15490
15491         * iltests.il: Add test for non-empty stack before switch instruction.
15492
15493 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
15494
15495         * mini.c: Add support for new stringbuilder marshalling conventions.
15496
15497         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
15498
15499 2004-02-01  Martin Baulig  <martin@ximian.com>
15500
15501         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
15502         in `ginst->mtype_argv'.
15503
15504 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
15505
15506         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
15507         facilitate grepping.
15508
15509 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
15510
15511         * mini.c: fixed buglet in initobj generic implementation for references.
15512
15513 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
15514
15515         * Makefile.am: make the version script conditional.
15516         * jit-icalls.c: handle missing truncl().
15517
15518 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
15519
15520         * exceptions.cs: Add more tests for double->int conversion.
15521
15522         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
15523         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
15524
15525 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
15526
15527         * driver.c: make --verbose --version emit an error
15528         if the loaded corlib doesn't match the runtime version.
15529
15530 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
15531
15532         * mini-ppc.h: export ppc_patch().
15533         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
15534         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
15535         on par or better than on MacOSX.
15536
15537 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
15538
15539         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
15540         mono_lookup_pinvoke_call.
15541
15542         * mini-x86.c: Under windows, the default pinvoke calling convention is
15543         stdcall. Fixes #52834.
15544
15545         * mini.c (optimize_branches): Add an upper bound to the number of
15546         iterations to prevent infinite loops on strange loops. Fixes #53003.
15547
15548 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
15549
15550         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
15551         and ISINST. Fixes #52093.
15552
15553         * objects.cs (test_0_vector_array_cast): New tests.
15554         
15555 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
15556
15557         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15558         checking in Array.Set ().
15559
15560         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15561         #52590.
15562
15563         * object.cs (test_0_multi_array_cast): New regression test.
15564
15565 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15566
15567         * exceptions-ppc.c: fix build on Linux/PPC.
15568
15569 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
15570
15571         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15572         running under valgrind.
15573         (x86_magic_trampoline): Fix build bustage.
15574
15575         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15576         negative values as well. This is needed for the encoding of the line number
15577         info, since sometimes the line numbers are not in increasing order.
15578
15579 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
15580
15581         * cpu-pentium.md (localloc): Increase the size of the localloc 
15582         instruction since it is a loop under Win32.
15583
15584         * debug-mini.c (record_line_number): Get rid of unneccesary memory
15585         allocation.
15586
15587 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
15588
15589         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
15590         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
15591         Max Horn (max@quendi.de). Fix file names in comments.
15592
15593 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
15594
15595         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15596         avoid stack overflow.
15597         (replace_usage): Avoid uninitialized variable warnings.
15598
15599         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15600         and taking the address of valuetype variables.
15601
15602 2004-01-03  Patrik Torstensson
15603
15604         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15605         for other purposes than FP later on.
15606
15607 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
15608
15609         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15610         of tail calls.
15611
15612 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15613
15614         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15615
15616 2003-12-30  Patrik Torstensson <p@rxc.se>
15617
15618         * mini-x86.h: Decreased number of availiable fp regs.
15619         Solves corner cases with FP spilling.
15620
15621 2003-12-23  Patrik Torstensson <p@rxc.se>
15622
15623         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15624         for floating point stack tracking / spilling on x86. 
15625         Fixes bug #49012.
15626         
15627         * basic-float.cs: added float mul overflow test.
15628
15629 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
15630
15631         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15632
15633 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15634
15635         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15636         supports for cond branches that overflow the immediate
15637         overflow offset. mcs can compile simple programs.
15638
15639 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15640
15641         * exceptions-ppc.c: exception handling support wip:
15642         finally handlers get run on exception.
15643
15644 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
15645
15646         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
15647         profiling.
15648
15649 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15650
15651         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15652         initial support for stack walking and unwinding.
15653
15654 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
15655
15656         * driver.c (mono_main): Make corlib-out-of-sync message more 
15657         descriptive. Also remove verify_corlib call.
15658
15659 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15660
15661         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
15662         not overlap with other call's arguments, too.
15663
15664 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15665
15666         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
15667         move to arch-specific code the choice of arch-specific
15668         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15669         * mini.c: ensure emulation calls will not interleave
15670         with other calls.
15671
15672 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15673
15674         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
15675         the magic trampoline stack frame is dropped before executing
15676         the new method.
15677
15678 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15679
15680         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
15681         and integer to fp conversions. Added support for overflowing
15682         arguments on the stack. Reserve a couple more registers as temps.
15683         Added support for aot compilation (as output still needs to be
15684         tweaked, though).
15685
15686 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15687
15688         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15689         Don't overwrite return register in some corner cases.
15690
15691 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
15692
15693         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15694         static constructors when AOT compiling.
15695
15696         * driver.c (mono_main): Call mono_check_corlib_version.
15697
15698 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15699
15700         * cpu-g4.md, basic.cs: fixed div target register.
15701
15702 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15703
15704         * mini-ppc.c, basic.cs: shl_imm fix with test.
15705
15706 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15707
15708         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
15709         structures by value. Misc fixes.
15710         * objects.cs: more tests.
15711
15712 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15713
15714         * mini-ppc.c: lconv.ovf.i implemented.
15715
15716 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15717
15718         * mini.c:
15719         (mini_init): don't error out if someone already called g_thread_init.
15720
15721 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15722
15723         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15724         to be any type per the spec. Fix abnormal memory usage when
15725         the same object is repeatedly thrown.
15726
15727 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15728
15729         * mini.c: check for overruns in IL code.
15730
15731 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
15732
15733         * TODO: Add/remove some todo entries.
15734
15735 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
15736
15737         * driver.c (mono_main): Call mono_verify_corlib.
15738
15739 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
15740
15741         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
15742         This has been moved to mini.c
15743         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15744         type being casted is marshalbyref it could be a proxy, so instead of
15745         emitting the type check code, emit a call to a runtime method that will
15746         perform the check by calling CanCastTo if needed.
15747
15748 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
15749
15750         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
15751         methods with large stack frames under Win32.
15752
15753 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
15754
15755         * Makefile.am: Distribute regression tests.
15756
15757         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
15758         at the end instead of inserting each variable into the sorted list.
15759
15760         * linear-scan.c (mono_varlist_sort): New helper function.
15761         
15762 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15763
15764         * mini.c: ensure arguments and locals are within bounds.
15765
15766 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15767
15768         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
15769         related fixes.
15770
15771 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15772
15773         * mini.c (mono_cprop_copy_values): Fix crash.
15774
15775         * aot.c: Set verbosity back to 0.
15776         
15777 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15778
15779         * regalloc.c: complete memory leak fix by Laurent Morichetti
15780         (l_m@pacbell.net).
15781
15782 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
15783
15784         * driver.c (main_thread_handler): Revert the previous patch.
15785
15786         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
15787         under valgrind.
15788
15789         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
15790         memory from the memory pool.
15791
15792         * driver.c (main_thread_handler): Turn on all optimizations when
15793         --aot is used.
15794
15795         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
15796         an array for better performance.
15797
15798         * regalloc.c (mono_regstate_assign): Fix memory leak.
15799
15800         * debug-mini.c (mono_debug_serialize_debug_info): New function to
15801         serialize the debug info.
15802
15803         * debug-mini.c (mono_debug_add_aot_method): New function to load the
15804         debug info from the serialized representation.
15805
15806         * aot.c: Save debug info into the generated file and load it when 
15807         loading a method.
15808
15809         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
15810
15811 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15812
15813         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
15814         More FP-related fixes.
15815
15816 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
15817
15818         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
15819         and register allocation buglet. Hello world now runs.
15820
15821 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
15822
15823         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
15824         * tramp-ppc.c: fixed class init trampoline.
15825         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
15826
15827 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15828
15829         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
15830         mini.c: more ppc changes/fixes.
15831
15832 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15833
15834         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
15835         Also optimize the case when the arguments are the same in the caller 
15836         and in the callee.
15837
15838         * iltests.il: Add tests for tail calls with valuetype arguments.
15839
15840 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15841
15842         * mini-ppc.c: fixes for struct return type.
15843
15844 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
15845
15846         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
15847         mono_spillvar_offset() to arch-specific code.
15848
15849 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
15850
15851         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
15852
15853 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
15854
15855         * exceptions-x86.c: Fix stack space leaks.
15856         
15857         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
15858         registers from the lmf if the method has save_lmf set.
15859
15860 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
15861
15862         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
15863         of icall wrappers into InvokeInDomain, since these are now per-domain.
15864
15865 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
15866
15867         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
15868         make some opcode emulation and intrinsic ops enabled/disabled 
15869         according to the architecture. More fixes.
15870
15871 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
15872
15873         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
15874
15875 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
15876
15877         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
15878         arch-specific handling for 'this' and struct return type to
15879         arch-specific code.
15880
15881 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15882
15883         * aot.c: prevent divide by zero error when reporting (it happened with
15884         Accessibility.dll).
15885
15886 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
15887
15888         * mini.h (inst_switch): Remove unused macro.
15889
15890 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15891
15892         * aot.c:
15893         (load_aot_module): free 'info->methods' and 'info' properly. No more
15894         "free(): invalid pointer blah" messages when you have an old aot
15895         compiled assembly.
15896
15897 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
15898
15899         * jit-icalls.c, mini.c: Added support for context static fields.
15900
15901 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15902
15903         * mini.c (mono_method_blittable): Methods which set LastError are not 
15904         blittable either. Fixes #51108.
15905         
15906 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
15907
15908         * mini.c: flush icache.
15909         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
15910
15911 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
15912
15913         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
15914
15915 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
15916
15917         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
15918         safe on IA32.
15919
15920         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
15921         vararg calls.
15922
15923         * inssel.brg (CEE_MKREFANY): Fix AOT case.
15924
15925 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
15926
15927         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
15928         instruction when the result is discarded.
15929
15930         * iltests.il (test_0_div_regalloc): New regression test.
15931
15932         * arrays.cs: Fix compilation error.
15933
15934 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
15935
15936         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
15937         float rules to inssel-x86.brg: sane architectures with FP registers
15938         don't need to implement these rules.
15939
15940 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15941
15942         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
15943
15944 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
15945
15946         * mini.h, inssel-long32.brg: fixed endianess issues in int64
15947         implementation of 32 bit systems.
15948
15949 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15950
15951         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
15952         (Jeroen Zwartepoorte).
15953
15954 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
15955
15956         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
15957         the caller and the callee matches.
15958         
15959         * mini.c (mono_method_to_ir): Add comment.
15960
15961         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
15962         signbit is missing on some platforms.
15963
15964 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
15965
15966         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
15967
15968         * mini.c (setup_jit_tls_data): Call the new function.
15969         
15970         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
15971
15972         * mini-x86.c: Add experimental support for fast access to the lmf
15973         structure under NPTL/Linux 2.6.x.
15974
15975 2003-11-06  Martin Baulig  <martin@ximian.com>
15976
15977         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
15978         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
15979         the debugger.
15980
15981 2003-11-02  Martin Baulig  <martin@ximian.com>
15982
15983         * mini.c (inflate_generic_field): New static method.
15984         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
15985         generic instance and the field is declared in a generic type, call
15986         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
15987
15988 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
15989
15990         * mini.h mini.c (mono_method_same_domain): New function to return
15991         whenever the caller and the callee are in the same domain.
15992
15993         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
15994
15995 2003-10-30  Martin Baulig  <martin@ximian.com>
15996
15997         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
15998         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
15999         method parameters.
16000         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
16001         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
16002
16003 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
16004
16005         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
16006         propagation.
16007
16008         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
16009         object here, so it is in the correct appdomain etc.
16010
16011 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
16012
16013         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
16014         already done.
16015         (mono_method_to_ir): Avoid freeing the type created returned from
16016         mono_type_create_from_typespec, since it is put into an internal cache
16017         by the function. Fixes pointer.exe.
16018
16019         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
16020         trampolines for icalls and pinvokes as well. Fixes #33569.
16021
16022 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
16023
16024         * mini.c: Update after appdomain changes.
16025
16026         * mini.c (mono_jit_compile_method_inner): Allways compile native
16027         method wrappers in the root domain, since there can only be one
16028         instance of them, whose address is stored in method->info.
16029
16030 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
16031
16032         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
16033         environment variable. Instead detect automatically whenever running
16034         under valgrind using the magic macro RUNNING_ON_VALGRIND from
16035         valgrind.h.
16036
16037 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
16038
16039         * trace.c, trace.h: New files that implement the new trace option
16040         parsing. 
16041
16042         * driver.c: Document new --trace options.
16043
16044         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
16045         mini-x86.c: Apply:
16046
16047         -       if (mono_jit_trace_calls)
16048         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
16049
16050         * mini.h: prototypes.
16051         
16052 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
16053
16054         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
16055
16056         * mini.c inssel.brg: Implement typedefbyref opcodes.
16057
16058         * mini.c (mono_jit_compile_method): Remove unused local variable.
16059
16060         * mini.c (mono_jit_compile_method_inner): Ditto.
16061         
16062 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
16063
16064         * tramp-x86.c (x86_class_init_trampoline): Fix build.
16065         
16066         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
16067
16068 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
16069
16070         * mini.c (mono_no_aot): Remove unused global variable.
16071
16072         * mini.c: Thread safety fixes.
16073
16074 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
16075
16076         * mini.c (mono_create_class_init_trampoline): Add a lock around
16077         class_init_hash_addr.
16078
16079         * arrays.cs (test_0_newarr_emulation): Add new regression test for
16080         #30073.
16081
16082         * mini.c: Decompose the NEWARR instruction before decomposing its
16083         arguments. Fixes #30073.
16084
16085 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
16086
16087         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
16088         convention.
16089
16090 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
16091
16092         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
16093
16094         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
16095
16096         * driver.c: Add support for compiling icall wrappers to --compile.
16097
16098 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
16099
16100         * inssel.brg: The empty value in class->interface_offsets is -1, not
16101         0. Fixes #49287.
16102
16103 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
16104
16105         * objects.cs: New test for 'is' operator on an array of interfaces.
16106
16107 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16108
16109         * tramp-ppc.c: update trampoline code to support jumps
16110         and class initialization.
16111
16112 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
16113
16114         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
16115
16116         * inssel.brg (OP_UNBOXCAST): Fix #46027.
16117
16118         * inssel.brg (OP_UNBOX): Remove unused rule.
16119
16120         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
16121         region instead of one for each method. Fixes #47813.
16122
16123 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
16124
16125         * exceptions.cs (test_0_nested_finally): New regression test for
16126         nested exception handlers.
16127
16128         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
16129
16130         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
16131
16132         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
16133         inlining.
16134
16135         * mini.c (mono_method_check_inlining): Make the inlining limit 
16136         configurable by an environment variable.
16137         
16138         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
16139
16140         * mini.h: Bump AOT file version.
16141
16142         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
16143         token, store the image along with the token, since the token might not 
16144         refer to the same image as the method containing the relocation, 
16145         because of inlining.
16146
16147 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
16148
16149         * mini.c (mono_precompile_assemblies): New function to compile
16150         all methods in all loaded assemblies.
16151
16152         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
16153
16154         * regalloc.h regalloc.c (MonoRegState): Change the type of 
16155         iassign and fassign to int*, since they can contain large negative
16156         values if the register is spilled. Also added some comments. Fixes
16157         #45817.
16158
16159         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
16160         under Win32. Fixes #42964.
16161
16162 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
16163
16164         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
16165
16166         * aot.c: Added support for AOT compiling methods which contain calls
16167         to wrappers. Currently, only remoting-invoke-with-check wrappers are
16168         handled.
16169         
16170         * driver.c (compile_all_methods): Run the compilation in a thread
16171         managed by mono. Fixes #44023.
16172
16173         * mini.c (mono_codegen): Print full method name in verbose output.
16174
16175         * mini-x86.c (mono_arch_patch_code): Fix warning.
16176         
16177         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
16178         jumps, since the method we are jumping to might be domain-specific.
16179
16180         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
16181
16182 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16183
16184         * inssel.brg: string chars are unsigned.
16185
16186 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
16187
16188         * TODO: New todo item.
16189
16190         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
16191         which calls mono_runtime_class_init and patches the call site to
16192         avoid further calls.
16193         (mono_arch_create_class_init_trampoline): New arch specific function 
16194         to create a class init trampoline.
16195         (create_trampoline_code): Generalized so it can create
16196         class init trampolines as well.
16197
16198         * mini.c (helper_sig_class_init_trampoline): New helper variable.
16199         (mono_create_class_init_trampoline): New function to create and cache
16200         class init trampolines.
16201         (mono_find_class_init_trampoline_by_addr): New function to lookup the
16202         vtable given the address of a class init trampoline. Used by the
16203         patching process.
16204         (mono_codegen): Generate a call to a trampoline instead of
16205         mono_runtime_class_init in LDSFLD[A].
16206         (mono_codegen): Add relocations for the new trampoline.
16207         
16208         * mini.h mini-x86.c aot.c: Added a new relocation type: 
16209         MONO_PATCH_INFO_CLASS_INIT.
16210
16211         * mini.h: Bump AOT version number.
16212
16213         * aot.c: Create a copy of the loaded code instead of using the original
16214         so methods which call each other will be close in memory, improving
16215         cache behaviour.
16216         
16217         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
16218         patch since it breaks the regression tests.
16219         
16220         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
16221         for the register saving instruction sequence since the 
16222         frame_state_for function in glibc 2.3.2 don't seem to detect it.
16223
16224 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
16225
16226         * TODO: Fix todo item && remove another.
16227
16228 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
16229
16230         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
16231         previous checkin.
16232
16233         * aot.c: Moved the check for MONO_LASTAOT into the initialization
16234         function of the module.
16235
16236         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
16237         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
16238         --no-aot command line option.
16239
16240 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
16241
16242         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
16243         by Bernie Solomon (bernard@ugsolutions.com).
16244
16245         * inssel.brg: Refactor the interface offset table related code into
16246         its separate functions and add support for the AOT case.
16247
16248 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
16249
16250         * aot.c (mono_aot_get_method_inner): Fix memory leak.
16251         
16252         * aot.c: Added mono_aot_verbose variable and made all debugging
16253         output depend on the value of this variable.
16254
16255         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
16256         method_label and info_label.
16257
16258         * mini.h mini-x86.c aot.c: Added a new relocation type 
16259         MONO_PATCH_INFO_IID for klass->interface_id.
16260
16261         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
16262         the MonoJitInfo structure.
16263
16264         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
16265         a non-root appdomain in shared mode.
16266
16267 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16268
16269         * aot.c: make aot loader less verbose. Remove free of unused variable.
16270
16271 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
16272
16273         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
16274
16275         * .cvsignore: Added *.dll.
16276
16277         * mini.c (mono_print_tree_nl): New function callable while debugging.
16278
16279         * mini.c (mono_print_code): Export this.
16280
16281         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
16282         patched code.
16283
16284 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
16285
16286         * mini.h (MonoCompile): Added 'jit_info' field.
16287
16288         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
16289         the cfg structure, since it is needed by the AOT compiler.
16290
16291         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16292
16293         * aot.c: A major rewrite. Changes include:
16294         - save exception tables for methods which have them.
16295         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
16296         to g_module_symbol.
16297         - reworked the file format so it is now much smaller and needs
16298         fewer relocation entries.
16299         
16300 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16301
16302         * aot.c (load_aot_module): Fix build bustage on platforms without
16303         Boehm GC.
16304
16305 2003-09-04  Martin Baulig  <martin@ximian.com>
16306
16307         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
16308
16309 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16310
16311         * TODO: Some new optimization ideas.
16312
16313         * aot.c: Move AOT module loading logic here from mono_assembly_open.
16314
16315         * aot.c: Save the optimization flags used to compile the code into
16316         the AOT module.
16317
16318         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
16319         support emitting domain specific code.
16320         
16321         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
16322         no longer domain neutral. It can be made domain neutral by compiling 
16323         with --optimize=shared.
16324
16325         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
16326         between appdomains.
16327
16328         * driver.c mini.h mini.c: New --no-aot debugging option which disables
16329         loading of AOT code.
16330
16331         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
16332         
16333         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
16334         if there is no domain neutrality information.
16335
16336 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
16337
16338         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
16339         format version into the generated library.
16340
16341         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
16342         callee method into the caller since one of them could be shared.
16343
16344         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
16345         system exceptions from AOT code now works.
16346
16347         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
16348         method if it is domain neutral and the callee is not.
16349
16350         * graph.c (cfg_emit_one_loop_level): Fix warning.
16351
16352 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
16353
16354         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
16355         last checkin.
16356
16357 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
16358
16359         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
16360         is needed  by code which is executed before mono_runtime_init ().
16361         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
16362         
16363         * mini.c (mono_thread_abort): Fix warning.
16364         (mono_jit_compile_method): Call static constructor in the AOT case too.
16365
16366         * aot.c (mono_compile_assembly): Fix warning.
16367
16368 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16369
16370         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
16371
16372 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
16373
16374         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
16375
16376         * cpu-pentium.md: Fix the length of call opcodes so they include the
16377         ESP restoring instruction. Fixes #47968.
16378
16379 2003-08-28  Martin Baulig  <martin@ximian.com>
16380
16381         * mini-x86.c (mono_arch_call_opcode): Added support for
16382         MONO_TYPE_GENERICINST.
16383
16384         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
16385
16386 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
16387
16388         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
16389         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
16390
16391         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
16392         metadata_section.
16393
16394 2003-08-26  Martin Baulig  <martin@ximian.com>
16395
16396         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
16397         when reporting an error, set this to the actual error location.
16398         (mono_method_to_ir): Report the correct error location if
16399         get_basic_blocks() returned an error.
16400
16401 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
16402
16403         * mini.c (mono_type_blittable): OBJECT is not blittable.
16404         (mono_method_blittable): Methods which have marshalling descriptors
16405         are not blittable either. Fixes #47842.
16406
16407 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
16408
16409         * driver.c mini.c: Use an environment variable instead of a global 
16410         variable. Also fix the build.
16411
16412         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
16413         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
16414         reporting this. 
16415
16416         * driver.c mini.c: Added --with-valgrind option to turn off some
16417         code which prevents mono from running under valgrind.
16418
16419         * mini.c (mono_emit_call_args): Fixed warning.
16420
16421         * mini.c (mono_emulate_opcode): Fixed warning.
16422
16423 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16424
16425         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
16426         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
16427         regalloc.c, regalloc.h: specify available registers in arch-specific
16428         code and support floats in the regallocator (patch by Laurent Morichetti 
16429         <l_m@pacbell.net>)
16430
16431 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16432
16433         * mini.c: mono_thread_current() can be called only after
16434         mono_runtime_init(): rearrange code to not call it early on.
16435
16436 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16437
16438         * mini.c: allocate jump tables in the code mempools.
16439
16440 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16441
16442         * mini.c, mini.h: make sure per-thread data allocated by the jit is
16443         freed.
16444
16445 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
16446
16447         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
16448         12 to 16.  This fixes bug #47453.
16449
16450
16451 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16452
16453         * mini-ppc.c: fixed indexed load and unsigned compares.
16454
16455 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
16456
16457         * mini.c: reenabled installation of handler for
16458           thread abort signal.
16459
16460 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16461
16462         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
16463         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
16464         until it's fixed and actually useful.
16465
16466 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16467
16468         * inssel-long32.brg: couple more opcodes implemented.
16469
16470 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16471         
16472         * mini-sparc.c: Even more opcodes implemeted.
16473
16474 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
16475
16476         * mini-sparc.c: More opcodes implemented.
16477
16478 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
16479
16480         * mini-sparc.c: More opcodes implemented.
16481
16482 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16483
16484         * inssel-sparc.brg: Add some needed rules.  Direct
16485         copy from PPC.
16486         * Makefile.am: Use inssel-sparc.brg
16487         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
16488         an assert happy for now.
16489
16490 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
16491
16492         * mini-sparc.c: Fixed compile errors.
16493         * exceptions-sparc.c: Same.  We now produce a mono binary 
16494         on sparc-linux.  Yea.
16495
16496 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
16497
16498         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
16499         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
16500         They compile, but do not work.
16501
16502 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16503
16504         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
16505         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
16506         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
16507         (ct@gentoo.org).
16508
16509 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16510
16511         * mini.c: more opcodes implemented and better support for generics.
16512
16513 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16514
16515         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
16516         * mini.c, mini.h: first cut at generics support: some new instructions 
16517         added and changed the behaviour of some of the existing ones.
16518
16519 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
16520
16521         * mini.c: Removed definition of metadata_shared mutex here.
16522
16523 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16524
16525         * mini-x86.c: make vararg calls work for instance methods.
16526
16527 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16528
16529         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
16530         returns the arguments in a separte list, now.
16531
16532 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16533
16534         * aot.c, mini.c: updates for array type representation changes.
16535
16536 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
16537
16538         * mini.c: register function to perform jit shutdown.
16539
16540 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16541
16542         * mini.c: use a faster allocator if possible.
16543
16544 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16545
16546         * aot.c: some cleanups and portability changes.
16547
16548 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16549
16550         * mini.c: use faster allocation for CEE_BOX if possible.
16551
16552 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16553
16554         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
16555         Moved inlined mempcy code to its own function so that is can be
16556         reused. Added an inline memset function as well (optimized initobj).
16557         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16558
16559 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16560
16561         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16562
16563 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16564
16565         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16566         arch code can setup the cpu for CLR execution, if needed.
16567         We use it on x86 to set the precision of FP operations.
16568
16569 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16570
16571         * mini.c: disable some optimizations if we can guess they'll cost too
16572         much for a given method.
16573
16574 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16575
16576         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16577         
16578 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16579         * mini.h mini.c mini-x86.c: Added instruction level coverage 
16580         info collection support.
16581
16582 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16583
16584         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16585         is now implemented in the profiling API. Get rid of a couple of
16586         unnecessary global variables.
16587
16588 2003-06-15  Nick Drochak <ndrochak@gol.com>
16589
16590         * basic-long.cs: tests for negative values for bigmul, and unsigned.
16591         * cpu-g4.md: add op_bigmul and op_bigmul_un
16592         * cpu_pentium.md: add op_bigmul_un
16593         * inssel-long32.brg: add rule for unsigned bigmul
16594         * mini-ops.h: define OP_BIGMUL_UN
16595         * mini-x86.c: THE BUG: handle (un)signed properly
16596         * mini.c: choose unsigned opcode if needed.
16597         This set of patches fixes bug #44291
16598
16599 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
16600
16601         * mini.c (optimize_branches): improved to handle all kinds of
16602         conditional branches.
16603
16604 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16605
16606         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16607         don't raise exceptions.
16608
16609 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16610
16611         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16612         to arch-specific files.
16613
16614 2003-06-09  Martin Baulig  <martin@ximian.com>
16615
16616         * Makefile.am (libs): Added $(LIBGC_LIBS).
16617
16618 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16619
16620         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16621         and OP_ATAN (fixes bug#44293).
16622
16623 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16624
16625         * Makefile.am, mini-x86.c: rename cpu description array to
16626         pentium_desc, since some compilers define the 'pentium' preprocessor
16627         symbol.
16628
16629 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
16630
16631         * mini.c (mini_select_instructions): add explicit branch if the
16632         following block is not the false target of a conditional branch -
16633         we need this with any optimization that reorder or remove bblocks
16634
16635         * mini.c (optimize_branches): bug fixes
16636
16637 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
16638
16639         * mini.c (mono_method_to_ir): inline static readonly fields
16640
16641         * ssa.c (fold_tree): start cfold support for long (very simple
16642         cases only)
16643
16644         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16645
16646 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16647
16648         * inssel.brg: fixed memcpy (bug #44219).
16649
16650 2003-06-05  Dick Porter  <dick@ximian.com>
16651
16652         * driver.c: Set the glib log levels to not abort if g_message
16653         recurses.
16654
16655         g_set_prgname() has to happen before mini_init() so that the
16656         process handle gets the info.
16657         
16658 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16659
16660         * driver.c: add intrins to the default optimizations to get wider
16661         exposure.
16662
16663 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16664
16665         * mini.h: some large basic blocks will overflow a 16-bit
16666         integers for symbolic registers.
16667
16668 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16669
16670         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16671         (mono_arch_output_basic_block): fix bug 43499 
16672
16673 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16674
16675         * mini.c: kill duplicated definition of mono_debug_format.
16676
16677 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
16678
16679         * mini-x86.c, arrays.cs: fixed register allocation bug.
16680
16681 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16682
16683         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16684
16685         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16686
16687 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16688
16689         * mini.c:
16690         (print_method_from_ip): also print source location information if
16691         available.
16692
16693 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
16694
16695         * mini.c (mono_find_block_region): bug fix in region code
16696         (mini_method_compile): enable removing unreachable code again, but
16697         only in methods without exception clauses.
16698
16699 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16700
16701         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16702         Implemented arglist opcode and handling of TypedReference type.
16703         Fixed x86 call convention when a structure is returned.
16704         Minimal support for calling static vararg methods.
16705
16706 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
16707
16708         * mini.c (mini_method_compile):  always remove unreachable code,
16709         because the code in them may be inconsistent  (access to dead
16710         variables for example).
16711
16712 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16713
16714         * driver.c, debug-mini.c: warning fixes.
16715
16716 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16717
16718         * Makefile.am, jit.h, mini.h: install header for embedding mono.
16719
16720 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16721
16722         * mini.c: thread-static fields are registered in mono_class_vtable(),
16723         so ensure the function is called before checking for them.
16724
16725 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
16726
16727         * mini.c (optimize_branches): fix for bug 43586
16728
16729         * jit-icalls.c (mono_llmult_ovf): added an additional check for
16730         overflow (fixes Bug #43639)
16731
16732 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16733
16734         * mini.c, objects.cs: allow the use of stobj for primitive types.
16735
16736 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16737
16738         * mini.c: be less strict about argument checking until we support
16739         running the verifier.
16740
16741 2003-05-27  Nick Drochak <ndrochak@gol.com>
16742
16743         * basic-long.cs: tests for (ulong)int * (ulong)int also
16744         * mini.c: use the same trick for (ulong)int * (ulong)int
16745
16746 2003-05-27  Nick Drochak <ndrochak@gol.com>
16747
16748         * basic-long.cs: add regression test for (long)int * (long)int
16749         * cpu-pentium.md: add op_bigmul specification
16750         * inssel-long32.brg: add OP_BIGMUL rule
16751         * mini-ops.h: add OP_BIGMUL
16752         * mini-x86.c: register allocator: handle case where src1 needs to be
16753         in EAX.
16754         * mini.c: substitute special BIGMUL opcode in the tree for 
16755         (long)int * (long)int
16756
16757 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
16758
16759         * jit-icalls.c: call the type ctor on field access if needed.
16760
16761 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16762
16763         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
16764         to a method (including results of ldelema, bug#43207).
16765
16766 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
16767
16768         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
16769         colors to show exception handler blocks.
16770
16771         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
16772         (fix for pinvoke7.cs).
16773
16774 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16775
16776         * mini.h, mini.c: ensure correct initialization order for types that
16777         require it. Prepare for lazy compilation of jit icall wrappers.
16778         Provide a name for opcode emulation to reduce unneeded mallocing.
16779
16780 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
16781
16782         * mini-x86.c: better register restoring code and profiling
16783         support for tail calls.
16784
16785 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16786
16787         * mini.h, driver.c: prepare for leaf methods optimization.
16788
16789 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16790
16791         * mini.c: get targets of branches before converting a method.
16792
16793 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
16794
16795         * mini.c (optimize_branches): added some experimental code (disbaled) 
16796
16797 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
16798
16799         * mini.c (optimize_branches): fix branch to branch optimization 
16800
16801         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
16802
16803         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
16804
16805         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
16806
16807         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
16808         if needed.
16809
16810 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
16811
16812         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
16813         enable use of interface variables again.
16814
16815         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
16816         I1 to registers because there is no simply way to sign extend 8bit
16817         quantities in caller saved registers on x86.
16818
16819         * inssel-float.brg: set costs of some rules to 2 so
16820         that monobure always select the arch. specific ones if supplied,
16821         regardless of the order we pass the files to monoburg.
16822
16823 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
16824
16825         * mini.c, mini-x86.c: since the magic trampoline for jumps
16826         can't patch the code directly, we do it as soon as the
16827         method gets compiled.
16828
16829 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16830
16831         * mini-x86.c, mini.h: introduce a new patching method
16832         to support CEE_JMP and tail calls.
16833         * mini.c: obey tail.call. Don't precompile methods target
16834         of CEE_JMP.
16835         * tramp-x86.c: new trampoline code to handle methods
16836         reached through a jump.
16837
16838 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
16839
16840         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
16841         bit values to registers
16842
16843 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
16844
16845         * mini.c (mono_compile_get_interface_var): share interface
16846         variables if possible.
16847
16848 2003-05-16  Martin Baulig  <martin@ximian.com>
16849
16850         * debug-mini.c (mono_init_debugger): New function to initialize
16851         the debugger.  This is not in the debugger since it needs to
16852         access some of mini's internals.
16853
16854 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16855
16856         * mini.c (mono_method_to_ir): inlining fixes/cleanups
16857
16858 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
16859
16860         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
16861         for value type handling.
16862
16863 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
16864
16865         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
16866         (mono_method_check_inlining): enable inlining of all kinds of wrappers
16867
16868 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
16869
16870         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
16871           the constructor through a proxy.
16872
16873 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16874
16875         * jit-icalls.c, inssel.brg: fixes to array element address
16876         calculations.
16877
16878 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
16879
16880         * mini-x86.c (is_regsize_var): allocate pointer to registers
16881
16882 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16883
16884         * driver.c: fixed typo, added intrins to the set of optimizations
16885         tested with regressions.
16886
16887 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
16888
16889         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
16890         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
16891         test case.
16892
16893 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
16894
16895         * inssel.brg: remove some common pop instructions without side effects
16896
16897 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16898
16899         * inssel-x86.brg: fixed thinko in int to double conversions.
16900
16901 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
16902
16903         * mini.c, jit-icalls.c: added runtime thread-static variable support.
16904
16905 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16906
16907         * inssel-long32.brg: two more missing instructions.
16908
16909 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
16910
16911         * mini.c (mono_emit_call_args): set the cil_code for all arguments
16912         if not already set.
16913
16914 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
16915
16916         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
16917         correctly.
16918
16919         * basic-float.cs: Added tests for negative zero.
16920
16921 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16922
16923         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
16924         a couple of missing operations for long casts, with test cases.
16925
16926 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16927
16928         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
16929
16930 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
16931
16932         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
16933         code size estimation.
16934
16935 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
16936
16937         * mini.c (mono_jit_create_remoting_trampoline): make it work with
16938         abstract methods (fix bug 42542)
16939
16940         * aot.c: add ability to handle array types
16941         
16942 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
16943
16944         * mini.c: Call the _specific versions of the object allocation
16945         functions if possible.
16946
16947 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16948
16949         * driver.c: call setlocale ().
16950
16951 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16952
16953         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
16954         windows build.
16955
16956 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
16957
16958         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
16959
16960         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
16961         wrappers (fix bug 42122)
16962
16963 2003-05-04  Martin Baulig  <martin@ximian.com>
16964
16965         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
16966
16967         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
16968         s/mini_set_defaults/mono_set_defaults/g.
16969
16970 2003-05-04  Martin Baulig  <martin@ximian.com>
16971
16972         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
16973
16974 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16975
16976         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
16977         (reported by Don Roberts).
16978
16979 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16980
16981         * mini.c: temporarily work around two bugs for this release.
16982
16983 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16984
16985         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
16986         that contains -export-dynamic and it makes using the ld script
16987         useless.
16988         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
16989
16990 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
16991
16992         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
16993         specific cpu.
16994
16995 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
16996
16997         * mini.c: make sure leave calls all the needed finally blocks,
16998         even when the target jumps out of multiple exception clauses.
16999
17000 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17001
17002         * ldscript, Makefile.am: add linker script to reduce the number of
17003         exported symbols (should also fix the issues with libwine defining
17004         some of the same symbols in io-layer).
17005
17006 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
17007
17008         * driver.c (mini_main): Avoid assertion when no file name is given on 
17009         the command line.
17010
17011 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
17012
17013         * driver.c: added --version/-V command line option.
17014         Added the inline optimization in the regression tests.
17015
17016 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17017
17018         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
17019         to the type in the method signature (fixes bug#42134).
17020
17021 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
17022
17023         * mini.c: when inlining, check this is not null only when needed (bug #42135).
17024
17025 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
17026
17027         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
17028
17029 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17030
17031         * driver.c: fixed bug #42100.
17032
17033 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
17034
17035         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
17036
17037 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17038
17039         * mini.c: moved most of the code required to do inlining to its own
17040         function so it can be reused. Inline also ctors if appropriate.
17041
17042 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
17043
17044         * Makefile.am: Link with -export-dynamic so shared libs loaded by
17045         the runtime can call mono API functions.
17046
17047 2003-04-27  Martin Baulig  <martin@ximian.com>
17048
17049         * debug-mini.c (mono_debug_init_method): Added
17050         `guint32 breakpoint_id' argument; if the method has a breakpoint,
17051         send a notification to the debugger.
17052
17053         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
17054         running in the Mono Debugger, just pass the breakpoint number to
17055         mono_debug_init_method().
17056
17057         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
17058
17059 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
17060
17061         * mini.c: allow some more unsafe compares.
17062
17063 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17064
17065         * mini-x86.c, Makefile.am: make distcheck works (partially from
17066         a patch by Richard Lee <r.h.lee@attbi.com>).
17067         * regset.c, regset.h: removed, they are unused.
17068
17069 2003-04-25  Dick Porter  <dick@ximian.com>
17070
17071         * driver.c: Usage reports the name as 'mono' not 'mini'
17072         * exceptions-x86.c: Build and run on freebsd
17073
17074 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17075
17076         * Makefile.am: install the program with the 'mono' name and
17077         the library as libmono instead of mini and libmini.
17078
17079 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17080
17081         * driver.c: provide the APIs for the embedding interface of the old jit.
17082
17083 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
17084
17085         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
17086
17087 2003-04-23  Martin Baulig  <martin@ximian.com>
17088
17089         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
17090
17091         * driver.c: Added `--debug' command line argument to enable
17092         debugging support.
17093
17094 2003-04-23  Martin Baulig  <martin@ximian.com>
17095
17096         * debug.[ch]: Removed.  The code is now in
17097         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
17098
17099         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
17100         last six months.
17101
17102 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
17103
17104         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
17105
17106 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17107
17108         * mini.c:
17109         (mini_cleanup): moved mono_runtime_cleanup call after the call to
17110         mono_domain_finalize.
17111         (mini_method_compile): use mono_method_profile* if the the option is
17112         enabled.
17113
17114 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
17115
17116         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17117         methods with their wrapper.
17118
17119         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17120         methods with their wrapper.
17121
17122         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
17123         their wrapper.
17124
17125         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
17126         wrapper.
17127
17128         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
17129         methods.
17130
17131 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
17132
17133         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
17134
17135 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
17136
17137         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
17138         of the mempool. This is slightly faster and uses less memory
17139
17140 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17141
17142         * mini.c: avoid O(n) allocation for variables.
17143
17144 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17145
17146         * mini.c: handle items on the stack after inlining methods.
17147
17148 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17149
17150         * mini.c: make the method->opcode optimization dependent
17151         on MONO_OPT_INSTRINS and do it lazily.
17152
17153 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17154
17155         * driver.c: print overall results at the end of regression run.
17156
17157 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17158
17159         * inssel.brg: don't overwrite symbolic registers.
17160
17161 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17162
17163         * inssel-x86.brg: fix conversion from long to float.
17164
17165 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
17166
17167         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
17168
17169 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
17170
17171         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
17172
17173         * driver.c: Added --print-vtable option as in the old JIT.
17174
17175 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17176
17177         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
17178
17179 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
17180
17181         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
17182
17183 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
17184
17185         * mini.c regalloc.c regalloc.h: Fix memory leak.
17186
17187 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
17188
17189         * aot.c (mono_aot_get_method): register all used strings
17190
17191 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17192
17193         * mini.c: always intern strings references with ldstr at compile time.
17194
17195 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17196
17197         * Makefile.am: add BUILT_SOURCES.
17198
17199 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17200
17201         * driver.c: give a better error message when the assembly to execute
17202         doesn't have an entry point.
17203
17204 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
17205
17206         * Makefile.am: added hack for automake
17207
17208         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
17209         correct sematics.
17210
17211         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
17212
17213 22003-04-07  Martin Baulig  <martin@ximian.com>
17214
17215         * Makefile.am: Added Makefile.am.
17216
17217         * debugger-main.c: Removed, this is now in the debugger where it
17218         belongs.
17219
17220         * mini.pc.in: Call this package `mini' for the moment.
17221
17222
17223
17224
17225
17226
17227
17228
17229
17230
17231
17232
17233
17234