2008-11-20 Rodrigo Kumpera <rkumpera@novell.com>
[mono.git] / mono / mini / ChangeLog
1 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
2
3         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
4
5 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
6
7         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
8
9         * cpu-x86.md: Same.
10
11         * mini-x86.c (mono_arch_output_basic_block): Same.
12         
13         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
14
15 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
16
17         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
18
19 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
20
21         * simd-intrinsics.c: Enable setters for Vector16sb.
22
23 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
24
25         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
26
27         * cpu-x86.md: Same.
28
29         * mini-x86.c (mono_arch_output_basic_block): Same.
30         
31         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
32
33 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
34
35         * simd-intrinsics.c: Implement setter for Vector8us.
36
37 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
38
39         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
40         for dead variables.
41
42 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
43
44         * mini-ppc.c: remove references to the red zone in the prolog
45         (for systems that don't support it).
46
47 2008-11-19  Mark Probst  <mark.probst@gmail.com>
48
49         * cpu-ppc64.md: Fixed a few instruction lengths.
50
51         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
52         now.
53
54 2008-11-19  Mark Probst  <mark.probst@gmail.com>
55
56         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
57         basic.exe now.
58
59 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
60
61         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
62
63 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
64
65         * mini-ops.h: Added OP_INSERT_I2.
66
67         * cpu-x86.md: Same.
68
69         * mini-x86.c (mono_arch_output_basic_block): Same.
70         
71         * simd-intrinsics.c: Implement setter for Vector8s.
72
73         * simd-methods.h: Add the names of get setters of Vector8s.
74
75 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
76
77         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
78         
79         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
80         parameters.
81
82         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
83
84 2008-11-18  Mark Probst  <mark.probst@gmail.com>
85
86         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
87         for PPC64.  An empty program runs now.
88
89 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
90
91         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
92
93         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
94         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
95         info for JITted code is emitted into a shared library, loadable into gdb.
96
97 2008-11-18  Mark Probst  <mark.probst@gmail.com>
98
99         * Makefile.am: Changes to build PPC64.
100
101         * mini-arch.h: Include mini-ppc64.h on PPC64.
102
103 2008-11-18  Mark Probst  <mark.probst@gmail.com>
104
105         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
106         in PPC code up to r119147.
107
108 2008-11-18  Mark Probst  <mark.probst@gmail.com>
109
110         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
111         cpu-ppc64.md: Changes for PPC64.
112
113         Based on code submitted by andreas.faerber@web.de at
114         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
115         X11/MIT license.
116
117 2008-11-18  Mark Probst  <mark.probst@gmail.com>
118
119         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
120         cpu-ppc64.md: Copied from the corresponding PPC files from
121         r118846.
122
123 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
124
125         * mini-ops.h: Added OP_ROUND.
126
127         * cpu-x86.md: Added round.
128
129         * mini-x86.c: Added support for intrinsicing Math.Round (double).
130
131         * basic-math.cs: Added test_0_round to test rounding.
132
133         Contributed under MIT/X11 license.
134
135 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
136
137         * aot-compiler.c : Fix the Winx64 build.
138
139         Contributed under MIT/X11 license.
140
141 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
142
143         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
144         in OP_EXTRACT_R8 to avoid possible stack corruption.
145
146 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
147
148         * mini-ops.h: Added OP_EXTRACT_R8/I8.
149
150         * cpu-x86.md: Added extract_r8.
151
152         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
153         
154         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
155         a couple of OP_EXTRACT_I4.
156
157         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
158
159         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
160
161 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
162
163         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
164         and not 4.1. 
165
166 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
167
168         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
169         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
170
171         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
172         are not needed any more.
173
174         * mini.h: Remove the unused INS_LIST macros.
175
176         * mini.c (mini_method_compile): Remove a disable globalra case which is no
177         longer needed.
178
179         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
180         ir-emit.h.
181
182         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
183         mono_alloc_ireg () instead.
184
185         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
186         macros.
187
188         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
189         on amd64.
190
191         * aot-runtime.c (load_aot_module): Disable AOT when running under
192         CAS.
193
194         * mini-amd64.h: Change the monitor fastpath defines to check for
195         !PLATFORM_WIN32 so they work on *bsd too.
196
197         * mini.h mini.c mini-hhpa.c: Remove more unused code.
198
199         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
200
201         * mini.h (MonoCompile): Remove new_ir flag.
202
203         * regalloc.h regalloc.c: Remove unused code.
204
205         * cpu-*.md: Remove more unused opcodes.
206
207         * simple-cee-ops.h simple-mini-ops.h: Removed.
208
209         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
210         
211 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
212
213         * aliasing.h: Removed.
214
215         * *.c: Remove references to aliasing.h and inssel.h.
216
217         * mini.c: Remove additional unused functions.
218
219         * mini-ops.h cpu-*.md: Remove unused opcodes.
220
221 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
222
223         Remove the old JIT code.
224
225         * inssel*.brg: Removed.
226
227         * ssa.c abcremoval.c aliasing.c: Removed.
228
229         * ssa2.c: Renamed to ssa.c.
230
231         * abcremoval2.c: Renamed to abcremoval.c.
232
233         * *.c: Removed all !cfg->new_ir code.
234
235         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
236         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
237
238         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
239         
240 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
241
242         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
243         to simplify the code and cut back on the number of global symbols in the AOT
244         file.
245         
246         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
247
248 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
249
250         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
251         with the got/got_info tables.
252
253         * mini.h: Bump AOT file format version.
254         
255         * unwind.h: New file, contains definitions for stack unwinding.
256
257         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
258         to cfg->unwind_ops.
259         
260         * aot-compiler.c: Generalize the emitting of unwind information to use the
261         information in cfg->unwind_ops.
262
263         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
264
265         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
266         AOT method frames. Enable writing symbols for methods by default.
267
268 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
269
270         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
271         and make it work with vectors of element sizes 1, 2 and 4.
272
273         * simd-intrinsics.c: Enable getter for all vectors with element size
274         1, 2 or 4.
275
276         * simd-methods.h: Add the names of other getters.
277
278         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
279
280         * cpu-x86.md: Same.
281
282         * mini-x86.c: Same.
283
284 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
285
286         * mini-ppc.h: portability fix.
287
288 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
289
290         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
291         buggy and will overwrite it.
292
293 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
294
295         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
296         Use it to emit local symbols for all methods so AOTed methods show up with
297         their full name in gdb/valgrind output.
298
299 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
300
301         * mini-ppc.c: portability fixes.
302
303 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
304
305         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
306         entries out of the if (!generic_shared...) code so it is always done.
307         (mono_class_init_trampoline): Do the patching when running under valgrind
308         too, newer versions of valgrind have no problems with it.
309
310 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
311
312         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
313         further sections.
314
315 2008-11-13  Mark Probst  <mark.probst@gmail.com>
316
317         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
318         filters.
319
320 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
321
322         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
323
324 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
325
326         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
327
328         * cpu-x86.md: Same.
329
330         * mini-x86.c: Same.
331
332         * simd-intrinsics.c: Same.
333
334 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
335
336         * simd-intrinsics.c: Enable constructor intrinsics for all types.
337
338 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
339
340         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
341         to work with more Vector types.
342
343 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
344
345         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
346         store the elemens directly instead of using and intermediate.
347
348 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
349
350         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
351
352         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
353         to preserve %eax for aot plt trampolines.
354
355         * aot-compiler.c (compile_method): Don't skip synchronized methods.
356         (encode_method_ref): Flag synchronized methods so they won't go through
357         the AOT trampoline.
358
359         * aot-compiler.c: Additional work to support AOTing synchronized methods/
360         wrappers.
361
362         * cpu-ia64.md (jmp): Increase max length.
363
364 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
365
366         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
367         open generic classes.
368
369         * aot-compiler.c: Enable the ELF writer on ELF platforms.
370
371         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
372         box+brtrue optimization since it causes test failures on x86.
373
374 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
375
376         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
377
378         * cpu-x86.md: Same.
379
380         * mini-x86.c: Same.
381
382         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
383         for simd ctor values. 
384
385         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
386         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
387
388 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
389
390         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
391         LogicalRightShift.
392
393         * simd-instrincs.c: Same.
394
395         * basic-simd.cs: Same.
396
397 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
398
399         * ratests.cs: Add more tests.
400
401         * regalloc2.c (add_spill_code): Handle more corner cases.
402
403 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
404
405         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
406         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
407         both the source an destination of an instruction.
408
409 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
410
411         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
412         wapihandles.c: more portability changes.
413
414 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
415
416         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
417         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
418         safe to execute in a signal handler and the kernel provides better
419         the info in /proc/self/smaps. Avoid the assert on sigaction during
420         cleanup.
421
422 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
423
424         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
425         do the bblock linking hack if it is actually needed.
426
427         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
428         up linking.
429
430         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
431         crash problem is fixed.
432
433         * branch-opts.c (mono_remove_critical_edges): Link up newly added
434         bblocks.
435
436         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
437         for catch clauses.
438         (mini_method_compile): Set the starting value of next_vreg to 
439         MAX_IREGS + MAX_FREGS when using globalra.
440
441         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
442         filter clauses with BB_EXCEPTION_HANDLER.
443
444         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
445
446 2008-11-10  Mark Probst  <mark.probst@gmail.com>
447
448         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
449         space for stdcall.  Fixes regressions on Win32.
450
451 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
452
453         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
454         bblocks.
455         (linear_scan): Remove an assert which doesn't seem to be needed.
456
457         * local-propagation.c (mono_local_deadce): Avoid a call to
458         MONO_DELETE_INS which would screw up the instruction linking.
459
460         * mini.c (mono_decompose_op_imm): Make this work with globalra.
461
462         * regalloc2.c: Upgrade to work the current JIT code.
463
464 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
465
466         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
467         case.
468
469         * aot-runtime.c: Remove some dead code.
470
471         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
472         consistency.
473         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
474
475         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
476         trampolines using sscanf since atoi doesn't work on large unsigned values.
477
478         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
479         Initialize code_size.
480
481 2008-11-08  Mark Probst  <mark.probst@gmail.com>
482
483         * method-to-ir.c (mini_emit_inst_for_method): Make
484         Interlocked.CompareExchange work for Int arguments on 32 bit
485         archs, as well.
486
487 2008-11-07  Mark Probst  <mark.probst@gmail.com>
488
489         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
490
491 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
492
493         * main.c Fix MSVC build.
494
495         Contributed under MIT/X11 license.
496
497 2008-11-06  Mark Probst  <mark.probst@gmail.com>
498
499         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
500         alignment larger than 8 bytes are aligned correctly, too.
501
502         * mini.c: Honor the min_align field of MonoClass when laying out
503         the stack.
504
505 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
506
507         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
508
509         * aot-compiler.c (emit_plt): Fix a warning.
510         
511         * aot-compiler.c: Implement ARM support in the binary writer.
512
513 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
514
515         * basic-simd.cs: Add test for getter with byref arg.
516         Fix the naming of a few tests.
517         Add missing checks to a test.
518
519 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
520
521         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
522
523         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
524         most of the full-aot support for monitor enter/exit trampolines.
525
526         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
527         enter/exit trampoline creation functions.
528
529         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
530         make dist.
531
532 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
533
534         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
535         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
536         implement the needed functionality without adding crap to the runtime.
537
538 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
539
540         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
541         non-x86 builds.
542
543         * mini.c (mono_build_date): New global version holding the build date in
544         string format.
545         
546         * Makefile.am (buildver.c): Generate a file containing the build date.
547
548         * main.c: Set the build date from the generated file.
549
550         * mini.c (mono_get_runtime_build_info): New helper function returning build
551         information in a string format.
552         
553         * driver.c (mono_main): Print the build date in --version.
554
555         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
556         file when the bind-to-runtime-version option is used.
557
558 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
559
560         * simd-intrinsics.c: Fix bug when using getters and byref args. 
561
562 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
563
564         * simd-methods.h: Rename prefetch methods.
565
566         * simd-intrinsics.c: Same.      
567
568 2008-11-05  Mark Probst  <mark.probst@gmail.com>
569
570         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
571         sizes.
572
573 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
574
575         * aot-compiler.c: Use the bundled elf header files instead of depending on
576         the system one.
577         
578         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
579         mempool.
580
581         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
582         on every call.
583
584 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
585
586         * cpu-x86.md: Add store nta ops.
587
588         * mini-ops.h: Same.
589
590         * mini-x86.c: Same.
591
592         * mini.h: Add an enum for simd prefetch modes.
593
594         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
595         of store. Use the changed code to support store nta.
596
597         * simd-intrinsics.c: Add prefetch ops for all vector types.
598
599 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
600
601         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
602         threads.
603         
604         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
605         names.
606
607         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
608         trampolines.
609
610 2008-11-04  Mark Probst  <mark.probst@gmail.com>
611
612         * mini-x86.c: Fixed commit.
613
614 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
615
616         * aot-compiler.c (emit_plt): Align the plt section only on x86.
617
618 2008-11-04  Mark Probst  <mark.probst@gmail.com>
619
620         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
621         and MONITOR_EXIT, for the ASM fastpaths.
622
623         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
624         available.
625
626         * mini.c, patch-info.h: Signature and patch infos for
627         Monitor.Enter/Exit trampolines.
628
629         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
630
631         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
632         Monitor.Enter/Exit ASM fastpath for Linux.
633
634 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
635
636         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
637
638         * objects.cs: Add a new test.
639         
640         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
641
642         * aot-runtime.c (load_method): Run class initialization in the PLT case even
643         if MONO_LOG_LEVEL is set.
644
645         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
646
647         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
648
649         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
650         
651         * aot-compiler.c: Change the relocation code to use virtual addresses instead
652         of file offsets. Align the sections belonging to the data segment to 
653         PAGESIZE.
654
655 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
656
657         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
658         elf.h. Port it to amd64.
659
660 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
661
662         * driver.c: Enable SIMD by default.
663
664 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
665
666         * cpu-x86.md: Add prefetch op.
667
668         * mini-ops.h: Same.
669
670         * mini-x86.c: Same.
671
672         * mini.h: Add an enum for simd prefetch modes.
673
674         * simd-methods.h: Add prefetch function names.
675
676         * simd-intrinsics.c: Add prefetch ops for all vector types.
677
678 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
679
680         * aot-compiler.c (emit_bytes): Speed this up a little.
681
682 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
683
684         * aot-compiler.c: Add JIT time etc. statistics.
685         
686         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
687
688         * mini.h (MonoCompile): Add 'got_offset' field.
689
690         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
691         method_got_offsets array.
692
693         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
694         wrappers.
695
696         * aot-compiler.c (compile_method): Add generic method instances referenced
697         by the method to the list of methods to be compiled, this is required so if
698         A<T> references B<T>, and another assembly references A<int>, then it will
699         also get a copy of B<int>.
700
701         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
702         when checking for monitor enter/exit.
703
704 2008-10-30  Mark Probst  <mark.probst@gmail.com>
705
706         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
707         for Monitor.Enter and Monitor.Exit if enabled.
708
709         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
710         Solaris.
711
712 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
713
714         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
715         of an OP_MOVE. Fixes #440046.
716
717         * basic-long.cs: Add a new test.
718
719 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
720
721         * mini.h: Add synchronization note for the managed counter-part.
722
723         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
724         returns the simd caps of the current cpu.
725
726 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
727
728         * basic-simd.cs: Remove Console.WriteLine.
729
730 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
731
732         * basic-simd.cs: New tests for Vector2ul.
733
734 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
735
736         * simd-intrinsics.c: Add new vector type Vector2ul.
737
738 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
739
740         * basic-simd.cs: New tests for Vector2l.
741
742 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
743
744         * cpu-x86.md: Add long version of most packed int ops.
745
746         * mini-ops.h: Same.
747
748         * mini-x86.h: Same.
749
750         * simd-intrinsics.c: Add new vector type Vector2l.
751
752 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
753
754         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
755
756         * simd-methods.h: Remove SN_op_BitwiseXor.
757
758 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
759
760         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
761         alignment.
762
763 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
764
765         * basic-simd.cs: Test for Vector2d.
766
767         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
768         value.
769
770 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
771
772         * cpu-x86.md: Add double version of all packed float ops.
773
774         * mini-ops.h: Same.
775
776         * mini-x86.h: Same.
777
778         * simd-intrinsics.c: Add new vector type Vector2d.
779
780         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
781
782         * simd-methods.h: Add Duplicate.
783
784 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
785
786         * basic-simd.cs: Test for packing with signed saturation.
787
788 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
789
790         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
791         found in the TYPESPEC table.
792
793 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
794
795         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
796         too.
797
798         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
799
800         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
801         instead of the RVA, since the RVA can be changed by tools like the cil 
802         stripper.
803
804         * method-to-ir.c (mono_method_to_ir2): Ditto.
805
806         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
807         (deserialize_variable): Ditto.
808
809 2008-10-25  Martin Baulig  <martin@ximian.com>
810
811         * debug-mini.c (write_variable): Use
812         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
813
814 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
815
816         * cpu-x86.md: Add unsigned variants of packd and packw.
817
818         * mini-ops.h: Same.
819
820         * mini-x86.h: Emit the right instruction for packd and packw.
821         Add unsigned variants of packd and packw.
822
823         * simd-intrinsics.c: Packd and packw were used in place of their
824         unsigned variants. Change that.
825         Add intrinsics for (Signed)PackWithSignedSaturation.
826
827         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
828
829 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
830
831         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
832
833 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
834
835         * mini-ops.h: Remove dword packed add/sub with saturation ops.
836
837         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
838
839         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
840         sse instructions.
841
842         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
843
844 2008-10-24  Mark Probst  <mark.probst@gmail.com>
845
846         * method-to-ir.c, mini.c: Special casing for the synchronized
847         wrapper for the ldtoken+GetTypeFromHandle case.
848
849 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
850
851         * mini.c (mono_replace_ins): Move this to branch-opts.c.
852
853         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
854         created/split bblocks.
855
856 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
857
858         * mini-ops.h: Add packed signed mul high.
859         
860         * cpu-x86.md: Same.
861
862         * mini-x86.c (mono_arch_output_basic_block): Same.
863
864         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
865
866         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
867
868 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
869
870         * basic-simd.cs: Tests for Vector16sb.
871
872 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
873
874         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
875
876 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
877
878         * mini-ops.h: Add packed signed min, max and compare greater.
879         
880         * cpu-x86.md: Same.
881
882         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
883         saturation.
884
885         * simd-methods.h: Add CompareGreaterThan.
886
887         * simd-methods.h: Remove CompareEquals.
888
889         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
890
891         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
892
893         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
894         CompareEqual.
895
896 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
897
898         * basic-simd.cs: Fix tests due to change in the API.
899
900 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
901
902         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
903
904 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
905
906         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
907
908         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
909         inst_offset as this has invalid values for LDADDR.
910
911 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
912
913         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
914
915         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
916
917 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
918
919         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
920         for accessing field->data.
921
922 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
923
924         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
925
926 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
927
928         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
929
930         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
931
932 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
933
934         * dominators.c (mono_compute_natural_loops): Allocate GList enties
935         from the cfg mempool.
936
937 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
938
939         * basic-simd.cs: Tests for new methods in Vector8us.
940
941 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
942
943         * mini-ops.h: Add multiply and store high.
944         
945         * cpu-x86.md: Same.
946
947         * mini-x86.c (mono_arch_output_basic_block): Same.
948
949         * simd-methods.h: Same.
950
951         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
952         and CompareEqual.
953
954 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
955
956         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
957         mono_class_setup_vtable ().
958
959         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
960         mono_class_get_vtable_entry () for accessing klass->vtable.
961
962         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
963
964         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
965         found.
966
967         * method-to-ir.c (mono_save_token_info): Don't save references made from
968         wrappers.
969
970         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
971         of generic instances.
972
973         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
974
975 2008-10-19  Mark Probst  <mark.probst@gmail.com>
976
977         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
978         OP_JMP depends on the method signature.  Calculate it properly.
979
980 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
981         
982         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
983         called directly.
984
985         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
986         instances.
987         (emit_extra_methods): Add another table mapping method indexes to 
988         offsets in the extra_method_info table.
989
990         * mini.h: Bump AOT file format version.
991         
992         * aot-runtime.c: Merge most of the code from mono_aot_get_method
993         and mono_aot_get_method_from_token () into one function.
994
995 2008-10-19  Mark Probst  <mark.probst@gmail.com>
996
997         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
998         separate counter.
999
1000 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
1001
1002         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
1003         methods.
1004
1005         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
1006         disable_aot.
1007
1008         * mini.c (mono_patch_info_equal): Compare the generic context as well.
1009
1010         * mini.h: Bump aot file format version.
1011
1012         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
1013         AOT file can contain native code for methods which are not in the METHOD
1014         table. Generate code for non-sharable generic instances of generic methods
1015         found in the METHODSPEC table.
1016         
1017         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
1018         encoding generic type handles.
1019
1020         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
1021         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
1022
1023         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
1024         macros + MONO_ADD_INS.
1025
1026         * mini.c (mono_jump_info_token_new2): New function which takes a generic
1027         context as well.
1028
1029         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
1030
1031         * mini.h: Bump aot file format version.
1032
1033         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
1034
1035 2008-10-17  Mark Probst  <mark.probst@gmail.com>
1036
1037         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
1038         platforms, with definable stack alignment value.  Set to 16 now
1039         for all platforms.
1040
1041         * mini.c, mini.h, driver.c: Command line option for disabling
1042         stack alignment.
1043
1044 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
1045
1046         * basic-simd.cs: Tests for new methods in Vector4ui.
1047
1048 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
1049
1050         * mini-ops.h: Add packed int shuffle.
1051         
1052         * cpu-x86.md: Same.
1053
1054         * mini-x86.c (mono_arch_output_basic_block): Same.
1055
1056         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
1057         extract mask, max, min, shuffle.
1058
1059         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
1060
1061 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
1062
1063         * basic-simd.cs: Tests for new methods in Vector8us.
1064
1065 2008-10-17  Mark Probst  <mark.probst@gmail.com>
1066
1067         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
1068         RuntimeTypeHandle, not a TypedReference.
1069
1070 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
1071
1072         * simd-intrinsics.c: remove relocations.
1073
1074 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
1075
1076         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
1077         optimizations from the x86 backend.
1078
1079 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
1080
1081         * simd-methods.h, simd-intrinsics.c: debloat method names and
1082         prepare for no relocations.
1083
1084 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1085
1086         * mini-ops.h: Add packed min/equal and sum of absolute differences.
1087         
1088         * cpu-x86.md: Same.
1089
1090         * mini-x86.c (mono_arch_output_basic_block): Same.
1091
1092         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
1093         extract mask, max, min and sum of absolute differences.
1094
1095         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
1096         method name.
1097
1098 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1099
1100         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
1101         Renamed one test for consistency.
1102
1103 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1104
1105         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
1106         fix to the code that deal with other blocks.
1107
1108 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1109
1110         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
1111
1112 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1113
1114         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
1115         that deals with vreg interference. Explicitly check for OP_LDADDR to be
1116         able to process the source reg.
1117
1118 2008-10-16  Martin Baulig  <martin@ximian.com>
1119
1120         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
1121
1122         * inssel.brg: Add `OP_HARD_NOP'.
1123
1124         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
1125
1126         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
1127         `OP_HARD_NOP' instruction when running inside the debugger.
1128
1129         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
1130         `OP_HARD_NOP' instruction when running inside the debugger.
1131
1132 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1133
1134         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
1135         now works. The issue with the regalloc tripping up no longer
1136         happens.
1137
1138         * simd-intrinsics.c (load_simd_vreg): Same.
1139
1140 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1141         
1142         * basic-simd.cs: Tests for new Vector8ui methods.
1143
1144 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1145
1146         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
1147         only for type. This fixes crashes where MonoInst::klass is checked
1148         for ops of type != VTYPE or OBJ.
1149
1150         * simd-intrinsics.c (load_simd_vreg): Same.
1151
1152 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1153
1154         * mini-ops.h: Add ops for packed shuffle/max/avg and
1155         extract mask.
1156         
1157         * cpu-x86.md: Same.
1158
1159         * mini-x86.c (mono_arch_output_basic_block): Same.
1160
1161         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
1162         extract mask.
1163
1164         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
1165         to emit extract mask op.
1166
1167         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
1168         to emit word shuffles.
1169
1170 2008-10-15  Mark Probst  <mark.probst@gmail.com>
1171
1172         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
1173         the largest alignment needed by a variable, but at least
1174         sizeof(gpointer).
1175
1176 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1177
1178         * basic-simd.cs: Tests for the fixes in the last commit.
1179
1180 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1181
1182         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
1183         no longer handles STACK_PTR input.
1184
1185         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
1186
1187         * simd-intrinsics.c (load_simd_vreg): New function that works like 
1188         get_simd_vreg   but handles STACK_PTR input.
1189
1190         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
1191         as the input can be an arbitrary pointer.
1192
1193         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
1194         LDADDR local optimization directly otherwise use a store op.
1195
1196 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1197
1198         * basic-simd.cs: Tests for dup low and dup high.
1199
1200 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1201
1202         * mini-ops.h: Add dup low and dup high ops.
1203         
1204         * cpu-x86.md: Same.
1205
1206         * mini-x86.c (mono_arch_output_basic_block): Same.
1207
1208         * simd-intrinsics.c (vector4f_intrinsics): Same.
1209
1210 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1211
1212         * basic-simd.cs: Tests for recently added functionality.
1213
1214 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1215
1216         * mini-ops.h: Add remaining sse1 fp ops.
1217         
1218         * cpu-x86.md: Add remaining sse1 fp ops.
1219
1220         * mini-x86.c (mono_arch_output_basic_block): Same.
1221
1222         * mini.h: Add enum for simd FP compare conditions.
1223
1224         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
1225
1226         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
1227         so the backed can generate the appropriate op.
1228
1229 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1230         This patch squeese one more byte from the SimdIntrinsc struct.
1231
1232         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
1233         a a shift amount intead of simply or'ing it.
1234
1235         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
1236
1237         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
1238         byte so we can have an aditional flags field without increasing struct size.
1239
1240         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
1241         against the simd_supported_versions bitmask.
1242
1243         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
1244
1245 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
1246
1247         * mini.c: remove rawbuffer code (the only use here is unsafe because
1248         it takes locks during signal handling and the kernel now provides much
1249         better info in proc/pid/smaps these days).
1250
1251 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
1252
1253         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
1254         OP_X86_PUSH_OBJ. Fixes #434620.
1255
1256         * objects.cs: Add a test.
1257         
1258 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
1259
1260         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
1261         that the packuswb/packusdw don't work with unsigned numbers for what
1262         would be negative numbers in signed format.
1263
1264         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
1265         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
1266
1267         * mini-ops.h: Add doubleword forms of many ops and packing ones.
1268
1269         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
1270
1271         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
1272
1273         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
1274
1275         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
1276         add more ops.
1277
1278         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
1279         version as the enum in mini.h.
1280
1281         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
1282         for sse3 ops, check the simd_version field if present. This way the code
1283         works with all versions of sse.
1284
1285 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1286
1287         * simd-intrinsics.c: Fixed intrinsic name typo.
1288
1289         * mini.h: Added missing simd exported function.
1290
1291         * basic-simd.cs: Added tests for Vector4ui.
1292         Fixed broken test for Vector16b.
1293
1294 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
1295
1296         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
1297         the max length to 64.
1298
1299 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1300
1301         * method-to-ir.c: Only do the fast virtual generic method call for
1302         non-wrapper methods.
1303
1304         * mini.h, mini-trampolines.c: The new generic virtual remoting
1305         trampoline handles virtual method calls via the vtable (as done by
1306         the fast virtual generic method calls) to remoting proxies.
1307
1308         * mini.c (mono_jit_create_remoting_trampoline): For generic
1309         methods reate a generic virtual remoting trampoline.
1310
1311         * mini-amd64.h: Enable fast virtual generic method calls again.
1312
1313 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1314
1315         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
1316         restore registers when doing tail calls.
1317
1318 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1319
1320         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
1321         Vector4ui.
1322
1323 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1324
1325         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
1326
1327 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1328
1329         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
1330
1331 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1332
1333         * basic-simd.cs: Retrofit for API changes.
1334
1335 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1336
1337         * mini-ppc.c: Handle integer stack arguments for tail calls.
1338
1339 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1340
1341         * optflags-def.h: Removed sse3 optimization.
1342
1343         * driver.c: Same.
1344
1345         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
1346         sse3.
1347
1348         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
1349
1350         * mini.h: Added enumeration with simd versions.
1351
1352         * simd-intrinsics.c (emit_intrinsics): Use the new static var
1353         for detecting SSE3.
1354
1355         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
1356
1357         * mini.c (mini_init): Call mono_simd_intrinsics_init.
1358
1359 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1360
1361         * basic-simd.cs: Added tests for Vector8u and Vector16u.
1362
1363         * basic-simd.cs: Fixed test naming.
1364
1365 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1366
1367         * mini-ops.h: Added ops for packed and saturated math, shifts
1368         and packing/unpacking.
1369
1370         * cpu-x86.md: Added descriptors for the above ops.
1371
1372         * mini-x86.c: Added code to emmit the above ops.
1373
1374         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
1375
1376 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
1377
1378         * aot-compiler.c (compile_method): Enable AOT for generic code.
1379
1380         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
1381
1382 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
1383
1384         * mini.c: add a workaround for a common screwup that ends up blamed
1385         to mono (other processes blocking signal delivery).
1386
1387 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1388
1389         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
1390         in the LDFLD/STFLD opcodes. Fixes #432673.
1391
1392         * iltests.il.in: Add a new test.
1393
1394 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
1395
1396         * mini-arm.c: attach the thread in unmanaged->managed transitions
1397         using delegates (bug #433148).
1398
1399 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1400
1401        * basic-simd.cs: Use new ShuffleSel constants.
1402
1403 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1404
1405         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
1406
1407         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
1408         only disable simd intrinsics if no sse2 is detected.
1409
1410         * optflags-def.h: Added sse3.
1411
1412         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
1413         is disabled.
1414
1415 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1416
1417         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
1418         when adding delegate-invoke wrappers.
1419
1420 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1421
1422         * Makefile.am: Reenable the simd tests.
1423
1424 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
1425
1426         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
1427           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
1428           other vreg is allocated to that hreg.
1429
1430         Contributed under MIT/X11 license.
1431
1432 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1433
1434         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
1435         yet checked in.
1436
1437 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1438
1439         * basic-simd.cs: New test suite for SIMD intrinsics.
1440
1441         * Makefile.am: Added new tests.
1442
1443 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1444
1445         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
1446
1447         * mini-ops.h: Same.
1448
1449         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
1450
1451         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
1452         using SSE2 aware opcodes.
1453
1454         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
1455         is enabled, this code path is only reachable if conversion ops are emmited after
1456         mono_method_to_ir.
1457
1458         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
1459
1460         This optimization saves 6 bytes per conversion against the old version.
1461
1462 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1463
1464         * aot-compiler.c (compile_method): Don't skip methods referencing 
1465         generic methods without a corresponding entry in token_info_hash, since
1466         encode_method_ref () can handle all generic methods now.
1467
1468         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
1469         generic context is set.
1470         
1471         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
1472         generic sharing of LDTOKEN.
1473
1474 2008-10-06  Mark Probst  <mark.probst@gmail.com>
1475
1476         * mini-amd64.h: Temporarily disabled fast virtual generic method
1477         calls because it breaks the System.Runtime.Remoting tests.
1478
1479 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1480
1481         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
1482
1483         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
1484         so inlining actually works.
1485         (check_inline_caller_method_name_limit): Ditto.
1486
1487 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
1488
1489         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
1490         64 bit safety (from Olaf Hering and Andreas Färber).
1491
1492 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1493         
1494         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
1495         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
1496         unused virtual call support code.
1497
1498         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
1499         
1500         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
1501         which can't use aot trampolines.
1502         (decode_patch): Don't create aot trampolines for methods which can't use
1503         them.
1504
1505         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
1506         use aot trampolines.
1507
1508         * mini.h: Bump AOT image format version.
1509         
1510 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
1511
1512         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
1513         to save_token_info () since cmethod is inflated for constrained calls.
1514
1515         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
1516
1517 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
1518
1519         * Makefile.am: Add build rules for ppc64.
1520         This avoids the build failing at pedump with unresolved symbols
1521         due to lack of arch_sources. Instead it will now fail earlier
1522         due to lack of cpu-ppc64.md.
1523
1524         Contributed under MIT/X11 license.
1525
1526 2008-10-04  Mark Probst  <mark.probst@gmail.com>
1527
1528         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
1529         tail calls.
1530
1531         * iltests.il.in: Add test case for tail call with many arguments.
1532
1533 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1534
1535         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
1536         to the fast virtual generic method code until the aot case is fixed.
1537
1538 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1539
1540         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
1541
1542 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1543
1544         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
1545         thunks.
1546
1547 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1548         
1549         * simd-intrinsics.c: Forgot to add this one.
1550
1551         * mini-codegen.c: Fix macro in case SIMD is not supported.
1552
1553 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1554         
1555         This patch land initial JIT support for simd intrinsics.
1556
1557         * mini-x86.h: Added new define to make --enable_minimal work on x86.
1558
1559         * Makefile.am: Added simd-intrinsics.c
1560
1561         * simd-intrinsics.c: New file with simd instrinsic related
1562         code.
1563
1564         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
1565
1566         * cpu-x86.md: Add simd related instructions.
1567
1568         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
1569
1570         * driver.c: Added two new --regression variants.
1571
1572         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
1573
1574         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
1575
1576         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
1577         extract some complicated logic to helper functions.
1578
1579         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
1580
1581         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
1582
1583         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
1584         the specialized simplification pass.
1585
1586         * method-to-ir.c (mono_spill_global_vars): Use new macro.
1587
1588         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
1589
1590         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
1591         table.
1592
1593         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
1594         if MONO_ARCH_NEED_SIMD_BANK is defined.
1595
1596         * mini-ops.h: Added the new simd ops.
1597
1598         * mini-x86.c: Added mono_arch_xregname.
1599
1600         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
1601
1602         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
1603
1604         * mini-x86.h: Define simd related MONO_ARCH macros.
1605
1606         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
1607
1608         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
1609
1610         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
1611         MONO_CLASS_IS_SIMD to deal with simd related IR.
1612
1613         * mini.h (MonoInst): Added spill_var to the backend union.
1614
1615         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
1616
1617         * mini.h: Added forward declarations of the new simd fuctions.
1618
1619         * optflags-def.h: Added new optimization names SIMD.
1620
1621         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
1622
1623         * regalloc.h: Added support for working with 3 register banks.
1624
1625         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
1626
1627         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
1628
1629 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
1630
1631         * mini-exceptions.c: remove 64 bit related ifdef clutter.
1632
1633 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1634
1635         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
1636         instead of one on 64 bit systems.
1637
1638         * method-to-ir.c: Remove unused includes.
1639
1640 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
1641
1642         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
1643         cfg->used_int_regs, since the two are different on arm.
1644
1645 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1646
1647         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
1648         mono_method_get_vtable_index() to get the vtable index.
1649
1650 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1651
1652         * method-to-ir.c (mono_method_to_ir2): Don't create native
1653         wrappers for array methods, because they're never called (and if
1654         they were called they wouldn't work).
1655
1656 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1657
1658         * method-to-ir.c (mono_method_to_ir2): Array methods are
1659         special-cased and must not be invoked indirectly via the (M)RGCTX
1660         when generic sharing is turned on.  Fixes #431413.
1661
1662 2008-10-01  Mark Probst  <mark.probst@gmail.com>
1663
1664         * method-to-ir.c: When generic sharing is active, call
1665         non-interface virtual generic methods via the standard trampoline.
1666
1667         * mini-trampolines.c: Handle virtual generic shared methods.
1668
1669         * mini.h, mini-x86.c, mini-x86.h: New argument for
1670         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
1671         method thunks and which is the trampoline to call if the lookup
1672         fails.  Enable the virtual generic method thunk for x86.
1673
1674         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
1675         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
1676         argument but assert that it's NULL, because these archs don't yet
1677         implement the virtual generic method thunk.  Changes in the IMT
1678         thunk data structures.
1679
1680 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
1681
1682         * aot-compiler.c (emit_globals): Avoid invalid characters in
1683         the static linking symbol.
1684
1685         * objects.cs: Add a test for the range check optimization. Fix warnings.
1686
1687         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
1688         optimization from the current JIT.
1689
1690         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
1691         later in decompose_array_access_opts () to allow more optimizations.
1692
1693         * method-to-ir.c (mono_handle_soft_float): Rename this to 
1694         mono_decompose_soft_float () for consistency.
1695
1696         * mini-ops.h: Fix arguments of OP_STRLEN.
1697
1698         * method-to-ir.c (save_cast_details): Extract the cast details saving code
1699         into a separate function.
1700         (reset_cast_details): Ditto.
1701         (handle_unbox): Save cast details. Fixes #431254.
1702
1703         * method-to-ir.c: Remove some obsolete FIXMEs.
1704
1705 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1706
1707         * ir-emit.h (alloc_dreg): Write a warning before crashing.
1708
1709 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1710
1711         * mini-codegen.c: More work on macros to make them
1712         ready for multiple regbanks.
1713
1714 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1715
1716         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
1717
1718         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
1719
1720 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1721
1722         * mini-codegen.c (mono_spillvar_offset): Proper support for
1723         multiple regbanks.
1724
1725 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1726
1727         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
1728         the stack overflow changes.
1729
1730 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1731
1732         * mini-codegen.c: Make all bank macros depend on reg_bank.
1733
1734         * mini-codegen.c (mono_local_regalloc): Make free mask
1735         initialization regbank aware.
1736
1737 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1738
1739         * mini-codegen.c (mono_local_regalloc): Extract callee
1740         mask selection to a function and make it regbank aware.
1741
1742 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1743
1744         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
1745         code to deal with many regbanks.
1746
1747 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1748
1749         * mini-codegen.c: More fp->regbank changes.
1750
1751 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1752
1753         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
1754         of a hardcoded constant.
1755
1756 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1757
1758         * method-to-ir.c (type_from_stack_type): Fix typo.
1759
1760 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
1761
1762         * mini-ia64.c (emit_move_return_value): Convert float return values to
1763         double.
1764
1765         * objects.cs: Add a new test.
1766         
1767         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
1768         VARARG methods to fix an assert later.
1769
1770         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
1771         end so it at least compiles.
1772
1773 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1774
1775         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
1776
1777 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
1778
1779         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
1780         optimization to a new function (emit_optimized_ldloca_ir) and enable
1781         it for both ldloca and ldloca_s.
1782
1783 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1784
1785         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
1786         gshared CASTCLASS code.
1787
1788         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
1789         amd64, where the libc stack unwinder encounters stack frames referring to
1790         native code in unmapped memory.
1791
1792         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
1793         sharing.
1794
1795         * generics.cs: Add new test.
1796
1797 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
1798
1799         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
1800         add a check that one of the ARM_FPU_ constants is defined.
1801
1802         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
1803         
1804         * mini-exceptions.c: Fix build on non-altstack platforms.
1805
1806         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
1807         sharing of vtypes.
1808
1809         * ir-emit.h: Add a comment to NEW_PCONST.
1810
1811         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1812
1813         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1814
1815         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1816         after the changes to MonoJitDomainInfo.
1817
1818 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1819
1820         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1821
1822 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1823
1824         * mini-ppc.c: Compiler warning fixes.
1825
1826 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1827
1828         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1829         for pinvokes.
1830
1831 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1832
1833         * exceptions-ppc.c, mini-ppc.h: Compile
1834         mono_arch_handle_altstack_exception() on Darwin, too.
1835
1836 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1837
1838         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1839         work on archs which don't have generic sharing implemented, only
1840         without the vtable_arg.
1841
1842 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1843
1844         * mini.c: Added comment explaining why delegate ctor icall
1845         wrappers are compiled.
1846
1847 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1848
1849         * mini.c: Don't produce trampolines to delegate ctor icall
1850         wrappers but compile them upfront.
1851
1852 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1853
1854         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1855         runtime-set function when going back to managed code. Currently this
1856         is used to set back the protection on the soft ovf pages and/or to
1857         throw the stack overflow exception that happened in unmanaged code.
1858
1859 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1860
1861         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1862         runtime-set function when going back to managed code. Currently this
1863         is used to set back the protection on the soft ovf pages and/or to
1864         throw the stack overflow exception that happened in unmanaged code.
1865
1866 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1867
1868         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1869         the support code for restoring stack protection after stack overflows
1870         that happen in unmanaged code. Don't set the exec permission on the
1871         soft overflow area.
1872
1873 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
1874
1875         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1876         delegate->method_ptr is set. Fixes #428054.
1877
1878 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1879
1880         * tests.cs: Rename to ratests.cs.
1881
1882         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
1883         emit_get_rgctx_... functions.
1884
1885 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1886
1887         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1888
1889 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1890
1891         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1892         before asserting that method is sharable.
1893
1894 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1895
1896         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1897         whether method needs a static RGCTX wrapper used instead of
1898         complex conditions.
1899
1900         * generic-sharing.c, mini.h: A few functions moved to
1901         metadata/generic-sharing.c.
1902
1903 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1904
1905         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1906         Generic code sharing for value types, which essentially means
1907         treating value type methods like static methods.  The RGCTX is
1908         passed in the same way.
1909
1910 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1911
1912         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1913         opcode when creating multi-dimensional arrays of open types.
1914
1915         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1916         open generic types.
1917
1918         * generics.cs: Add a test.
1919
1920         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1921
1922 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1923
1924         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1925
1926         * mini.c (mini_method_compile): Set it when running under the debugger. 
1927
1928         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
1929         vreg optimization if the flag is set.
1930
1931         * driver.c (mono_main): Add --attach= option to pass options to
1932         the attach agent.
1933
1934         * mini.c (sigquit_signal_handler): Start the attach agent.
1935
1936         * ssapre.c: Disable this to save space since it is not yet ported to
1937         linear IR.
1938
1939         * regalloc2.c: Disable this to save space.
1940
1941         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
1942
1943 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
1944
1945         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
1946         the -v option useful again.
1947
1948 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1949
1950         * mini-amd64.c (mono_arch_output_basic_block): Add support for
1951         --break-at-bb.
1952
1953         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
1954         arrays of arrays. Fixes #428406.
1955
1956         * method-to-ir.c (mini_emit_castclass): Ditto.
1957
1958         * objects.cs: Add new test.
1959         
1960 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
1961
1962         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
1963         was wrong at it choked against target_type_is_incompatible for byref types.
1964
1965 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1966
1967         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
1968         places.
1969
1970 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
1971
1972         * mini-exceptions.c: update a few more exceptions-related counters.
1973
1974 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
1975
1976         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
1977         new functions to allocate from persistent mempools.
1978
1979 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
1980
1981         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
1982         multiple register banks in the future.
1983
1984         * mini-codegen.c (mono_local_regalloc): Fix a warning.
1985
1986 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
1987
1988         * mini.c (type_to_eval_stack_type): Remove duplicated function.
1989
1990         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
1991
1992         * mini.h: Export type_to_eval_stack_type.
1993
1994         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
1995         is only ins->klass of byref types.
1996
1997 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
1998
1999         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
2000         (mini_emit_memcpy2): Ditto.
2001
2002         * mini-amd64.c: Fix a warning.
2003
2004 2008-09-21  Mark Probst  <mark.probst@gmail.com>
2005
2006         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
2007         linking.
2008
2009 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
2010
2011         * method-to-ir.c: Extract stloc micro-optimization to a
2012         function and apply it to all cases.
2013
2014 2008-09-19  Mark Probst  <mark.probst@gmail.com>
2015
2016         * method-to-ir.c: Don't fail generic code sharing in cases we
2017         already support.
2018
2019 2008-09-18  Mark Probst  <mark.probst@gmail.com>
2020
2021         * mini-ppc.c: Handle structs in tailcalls on Darwin.
2022
2023 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
2024
2025         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
2026         implementation.
2027
2028 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
2029
2030         * trace.c: make tracing more useful and correct, with per-thread
2031         id and indent info.
2032
2033 2008-09-15  Mark Probst  <mark.probst@gmail.com>
2034
2035         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
2036         doing a method call and the argument is an R4.
2037
2038 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
2039
2040         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
2041         generic methods.
2042
2043 2008-09-13  Mark Probst  <mark.probst@gmail.com>
2044
2045         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
2046
2047 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
2048
2049         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
2050         (MONO_JUMP_TABLE_FROM_INS): Ditto.
2051
2052 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
2053
2054         * driver.c: Add a --agent argument (not supported yet) to load managed
2055         agent assemblies before loading the main assembly, similarly to how the
2056         Java VM handles agents.
2057
2058 2008-09-11  Mark Probst  <mark.probst@gmail.com>
2059
2060         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
2061         function to do stack layout of local variables.
2062
2063 2008-09-11  Mark Probst  <mark.probst@gmail.com>
2064
2065         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
2066         calculation.
2067
2068 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
2069
2070         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
2071         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
2072         JIT if DISABLE_JIT is defined.
2073
2074         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
2075         defined.
2076
2077 2008-09-10  Mark Probst  <mark.probst@gmail.com>
2078
2079         * iltests.il.in: Disable the fconv test on PPC (the result is
2080         undefined according to ECMA).
2081
2082 2008-09-10  Mark Probst  <mark.probst@gmail.com>
2083
2084         * iltests.il.in: Enable tail call tests for PPC.
2085
2086         * mini.h: Add variable for storing incoming valuetype argument
2087         addresses for tail calls.
2088
2089         * mini-ppc.c: Implement valuetype arguments and return values for
2090         tailcalls on Linux.
2091
2092 2008-09-09  Mark Probst  <mark.probst@gmail.com>
2093
2094         * mini-ppc.c: Partially implement tail calls (struct arguments and
2095         return values not supported).
2096
2097         * method-to-ir.c: Enable tail calls on PPC.
2098
2099 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
2100
2101         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
2102         runtime-invoke wrappers to work around the problem of them getting
2103         assigned to a random class.
2104
2105         * aot-runtime.c (mono_aot_get_method): Ditto.
2106         
2107 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
2108
2109         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
2110         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
2111
2112 2008-09-07  Mark Probst  <mark.probst@gmail.com>
2113
2114         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
2115         until they're implemented properly.
2116
2117         * exceptions-ppc.c: Use arch-independent exception-handling code
2118         instead of custom one.
2119
2120         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
2121         for Linear IR.
2122
2123         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
2124
2125         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
2126         applies when __powerpc__ is defined.
2127
2128 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
2129
2130         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
2131         methods to their code to avoid computing the full name of wrappers and
2132         doing a lookup in a string hash table.
2133
2134 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
2135
2136         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
2137         we identify bblocks before method_to_ir () is ran.
2138
2139         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
2140         Also avoid optimizing branches pointing to themselves.
2141
2142         * mini.c (mini_method_compile): Ditto. Fixes #422947.
2143
2144 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
2145
2146         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
2147
2148 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
2149
2150         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
2151         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
2152         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
2153         'buf'.
2154
2155         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
2156         jumped to the same entry in plt_jump_table.
2157
2158 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
2159
2160         * method-to-ir.c (initialize_array_data): Handle field with RVA from
2161         dynamic images.
2162
2163 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
2164
2165         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
2166         other assignment can be if converted. Saves 1.5% on corlib size and fixes
2167         #421807.
2168
2169 2008-08-29  Geoff Norton  <gnorton@novell.com>
2170
2171         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
2172         segment, and doesn't properly handle .space as .text.  Fixes
2173         AOT Mach/ARM
2174
2175 2008-08-29  Geoff Norton  <gnorton@novell.com>
2176
2177         * mini.c: Disable the mach exception handler when running on 
2178         ARM
2179
2180 2008-08-29  Geoff Norton  <gnorton@novell.com>
2181
2182         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
2183         globals on Darwin/ARM
2184
2185 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
2186
2187         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
2188         since too many things depend on it. Instead, call 
2189         mono_runtime_set_no_exec ().
2190         
2191         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
2192         the new JIT.
2193
2194         * aot-compiler.c: Add an 'asm-only' AOT option.
2195
2196         * mini.c: Avoid initializing the runtime when doing AOT compilation.
2197                 
2198         * aot-compiler.c (compile_method): Disable gshared support for now as it
2199         doesn't yet work.
2200
2201 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
2202
2203         * mini-amd64.h : Fix a compiler warning.
2204
2205         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
2206           Changed to use a callback function to retrieve the unwind info.
2207           This avoids problems observed when code blocks were removed by
2208           unloading an app domain.
2209
2210         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
2211           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
2212           to work properly.
2213
2214         Contributed under MIT/X11 license.
2215
2216 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
2217
2218         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
2219           case to keep the stack aligned to 8.
2220
2221         Contributed under MIT/X11 license.
2222
2223 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
2224
2225         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
2226         avoid repeated linear searches.
2227
2228 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
2229
2230         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
2231         methods it can't handle.
2232         
2233         * aot-compiler.c (add_method): Avoid adding a method twice.
2234         (add_wrappers): Add runtime invoke wrappers for all methods.
2235
2236         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
2237         function to create an aot-compatible version of this trampoline.
2238
2239         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
2240
2241 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
2242
2243         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
2244
2245         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
2246         with a generic sharing failure.
2247
2248         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
2249
2250         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
2251         CEE_RETHROW. Fixes #419634.
2252
2253         * mini.c (mono_method_to_ir): Ditto.
2254
2255         * exceptions.cs: Add a new test.
2256         
2257         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
2258         to mono_type_stack_size_internal () since some callers might not pass in
2259         an rgctx.
2260
2261         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
2262         instrument_prolog. Fixes #419878.
2263
2264         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
2265         doubles in soft float mode volatile.
2266
2267 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
2268
2269         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
2270
2271         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
2272         to handle soft float correctly.
2273
2274         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
2275         the fast path.
2276
2277         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
2278
2279         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
2280         to sp, since the generics catch code requires it.
2281
2282         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
2283         copying.
2284
2285         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
2286         mono_arch_emit_imt_argument ().
2287
2288         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
2289
2290         * mini-arm.c tramp-arm.c: Generic sharing updates.
2291
2292 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
2293
2294         * mini-arm.c: Fix the arm build.
2295
2296         * generic-sharing.c (mini_type_get_underlying_type): New helper function
2297         handling enums, generic instances and generic sharing.
2298         (mini_type_stack_size_full): Ditto.
2299
2300         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
2301         
2302         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
2303
2304         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
2305
2306         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
2307         trampolines.
2308
2309         * mini-arm.c: Various small generic sharing changes.
2310
2311         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
2312         this for x86.
2313         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
2314         custom code.
2315
2316         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
2317         helper function to return a generic class init trampoline.
2318
2319         * method-to-ir.c mini.c: Use it.
2320         
2321         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
2322         arch-specfic function to return a generic class init trampoline.
2323
2324         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
2325         the GENERIC_CLASS_INIT custom code.
2326
2327         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
2328         a fatal error, not a sharing failure.
2329
2330         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
2331         needed.
2332
2333         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
2334         trampoline argument from MONO_ARCH_VTABLE_REG.
2335
2336         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2337         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2338         argument, and pass the vtable in VTABLE_REG.
2339
2340         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2341         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2342         argument, and pass the vtable in VTABLE_REG.
2343         (mono_arch_create_trampoline_code_full): Remove some special casing for
2344         the rgctx fetch trampoline.
2345
2346         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
2347         Fixes #419273.
2348
2349         * iltests.il: Add a test for it.
2350
2351 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
2352
2353         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
2354
2355         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
2356         no longer needed.
2357
2358         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
2359         use mono_jit_info_table_find () to avoid recursion.
2360         (mono_delegate_trampoline): Add a sync wrapper here.
2361
2362         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
2363         here.
2364
2365         * mini.c (mono_method_to_ir): Ditto.
2366         
2367         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
2368         add_sync_wrapper argument. Don't add a sync wrapper here.
2369         (mono_create_jump_trampoline): Don't add a sync wrapper here.
2370
2371         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
2372         
2373 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2374
2375         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
2376           of nonvolatile registers back from MonoContext to CONTEXT.
2377
2378         Contributed under MIT/X11 license.
2379
2380 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2381
2382         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
2383           arguments on Winx64 there are only 4 argument registers.  For this
2384           logic to work the last argument must be pulled from the stack.  
2385
2386         Contributed under MIT/X11 license.
2387
2388 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
2389
2390         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2391
2392         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
2393         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
2394         encode/decode_method_ref ().
2395
2396         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
2397
2398         * aot-runtime.c (decode_patch): Ditto.  
2399
2400         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
2401         MONO_PATCH_INFO_METHOD.
2402
2403         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
2404         MonoGenericJitInfo.
2405
2406         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
2407         MonoGenericJitInfo.
2408
2409         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
2410
2411         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
2412         one from the caller.
2413
2414         * aot-runtime.c (decode_generic_inst): New function to decode and
2415         return a interned generic inst.
2416         (decode_klass_ref): Use it.
2417         (decode_method_ref): Ditto.
2418
2419         * aot-compiler.c (emit_exception_debug_info): Save 
2420         jinfo->has_generic_jit_info too.
2421
2422 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2423
2424         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
2425
2426         * iltests.il.in: Add a test for fconv_to_i.
2427
2428         * liveness.c: Disable the liveness2 pass for now to save space.
2429
2430         * regalloc2.c: Include mempool-internals.h to fix warnings.
2431
2432         * aot-compiler.c (encode_method_ref): Encode the context of generic
2433         instance methods.
2434
2435         * aot-runtime.c (decode_method_ref): Inflate generic methods using
2436         the context saved in the aot file.
2437
2438         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2439
2440         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2441
2442         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
2443         volatile so they won't be optimized away.
2444
2445 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
2446
2447         * ssa.c:
2448         * ssa2.c:
2449         * mini.c:
2450         * regalloc2.c:
2451         * dominators.c: Remove duplicated functions that now are in
2452         mempool-internals.h.
2453
2454 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2455
2456         * aot-compiler.c: Fix warnings.
2457
2458         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
2459
2460         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
2461
2462         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
2463         as the patch type.
2464
2465         * mini.c (mono_resolve_patch_target): Ditto.
2466         
2467         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
2468         (encode_klass_ref): Add support for encoding VARs/MVARs.
2469
2470         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
2471
2472         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
2473         the handling of the got entries into a separate 'decode_got_entry' function.
2474         Add support for RGCTX_FETCH.
2475
2476         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
2477         clobbered by the trampoline code.
2478
2479         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
2480         not clobbered by the indirect calling code.
2481
2482 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2483
2484         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
2485         to fix the build.
2486
2487 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
2488
2489         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
2490         signature using the compilation mempool otherwise we would leak it.
2491
2492 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2493
2494         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
2495         mono_emit_abs_call ().
2496
2497         * patch-info.h: Add GENERIC_CLASS_INIT.
2498
2499         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
2500
2501         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
2502         as their target as a near call.
2503
2504         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
2505         ABS handling code.
2506         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
2507
2508         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
2509         call to a runtime function described by a patch.
2510
2511         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
2512         mono_emit_abs_call, this has the advantage that the ABS handling code in
2513         mono_codegen () can handle them both, and can handle other stuff in the
2514         future without additional code.
2515
2516         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
2517         entry.
2518         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
2519         abs addresses.
2520
2521         * mini.h: Add missing bblock related prototypes.
2522
2523         * mini.h (MonoCompile): Remove unused reverse_inst_list and
2524         reverse_inst_list_len fields.
2525
2526         * mini.c: Refactor this file a bit by moving branch optimizations to 
2527         branch-opts.c.
2528
2529         * method-to-ir.c: Merge generic sharing changes missed earlier.
2530
2531         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
2532
2533         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
2534         shared patches. Process METHODCONST as a shared patch.
2535
2536         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
2537         as it crashes on the 2.0 mscorlib.
2538
2539         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
2540         to cause crashes.
2541         
2542         * aot-compiler.c: Use is_plt_patch () in a few additional places.
2543         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
2544         by IMT.
2545
2546         * aot-compiler.c: Reorganize the got handling code to be a bit more
2547         understandable.
2548
2549 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2550
2551         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
2552         mono_patch_info_equals/hash, and use it to massively simplify
2553         get_plt_index ().
2554
2555         * mini.c (mono_patch_info_hash): Simplify this and add support for
2556         more patch types.
2557
2558         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
2559
2560         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
2561         handling code, since an offset is not enough to identify a trampoline.
2562
2563         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
2564
2565 2008-08-17  Mark Probst  <mark.probst@gmail.com>
2566
2567         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
2568
2569         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
2570
2571         * mini-ops.h: Argument and result types for OVF_CARRY ops.
2572
2573         * decompose.c: PPC decompositions for various ops.
2574
2575         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
2576
2577 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2578
2579         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
2580         call the generic trampoline code using a call, instead of a jump, to
2581         remove some special casing from the generic trampoline code.
2582
2583         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
2584         (mono_codegen): Ditto.
2585
2586         * aot-compiler.c aot-runtime.c: Ditto.
2587
2588         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
2589
2590         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
2591         helper function to find the offset corresponding to a lazy fetch trampoline.
2592
2593         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
2594         when doing generic sharing.
2595
2596         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
2597         places.
2598         
2599         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
2600         mini-trampolines.c to be with the other trampoline creation functions.
2601
2602         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
2603         as it is equal to method->signature in most cases, add a 
2604         mono_emit_method_call_full variant which takes a signature and an imt
2605         argument as well.
2606
2607 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
2608
2609         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
2610         to this function, since it could be computed easily from the method 
2611         argument.
2612         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
2613         more.
2614
2615         * method-to-ir.c mini.c: Remove references to 
2616         compile_generic_method_wo_context.
2617
2618         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
2619         generic method calls.
2620         
2621         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
2622         dimensional non-szarrays.
2623
2624         * mini.c (mini_init): Register mono_array_new_1.
2625
2626         * jit-icalls.c (mono_array_new_1): New jit icall.
2627
2628         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
2629         pointing to the method.
2630
2631         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
2632         method addresses belonging to METHOD_JUMP patches in the 
2633         jump_target_got_slot_hash.
2634         (mono_aot_load_method): Ditto.
2635
2636         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
2637         METHOD_JUMP patches.
2638
2639         * mini.c (mini_create_jit_domain_info): New helper function which 
2640         initializes/frees domain->runtime_info.
2641         (mini_free_jit_domain_info): Ditto.
2642         (mini_init): Install the domain hook functions with the runtime.
2643
2644         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
2645         information maintained by the JIT.
2646
2647         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
2648         insertion into jump_table_hash into mono_codegen (), also implement proper
2649         locking.
2650
2651         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
2652         tail calls, it is already done by the aot code.
2653         
2654         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
2655         mechanism on amd64.
2656
2657         * iltests.il.in: Make the jmp test a bit more complex.
2658
2659         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
2660         generic instances which doesn't have a token.
2661
2662         * aot-runtime.c (decode_method_ref): Ditto.
2663         
2664         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
2665         can handle this case now.
2666         (handle_box): Ditto.
2667
2668 2008-08-15  Geoff Norton  <gnorton@novell.com>
2669
2670         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
2671         debugging check.
2672
2673 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
2674
2675         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
2676         calling generic methods.
2677
2678         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
2679
2680         * aot-runtime.c (decode_patch_info): Ditto.
2681
2682         * mini.c (mono_resolve_patch_target): Ditto.
2683         
2684         * patch-info.h: Add METHOD_RGCTX.
2685
2686         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
2687
2688 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
2689
2690         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
2691         arguments in registers.
2692
2693         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
2694         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
2695
2696         * mini.c (mini_method_compile): Abort aot compilation for generic
2697         methods if generic sharing is disabled.
2698         
2699         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
2700         an mrgctx.
2701
2702         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
2703         requiring an mrgctx.
2704
2705         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
2706         store instructions when converting a vcall to a normal call.
2707
2708         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
2709         mono_arch_find_jit_info.
2710
2711 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
2712
2713         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
2714         avoid calling mono_method_full_name () for every method even if the
2715         env var is not set.
2716         (check_inline_caller_method_name_limit): Ditto.
2717
2718 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2719
2720         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
2721         assemblies in one run.
2722
2723         * aot-compiler.c (mono_compile_assembly): Only print out a count of
2724         skipped methods if it is not 0.
2725
2726         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
2727
2728 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2729
2730         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
2731           MONO_ARCH_HAVE_UNWIND_TABLE.
2732
2733         Contributed under MIT/X11 license.
2734
2735 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2736
2737         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
2738           from default optimizaton list on Winx64.
2739
2740         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
2741
2742         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
2743           the LMF from the MonoJitTlsData structure.
2744
2745         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
2746
2747         Contributed under MIT/X11 license.
2748
2749 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2750
2751         * mini.c (sigsegv_signal_handler): Fix the build.
2752
2753         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
2754         assembly->aot_module.
2755
2756         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
2757         hash table. This simplifies and speeds up a lot of code, and fixes support
2758         for .netmodules.
2759
2760         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
2761         with the runtime.
2762
2763         * mini-exceptions.c: Ditto.
2764         
2765         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
2766         'native_offset' argument, since these are computed in the 
2767         mono_find_jit_info () function.
2768
2769         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
2770         is used by exceptions-ppc.c.
2771
2772         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
2773         mono_arch_find_jit_info ().
2774         
2775         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
2776         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
2777         generic code in mini-exceptions.c.
2778
2779 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
2780
2781         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
2782
2783         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
2784         
2785         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
2786         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
2787         called while holding the loader lock. Fixes #415608.
2788         (mono_aot_get_method_from_token_inner): Ditto.
2789
2790 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2791
2792         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
2793         to reduce differences between this and the generic implementation in
2794         mini-exceptions.c.
2795         (ves_icall_get_frame_info): Ditto.
2796
2797         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
2798
2799         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
2800         longer neccesarry.
2801
2802         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
2803         mono_arch_get_call_filter () and make it non-static, for consistency with the
2804         other architectures.
2805
2806 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
2807
2808         * mini.c:
2809         * local-propagation.c:
2810         * mini-x86.c: Correct the name of arch defines.
2811
2812 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2813
2814         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2815         NO_EMULATE_LONG_SHIFT_OPS define.
2816
2817 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2818
2819         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2820         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2821
2822         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2823         MACH fixes. Merged from the 2.0 branch.
2824
2825         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2826
2827         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2828         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2829
2830         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2831
2832         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2833         mono_marshal_get_native_wrapper () signature changes.
2834
2835 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
2836
2837         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2838         conversion bug under arm.
2839
2840 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2841
2842         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2843
2844         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2845         with overflow checking.
2846
2847 2008-08-05  Marek Habersack  <mhabersack@novell.com>
2848
2849         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2850         to the genmdesc.pl file
2851
2852 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
2853
2854         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2855         arg_array in the soft-float versions of the LOAD/STORE macros.
2856
2857         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2858         implementation.
2859
2860         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2861
2862 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2863
2864         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2865         a float HFA. Fixes #413621.
2866
2867 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
2868
2869         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2870         frame_size to args_size. Fixes build.
2871
2872 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2873
2874         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2875         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2876
2877         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2878         the stack are not unaligned. Fixes #413247.
2879         
2880 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2881
2882         * mini.c: update jitted methods performance counters.
2883
2884 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2885
2886         * mini-exceptions.c: increase the exceptions thrown performance
2887         counter in mono_handle_exception ().
2888
2889 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
2890
2891         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2892         can work with netmodules.
2893
2894 2008-07-28  Geoff Norton  <gnorton@novell.com>
2895
2896         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
2897         regression tests.
2898
2899 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2900
2901         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2902         correct place.
2903
2904 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
2905
2906         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2907           The float param registers and other param registers must be the 
2908           same index on Windows x64.
2909
2910         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
2911           ArgValuetypeAddrInIReg argument case.  Setting the argument
2912           op to OP_VTARG_ADDR (OP_REGOFFSET)).
2913
2914         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
2915           variable computed above as the copy length for arguments of storage
2916           type ArgValuetypeAddrInIReg.
2917
2918         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
2919           ArgValuetypeAddrInIReg argument case.  This case will rely on
2920           mono_arch_emit_outarg_vt to emit the correct code later in the process.
2921
2922         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
2923           a 32 byte stack allocation for all calls.  We will omit the adjustment for
2924           jump and tail call instructoins as they do not follow the typical call behavior.
2925
2926         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
2927           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
2928           local variable and pass the local variable by reference to the called method.
2929
2930         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
2931           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
2932           of a struct is passed in a register it must be saved with the other
2933           volatile argument on the stack.
2934
2935         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
2936           frame pointer the stack adjustment value must be saved to the unwind 
2937           info structure.
2938
2939         Contributed under MIT/X11 license.
2940
2941 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2942
2943         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
2944         which got lost in the merge.
2945
2946 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2947
2948         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
2949         build.
2950
2951         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
2952         
2953         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
2954         icalls, since they won't be patched.
2955
2956         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
2957         different code sequence when running under valgrind to prevent some valgrind
2958         errors.
2959
2960         * iltests.il.in: Add new regression test.
2961
2962         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
2963         end with a throw.
2964
2965         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
2966         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
2967
2968         * iltests.il.in: Add new test.
2969
2970         * aot-compiler.c: Fix some warnings.
2971
2972         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
2973         Fixes #412494.
2974
2975 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
2976
2977         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
2978         (mini_usage_jitdeveloper): Add a missing --wapi option.
2979
2980 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
2981
2982         * mini-codegen.c: Simplify the is_fp macros.
2983         (free_up_ireg): Remove, use free_up_reg instead.
2984         (free_up_reg): Fix the fp case.
2985
2986 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
2987
2988         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
2989         lowered earlier.
2990
2991         * exceptions-x86.c: Merge some changes which seemed to have got lost
2992         in the linear-ir merge.
2993
2994         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
2995
2996         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
2997         long vreg volatile even if the variable was already created.
2998
2999         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
3000         volatile variables.
3001
3002 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
3003
3004         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
3005
3006         * mini.c (mono_jit_compile_method_inner): Add support for 
3007         MONO_EXCEPTION_BAD_IMAGE.
3008
3009         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
3010         mini_method_get_context () returns NULL. Fixes #356531.
3011
3012         * mini.c (mono_method_to_ir): Ditto.
3013         
3014         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
3015         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
3016
3017 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
3018
3019         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
3020         in the LDFTN implementation.
3021
3022 2008-07-25  Mark Probst  <mark.probst@gmail.com>
3023
3024         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
3025         code, patch calls to icalls, too, even if they're not in the
3026         shared generic code hash.  Fixes #411962.
3027
3028 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
3029
3030         * cpu-x86.md: Increase the length of the fcall opcodes.
3031
3032         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
3033         calls returning floats.
3034
3035         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
3036         on NEWARR.
3037         
3038         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
3039         missed earlier.
3040
3041         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
3042         into the domain->method_code_hash.
3043
3044         * aot-compiler.c: Fix win32 build.
3045
3046         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
3047         
3048         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
3049         gshared NEWARR implementation.
3050
3051         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
3052
3053         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
3054         can be used outside of method_to_ir.
3055
3056         * mini.h (MonoCompile): Add arg_types field.
3057
3058         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
3059         
3060         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
3061         the values of the local arg_array and param_types array.
3062
3063 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
3064
3065         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
3066         got accesses might only get generated later when NEWOBJ is decomposed.
3067         
3068         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
3069         looking up the native code of the target method when a delegate is called
3070         for the first time.
3071
3072         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
3073         optimization.
3074
3075         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
3076
3077         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
3078         AOT work on platforms without a working dlsym implementation.
3079
3080         * mini.h: Bump AOT image format version.
3081         
3082 2008-07-24  Mark Probst  <mark.probst@gmail.com>
3083
3084         * mini-exceptions.c: Free a MonoType with
3085         mono_metadata_free_type() instead of g_free().
3086
3087         * aot-runtime.c: Free a MonoType.
3088
3089 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
3090
3091         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
3092         optimization.
3093
3094         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
3095         fp stack on x86.
3096
3097 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
3098         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
3099         profiler hook.
3100
3101 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
3102
3103         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
3104         NEWOBJ calls on valuetypes.
3105
3106         * iltests.il.in: Add new test.
3107
3108         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
3109
3110 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
3111
3112         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
3113         is no longer needed.
3114
3115         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
3116         non register sized integer arguments.
3117         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
3118         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
3119         emit_memcpy2 ().
3120
3121         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
3122         CEE_MONO_RETOBJ.
3123         
3124         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
3125         two a binop with different sized arguments is emitted.
3126
3127         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
3128         instruction in the ins==NULL case.
3129
3130 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
3131
3132         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
3133
3134         * mini-x86.c: Fix osx build.
3135
3136         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
3137         opcodes as well.
3138
3139         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
3140         instruction for non int sized variables.
3141
3142         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
3143         implementation.
3144
3145 2008-07-23  Robert Jordan  <robertj@gmx.net>
3146
3147         * method-to-ir.c: Fix MSVC build.
3148
3149 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
3150
3151         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
3152         a non int sized type, widen it to an int since newer versions of gcc seem to
3153         generate code which needs this.
3154
3155         * ssa2.c abcremoval2.c: Fix warnings.
3156
3157         * *: Merge the Linear IR branch.
3158
3159         The original branch is at trunk/branches/vargaz/mini-linear-il, and
3160         the ChangeLog file there describes all the changes done over the years. 
3161         Further documentation can be found at www.mono-project.com/Linear_IL.
3162
3163 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
3164
3165         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
3166           The float param registers and other param registers must be the 
3167           same index on Windows x64.
3168
3169         Contributed under MIT/X11 license.
3170
3171 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
3172
3173         * mini.c: Make the previous fix GC safe.
3174
3175 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
3176
3177         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
3178
3179 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
3180
3181         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
3182           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
3183           ArgValuetypeAddrInIReg instead.
3184
3185         Contributed under MIT/X11 license.
3186
3187 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
3188
3189         * mini-codegen.c (get_register_spilling): Fix a warning.
3190
3191 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
3192
3193         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
3194         for types which the initialization fails. Raises the provided exception
3195         at the right stop after cleanup.
3196
3197 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
3198
3199         * aot-compiler.c: Free most of the memory allocated during compilation.
3200
3201         * mini.c (mini_parse_debug_options): Fix a leak.
3202         
3203         * mini.c (mini_method_compile): Don't add the method to the jit info tables
3204         during aot compilation.
3205
3206 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
3207
3208         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
3209         it has too much register pressure.
3210
3211 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
3212
3213         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
3214
3215 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3216
3217         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3218         on x86.
3219
3220         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3221         on amd64 similar to the way it is done on arm.
3222
3223         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3224
3225         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
3226         consistency, normalize error messages, avoid loading aot-only modules in
3227         normal mode.
3228
3229         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
3230         for consistency.
3231
3232         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
3233
3234 2008-07-11  Martin Baulig  <martin@ximian.com>
3235
3236         * debug-debugger.h
3237         (MonoDebuggerInfo): Add `interruption_request'.
3238
3239 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3240
3241         * aot-compiler.c (emit_plt): Remove some dead code.
3242
3243         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
3244
3245         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
3246         return the plt info offset belonging to a given plt entry.
3247
3248         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
3249         mono_aot_get_plt_info_offset.
3250         
3251         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
3252         similar to the amd64 code by makeing jumps through a separate jump table 
3253         instead of embedding the jump addresses into the code.
3254
3255 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
3256
3257         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
3258         method.
3259
3260 2008-07-10  Martin Baulig  <martin@ximian.com>
3261
3262         * mini.c (mini_method_compile): Disable generics sharing when
3263         running in the debugger.
3264
3265 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3266
3267         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
3268
3269         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
3270         the local register allocator from running out of registers on x86 when 
3271         using aot.
3272
3273 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
3274
3275         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
3276         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
3277         C4146.
3278
3279         Contributed under MIT/X11 license.
3280
3281 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3282
3283         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
3284         speed up the assembler.
3285
3286 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3287
3288         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
3289         support.
3290
3291         * mini.c: Move the soft float handling macros a bit earlier, add 
3292         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
3293         place.
3294
3295         * mini.h: Add prototype for mono_arch_fixup_jinfo.
3296
3297         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
3298         read-only to help catch code allocation requests.
3299         
3300         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
3301         and turn it off when using --aot-only or when compiling with --aot=full.
3302
3303         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
3304         jump table for switches from the normal domain mempool, not the code
3305         manager.
3306
3307         * mini-trampolines.c (get_unbox_trampoline): New function to return an
3308         unbox trampoline which handles aot-only mode too.
3309
3310         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
3311         an AOTed unbox trampoline.
3312
3313         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
3314
3315 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3316
3317         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
3318         ""
3319
3320         Contributed under MIT/X11 license.
3321
3322 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3323
3324         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
3325           the unwind information for the method at the end of the allocated block.
3326           
3327         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
3328           MonoCompileArch to hold the unwind info for SEH on Winx64
3329         
3330         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
3331           frame pointer info for the method being compiled.
3332           
3333         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
3334           the call to mono_exception_from_token.
3335           
3336         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
3337           storing the method prolog information in a format that the Winx64 SEH can understand.  This
3338           information is stored a the end of the method block because it is all 32-bit offset based.
3339
3340         Contributed under MIT/X11 license.
3341
3342 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3343
3344         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
3345
3346         * wapihandles.c: Fix warnings.
3347
3348         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
3349         mode.
3350
3351         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
3352         mono_jit_compile_method in aot-only mode since that calls the type 
3353         initializer.
3354         
3355         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
3356         get_delegate_invoke_impl in aot-only mode.
3357
3358         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
3359
3360 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
3361
3362         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
3363
3364         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
3365         is on by default.
3366
3367         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
3368
3369         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
3370         init trampoline from the AOT file as well.
3371
3372         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
3373         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
3374         code.
3375
3376         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
3377         mono_init.
3378
3379         * exceptions-amd64.c: Add _full variants for the remaining exception code
3380         creation functions as well, allow emission of relocatable code, remove
3381         caching since that is now done by the caller.
3382
3383         * mini-exceptions.c: Add _full variants for the remaining exception code
3384         creation functions as well, add aot-only support.
3385
3386         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
3387         if we can determine a proper token for them.
3388         (add_wrappers): Add a few more wrappers.
3389         (emit_method_code): Remove some dead code.
3390         (emit_trampolines): Emit exception code too.
3391
3392         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
3393
3394         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
3395         mono_array_new_va which avoids varargs.
3396
3397         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
3398
3399         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
3400         mono_arch_create_specific_trampoline () in all places.
3401
3402         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
3403         a bit so it can be used for other things as well.
3404         
3405         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
3406         on demand as well.
3407
3408         * exceptions-amd64.c: Rename the caching from the exception code creation
3409         functions, it is done by the caller instead.
3410         
3411         * exceptions-amd64.c: Change the signature of the exception code creation 
3412         functions to allow the creation of relocatable code later.
3413
3414         * mini-exceptions.c: Add a set of functions to query the various 
3415         runtime-generated exception functions.
3416
3417         * mini.c mini-exceptions.c: Use the newly added functions instead of the
3418         mono_arch_.. () functions.
3419         
3420 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3421
3422         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
3423
3424         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
3425
3426         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
3427         (mini_get_vtable_trampoline): Ditto.
3428
3429         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
3430         code in the AOT case by returning the code size and a list of relocations to
3431         the caller.
3432
3433         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
3434
3435 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
3436
3437         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
3438           clean the stack.
3439
3440         Contributed under MIT/X11 license.
3441
3442 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3443
3444         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
3445         so the buffer size can be computed correctly. Fixes #404735.
3446
3447         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
3448         normally as cfg->debug_info is already freed.
3449
3450 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
3451
3452         * mini-amd64.c: For calls returning vtypes in registers, don't store
3453         the return address on the stack, instead allocate a separate local for
3454         it. Fixes #404729.
3455
3456 2008-07-05  Mark Probst  <mark.probst@gmail.com>
3457
3458         * mini-trampolines.c, mini.h: Add an argument to
3459         mono_create_jit_trampoline_in_domain() for turning off the adding
3460         of the sync wrapper.
3461
3462         * mini.c: Use the JIT trampoline without sync instead of
3463         ldftn_nosync in static RGCTX invoke wrappers so that the call can
3464         be patched.
3465
3466 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3467
3468         * driver.c: Turn on GSHARED optimization by default.
3469
3470 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
3471
3472         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
3473         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
3474
3475         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
3476         create a variant of the generic trampoline code callable from AOTed trampolines.
3477
3478         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
3479         trampoline code callable from AOTed trampolines.
3480
3481         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
3482
3483 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3484
3485         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
3486         pass-through manner.
3487
3488         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
3489         and don't fail sharing for them anymore.
3490
3491         * mini-exceptions.c: Handle exceptions in shared generic methods.
3492
3493         * generic-sharing.c: When checking the context of a generic
3494         method, also check its class's context.  Don't treat wrappers as
3495         sharable.
3496
3497         * mini-trampolines.c: Some code factored out to
3498         metadata/generic-sharing.c.  Handle the MRGCTX case.
3499
3500         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
3501         we must deal with the method being of another instantiation of the
3502         class.  Add static rgctx invoke wrappers to generic methods.
3503
3504 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3505
3506         * mini.c: Provide all jit infos of generic shared methods with a
3507         generic jit info.
3508
3509         * mini-exceptions.c: Handle the new situation that a generic info
3510         might be available, but not info about the this/vtable/mrgctx
3511         variable.
3512
3513 2008-07-03  Mark Probst  <mark.probst@gmail.com>
3514
3515         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
3516         generic methods.
3517
3518 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
3519
3520         * dominators.c (check_dominance_frontier): Fix a warning.
3521
3522         * mini.h: Add some missing prototypes.
3523
3524         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
3525
3526         * driver.c (mono_jit_init_version): Correct the comments since the first
3527         argument should be the name of the root domain, not a filename.
3528
3529         * aot-runtime.c (make_writable): Error out if this is called while running
3530         with --aot-only.
3531         (load_aot_module): Ditto.
3532
3533         * aot-compiler.c: Really fix the computation of method indexes.
3534
3535         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
3536         optimizations as this is no longer called frequently.
3537
3538         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
3539         method and the invoke impl code and pass it to the delegate trampoline instead of
3540         just the delegate class.
3541
3542 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
3543
3544         * aot-compiler.c: Fixup the computation of method indexes.
3545         (add_wrappers): Create the base methods of the runtime invoke wrappers using
3546         the method builder infrastructure.
3547
3548         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
3549         has no header.
3550
3551         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
3552         mode, load the method right away instead of creating a trampoline.
3553
3554         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
3555
3556         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
3557         some checks a bit.
3558
3559 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
3560
3561         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
3562         (mono_aot_load_method): Use method_index instead of method->token.
3563
3564         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
3565         can handle icalls etc. properly.
3566
3567         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3568
3569         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
3570
3571         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
3572         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
3573         JIT_ICALL_ADDR patch type.
3574
3575         * patch-info.h: Add JIT_ICALL_ADDR patch type.
3576
3577         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
3578         request flag.
3579         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
3580
3581         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
3582
3583 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
3584
3585         * mini.c: Use domain->jit_code_hash_lock for controlling access to
3586         domain->jit_code_hash.
3587
3588 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
3589
3590         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
3591
3592 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
3593
3594         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
3595         get_this_arg_from_call, let it compute it when needed.
3596
3597         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
3598         gsctx from code only when needed.
3599
3600         * mini-trampolines.c (get_generic_context): Rename this to 
3601         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
3602         it can be called by the arch backends.
3603
3604         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
3605
3606 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
3607
3608         * driver.c (mono_main): Add experimental --aot-only command line option.
3609
3610         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
3611         set.
3612
3613 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
3614
3615         * driver.c (DllMain): Remove mono_module_handle.
3616
3617         Contributed under MIT/X11 license.
3618
3619 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
3620
3621         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
3622         for emitting methods which are not in the source assembly. Detect and report
3623         failure of assembling+linking.
3624         
3625         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
3626
3627         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
3628
3629 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
3630
3631         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
3632
3633 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
3634
3635         * mini.h: Remove some obsolete prototypes.
3636
3637         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
3638
3639 2008-06-24  Mark Probst  <mark.probst@gmail.com>
3640
3641         * mini.c (get_object_generic_inst): Variable-sized arrays are not
3642         supported by Visual Studio, so use alloca().
3643
3644 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
3645
3646         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
3647         Fixes #402585.
3648
3649 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3650
3651         * mini.c: Fail sharing of a generic method if it contains an open
3652         catch clause (because we don't pass MRGCTXs yet).
3653
3654 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3655
3656         * mini.c: When compiling a method with generic sharing, insert the
3657         method instantiated with an all-Object generic context into the
3658         jit info table, instead of the context of the first instantiation
3659         of the method we happen to compile.
3660
3661 2008-06-18  Martin Baulig  <martin@ximian.com>
3662
3663         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
3664         `major_version' and `minor_version'.
3665
3666 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3667
3668         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
3669         mono_method_is_generic_sharable_impl() takes an additional
3670         argument specifying whether to treat type variables as reference
3671         types.
3672
3673 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3674
3675         * mini.h: Removed obsolete prototypes.
3676
3677 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3678
3679         * mini.c: Don't fail generic sharing for initobj and sizeof - we
3680         already handle them.
3681
3682 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3683
3684         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
3685         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
3686         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
3687         tramp-x86.c: Added a MonoGenericContext* argument to
3688         mono_arch_get_unbox_trampoline() so that it can call other
3689         functions which require it.
3690
3691 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3692
3693         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
3694         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
3695         mono_arch_get_this_arg_from_call() takes a
3696         MonoGenericSharingContext* as well.
3697
3698 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3699
3700         * mini.c: Factor out code for emitting unbox into emit_unbox() and
3701         implement generic sharing of unbox.
3702
3703 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3704
3705         * mini.c: Don't compute the vtable to determine whether a field is
3706         special static, because it might not work for open types.
3707
3708 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3709
3710         * mini.c: Removed the unused token_type and token_source arguments
3711         from get_runtime_generic_context_ptr().
3712
3713 2008-06-17  Marek Habersack  <mhabersack@novell.com>
3714
3715         * mini.c (ADD_BINOP): fix the build
3716
3717 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
3718
3719         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
3720         a widening op.
3721
3722 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3723
3724         * mini.h: Removed class relations enum that's not used anymore.
3725
3726 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3727
3728         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
3729
3730         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
3731         the lazy fetch trampoline access code.
3732
3733 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
3734
3735         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
3736
3737 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
3738
3739         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
3740
3741         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
3742
3743         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
3744
3745 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3746
3747         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
3748         intrinsics.
3749
3750         * mini-ops.h: Add MIN/MAX_UN opcodes.
3751
3752         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
3753         intrinsics.
3754
3755         * basic-math.cs: Add more min/max tests.
3756
3757         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3758
3759 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3760
3761         * mini.c: Small fix in the prologue of emit_castclass.
3762
3763 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3764
3765         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3766
3767         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
3768         do not work even for unsigned types. Fixes #400014.
3769
3770         * basic-math.cs: Add regression tests for unsigned Min/Max.
3771
3772 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3773
3774         * mini.c: Added additional context_used argument to several
3775         functions, which will be needed for sharing generic methods.  Use
3776         GET_RGCTX macro wherever appropriate.  Declare only one
3777         context_used in mono_method_to_ir().
3778
3779 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3780
3781         * mini.c, generic-sharing.c: Removed generic class relations.
3782
3783         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
3784         functions due to MRGCTX changes.
3785
3786 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3787
3788         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
3789         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
3790         with calculated IMT.
3791
3792         * mini.c: Generic sharing of calls via generic interfaces.
3793
3794         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
3795         generic method with non-constant MonoGenericContext*.  Instead,
3796         the context is taken out of the method itself.
3797
3798 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3799
3800         * mini.c: Generic sharing of ldvirtftn.
3801
3802 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3803
3804         * mini.c: Generic sharing of ldftn.
3805
3806 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3807
3808         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3809
3810 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3811
3812         * mini.c: Generic sharing of the special case of ldtoken followed
3813         by a call to GetTypeFromHandle.
3814
3815 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3816
3817         * mini.c: Generic sharing of box for nullable types.
3818
3819 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3820
3821         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3822         are passed on the stack. Fixes #324807.
3823
3824 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
3825
3826         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3827         for the ArgValuetypeAddrInIReg case.
3828
3829         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
3830         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
3831
3832         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
3833         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
3834         local variable and pass the local variable by reference to the called method.
3835           
3836         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
3837         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3838
3839         Contributed under MIT/X11 license.
3840
3841 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
3842
3843         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3844
3845         * debug-mini.c (mono_debug_print_vars): Release memory after printing
3846         everything.
3847
3848 2008-06-10  Martin Baulig  <martin@ximian.com>
3849
3850         * debug-mini.c
3851         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3852
3853 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
3854
3855         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3856         possible error when no arguments are passed.
3857
3858         Contributed under MIT/X11 license.
3859
3860 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
3861
3862         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3863         where the file name is NULL.
3864
3865 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
3866
3867         * mini.c: Fix s390 build.
3868
3869 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
3870
3871         * trace.c (mono_trace_parse_options): Fix warnings.
3872
3873         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3874
3875 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
3876
3877         * mini.c (remove_block_if_useless): Avoid printing the method name.
3878         
3879         * mini.c: Remove needless setting of ins->cil_code which is now done by 
3880         MONO_INST_NEW.
3881
3882         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3883         LMF. Not yet used.
3884
3885         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3886         translated code after it has been patched.
3887
3888 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
3889
3890         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3891         avoid problems during code patching on SMP systems.
3892         (emit_call): Avoid adding a patch info which is already added by 
3893         emit_call_body.
3894         (mono_arch_emit_exceptions): Ditto.
3895
3896 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
3897
3898         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3899         MONO_TYPE_ISSTRUCT already checks for it.
3900
3901 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
3902
3903         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
3904           structs with floats on Winx64 the float registers are not used.  
3905           The integer registers are always used..
3906         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
3907           only one register will be used and only if the size of the struct 
3908           is 1,2,4, or 8 bytes.
3909
3910         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
3911           to work for Winx64.
3912
3913         Contributed under MIT/X11 license.
3914
3915 2008-06-05  Martin Baulig  <martin@ximian.com>
3916
3917         * debug-debugger.c (debugger_lookup_class): Also call
3918         mono_class_setup_methods() here; we're only called from RTI.
3919
3920 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
3921
3922         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3923         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3924         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3925         Post-process object files and add dtrace-generated object, if necessary.
3926
3927         Contributed under MIT/X11 license.
3928
3929 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3930
3931         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
3932         element class.
3933
3934         * mini.c: Generic sharing for unbox.any and castclass.
3935
3936 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3937
3938         * mini.c: Ignore tailcall prefix in shared generic code and when
3939         doing calls which require a vtable/rgctx argument.
3940
3941 2008-06-04  Mark Probst  <mark.probst@gmail.com>
3942
3943         * mini.c: Don't free the JIT info.
3944
3945         * driver.c: Changes in the JIT info table testing code.
3946
3947 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
3948
3949         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
3950         interruption. Fix some warnings.
3951
3952         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
3953         interruption_checkpoint.
3954
3955 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
3956
3957         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
3958         from embedding applications.
3959
3960 2008-06-02  William Holmes  <billholmes54@gmail.com>
3961
3962         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
3963           reserving 32 bytes on the stack when making calls. 
3964
3965         Contributed under MIT/X11 license.
3966
3967 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
3968
3969         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
3970         the linear IL branch.
3971
3972         * driver.c: Print out more information for --version on arm.
3973
3974 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
3975
3976         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
3977         bb_exit instead, since out of line bblocks might not actually be emitted
3978         out-of-line.
3979         
3980         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
3981         maximum epilog size for out of line bblocks if tracing is enabled.
3982
3983         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
3984
3985 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
3986
3987         * arrays.cs: Regression tests for allocating arrays with negative sizes.
3988
3989 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
3990
3991         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
3992         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
3993         opcodes.
3994
3995 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
3996
3997         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
3998         the 'value' to store is a constant.
3999
4000         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
4001
4002         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
4003         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
4004
4005 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
4006
4007         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
4008         for accessing method->generic_container.
4009
4010 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
4011
4012         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
4013         
4014         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
4015
4016         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
4017
4018         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
4019         fails.
4020
4021 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
4022
4023         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
4024
4025         * mini.c: Handle the case when mono_class_vtable () fails.
4026
4027 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
4028         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
4029         the stat profiler.
4030
4031 2008-05-22  Mark Probst  <mark.probst@gmail.com>
4032
4033         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
4034         together with domain sharing.
4035
4036 2008-05-22  Mark Probst  <mark.probst@gmail.com>
4037
4038         * mini.c: Treat callvirts to final methods like non-virtual calls
4039         when doing generic sharing, i.e. look them up in the runtime
4040         generic context.
4041
4042 2008-05-22  Mark Probst  <mark.probst@gmail.com>
4043
4044         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
4045         with computed types (for generic sharing).
4046
4047         * mini.c: Generic sharing for mkrefany and refanyval.
4048
4049 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
4050
4051         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
4052         possible.
4053
4054         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
4055         the generic sharing code.
4056         
4057         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
4058         when needed.
4059
4060 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
4061
4062         * mini.h: Remove the declaration of mono_aot_init_vtable ().
4063
4064 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
4065
4066         * driver.c: updated copyright date
4067
4068 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
4069
4070         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
4071         needed.
4072
4073 2008-05-19  Martin Baulig  <martin@ximian.com>
4074
4075         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
4076         pointing to the new `_mono_debug_using_mono_debugger' variable.
4077
4078         * driver.c
4079         (mono_main): Check mono_debug_using_mono_debugger() rather than
4080         the `MONO_INSIDE_MDB' environment variable to check whether we're
4081         inside the debugger.
4082
4083 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
4084
4085         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
4086         argument.
4087
4088 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
4089
4090         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
4091
4092         * mini.c: Added mini_assembly_can_skip_verification. This
4093         function checks if the assembly requested to skip verification. 
4094         Fixes part of #387274.
4095
4096 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
4097
4098         * mini.c (mini_get_method): Disable the check for open generic classes when
4099         using generic sharing.
4100
4101         * generics.cs: Add a test for #387034.
4102
4103         * mini.c (mini_get_method): Check whenever the method class is an open generic
4104         type, and return NULL in that case, causing a verification error. Fixes
4105         #384123.
4106
4107 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
4108
4109         * driver.c (mono_main): Revert r102623. The right
4110         thing to do is to enable the verifier under verifiable
4111         unless a --security flag was passed.
4112
4113         We need this non-trivial behavior for --verify-all otherwise
4114         mcs-compileall won't be able to use it. As it needs everything to
4115         be verified under validil.
4116
4117 2008-05-06  Martin Baulig  <martin@ximian.com>
4118
4119         Fix #383749.
4120
4121         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
4122         (mono_debugger_thread_cleanup): Likewise.
4123         (mono_debugger_extended_notification): Likewise.
4124
4125 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
4126
4127         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
4128         against both inflated and non-inflated methods. We need to check against the
4129         generic definition for cases where the instantiated method is not visible.
4130         We need to check against the inflated types for cases where the instantiation
4131         changes any super type. This fixes #382986.
4132
4133         Note that this doesn't need to be applied to other parts of mono_method_to_ir
4134         that check for visibiliy as generic params only appears as the type subject
4135         of tokens on call opcodes. Field manipulation and ldftn must always
4136         target an exact type.
4137
4138 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
4139
4140         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
4141         if no related --security flag is passed.
4142
4143 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4144
4145         * mini-arch.h: Prepare support for ppc64.
4146
4147         Contributed under MIT/X11 license.
4148
4149 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4150
4151         * aot-runtime.c: Prepare support for ppc64.
4152
4153         Contributed under MIT/X11 license.
4154
4155 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4156
4157         * mini-ops.h: Prepare support for ppc64.
4158
4159         Contributed under MIT/X11 license.
4160
4161 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
4162
4163         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
4164
4165         Contributed under MIT/X11 license.
4166
4167 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
4168
4169         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
4170         assemblies, since aot_name is not a full path, causing us to load MS.NET 
4171         assemblies on windows.
4172
4173 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
4174
4175         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
4176         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
4177         * main.c: Use UTF-8 encoded command line instead of Windows default code
4178         page on Windows to support Unicode.
4179         * driver.c (DllMain): New function for mixed-mode assembly support.
4180         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
4181         export __stdcall functions without decoration.
4182
4183         Contributed under MIT/X11 license.
4184
4185 2008-04-28  Mark Probst  <mark.probst@gmail.com>
4186
4187         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
4188         saving it very early.
4189
4190 2008-04-28  Mark Probst  <mark.probst@gmail.com>
4191
4192         * mini.h, mini.c: Lots of code for accessing the old RGCTX
4193         deleted.  The only way to access the new RGCTX is via the
4194         trampline.
4195
4196         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
4197         vtable instead of the RGCTX to static methods.
4198
4199         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
4200         accessing the new RGCTX.
4201
4202         * generic-sharing.c: There is no separation between self, type
4203         arguments and other types in the RGCTX anymore.
4204
4205 2008-04-25  Jonathan Chambers <joncham@gmail.com>
4206
4207         * mini-amd64.c (add_general): Remove previous stack adjustment.
4208         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
4209         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
4210         for 32 bytes of stack space reserved for all calls.
4211         
4212         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
4213         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
4214         adjustment.
4215         
4216         Code contributed under MIT/X11 license.
4217
4218 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
4219
4220         * mini.c (mini_method_verify): Only verify non-inflated methods, check
4221         against the root definition, peeling out method and type instantiations.
4222         Cache verify success results, code that fails verification is still
4223         checked multiple times.
4224
4225 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
4226
4227         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
4228
4229 2008-04-23  Jonathan Chambers <joncham@gmail.com>
4230
4231         * mini-amd64.c (add_general): Always increment stack on Win64.
4232         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
4233         on Win64.
4234         
4235         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
4236         stack based argument handling on Win64.
4237         
4238         Code contributed under MIT/X11 license.
4239
4240 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
4241
4242         * Makefile.am (version.h): Add support for git-svn.
4243
4244 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
4245
4246         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
4247         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
4248         avoiding allocations and libc functions which might deadlock.
4249         
4250         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
4251         'no-gdb-backtrace' option is set.
4252
4253         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
4254
4255         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
4256
4257 2008-04-21  Martin Baulig  <martin@ximian.com>
4258
4259         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
4260         and `get_lmf_addr'; `notification_address' is no longer a pointer.
4261
4262 2008-04-21  Martin Baulig  <martin@ximian.com>
4263
4264         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
4265         `thread_vtable', `event_handler_ptr' and `event_handler'.
4266
4267 2008-04-21  Martin Baulig  <martin@ximian.com>
4268
4269         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
4270         allows delayed initialization of the `executable_code_buffer' when
4271         attaching.
4272
4273 2008-04-21  Martin Baulig  <martin@ximian.com>
4274
4275         * mini.h (mono_debugger_create_notification_function): Removed.
4276         * tramp-*.c (mono_debugger_create_notification_function): Removed.
4277
4278         * mdb-debug-info64.s
4279         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4280
4281         * mdb-debug-info32.s
4282         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4283
4284         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
4285         currently only works on x86 and x86_64, so don't create it on ppc.
4286
4287 2008-04-21  Martin Baulig  <martin@ximian.com>
4288
4289         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
4290
4291         * mini.c
4292         (mini_method_compile): In the fp elimination check, check
4293         `debug_options.mdb_optimizations' in addition to
4294         mono_debug_using_mono_debugger().       
4295
4296         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
4297         disable some JIT optimizations which are only disabled when
4298         running inside the debugger.
4299         Added `--help-debug' option to describe the debugging options.
4300         (parse_debug_options): New static function to parse the `--debug'
4301         options, so we can easily add more stuff in future.
4302
4303 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
4304
4305         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
4306         the method has no body.
4307
4308 2008-04-19  Jonathan Chambers <joncham@gmail.com>
4309
4310         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
4311         assembly is not allowed in MSVC 64-bit compiler. 
4312         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
4313         as we get floating point exceptions everywhere.
4314         
4315         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
4316         correctly align arguments for call to throw_exception.
4317         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
4318         
4319         Code contributed under MIT/X11 license.
4320
4321 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
4322
4323         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
4324
4325 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
4326
4327         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
4328
4329         * mini-amd64.c (NEW_INS): Set cil_code.
4330
4331         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
4332         from mini-amd64.c so all debugger related logic is in one place.
4333
4334         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
4335         later won't have a random ip assigned to them.
4336
4337 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
4338
4339         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
4340         the arch specific function initializes code_size.
4341         (mono_create_delegate_trampoline): Ditto.
4342
4343         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
4344         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
4345         platforms.
4346
4347         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
4348         running under the debugger.
4349
4350         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
4351         debugger.
4352
4353         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
4354         debugger. Also move the disabling of optimizations here from driver.c.
4355         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
4356         debugger.
4357
4358         * mini.h (MonoCompile): Add a few new flags.
4359
4360 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
4361
4362         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
4363         so the cil_code field of created MonoInst's is properly set.
4364         (mini_select_instructions): Ditto.
4365
4366         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
4367         (MONO_INST_NEW_CALL): Ditto.
4368
4369         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
4370         in many places so the ins->cil_code field is properly initialized.
4371
4372         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
4373         place.
4374
4375 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
4376
4377         * mini.c (mini_method_compile): Print a different message when compiling a 
4378         shared method.
4379         
4380         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
4381         > 1.
4382
4383 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4384
4385         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
4386         SSE2 instructions.
4387
4388         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
4389         
4390 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4391
4392         * mini.c (handle_stack_args): Make this return void since its return value was
4393         never used. Also set cfg->unverifiable for invalid IL instead of calling
4394         G_BREAKPOINT ().
4395
4396 2008-04-10  Mark Probst  <mark.probst@gmail.com>
4397
4398         * mini.c: Make sure "this" is live in catch clauses with type
4399         variables in shared generic code.
4400
4401 2008-04-08  Mark Probst  <mark.probst@gmail.com>
4402
4403         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
4404         generic_class_is_reference_type() to ensure the proper behaviour
4405         when sharing generic code and the type in question is a type
4406         argument.
4407
4408 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4409
4410         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
4411         race conditions when printing thread dumps. Fixes #377738.
4412
4413 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
4414         
4415         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
4416         shows up when both MonoInst arguments can cause aliasig.
4417         There is likely no way in the current JIT to trigger this problem, but
4418         it showed up in the development of generics sharing, when in a new
4419         opcode both args of an OP_GROUP can be aliases (addresses of a local).
4420         When the generics sharing code will be committed, its tests will be
4421         valid also for this bug.
4422
4423 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4424
4425         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
4426         PATCH_INFO_METHOD.
4427
4428         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
4429         NULL.
4430
4431 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
4432
4433         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
4434         use a more detailed exception message for InvalidCastException.
4435
4436         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
4437
4438         * driver.c (mono_main): Add --debug=casts option to turn on better 
4439         InvalidCastException message details.
4440
4441         * mini.c (mini_get_debug_options): New helper function to return the address of
4442         the debug_options variable.
4443
4444         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
4445         the jit_tls TLS variable.
4446
4447         * mini.c (mono_jit_tls): New TLS variable.
4448
4449         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
4450         option is used.
4451
4452 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
4453
4454         * mini.h: Removed verifer related stuff. This code was moved to verify.c
4455
4456         * mini.c: Removed verifer related stuff, code moved to verify.c.
4457
4458         * driver.c: Using code from verify.c instead of mini.c.
4459
4460 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
4461
4462         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
4463         longer valid.
4464
4465 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
4466
4467         * mini.c (check_for_method_verify): Enabling verification of
4468         corlib if mono_verify_all is set. Bugs in the verifier preventing that
4469         have been fixed.
4470
4471 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
4472
4473         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
4474         caller saved registers as well.
4475         
4476         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
4477         saved registers as well.
4478
4479 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
4480
4481         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
4482
4483         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
4484         code.
4485
4486 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
4487
4488         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
4489         to get_call_info.
4490         (get_call_info): Take a gsctx argument instead of 'cfg'.
4491
4492 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
4493
4494         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
4495         mono_verify_all is set.
4496
4497         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
4498
4499         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
4500
4501 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
4502
4503         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
4504         an exception.
4505
4506         * driver.c mini.c mini.h: Add a --verify-all development option to test the
4507         verifier and the code generated by the compiler.
4508
4509 2008-03-25  Mark Probst  <mark.probst@gmail.com>
4510
4511         * mini.c: Generic sharing of the non-nullable case of the box
4512         instruction.
4513
4514 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
4515
4516         * inssel.brg: Fix the build.
4517
4518         * iltests.il.in: Add a test for lconv.ovf.u8.un.
4519
4520 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
4521
4522         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
4523         Array:Address. Fixes #372410.
4524
4525         * iltests.il.in: New tests for readonly prefix.
4526
4527 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
4528
4529         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
4530         mini-trampolines.c.
4531
4532         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
4533         mini-exceptions.c.
4534
4535         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
4536         
4537         * mini.c (mono_decompose_op_imm): New helper function.
4538
4539         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
4540         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4541         return value.
4542
4543         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4544         mono_arch_output_basic_block. Fix warnings.
4545
4546         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
4547         for now.
4548
4549 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
4550
4551         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
4552         since the extra frame is now detected automatically inside the loop.
4553
4554         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
4555         opts which are now in mono_peephole_ins ().
4556         
4557         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
4558
4559         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
4560         frames and skip duplicate managed-to-native frames. Fixes #367665.
4561
4562         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4563         opts which are now in mono_peephole_ins ().
4564         (mono_arch_peephole_pass_2): Ditto.
4565
4566         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
4567
4568         * mini-codegen.c (mono_peephole_ins): New helper function containing the
4569         arch independent peephole optimizations.
4570
4571         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4572         opts which are now in mono_peephole_ins ().
4573
4574         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
4575         
4576         * mini-s390.c (mono_arch_output_basic_block): Fix build.
4577
4578         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
4579         pattern.
4580
4581         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
4582         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
4583         opcode. 
4584
4585 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
4586
4587         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
4588         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4589         return value.
4590
4591         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4592         mono_arch_output_basic_block. Fix warnings.
4593
4594 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4595
4596         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4597         conv.ovf.u.un.
4598
4599 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4600
4601         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4602         conv.ovf.u.un.
4603
4604         * iltests.il: Add new tests.
4605
4606 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
4607
4608         * mini.c: Removed Windows version macros.
4609
4610 2008-03-20  Mark Probst  <mark.probst@gmail.com>
4611
4612         * generic-sharing.c: Put reflection types in the extensible part
4613         of the runtime generic context.
4614
4615         * mini.c: Generic sharing of the GetTypeHandle special case of the
4616         ldtoken instruction.
4617
4618 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4619
4620         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
4621
4622         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
4623         
4624         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
4625         consistency with the other version on the linear IR branch.
4626
4627         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
4628
4629         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
4630
4631         * iltests.il.in: Add new tests.
4632
4633 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
4634
4635         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
4636
4637         * iltests.il.in: Add new tests.
4638
4639 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4640
4641         * mini.c: Two variables with the same name were declared in
4642         nesting contexts and one wasn't initialized.  Fixed.
4643
4644 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4645
4646         * mini.c: Generic sharing of the initobj instruction.
4647
4648 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4649
4650         * mini.c: make the test to optimize ldtoken from typeof() more
4651         precise.
4652
4653 2008-03-18  Mark Probst  <mark.probst@gmail.com>
4654
4655         * mini.c: Generic sharing of the initobj instruction for reference
4656         types.
4657
4658 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4659
4660         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
4661         the mono_breakpoint_clean_code() code to perform bound checks.
4662
4663 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
4664
4665         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
4666         mono_arch_patch_callsite() to include the start of the managed method
4667         to be able to perform bound checks.
4668
4669 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4670
4671         * mini.c: Generic sharing for the isinst instruction.
4672
4673 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4674
4675         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4676         inssel-long32-mips.brg: Added opcodes for doing indirect calls
4677         with the runtime generic context argument.
4678
4679         * mini.c: Share calls to several types of unsharable methods by
4680         putting the address of the method code in the runtime generic
4681         context and doing an indirect call.
4682
4683         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4684         to switches.
4685
4686 2008-03-16  Mark Probst  <mark.probst@gmail.com>
4687
4688         * generic-sharing.c: Change due to a change in the runtime genric
4689         context API.
4690
4691 2008-03-15  Martin Baulig  <martin@ximian.com>
4692
4693         * tramp-x86.c
4694         (mono_arch_nullify_class_init_trampoline): Add call to
4695         mono_breakpoint_clean_code() to make things work when running
4696         inside the debugger.
4697
4698         * tramp-amd64.c
4699         (mono_arch_nullify_class_init_trampoline): Add call to
4700         mono_breakpoint_clean_code() to make things work when running
4701         inside the debugger.
4702
4703 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4704
4705         * inssel-long.brg (reg): Fix 64 bit build.
4706
4707 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4708
4709         * mini.c, mini.h: Share static generic code by passing it an
4710         implicit argument pointing to the runtime generic context.
4711
4712         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4713         inssel-long32-mips.brg: New opcodes for calling shared static,
4714         which need to be passed the runtime generic context.
4715
4716         * mini-amd64.c, mini-x86.c: Save the runtime generic context
4717         argument on the stack in the prologue if needed.  New function for
4718         finding the runtime generic context argument from the registers
4719         saved by the trampoline.
4720
4721         * mini-amd64.h, mini-x86.h: Specify which register to use for the
4722         runtime generic context argument.
4723
4724         * tramp-amd64.c: Also restore the register used for the runtime
4725         generic context argument.
4726
4727         * mini-trampoline.c: Resolve shared static calls by consulting the
4728         runtime generic context via the new argument.
4729
4730         * generic-sharing.c: Add an argument to sharability-checking
4731         functions that specifies whether type variables should be treated
4732         as sharable type arguments.
4733
4734         * inssel-x86.brg: Removed a superfluous, buggy rule.
4735
4736         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4737         to switches.
4738
4739 2008-03-14  Martin Baulig  <martin@ximian.com>
4740
4741         * debug-debugger.c (main_thread_handler): Call
4742         mono_runtime_run_main() without sending any notifications.
4743
4744         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
4745
4746 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4747
4748         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
4749
4750 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4751
4752         * tramp-x86.c: Fixed register restore offsets in the trampoline
4753         code for ECX and EDX.
4754
4755 2008-03-12  Geoff Norton  <gnorton@novell.com>
4756
4757         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
4758         different ucontext_t implementations.
4759         * exceptions-arm.c: Use the above defines to get exceptions working on 
4760         iPhone (based on a patch by Luke Howard lukeh@padl.com)
4761         * mini-arm.c: Implement iPhone icache support (based on a patch by
4762         Luke Howard lukeh@padl.com)
4763
4764 2008-03-12  Mark Probst  <mark.probst@gmail.com>
4765
4766         * mini.c: Enable generic sharing of calls to non-static
4767         non-interface non-generic non-value-type methods.
4768
4769         * mini-trampolines.c: Resolve calls from shared generic code.
4770
4771 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
4772
4773         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
4774
4775         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
4776
4777 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
4778
4779         * mini.c: some fixes for the AOT compiler.
4780
4781 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4782
4783         * cpu-amd64.md: Add clob:1 to some float opcodes.
4784
4785 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
4786
4787         * mini.h: Added MiniVerifierMode enumeration.
4788
4789         * mini.c: Added mini_verifier_set_mode to control
4790         the usage of the new verifier.
4791
4792         * mini.c (mono_method): Integrated the new verifier.
4793
4794         * driver.c: Extended --security option with validil and
4795         verifiable options to activate the new verifier.
4796
4797 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4798
4799         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
4800         optimization to ctors taking 0 or 2 arguments too.
4801
4802         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
4803         a bit.
4804
4805         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
4806
4807         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4808
4809 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
4810
4811         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4812         non-aot case as well.
4813
4814         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4815
4816         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4817         changes.
4818
4819         * aot-compiler.c (encode_patch): Ditto.
4820
4821         * mini.h (G_MININT32): Fix the definition of this.
4822
4823 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
4824
4825         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4826
4827         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4828
4829 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4830
4831         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
4832         methods returning vtypes in registers.
4833         (mono_arch_allocate_vars): Ditto.
4834
4835         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4836
4837         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
4838
4839         * generics.cs: Add a test from the linear IR branch.
4840
4841         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4842
4843         * mini.c (inline_method): Cache failed inline attempts.
4844
4845 2008-03-04  Mark Probst  <mark.probst@gmail.com>
4846
4847         * mini.c: For shared methods of generic classes put the location
4848         of "this" into the MonoGenericJitInfo.
4849
4850         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4851         register out of a MonoContext by register number.  Add the generic
4852         sharing context as an argument to mono_arch_find_this_argument().
4853
4854         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4855         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4856         for new arch function.
4857
4858         * mini-exception.c: Handle open exception clauses in shared
4859         generic code.
4860
4861         * mini-trampolines.c: Supply additional argument to
4862         mono_arch_find_this_argument().
4863
4864 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4865
4866         * Makefile.am (regtests): Run the bench.exe tests last.
4867
4868 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
4869
4870         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4871         a bit.
4872
4873 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
4874
4875         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4876         with MS.
4877
4878         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4879         
4880         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4881
4882         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4883         whose class has no cctor.
4884
4885         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4886
4887 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
4888
4889         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4890         unverified.
4891
4892 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
4893
4894         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4895         to be in sync with the code on the linear IR branch.
4896
4897         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4898
4899         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4900
4901 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
4902
4903         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4904
4905         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4906
4907         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4908
4909         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4910
4911         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4912         
4913         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4914         body.
4915
4916 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
4917
4918         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4919         OP_LOADR4_MEMBASE emission.
4920
4921         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4922         (mono_spillvar_offset_float): Ditto.
4923
4924         * mini-mips.c (mono_arch_emit_prolog): Ditto.
4925
4926         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
4927         emission.
4928
4929         * basic-long.cs: Add regression tests for them.
4930
4931         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
4932         use.
4933         (mono_arch_allocate_vars): Fix representation of single-precision float
4934         argument.
4935         (mono_arch_output_basic_block): Ditto.
4936
4937         * inssel-mips.brg: Ditto, remove duplicate items.
4938
4939         * mini-mips.c (emit_load_volatile_arguments): New function to handle
4940         arguments of tail calls as on other platforms.
4941         (mono_arch_output_basic_block): Handle tail calls.
4942
4943         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
4944         register.
4945
4946         * objects.cs (test_5_pass_static_struct): Add test for it.
4947
4948         Contributed under MIT/X11 license.
4949
4950 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
4951
4952         * Makefile.am: Use gmcs for compiling the regression tests.
4953
4954         * *.2.cs *.2.il: Rename to *.cs and *.il.
4955
4956 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
4957
4958         * regalloc.h: Make the vassign array smaller.
4959
4960         * mini.c (mini_method_compile): Remove an unused field in cfg.
4961
4962         * mini-codegen.c: Add a bunch of micro optimizations.
4963
4964 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
4965
4966         * regalloc.h: Remove some unused fields.
4967
4968 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
4969
4970         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
4971
4972         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
4973
4974 2008-02-22  Mark Probst  <mark.probst@gmail.com>
4975
4976         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
4977
4978         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
4979         trampoline: Fetch an entry from the runtime generic context.  If
4980         it's NULL, jump to the actual trampoline to fill the runtime
4981         generic context.  Otherwise, return it.
4982
4983         * mini.c: Call the lazy fetch trampoline to get entries out of the
4984         runtime generic context.
4985
4986         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
4987         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
4988         tramp-sparc.c: Stubs for the lazy fetch trampoline.
4989
4990 2008-02-21  Mark Probst  <mark.probst@gmail.com>
4991
4992         * mini.c: Fetch data out of the extensible part of the runtime
4993         generic context instead of calling a helper function.
4994
4995         * generic-sharing.c: Some functions moved into
4996         metadata/generic-sharing.c.  Helper function for fetching other
4997         types now checks and asserts against extensible rgctx (just for
4998         debugging purposes - the helper function isn't called anymore
4999         unless for debugging).
5000
5001 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
5002
5003         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
5004         for tail calls up to the point that the tests in iltests.exe run. Also add a
5005         dummy CKFINITE implementation.
5006         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
5007         needed for trampoline LMF frames.
5008
5009         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
5010         trampoline LMF frames.
5011
5012 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
5013
5014         * mini.c (inline_method): clean any pending loader error when inlining fail.
5015         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
5016
5017 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
5018
5019         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
5020
5021         * aot-runtime.c (decode_patch_info): Ditto.
5022
5023         * mini.c (mono_resolve_patch_target): Ditto.
5024         
5025         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
5026         icall wrappers.
5027
5028         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
5029         
5030         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
5031         if it references an icall address.
5032
5033 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
5034
5035         * cpu-s390x.md: Remove some more unused opcodes.
5036         
5037         * cpu-s390x.md: Remove some unused opcodes.
5038
5039         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
5040         mono_op_imm_to_op ().
5041
5042         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
5043         instead of a switch statement.
5044         
5045         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
5046         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
5047
5048         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
5049         
5050         * mini-codegen.c: Remove unused mono_regstate2_... functions.
5051
5052         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
5053         -1.
5054
5055 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
5056
5057         * driver.c (mono_main): Improve error reporting when an assembly cannot be
5058         opened. Fixes #362607.
5059
5060         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
5061
5062         * iltests.il.in: Add a test for static methods in interfaces.
5063
5064 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
5065
5066         * genmdesc.c (build_table): Fix a crash on older glib versions.
5067
5068         * cpu-sparc.md: Remove some unused opcodes.
5069         
5070         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
5071         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
5072
5073         * cpu-amd64.md: Remove some unused opcodes.
5074
5075         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
5076         like the other opcodes.
5077
5078 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
5079
5080         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
5081
5082         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
5083
5084         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
5085         variables 'cfg' instead of 'm' for consistency.
5086
5087         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
5088
5089         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
5090         argument holding the vtype return address, to avoid the ambigious use of
5091         cfg->ret for this purpose.
5092
5093         * mini.c (NEW_RETLOADA): Use vret_addr if set.
5094
5095         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
5096         
5097         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
5098         new mono_print_ins () function which only takes one argument.
5099
5100 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
5101
5102         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
5103         macro arguments.
5104
5105 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
5106
5107         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
5108
5109         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
5110
5111         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
5112         opcodes and other small changes.
5113
5114         * mini-ops.h: Add some new opcodes from the linear IR branch.
5115
5116         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
5117
5118         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
5119         opcodes, use the REG_MEMBASE opcodes instead.
5120         
5121         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
5122         opcodes, use the REG_MEMBASE opcodes instead.
5123         
5124         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
5125         linear IR branch.
5126
5127         * mini.c (mono_op_imm_to_op): New helper function.
5128
5129         * mini-ops.h: Add some opcodes from linear IR branch.
5130
5131 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
5132
5133         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
5134         <tsv@solvo.ru>.
5135
5136 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
5137
5138         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
5139         OP_ICONV_TO_R4/R8.
5140
5141         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
5142
5143 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
5144
5145         * aot-compiler.c (emit_method_code): Add an assert.
5146
5147         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
5148         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
5149         methods.
5150
5151 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
5152
5153         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
5154         some load/store opcodes so they are consistent. 
5155         (mono_arch_emit_prolog): Simplify some code.
5156
5157         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
5158
5159         * objects.cs: Add tests for large argument offsets on ARM.
5160
5161         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
5162         stack offsets. Fixes #359651.
5163
5164         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
5165
5166         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
5167
5168         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
5169
5170         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
5171
5172         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
5173
5174         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
5175         rid of CEE_CONV_R_UN.
5176
5177         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
5178
5179 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
5180
5181         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
5182
5183         * mini.c (mono_normalize_opcodes): Add some more opcodes.
5184
5185         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
5186
5187         * cpu-amd64.md: Remove some unused opcodes.
5188
5189         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
5190
5191         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
5192
5193         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
5194         arch specific functions for its parts. Call the peephole pass after local
5195         regalloc so the prolog can compute a more accurate max_offset.
5196         
5197         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
5198         the corresponding OP_I/OP_L opcodes.
5199
5200         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
5201
5202         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
5203
5204 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
5205
5206         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
5207         as they are handled in mini.c.
5208
5209         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
5210         
5211         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
5212         case since it is handled in mini.c.
5213
5214         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
5215
5216         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
5217
5218         * *.c: Use the new opcodes in the IR and back end code.
5219
5220         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
5221
5222         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
5223
5224 2008-02-06  Mark Probst  <mark.probst@gmail.com>
5225
5226         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
5227         an assert because it has a race condition.
5228
5229 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
5230
5231         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
5232
5233         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
5234
5235         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
5236
5237         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
5238         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
5239
5240 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
5241
5242         * cpu-amd64.md (move): Correct the maximum size of move.
5243
5244 2008-02-05  Mark Probst  <mark.probst@gmail.com>
5245
5246         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
5247         the generic class init trampoline to return quickly if the class
5248         is already inited.
5249
5250 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
5251
5252         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
5253         issues where an 32 bit callsite cannot be patched by a 64 bit address.
5254
5255 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
5256
5257         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
5258         branch.
5259
5260 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
5261
5262         * objects.cs: Add some soft-float tests.
5263
5264         * mini.c: Fix a couple more soft-float issues.
5265
5266         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
5267
5268         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
5269         avoid a REX prefix.
5270
5271 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
5272
5273         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
5274         exception happens while compiling a virtual method.
5275
5276 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
5277
5278         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
5279         
5280         * mini-sparc.c: Fix build.
5281
5282         * mini-sparc.c (get_call_info): Add support for generic sharing.
5283
5284         * mini-exceptions.c: Add a FIXME.
5285
5286 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
5287
5288         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
5289         altstack handling code.
5290
5291         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
5292         
5293         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
5294
5295         * mini-s390.c: Add support for generic sharing.
5296
5297         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5298         Fix CAS on s390.
5299         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5300
5301         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
5302
5303         * mini-s390x.c: Add support for generic sharing.
5304         
5305         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5306         Fix CAS on ia64.
5307         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5308
5309         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
5310         can be used since it takes a 16 bit signed immediate.
5311
5312         * inssel-s390x.brg: Fix OP_SETRET.
5313
5314         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
5315
5316         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
5317
5318         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
5319
5320         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
5321
5322         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
5323         in one place.
5324
5325         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
5326         stuff.
5327
5328         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
5329         of the unused mono_arch_patch_delegate_trampoline stuff.
5330
5331 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
5332
5333         * basic-long.cs: Move the fp related tests to basic-float.cs.
5334
5335         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
5336
5337         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
5338
5339         * basic-calls.cs: Add a test for proper float argument passing.
5340
5341         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
5342         if the context corresponds to an exception received through a signal.
5343
5344         * exceptions.cs: Add a test for nullref handling at the start of a try
5345         clause.
5346
5347         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
5348
5349         * jit-icalls.c (mono_break): New JIT icall.
5350
5351         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
5352
5353         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
5354
5355 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
5356
5357         * cpu-*.md: Get rid of unused opcodes.
5358
5359         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
5360
5361         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
5362         by all platforms.
5363
5364         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
5365         define.
5366
5367         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
5368         the arch independent trampoline code in mini-trampolines.c.
5369
5370         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
5371
5372         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
5373
5374         * mini-s390.h: Remove an unused define.
5375         
5376         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
5377         the arch independent trampoline code in mini-trampolines.c.
5378
5379         * mini-arm.c (mono_arch_emit_prolog): Fix build.
5380
5381 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
5382
5383         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
5384
5385         * mini-s390.c (mono_arch_emit_prolog): Fix build.
5386
5387         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
5388
5389         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
5390
5391         * cpu-amd64.md: Use smaller sizes for int opcodes.
5392
5393         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
5394
5395         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
5396         objects.cs.
5397
5398         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
5399         debugging.
5400
5401         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
5402         instead of though a pointer to save an indirection when accessing elements of
5403         the array.
5404
5405         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
5406         some typos.
5407         (NOT_IMPLEMENTED): New helper macro.
5408         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
5409         of a bb.
5410
5411         * *.c: Use the new helper macro.
5412
5413 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
5414
5415         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
5416
5417 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
5418
5419         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
5420         stack slots.
5421
5422 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
5423
5424         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
5425         profiling is enabled.
5426         
5427         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
5428         the end.
5429         (mono_arch_emit_prolog): Add more first bblock optimizations.
5430
5431         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
5432         in order if possible.
5433         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
5434         bblock, since the arguments are still in their original registers.
5435
5436         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
5437
5438 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
5439
5440         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
5441         as well.
5442
5443         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
5444         offset 0.
5445
5446         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
5447
5448         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
5449         process async exceptions received while in unmanaged code.
5450
5451         * mini.c (mini_init): Install a callback with the runtime which will be called
5452         when a thread receives an async exception while in unmanaged code.
5453
5454         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
5455
5456         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
5457
5458 2008-01-16  Wade Berrier  <wberrier@novell.com>
5459
5460         * cpu-g4.md:
5461         * cpu-arm.md:
5462         * cpu-s390x.md:
5463         fix build
5464
5465 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5466
5467         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
5468         compilation with sun cc.
5469
5470         * cpu-*.md: Fix the build.
5471
5472         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
5473
5474         * mini-amd64.h: Add some comments to the MonoLMF structure.
5475
5476         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
5477         
5478         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
5479         in the LMF structure if possible. This saves two instructions in the
5480         managed->native wrappers.
5481
5482         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
5483
5484 2008-01-16  Mark Probst  <mark.probst@gmail.com>
5485
5486         * generic-sharing.c: New type argument lookup code which uses the
5487         runtime generic context template.
5488
5489 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
5490
5491         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
5492
5493         * mini-arm.c (add_general): Fix arm eabi parameter passing.
5494         (mono_arch_output_basic_block): Fix localloc implementation.
5495
5496         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
5497
5498         * mini-ia64.c (peephole_pass): Fix ia64 build.
5499
5500         * mini-amd64.c (peephole_pass): Fix a warning.
5501         
5502         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
5503         at a constant offset from sp/fp.
5504
5505         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
5506         instead of obtaining it from *lmf in the managed method case.
5507
5508 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
5509
5510         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
5511
5512 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
5513
5514         * mini.h (MonoInstList): New type.
5515         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
5516         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
5517         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
5518         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
5519         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
5520         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
5521         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
5522         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
5523         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
5524         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
5525         MONO_INST_LIST_FOR_EACH_ENTRY,
5526         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
5527         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
5528         mono_inst_list_first, mono_inst_list_last,
5529         mono_inst_list_next, mono_inst_list_prev): New instruction
5530         list handling interfaces.
5531         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
5532         list head 'ins_list'.
5533         (MonoInst): Replace next pointer with list head 'node'.
5534         (MonoCallInst): Make 'out_args' a MonoInstList.
5535         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
5536         (MonoCompile): Delete reverse_inst_list and
5537         reverse_inst_list_len.
5538         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
5539         mono_arch_lowering_pass, mono_arch_local_regalloc,
5540         mono_arch_output_basic_block, mono_arch_emit_prolog):
5541         Convert to new instruction lists.
5542         (insert_after_ins): Delete.
5543         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
5544         instruction lists.
5545         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
5546         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
5547         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
5548         mono_emulate_opcode, mono_emit_load_got_addr,
5549         inline_method, mono_method_to_ir, mono_print_bb_code,
5550         print_dfn, decompose_pass, nullify_basic_block,
5551         replace_out_block_in_code, remove_block_if_useless,
5552         merge_basic_blocks, move_basic_block_to_end,
5553         try_unsigned_compare, optimize_branches, mono_print_code,
5554         mini_select_instructions, remove_critical_edges): Likewise.
5555         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
5556         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
5557         mono_arch_output_basic_block, mono_arch_emit_prolog):
5558         Likewise.
5559         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
5560         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5561         mono_arch_output_basic_block): Likewise.
5562         (inst_list_prepend, insert_after_ins): Delete.
5563         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
5564         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
5565         instruction lists.
5566         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
5567         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
5568         mono_arch_emit_prolog): Likewise.
5569         * cfold.c (mono_constant_fold): Likewise.
5570         * liveness.c (visit_bb, mono_analyze_liveness,
5571         optimize_initlocals): Likewise.
5572         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
5573         * graph.c (mono_draw_code_cfg): Likewise.
5574         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
5575         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
5576         mono_ssa_cprop): Likewise.
5577         * abcremoval (get_relations_from_previous_bb, process_block):
5578         Likewise.
5579         * local-propagation (mono_cprop_invalidate_values,
5580         mono_local_cprop_bb): Likewise.
5581         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
5582         peephole_pass, mono_arch_output_basic_block,
5583         mono_arch_emit_prolog): Likewise.
5584         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
5585         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5586         mono_arch_emit_prolog): Likewise.
5587         (insert_after_ins): Delete.
5588         * aliasing.c (print_code_with_aliasing_information,
5589         mono_build_aliasing_information, mono_aliasing_deadce):
5590         Convert to new instruction lists.
5591         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
5592         peephole_pass, NEW_INS, mono_arch_lowering_pass,
5593         mono_arch_local_regalloc, mono_arch_output_basic_block):
5594         Likewise.
5595         (insert_after_ins): Delete.
5596         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
5597         peephole_pass, mono_arch_output_basic_block): Convert to
5598         new instruction lists.
5599         * mini-codegen (InstList, inst_list_prepend,
5600         insert_after_ins): Delete.
5601         (insert_before_ins, get_register_force_spilling,
5602         get_register_spilling, free_up_ireg, free_up_reg,
5603         create_copy_ins, create_spilled_store, alloc_int_reg,
5604         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
5605         to new instruction lists.
5606         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
5607         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5608         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
5609         (insert_after_ins): Delete.
5610         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
5611         mono_arch_local_regalloc, mono_arch_output_basic_block,
5612         mono_arch_call_opcode): Convert to new instruction lists.
5613         (insert_after_ins): Delete.
5614         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
5615         peephole_pass, mono_arch_output_basic_block,
5616         mono_arch_emit_prolog): Convert to new instruction lists.
5617
5618 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
5619
5620         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
5621
5622         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
5623         Fixes #353182.
5624
5625         * Makefile.am (version.h): Make this work with non-bash shells.
5626
5627 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
5628
5629         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
5630
5631 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
5632
5633         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
5634         the InitializeArray optimization.
5635
5636 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
5637
5638         * mini.c driver.c: Don't include os/gc_wrapper.h.
5639
5640 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
5641
5642         * mini.c (print_jit_stats): Print GC statistics if available.
5643
5644 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
5645
5646         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
5647
5648 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
5649
5650         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
5651
5652 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
5653
5654         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
5655         
5656         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5657
5658         * driver.c (mono_main): Ditto.
5659
5660 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
5661
5662         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
5663
5664         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
5665         in the vtable can't be encoded.
5666         (compile_method): Ditto.
5667
5668 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
5669
5670         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
5671         defined.
5672
5673         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
5674         lmf->rbp.
5675
5676         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
5677         the top LMF entry belongs to the current method.
5678
5679         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
5680
5681 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
5682
5683         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
5684         
5685         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
5686
5687         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
5688
5689         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
5690
5691         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
5692
5693         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
5694         implementation.
5695
5696         * basic-float.cs: Add an ulong->double cast test.
5697
5698 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
5699
5700         * mini.c (mono_method_to_ir): Fix a warning.
5701
5702 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
5703
5704         * mini-ops.h: Add OP_SWITCH.
5705
5706         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
5707         CEE_SWITCH in back-end code, use OP_SWITCH instead.
5708
5709 2007-12-11  Geoff Norton  <gnorton@novell.com>
5710
5711         * mini-s390x.c: Minor change to the MAX() define to allow
5712         it to compile with other gcc versions.
5713
5714 2007-12-11  Geoff Norton  <gnorton@novell.com>
5715
5716         * cpu-s390x.md:
5717         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
5718
5719 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5720
5721         exceptions-arm.c (mono_arch_get_restore_context): Restore
5722         the frame pointer.
5723
5724         exceptions-arm.c (throw_exception): Save the frame pointer.
5725         This is a partial fix for #323747. Only the client side is
5726         fixed.
5727
5728 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5729
5730         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
5731         was using an unrelated variable to log the class which
5732         needed the cctor to be called. This was crashing on arm.
5733
5734 2007-12-09  Robert Jordan  <robertj@gmx.net>
5735
5736         * mini-x86.c (mono_arch_emit_epilog):
5737         Consider all kinds of 64-bit types. Fixes #323114.
5738
5739 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
5740
5741         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
5742
5743 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5744
5745         * mini-amd64.c (peephole_pass): Add a missing instruction check.
5746
5747 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5748
5749         * mini.c: run type ctor before allocating an object, not only
5750         when running it's constructor method (fixes at least part of bug #342507).
5751
5752 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5753         
5754         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
5755         
5756         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
5757         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
5758         function.
5759
5760         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
5761         mono_generic_class_init_trampoline () the same as it is done with the other
5762         trampolines.
5763
5764         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
5765         aot-runtime.c aot-compiler.c: Implement AOT support.    
5766
5767 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5768
5769         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
5770         build for archs which don't have the vtable trampoline defined
5771         yet.
5772
5773 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5774
5775         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
5776
5777         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
5778
5779         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
5780
5781         * tramp-<ARCH>.c: Use the new helper function.
5782
5783 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5784
5785         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
5786         trampoline call, which takes a vtable argument.
5787
5788         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
5789         OP_TRAMPCALL_VTABLEs like other calls.
5790
5791         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
5792         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
5793         call.  Implemented a support function which fetches the vtable
5794         from a register set.
5795
5796         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
5797         Implemented a generic class init trampoline, using the
5798         OP_TRAMPCALL_VTABLE opcode.
5799
5800         * mini.c: Implemented static field access when sharing generic
5801         code.  This implies initing the class using the new
5802         OP_TRAMPCALL_VTABLE call.
5803
5804 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5805
5806         * mini.c: Don't compile methods with sharing enabled if their
5807         classes are disabled for sharing.
5808
5809 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5810
5811         * inssel.brg: Add a missing sign extension to the GETCHR and array access
5812         opcodes. Fixes #346563.
5813
5814         * objects.cs: Add a new test.
5815
5816         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5817
5818         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5819         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5820
5821 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5822
5823         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5824
5825 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
5826
5827         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5828         code stream.
5829
5830 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
5831
5832         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5833
5834         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
5835         optimization in the AOT case.
5836         
5837 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
5838
5839         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5840         
5841         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5842
5843         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5844
5845         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5846
5847         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5848         is created by the inlined delegate ctor.
5849
5850         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
5851
5852         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5853
5854 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
5855
5856         * cpu-x86.md: Fix the length of ckfinite.
5857
5858 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
5859
5860         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5861         
5862         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5863         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5864
5865         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5866
5867         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
5868         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5869
5870 2007-11-28  Martin Baulig  <martin@ximian.com>
5871
5872         * mini-x86.c
5873         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5874         after creating the trampoline.
5875
5876 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
5877
5878         * aot-runtime.c (load_aot_module): Check runtime version if needed.
5879
5880         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5881         the same version.
5882
5883         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5884         instead of the calling method to help AOT.
5885
5886         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5887
5888 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
5889
5890         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5891         is defined.
5892
5893 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
5894
5895         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5896         
5897         * aot-compiler.c (compile_method): Correct check for generic method definitions.
5898         (encode_method_ref): No need to handle generic method definitions specially.
5899
5900         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5901
5902         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
5903         decode_klass_info.
5904
5905         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5906         encode_klass_info.
5907         (compile_method): Enable generic sharing.
5908
5909 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
5910
5911         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5912         (mini_method_compile): Add preliminary support for AOTing shared generic code.
5913
5914         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5915         generic code.
5916
5917         * mini-trampolines.c: Fix a warning.
5918
5919         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5920         NEW_PCONST.
5921         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5922         (generic_class_is_reference_type): Remove unused function.
5923
5924         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5925         in the generic vtable trampoline case.
5926
5927         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
5928         
5929         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
5930         return an AOT method based on a vtable slot.
5931
5932         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
5933
5934         * mini.c (mini_get_vtable_trampoline): Export this.
5935
5936 2007-11-22  Martin Baulig  <martin@ximian.com>
5937
5938         * debug-debugger.h
5939         (MonoDebuggerInfo): Move `debugger_version' up.
5940
5941 2007-11-22  Martin Baulig  <martin@ximian.com>
5942
5943         * mini-amd64.c
5944         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
5945
5946         * mini-trampolines.c
5947         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
5948         after compiling the method.
5949
5950 2007-11-20  Martin Baulig  <martin@ximian.com>
5951
5952         * debug-mini.c
5953         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
5954         (mono_debugger_remove_breakpoint): Likewise.
5955         (mono_debugger_check_breakpoints): Likewise.
5956
5957         * debug-debugger.c: Implement the new breakpoint interface here.
5958
5959 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
5960
5961         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
5962         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
5963
5964         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
5965
5966 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
5967
5968         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
5969
5970         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
5971         mini.c.
5972
5973         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
5974         mini.c.
5975
5976         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
5977         returning a vtype in a register.
5978
5979         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
5980         here from the arch specific code.
5981
5982         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
5983         mini.c.
5984
5985         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
5986         (mono_arch_emit_prolog): Increment maximum prolog size.
5987
5988         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
5989         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
5990
5991         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
5992         MonoGenericSharingContext.
5993
5994         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
5995         MonoGenericSharingContext. Allocate memory from the cfg mempool.
5996
5997 2007-11-15  Mark Probst  <mark.probst@gmail.com>
5998
5999         * mini.c, mini.h, generic-sharing.c: Functions for producing code
6000         which extract fields out of the runtime generic context.  Full
6001         sharing of the NEWARR opcode.
6002
6003 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6004
6005         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
6006         --enable-minimal=ssa.
6007
6008 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
6009
6010         * mini-trampolines.c (mono_delegate_trampoline): Update after 
6011         mono_marshal_get_delegate_invoke () signature change.
6012
6013 2007-11-13  Mark Probst  <mark.probst@gmail.com>
6014
6015         * mini.c: Removed the shared context in favor of the generic
6016         sharing context.  Allocate the MonoJitInfo structure with room for
6017         the generic sharing context if it's needed.
6018
6019         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
6020         domain-internals.h now.
6021
6022         * mini-x86.c: Pass the generic sharing context to get_call_info ().
6023
6024         * generic-sharing.c: Several changes for working without a shared
6025         context and instead operating on open types instead.
6026
6027 2007-11-12  David S. Miller  <davem@davemloft.net>
6028
6029        * inssel-sparc.brg: Fix double instruction emit.
6030
6031 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
6032
6033         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
6034         Get/Set/Address methods.
6035         
6036         * mini.c debug-debugger.c mini-trampolines.c: Update after 
6037         mono_marshal_get_delegate_invoke signature change.
6038
6039 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
6040
6041         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
6042         This can happens with dynamic methods. Fixes the other bug in #322722.
6043
6044 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
6045
6046         * tramp-arm.c (mono_arch_patch_callsite): Support patching
6047         BX call sequence.
6048
6049         * mini-arm.c (arm_patch): Implement patching of BX call
6050         sequence. Fixes one of the bugs in #322722.
6051
6052 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
6053
6054        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
6055        under Linux.  We only need to flush every 32-byte cache line.    
6056
6057 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
6058
6059         * mini.c:
6060         move_basic_block_to_end: Add branches when needed, eventually creating
6061         a new BB.
6062         optimize_branches: added a parameter that tells if it's ok to create
6063         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
6064         and avoid calling move_basic_block_to_end when it's not ok.
6065         Fixes bug 318677.
6066
6067 2007-11-07  Mark Probst  <mark.probst@gmail.com>
6068
6069         * mini.c: Abort inlining call to InitializeArray if something
6070         looks wrong.  Let the icall handle it, which now has proper safety
6071         checks.
6072
6073 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
6074
6075         * mini.c (mono_spill_call): add support for soft-float.
6076
6077         * mini.c (mono_method_to_ir): add support for soft-float
6078         to inlined functions that return float.
6079
6080         * mini.c (mono_method_to_ir): add support for soft-float
6081         to cee_stsfld opcode on float fields.
6082
6083 2007-11-05  Geoff Norton  <gnorton@novell.com>
6084
6085         * mini-x86.h: Fix the structure access for X86 Leopard.
6086
6087
6088 2007-11-05  Martin Baulig  <martin@ximian.com>
6089
6090         * mini-trampolines.c
6091         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
6092         after compiling the method to notify the debugger.
6093
6094 2007-11-05  Martin Baulig  <martin@ximian.com>
6095
6096         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
6097
6098 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
6099
6100         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
6101         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
6102
6103 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
6104
6105         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
6106         native-to-managed wrappers.
6107         
6108 2007-11-01  Geoff Norton  <gnorton@novell.com>
6109
6110         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
6111         members.
6112
6113 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6114
6115         * mini.c, mini-x86.c: when getting back from unmanaged code
6116         to managed via a marshaled delegate we also need to set the
6117         right domain.
6118
6119 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6120
6121         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
6122         for amd64.
6123
6124 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6125
6126         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
6127         let the debugger or other external agents to tell the JIT when
6128         a sw breakpoint has been inserted in the code that the JIT needs
6129         to be able to inspect.
6130
6131 2007-10-31  Martin Baulig  <martin@ximian.com>
6132
6133         * debug-debugger.h
6134         (MonoDebuggerInfo): Remove `runtime_class_init'.
6135
6136 2007-10-30  Martin Baulig  <martin@ximian.com>
6137
6138         * debug-mini.h
6139         (mono_debugger_thread_created): Added `MonoThread *' argument.
6140         (mono_debugger_extended_notification): New public method.
6141         (mono_debugger_trampoline_compiled): New public method.
6142
6143         * debug-mini.c
6144         (MonoDebuggerThreadInfo): Added `thread' and
6145         `extended_notifications' fields.
6146
6147         * debug-debugger.c
6148         (debugger_executable_code_buffer): New static variable.
6149
6150         * debug-debugger.h
6151         (MonoDebuggerInfo): Added `executable_code_buffer',
6152         `executable_code_buffer_size', `breakpoint_info_area',
6153         `breakpoint_table' and `breakpoint_table_size'.
6154
6155 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
6156
6157         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
6158         that IP  either is an unused value or the vtable pointer. IMT 
6159         calls use vtable + offset now. Reduced by almost half the size
6160         of IMT entries.
6161
6162 2007-10-26  Jonathan Chambers <joncham@gmail.com>
6163
6164         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
6165         defines to access param registers. Replace long usage with
6166         gsize as sizeof(long) != sizeof(void*) on Win64.
6167
6168         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
6169         on Win64. Fix intrinsic, use _AddressOfReturnAddress
6170         instead of non-existant _GetAddressOfReturnAddress.
6171
6172         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
6173         param registers. Save/restore %rdi and %rsi in MonoLMF.
6174
6175         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
6176         param registers. Modify (throw_exception) signature to take 
6177         %rdi and %rsi on Win64. 
6178
6179         Code is contributed under MIT/X11 license.
6180
6181 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6182
6183         * helpers.c: unlink debugging output files.
6184
6185 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
6186
6187         * mini.c: Move mono_create_ftnptr () to object.c.
6188
6189 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
6190
6191         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
6192         optional. This function can now be used to disassemble code generated
6193         outside the JIT such as trampolines and IMT thunks.
6194
6195         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
6196
6197         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
6198         vtable pointer from a ldr instruction.
6199
6200         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
6201         new IMT call sequence.
6202
6203         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
6204         call sequence for interface invocations.
6205
6206         * mini-arm.c (mono_arch_emit_imt_argument): added, required
6207         for imt support. This function is empty since IMT on ARM requires no
6208         special handling on the IR side.
6209
6210         * mini-arm.c (mono_arch_find_imt_method): added, required for
6211         imt support.
6212
6213         * mini-arm.c (mono_arch_find_this_argument): added, required
6214         for imt support.
6215
6216         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
6217         a ldr instruction to load a value stored in the code stream.
6218
6219         * mini-arm.c (mono_arch_build_imt_thunk):added, required
6220         for imt support.
6221
6222
6223 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
6224
6225         * mini.c (mini_init): Install the jump trampoline callback.
6226
6227 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6228
6229         * mini-trampolines.c: handle synchronized methods with the common
6230         vtable trampoline (bug #335601).
6231
6232 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
6233
6234         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
6235
6236         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
6237         64 bit platforms.
6238
6239         * mini-ia64.h mini-ia64.c: Add support for IMT.
6240
6241         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
6242         prolog. Fixes #331958.
6243
6244 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
6245
6246         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
6247
6248 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6249
6250         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
6251         trampoline.
6252
6253 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6254
6255         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
6256         trampoline.
6257
6258 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
6259
6260         * mini-x86.c, mini-x86.h: x86 support for the common vtable
6261         trampoline.
6262
6263 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6264
6265         * mini-trampolines.c: changed the magic rampoline to understand
6266         the common vtable trampoline method: the method to invoke is
6267         determined by the vtable displacement of the call.
6268
6269 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6270
6271         * mini.c, mini.h: register the common vtable trampoline if the
6272         architecture supports it.
6273
6274 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6275
6276         * cpu-amd64.md: use the correct max length for tls_get.
6277
6278 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
6279
6280         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
6281         CEE_STELEM_ANY. Fixes #333696.
6282
6283 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6284
6285         * exceptions-x86.c: provide more graceful handling of the case where
6286         we followed a bogus function pointer from managed code (bug #332866).
6287
6288 2007-10-11  Mark Probst  <mark.probst@gmail.com>
6289
6290         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
6291         replaces the generic_shared flag and will carry more information
6292         in the future.
6293
6294         * generic-sharing.c: Added mini_type_stack_size() which allows
6295         allows open types if given a generic sharing context.
6296         mini_get_basic_type_from_generic() takes a
6297         MonoGenericSharingContext* instead of a MonoCompile* now.
6298
6299         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
6300         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
6301         mini-sparc.c, mini-x86.c: Trivial changes required by the two
6302         changes above.  Just passing arguments through to the right
6303         places.
6304
6305 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6306
6307         * mini-arm.c: unify the call emission to emit_code_seq().
6308
6309 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
6310
6311         * tramp-arm.c: reduced the trampoline size.
6312
6313 2007-10-10  Mark Probst  <mark.probst@gmail.com>
6314
6315         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
6316         variable handling out of arch-specific code.
6317
6318 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
6319
6320         * mini-arm.c: implemented fast delegate dispatch.
6321
6322 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6323
6324         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
6325         that fp elimination is turned off if the space required by locals is too
6326         big. Fixes #331958.
6327
6328 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6329
6330         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
6331         ARM to the new style trampoline.
6332
6333 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6334
6335         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
6336
6337         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
6338
6339 2007-10-09  Martin Baulig  <martin@ximian.com>
6340
6341         * debug-debugger.h
6342         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
6343         `field_info_offset_offset'.     
6344
6345 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
6346
6347         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
6348         removed more internal usage of the r11 register and made it available
6349         to the register allocator.
6350
6351 2007-10-08  Mark Probst  <mark.probst@gmail.com>
6352
6353         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
6354         when sharing generics and treat type variables as references.
6355
6356 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6357
6358         * mini-ppc.c: started removing the internal uses of register r11
6359         to eventually allow the register allocator to manage it as an
6360         additional available register.
6361
6362 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6363
6364         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
6365
6366 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
6367
6368         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
6369         specific trampolines as they are not performance critical as a jump
6370         target (maybe align as before only for AOT code?). This saves about
6371         200 KB of native code on x86 for monodevelop startup.
6372
6373 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6374
6375         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
6376         monodevelop startup.
6377
6378 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
6379
6380         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
6381
6382         * mini-sparc.h mini-sparc.c: Implement IMT support.
6383
6384         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
6385         its smaller and doesn't clobber sparc_g1.
6386
6387         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
6388
6389 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6390
6391         * mini-ppc.c: optimized the size of the IMT thunks a bit.
6392
6393 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6394
6395         * mini-ppc.c: implemented fast delegate invocation.
6396
6397 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
6398
6399         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
6400
6401 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6402
6403         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
6404         code to the new style trampoline in preparation for IMT support.
6405
6406 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6407
6408         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
6409         systems already. This also reduces the specific trampiline sizes and
6410         prepares for the use of r12 as the IMT identifier register.
6411
6412 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6413
6414         * mini-mips.h: endianess fix (simplified from a patch by
6415         Thomas Kunze <thommy@tabao.de>, bug #323737).
6416
6417 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6418
6419         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
6420         to access ucontext fields and enable netbsd support
6421         (partially from Magnus Henoch <mange@freemail.hu>).
6422
6423 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6424
6425         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
6426         use the preprocessor from the CPP env var if it is set.
6427
6428 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6429
6430         * mini-trampolines.c: fixed an assertion and moved it earlier in the
6431         code, before interface_offset gets used.
6432
6433 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
6434
6435         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
6436         mono_class_setup_vtable () before accessing klass->vtable.
6437
6438 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
6439
6440         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
6441         hackish.
6442
6443 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6444
6445         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
6446         IMT slots (this saves hundreds of KB of memory in programs like
6447         IronPython and Monodevelop).
6448
6449 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6450
6451         * mini.c: print the delegate counter.
6452
6453 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
6454
6455         * mini-x86.c: make it easier to enable the debugging code for IMT
6456         slots.
6457
6458 2007-09-28  Martin Baulig  <martin@ximian.com>
6459
6460         * debug-debugger.h
6461         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
6462         `mono_method_klass_offset' and `mono_method_token_offset'.
6463
6464 2007-09-20  Mark Probst  <mark.probst@gmail.com>
6465
6466         * mini.c: First generics sharing implementation.  Can only share
6467         in very simple cases.  If sharing doesn't work it falls back to
6468         dedicated compilation.
6469
6470         * mini.h: Flag in MonoCompile to specify whether generic
6471         compilation is shared.  Flags enum for marking which generic inst
6472         of a context is used.  Prototypes for helper functions.
6473
6474         * generic-sharing.c: Helper functions for generic method sharing.
6475
6476         * optflags-def.h: Optimization flag (gshared) for enabling generic
6477         method sharing added.
6478
6479         * Makefile.am: generic-sharing.c added.
6480
6481 2007-09-19 Daniel Nauck <dna@mono-project.de>
6482
6483         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
6484
6485 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
6486         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
6487         fixes bug 325507.
6488
6489 2007-09-19  Martin Baulig  <martin@ximian.com>
6490
6491         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
6492         mono_debug_cleanup() is now part of mono_cleanup().
6493
6494 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
6495
6496         * driver.c (mono_main): Fix a warning.
6497
6498 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
6499
6500         * aot-compiler.c: Optimize various parts when processing large assemblies.
6501         Fixes ##325568.
6502
6503         * mini.c (mono_patch_info_hash): Improve hash function.
6504
6505 2007-09-14  Jonathan Chambers <joncham@gmail.com>
6506
6507         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
6508         
6509         Code is contributed under MIT/X11 license.
6510
6511 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6512
6513         * mini.c (mini_init): Fix a leak.
6514
6515         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
6516
6517 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6518
6519         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
6520
6521 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6522
6523         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
6524
6525 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
6526
6527         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
6528         variance tests.
6529
6530         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
6531
6532         * mini.c (handle_alloc): Enable managed allocators in AOT code.
6533
6534         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
6535
6536         * aot-runtime.c (decode_patch_info): Ditto.
6537
6538 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6539
6540         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
6541         static case. Cache delegates in architecture specific code, 
6542         based on number of parameters.
6543         
6544         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
6545         in architecture specific code, based on number of parameters.
6546         
6547         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
6548         caching happen in architecture specific code now.
6549         
6550         Code is contributed under MIT/X11 license.
6551
6552 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6553
6554         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
6555         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
6556         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
6557
6558         Code is contributed under MIT/X11 license.
6559
6560 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6561         * mini.c: (mono_thread_abort) Fixed bug #82416.
6562
6563 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6564
6565         * mini.: hook the new managed GC allocation feature into the JIT.
6566
6567 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6568
6569         * mini.c: implementation for the new runtime tls opcode.
6570
6571 2007-09-11  Martin Baulig  <martin@ximian.com>
6572
6573         * debug-debugger.h
6574         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
6575         `mono_method_inflated_offset'.
6576
6577 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
6578
6579         * driver.c mini.h mini.c: Add a new devel command line option for injecting
6580         async exceptions into a method.
6581
6582         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
6583         purpose of testing whenever the unwinder works at every instruction.
6584
6585 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
6586
6587         * mini.c: check accessibility of method used in ldftn (fixes
6588         bug #82635).
6589
6590 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
6591
6592         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
6593
6594         * inssel.brg: Fix a warning.
6595
6596 2007-09-03  Martin Baulig  <martin@ximian.com>
6597
6598         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
6599         now takes the `main_method' as argument.
6600
6601 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
6602
6603         * cpu-sparc.md (endfilter): Add missing src1:i argument.
6604
6605 2007-08-30  Jonathan Chambers <joncham@gmail.com>
6606
6607         * driver.c: include the cil-coff.h header on Windows.
6608         
6609         Code is contributed under MIT/X11 license.
6610
6611 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6612
6613         * mini.c, driver.c: don't include the cil-coff.h header.
6614
6615 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6616
6617         * mini.c: flag places that needs fixes fo soft-float support.
6618
6619 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
6620
6621         * mini.h, inssel-float.brg: fix soft-float constant loads on big
6622         endian systems (partially from Dean Jenkins, bug #81924).
6623
6624 2007-08-28  Mark Probst  <mark.probst@gmail.com>
6625
6626         * mini.c (check_linkdemand): Remove embedded reference object in
6627         call to LinkDemandSecurityException.
6628         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
6629         with an IntPtr instead of a reference object.
6630
6631 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
6632
6633         * mini.c (handle_initobj): Handle alignment properly.
6634
6635         * inssel.brg (mini_emit_memset): Ditto. 
6636
6637         * inssel.brg (mini_emit_memcpy): Ditto. 
6638
6639         * inssel-sparc.brg: Ditto.              
6640
6641         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
6642
6643 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
6644
6645         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
6646         exceptions raised in unmanaged code. Fixes part of #82594.
6647
6648 2007-08-24  Mark Probst  <mark.probst@gmail.com>
6649
6650         * mini.c (mono_method_to_ir), declsec.c
6651         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
6652
6653 2007-08-22  Martin Baulig  <martin@ximian.com>
6654
6655         * debug-mini.h
6656         (MonoDebuggerThreadInfo): New typedef.
6657         (mono_debugger_thread_table): New global variable.
6658         (mono_debugger_thread_created): New public function.
6659         (mono_debugger_thread_cleanup): New public function.
6660
6661         * debug-debugger.h
6662         (MonoDebuggerInfo):
6663         - removed `get_current_thread' and `lookup_assembly'.
6664         - removed `data_table'.
6665         - added `thread_table'.
6666
6667         * mini.c
6668         (mono_thread_start_cb): Call mono_debugger_thread_created().
6669         (mono_thread_attach_cb): Likewise.
6670         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
6671         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
6672         initial domain.
6673
6674         * driver.c (mono_main): Move mono_debug_init() up, before calling
6675         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
6676
6677 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6678
6679         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
6680         together when passing several arguments of type double (gives a small
6681         speedup and saves a few bytes of generated code).
6682
6683 2007-08-20  Jb Evain  <jbevain@novell.com>
6684
6685         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
6686
6687 2007-08-20  Jb Evain  <jbevain@novell.com>
6688
6689         * mini.c (mono_method_to_ir): throw MethodAccessException
6690         and FieldAccessException instead of InvalidProgramException.
6691
6692 2007-08-20  Mark Probst  <mark.probst@gmail.com>
6693
6694         * mini.c: CoreCLR security checks.
6695
6696         * mini.h: Removed MonoSecurityMode (moved to
6697         metadata/security-manager.h) and mono_security_mode global var
6698         (replaced by set/get functions in security-manager.h).
6699
6700         * driver.c: Added "core-clr-test" security mode for testing.  Used
6701         set-function for setting security mode.
6702
6703 2007-08-17  Mark Probst  <mark.probst@gmail.com>
6704
6705         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
6706         the new jit_info_table.
6707
6708         * driver.c: Test code for the new jit_info_table (enabled by the
6709         define MONO_JIT_INFO_TABLE_TEST).
6710
6711 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
6712
6713         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6714         detection of call <REG> instruction sequence. Fixes build on freebsd.
6715
6716 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
6717
6718         * mini-exceptions.c: Fix a warning.
6719
6720 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
6721
6722         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
6723         stack overflow handling code on amd64 too.
6724
6725         * mini-exceptions.c (mono_setup_altstack): Make this use 
6726         mono_thread_get_stack_bounds ().
6727
6728         * mini-x86.h: Disable sigaltstack on solaris x86.
6729
6730 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
6731
6732         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
6733
6734 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
6735
6736         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
6737
6738 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
6739
6740         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
6741
6742         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
6743
6744 2007-08-03  Neale Ferguson <neale@sinenomine.net>
6745
6746         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
6747         due to alignment.
6748
6749 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6750
6751         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
6752         to be emitted (bug #82281).
6753
6754 2007-08-01  Martin Baulig  <martin@ximian.com>
6755
6756         Merged the `debugger-dublin' branch.
6757
6758         * debug-debugger.h (MonoDebuggerInfo):
6759         Removed the `old_*' compatibility entries.
6760         Added `debugger_version' and `data_table'.
6761         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
6762         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
6763
6764         * debug-mini.c
6765         (MiniDebugMethodBreakpointInfo): Add `address_list'.
6766         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
6767         instead of a `gconstpointer'.
6768         (mono_debugger_insert_method_breakpoint): Return a
6769         `MonoDebugMethodAddressList *'.
6770
6771 2007-06-28  Martin Baulig  <martin@ximian.com>
6772
6773         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6774
6775 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
6776
6777         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
6778         __builtin_frame_address () since it is broken on older gcc versions.
6779
6780 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6781
6782         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
6783         on the stack overflow handling and made the managed stack overflows
6784         catchable in most cases using soft guard pages.
6785         * exceptions-x86.c: added code to restore the protection in the soft
6786         guard pages at the end of exception handling.
6787
6788 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
6789
6790         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
6791
6792 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6793
6794         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
6795         exception handling.
6796
6797 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6798
6799         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
6800         signal handling support until it has been ported to the new mechanism.
6801         * mini.c: fixed stack overflow detection and use the new
6802         architecture code  to handle signals on the altstack.
6803
6804 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6805
6806         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
6807         stack overflows on the alt stack.
6808
6809 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6810
6811         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6812         stack overflows on the alt stack.
6813
6814 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6815
6816         * exceptions-ppc.c: cleanup preparing for altstack support.
6817
6818 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6819
6820         * exceptions-arm.c: cleanup preparing for altstack support.
6821
6822 2007-07-27  Mark Probst  <mark.probst@gmail.com>
6823
6824         * mini.c (print_jit_stats): Output hazard pointer stats.
6825
6826 2007-07-26  Mark Probst  <mark.probst@gmail.com>
6827
6828         * driver.c, mini.c: Replaced security mode flags with a single
6829         enum variable.
6830
6831 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6832
6833         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6834
6835 2007-07-25  Mark Probst  <mark.probst@gmail.com>
6836
6837         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6838         (which doesn't do anything yet) for activating Core CLR
6839         (Silverlight) security.
6840
6841 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6842
6843         * mini-codegen.c: work around a possible gcc bug on arm.
6844
6845 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6846
6847         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6848         message for platforms that don't support AOT compilation.
6849
6850 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6851
6852         * mini.h, mini.c, driver.c: temporary smcs hack.
6853
6854 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6855
6856         * mini-arm.h, mini-arm.c: arm EABI fixes.
6857
6858 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
6859
6860         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6861         case.
6862
6863         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6864         trampolines taking a method argument.
6865
6866         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6867
6868         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6869         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6870
6871         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6872         JIT compilation throws an exception. Fixes #82050.
6873
6874 2007-07-19  Mark Probst  <mark.probst@gmail.com>
6875
6876         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6877         with the MONO_EXCEPTION_ defines.
6878
6879 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
6880
6881         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6882         #82117.
6883         
6884         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6885         the cause of an assertion.
6886
6887 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6888
6889         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6890         removed.
6891
6892 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
6893
6894         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6895         assert. Should fix #82103.
6896
6897 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
6898
6899         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6900         here too. Fixes #82095.
6901
6902         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6903         addresses.
6904
6905         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6906
6907         * mini-amd64.h: Enable IMT for amd64.
6908         
6909         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6910
6911 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
6912
6913         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6914
6915 2007-07-12  Mark Probst  <mark.probst@gmail.com>
6916
6917         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6918         as soon as check_linkdemand sets an exception_type.
6919
6920 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6921
6922         * mini-x86.c: fixed offsets for IMT call sequence.
6923         * mini-x86.h: enable IMT again.
6924
6925 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6926
6927         * trace.c (mono_trace_enter_method): Decode MonoType too.
6928
6929         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
6930
6931         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
6932
6933         * mini-amd64.c: Add preliminary IMT implementation.
6934         
6935 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6936
6937         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
6938         understand the new IMT-base interface invocation (thanks to
6939         Daniel Nauck for the report and the remote debugging session).
6940
6941 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6942
6943         * mini-x86.c: size and speed optimizations for the IMT bsearch.
6944
6945 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6946
6947         * Makefile.am (aotcheck): Make this actually use the AOTed code.
6948
6949 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
6950
6951         * mini-trampolines.c: implement AOT IMT support.
6952         * mini-x86.h: enable IMT support for wider testing.
6953
6954 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6955
6956         * inssel.brg (emit_imt_argument): Add aot support here.
6957
6958         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
6959
6960 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6961
6962         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
6963         of the IMT implementation, partially from massi, with my
6964         implementation of the bsearch sequence. Disabled by default until
6965         the AOT code is implemented.
6966
6967 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
6968
6969         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
6970
6971         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
6972
6973 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6974
6975         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
6976         arch-independent IMT JIT code from Massimiliano
6977         Mantione (massi@ximian.com) with small cleanups from me.
6978
6979 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6980
6981         * Makefile.am: fix svn invocation to get the svn revision to be
6982         independent of the local language (build fix).
6983
6984 2007-07-09  Mark Probst  <mark.probst@gmail.com>
6985
6986         * mini.c (inline_method): Reset cfg->exception_type if the
6987         inlining is aborted.  Fixes: 82049.
6988
6989 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
6990
6991         * mini.c: remove assert from exception handling code when exception_ptr
6992         is not set.
6993
6994 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
6995
6996         * mini.c (mono_codegen): Add an assert.
6997
6998         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
6999         enter and leave code.
7000         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
7001
7002 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7003
7004         * mini-ppc.c: fixed memory corruption for localloc(0)
7005         (bug #81852).
7006
7007 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
7008         
7009         * mini.c: Fix warnings.
7010
7011 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
7012
7013         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
7014         to emit better double->int conversions.
7015
7016 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7017
7018         * mini.c: the provided Min/Max optimizations are valid for unisgned
7019         ints.
7020
7021 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
7022
7023         * 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
7024
7025 2007-06-28  Miguel de Icaza  <miguel@novell.com>
7026
7027         * mini.c (mono_running_on_valgrind): Add support for reporting the
7028         method and  its boundaries to valgrind.
7029
7030 2007-06-28  Martin Baulig  <martin@ximian.com>
7031
7032         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
7033
7034 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
7035
7036         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
7037
7038         * generic.2.cs: Add new test case.
7039
7040 2007-06-25  Martin Baulig  <martin@ximian.com>
7041
7042         Merged the `debugger-dublin' branch.
7043
7044         * debug-mini.c
7045         (mono_debugger_insert_method_breakpoint): New public method.
7046         (mono_debugger_remove_method_breakpoint): Likewise.
7047         (mono_debugger_check_breakpoints): New static method.
7048         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
7049
7050         * debug-debugger.h (MonoDebuggerInfo):
7051         Renamed (to keep backward compatibility in the vtable):
7052         `insert_breakpoint' -> `old_insert_breakpoint'.
7053         `remove_breakpoint' -> `old_remove_breakpoint'.
7054         `create_string' -> `old_create_string'.
7055         `lookup_class' -> `old_lookup_class'.
7056         `lookup_type' -> removed; changed into a dummy field.
7057         `lookup_assembly' -> `old_lookup_assembly'.
7058         Added (same functionality, but different signature):
7059         `create_string', `lookup_class', `lookup_assembly'
7060         Added new:
7061         `get_method_addr_or_bpt', `remove_method_breakpoint',
7062         `runtime_class_init'.
7063
7064         * debug-debugger.c: Merged the `debugger-dublin' branch.
7065
7066 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
7067
7068         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
7069         well.
7070         (peephole_pass): Likewise.
7071
7072 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
7073
7074         * driver.c: hopefully make setaffinity work also for ancient
7075         versions of linux.
7076
7077 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
7078
7079         * driver.c : win32 build fix.
7080
7081 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7082
7083         * driver.c: check for the MONO_NO_SMP env var and bind to a single
7084         processor if it is set.
7085
7086 2007-06-21  Martin Baulig  <martin@ximian.com>
7087
7088         * debug-mini.h: New file.
7089
7090         * debug-mini.c
7091         (mono_debugger_insert_breakpoint_full): Moved here from
7092         ../metadata/mono-debug-debugger.c.
7093         (mono_debugger_remove_breakpoint): Likewise.
7094         (mono_debugger_breakpoint_callback): Likewise.
7095
7096 2007-06-15  Raja R Harinath  <rharinath@novell.com>
7097
7098         * jit-icalls.c (mono_helper_compile_generic_method): Update to
7099         changes in MonoGenericClass.
7100
7101 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
7102
7103         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
7104
7105 2007-06-14  Raja R Harinath  <rharinath@novell.com>
7106
7107         * jit-icalls.c (mono_helper_compile_generic_method): Update to
7108         removal of MonoGenericMethod.
7109
7110 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7111
7112         * mini-exceptions.c: hooks for the exception events profiling API.
7113
7114 2007-06-14  Randolph Chung  <tausq@debian.org>
7115
7116         * Makefile.ma: Add hppa target.
7117         * mini-arch.h: Include mini-hppa.h
7118         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
7119         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
7120         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7121
7122 2007-06-14  Randolph Chung  <tausq@debian.org>
7123
7124         * inssel.brg: Add rules for "chained" compare-branch operations so that
7125         a single compare op can affect multiple branches.  Adjust cost for
7126         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
7127         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
7128         cost for some rules so that they can more easily be overridden by
7129         per-arch rules (with fixes from lupus).
7130         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7131
7132 2007-06-13  Randolph Chung  <tausq@debian.org>
7133
7134         * mini-ops.h: Reorder branch ops so that they match the order of the
7135         corresponding CEE_* ops.  The code expects them this way.
7136         Add new ops for HPPA target.
7137         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7138
7139 2007-06-13  Randolph Chung  <tausq@debian.org>
7140
7141         * mini-exceptions.c: Handle cases where the stack grows towards
7142         larger addresses.
7143         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7144
7145 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
7146
7147         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
7148         counter.
7149         * driver.c: explain where a non-matching corlib is found.
7150
7151 2007-06-13  Mark Probst  <mark.probst@gmail.com>
7152
7153         * mini.c (print_jit_stats): Output dynamic code allocation stats.
7154
7155 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
7156
7157         * mini-exceptions.c: Generate a method profile leave event during
7158         an exception to ensure that the profiler gets notified.
7159
7160 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
7161
7162         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
7163         branch.
7164
7165         * cpu-amd64.md: Add long_and/or/xor opcodes.
7166
7167 2007-06-06  Wade Berrier  <wberrier@novell.com>
7168
7169         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
7170         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
7171         length of instruction shr_imm (expected 8, got 10)
7172
7173 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
7174
7175         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
7176
7177 2007-06-06  Mark Probst  <mark.probst@gmail.com>
7178
7179         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
7180         MonoInternalHashTable again (fixed bug in the internal hash table
7181         code).
7182
7183 2007-06-06  Mark Probst  <mark.probst@gmail.com>
7184
7185         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
7186         Have to figure out what makes it crash the SWF regression.
7187
7188 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
7189
7190         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
7191
7192 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7193
7194         * mini.c: optimize out the type check when storing null in a
7195         reference array.
7196
7197 2007-06-04  Mark Probst  <mark.probst@gmail.com>
7198
7199         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
7200         MonoInternalHashTable.
7201
7202 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
7203
7204         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
7205         signed integer methods.
7206
7207 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
7208
7209         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
7210         permanently since the current approach doesn't work.
7211
7212 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
7213
7214         * inssel.brg (stmt): Only call delegate->invoke_impl if 
7215         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
7216
7217 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
7218
7219         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
7220         the sreg2==rdx case.
7221         
7222         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
7223         account if it contains a rex prefix.
7224         (peephole_pass): Handle OP_FMOVE as well.
7225
7226 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
7227
7228         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
7229         as it causes regressions.
7230
7231 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
7232
7233         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
7234         static case as well.
7235
7236         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
7237
7238         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7239         (mono_arch_get_this_arg_from_call): Ditto.
7240
7241         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
7242
7243         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
7244         invoke_impl field.
7245
7246         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7247         (mono_arch_get_this_arg_from_call): Ditto.
7248
7249         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
7250         
7251         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
7252         try to create optimized invoke code and use that for further invocations. 
7253         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
7254
7255         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
7256
7257 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
7258
7259         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
7260         sealed classes or methods.
7261         *devirtualization.cs: tests for the new optimization
7262
7263 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
7264
7265         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
7266         by the update_volatile () function.
7267
7268 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
7269
7270         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
7271         require it.
7272
7273         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
7274
7275 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
7276
7277         * mini.c: Add configure checks for header files.
7278         * mini-x86.c: Add configure checks for header files.
7279         * trace.c: Add configure checks for header files.
7280         * aot-runtime.c: Add configure checks for header files.
7281         * aot-compiler.c: Add configure checks for header files.
7282         * driver.c: Add configure checks for header files.
7283         * mini-codegen.c: Add configure checks for header files.
7284         
7285         Code is contributed under MIT/X11 license.
7286
7287 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
7288
7289         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
7290         icompare_imm -128 + op_iclt. Fixes #81703.
7291
7292 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
7293
7294         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
7295
7296 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
7297
7298         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
7299         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
7300         so that all isinst checks now use "interface_bitmap".
7301
7302 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
7303
7304         * cpu-amd64.md (jmp): Fix a warning.
7305
7306         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
7307
7308         * basic.cs: Add new regression test.
7309
7310         * basic.cs: Remove test which is now in basic-long.cs.
7311
7312         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
7313
7314         * basic-long.cs: Add new test.
7315         
7316 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
7317
7318         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
7319
7320 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
7321
7322         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
7323
7324         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
7325         places.
7326         
7327         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
7328         throwing code a bit.
7329
7330         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
7331         the exception throwing code a bit.
7332
7333         * mini-x86.c (get_call_info): Allocate result from a mempool.
7334
7335 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
7336
7337         * aot-compiler.c (find_typespec_for_class): Fix the assert.
7338
7339         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
7340
7341         * mini.h (MonoCompile): Add 'token_info_hash' field.
7342
7343         * mini.c: Save token->method associations during compilation so the AOT 
7344         compiler can use it.
7345         
7346         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
7347         which reference generic classes and methods.
7348
7349 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
7350
7351         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
7352
7353         * aot-compiler.c (compile_method): Fix a typo in a comment.
7354
7355         * aot-runtime.c (decode_cached_class_info): Skip generic types.
7356
7357         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
7358         everything generic.
7359
7360         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
7361
7362 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
7363
7364         * mini.h (MonoCompile): Add 'args' field.
7365
7366         * mini.c (mono_compile_create_vars): Store variables representing the arguments
7367         into cfg->args.
7368
7369         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
7370
7371 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
7372
7373         * mini.c (mono_compile_get_interface_var): Remove this unused function.
7374
7375         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
7376
7377         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
7378         opcodes for some opcodes.
7379
7380         * mini.h *.brg *.c: Use the new opcodes.
7381
7382 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
7383
7384         * mini.h: Bumped aot revision.
7385
7386         * inssel.brg: modified code generation of type checks for interfaces
7387         to use the new "MonoClass.interface_bitmap" instead of the old
7388         "MonoClass.interface_offsets".
7389
7390 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
7391
7392         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
7393
7394 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
7395
7396         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
7397         64 bit platforms.
7398
7399 2007-04-27  Neale Ferguson <neale@sinenomine.net>
7400
7401         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
7402
7403 2007-04-27  Wade Berrier  <wberrier@novell.com>
7404
7405         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
7406         mini.h) to fix build.
7407
7408 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
7409
7410         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
7411         
7412         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
7413         causes the corlib unit tests to fail.
7414
7415 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
7416
7417         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
7418
7419         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
7420
7421         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
7422         opcodes to the comparison relations.
7423
7424         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
7425         opcodes to their types.
7426         
7427         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
7428
7429         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
7430         it in cfg->arch.cinfo.
7431
7432         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
7433
7434         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
7435         cfg->cil_offset_to_bb.
7436
7437 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
7438
7439         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
7440         created becase of initlocals.
7441
7442 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
7443
7444         * mini-alpha.c cpu-alpha.md: More alpha port work from 
7445         Sergey Tikhonov <tsv@solvo.ru>.
7446
7447 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
7448
7449         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
7450
7451 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
7452
7453         * cpu-s390.md (break): Correct the length of break instruction.
7454
7455 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7456
7457         * mini.c: fix a couple of soft-float issues and comments.
7458
7459 2007-04-15  Miguel de Icaza  <miguel@novell.com>
7460
7461         * trace.c (is_filenamechar): - is also a filename char.
7462
7463 2007-04-15  Neale Ferguson <neale@sinenomine.net>
7464
7465         * mini-s390.c: Correct checking for enum type in return value processing.
7466
7467 2007-04-14  Raja R Harinath  <rharinath@novell.com>
7468
7469         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
7470         (version.h): Makefile is in the build directory.
7471
7472 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
7473
7474         * mini-amd64.h: fix for assertion failure on Solaris/amd64
7475
7476 2007-04-11  Martin Baulig  <martin@ximian.com>
7477
7478         * mini.c (can_access_member): Fix handling of generic classes;
7479         fixes #81259.
7480
7481 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
7482
7483         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
7484
7485 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
7486
7487         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
7488
7489 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7490
7491         * mini-codegen.c: make sure the right spill amount is
7492         used for fp or integer registers (fixes the float_sub_spill() on ppc).
7493
7494 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
7495
7496         * mini-ppc.c: fixes for the fp_branch_nan test.
7497
7498 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
7499
7500         * basic.cs: Comment out new test which still fails on ia64.
7501
7502 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7503
7504         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
7505
7506 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7507
7508         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
7509
7510 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
7511
7512         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
7513         on 64 bit machines. Fixes part of #80738.
7514
7515         * basic.cs: Add regression test.
7516
7517 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7518
7519         * inssel.brg basic.cs: Revert previous change to fix build.
7520
7521         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
7522         platforms.
7523         
7524         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
7525
7526         * basic.cs: Add new regression test.
7527
7528 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7529
7530         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
7531         many arguments.
7532
7533 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7534
7535         * cpu-s390x.md: Correct length of break instruction.
7536
7537 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7538
7539         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
7540         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
7541
7542 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
7543
7544         * *.c: Begin WIN64 port.
7545         * mini.c:  Use correct register in profiler.
7546         * mini-amd64.c: No inline assembly on Win64.
7547         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
7548         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
7549         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
7550         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
7551         mono_arch_ip_from_context for Win64.
7552         
7553         Contributed under MIT/X11 license.
7554
7555 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
7556
7557         * exceptions-amd64.c (seh_handler): Ditto.
7558
7559         * exceptions-x86.c (seh_handler): Fix a memory leak.
7560
7561 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
7562
7563         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
7564         mini-s390x.c: fixed peephole optimizations to deal
7565         correctly with 1 and 2 byte reload avoidance.
7566
7567 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
7568
7569         * cpu-s390.md, cpu-s390x.md: update localloc length.
7570
7571 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7572
7573         * cpu-g4.md: added missing descriptions.
7574
7575 2007-03-14  Miguel de Icaza  <miguel@novell.com>
7576
7577         *  Makefile.am: Add support so the tail tests are not executed on
7578         PowerPC as that is a known limitation of the PowerPC port.
7579
7580 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7581
7582         * runmdesc.bat:  Move to msvc directory.
7583         
7584 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7585
7586         * runmdesc.bat:  Run executable that was produced by the current
7587         target and sent via an argument.
7588         
7589 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
7590
7591         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
7592         #81102.
7593
7594         * generics.2.cs: Add regression test.
7595
7596 2007-03-09  Wade berrier  <wberrier@novell.com>
7597
7598         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
7599
7600 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
7601
7602         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
7603         AOT code depends on this.
7604
7605 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7606
7607         * mini.c: more precise tracking of types in the eval stack
7608         (part of fix for bug #81044).
7609
7610 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
7611
7612         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
7613
7614         * aot-compiler.c (encode_patch): Remove an obsolete comment.
7615
7616 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
7617
7618         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
7619
7620         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
7621
7622 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
7623
7624         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
7625         a pointer on 64 bit systems. Fixes #80190.
7626
7627         * iltests.il: Add new regression test.
7628
7629 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7630
7631         * mini.c: inline a constant for Environment.IsRunningOnWindows.
7632
7633 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
7634
7635         * trace.c: Remove an erroneous alignemnt check when tracing.
7636           Fixes --trace on OSX86.
7637
7638 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7639
7640         * mini-$(arch).h: initialize SP in context for all the archs.
7641
7642 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
7643
7644         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
7645         regressions in the thread tests.
7646
7647 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
7648
7649         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
7650         - fixed implementation of LOCALLOC opcode
7651         - implemented non-un compare for floats
7652         - code cleanup
7653         - implementation of FDIV and CKFINITE opcodes
7654         - fixes for latest mono updates
7655         - additional arch opcodes
7656
7657 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7658
7659         * Makefile.am: simplify and merge rules for cross-compilation.
7660
7661 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
7662
7663         * local-propagation.c: Actually *apply* the fix for bug 80591...
7664
7665 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7666
7667         * mini-exceptions.c: backuot part of the last change
7668         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
7669
7670 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
7671         * inssel.brg: Fix bug 59286.
7672
7673
7674 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
7675
7676         * mini-exceptions.c: patch from Zoltan to correctly check for
7677         stack boundaries (using the stack register, not the frame register),
7678         fixes bugs #80724, #79717.
7679
7680 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
7681
7682         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
7683         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
7684
7685         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
7686         presence of frame pointer elimination.
7687
7688 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
7689         
7690         * mini-x86.h: NetBSD UCONTEX_REG defines.
7691
7692 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
7693
7694         * inssel-amd64.brg: Fix amd64 build.
7695
7696 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
7697
7698         * mini.h: remove extern to workaround what looks likes gcc bug 26905
7699         on amd64.
7700
7701 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
7702
7703         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
7704         ends.
7705
7706         * mini-<ARCH>.c: Use mono_is_regsize_var ().
7707
7708 2007-01-30 Mark Mason <mason@broadcom.com>
7709
7710            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
7711            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
7712            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
7713            beginning support for CEE_JMP [not quite working yet]
7714            * tramp-mips.c: LMF handling now works
7715         
7716 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
7717
7718         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
7719
7720         * mini.h (NULLIFY_INS): New macro.
7721
7722 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7723
7724         * mini.c: statistical profiler fix for windows, patch
7725         from Tor Lillqvist (tml@novell.com).
7726
7727 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
7728         * local-propagation.c: Fix bug 80591.
7729
7730 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7731
7732         * Makefile.am: put back the --export-dynamic option as with
7733         the previous gmodule flags (thanks to Robert Jordan).
7734
7735 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
7736
7737         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
7738
7739         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
7740         simplify and speed up the local register allocator. Also rename some fields
7741         like iassign->vassign.
7742         
7743         * regalloc.c: Remove some functions which are no longer used since their
7744         inlined version is in mini-codegen.c.
7745         
7746         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
7747
7748         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
7749
7750 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
7751
7752         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
7753         narrowing. Fixes #80622.
7754
7755         * iltests.il: Add new regresssion test. 
7756
7757 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7758
7759         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
7760         debug-debugger.c, debug-debugger.h: warning fixes.
7761         * driver.c: updated copyright year and made it fit in one line.
7762
7763 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
7764
7765         * aot-runtime.c: updated to use mono-dl instead of gmodule.
7766
7767 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
7768
7769         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
7770
7771         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
7772
7773         * iltests.il: Add new test for bug #80507.
7774
7775 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7776
7777         * mini-arm.h: use soft-float also on vfp for now.
7778
7779 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7780
7781         * mini.c: fix some more soft-float issues.
7782
7783 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
7784
7785         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
7786
7787 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
7788         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
7789         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
7790         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
7791
7792 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
7793
7794         * mini-arm.c: typo fix.
7795
7796 2007-01-23  Neale Ferguson <neale@sinenomine.net>
7797
7798         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
7799
7800 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
7801
7802         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
7803         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
7804
7805         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
7806
7807         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
7808
7809         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7810         
7811         * inssel.brg: Fix a warning.
7812
7813         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7814
7815         * abcremoval.c ssa.c ssapre.c: Update after this change.
7816         
7817         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7818
7819         * dominators.c (df_set): Use mono_bitset_union_fast.    
7820
7821 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7822
7823         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7824         mini-codegen.c: reduce relocations and memory usage for the cpu
7825         description.
7826
7827 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
7828
7829         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7830
7831         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7832         to reduce their size.
7833
7834 2007-01-19 Mark Mason <mason@broadcom.com>
7835
7836         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7837         * mini-mips.c: more configuration macros, support long conditional branches, additional
7838         asserts, fix epilog instrumentation.
7839         * mini-mips.h: use standard stack walk
7840         * cpu-mips.md: increase size of div, rem and conditional branches
7841         
7842 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7843
7844         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7845         to cpu spec data.
7846
7847 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
7848
7849         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7850         (compile_method): Ditto.
7851
7852         * aot-runtime.c (decode_klass_info): Ditto.
7853
7854         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7855         needed by the code generated by inssel.brg. Also fix a warning.
7856
7857 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7858
7859         * mini.c: deal with enums that become genericinsts by
7860         being nested in a generic class (bug #79956).
7861
7862 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7863
7864         * mini.c: match the generic definition to check for
7865         private access with generic types (bug #78431).
7866
7867 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7868
7869         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7870         to make life easier for people cross-compiling that insist on not
7871         using scratchbox.
7872
7873 2007-01-17 Mark Mason <mason@broadcom.com>
7874
7875         * inssel-long.brg: patch to deal with mips missing flags
7876         * inssel-long32-mips.brg: implement overflow checks
7877         * insset-mips.brg: implement overflow checks
7878         * mini-mips.h: implement conditional exception handling
7879         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7880           Remove unused code, minor cleanups.
7881         * exceptions-mips.c: minor cleanups
7882         * mini-ops.h: add mips conditional exception ops
7883         * cpu-mips.md: add mips conditional exception ops
7884
7885         
7886 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7887
7888         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7889         to deal with mips missing of flags.
7890
7891 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7892
7893         * exceptions-ppc.c: execute fault handlers.
7894
7895 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7896
7897         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7898
7899 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7900
7901         * mini.c: handle also floating point values in initialize_array.
7902
7903 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7904
7905         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7906         array initialization and make it conditional on the intrins option.
7907
7908 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7909
7910         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7911         relocations and put the patch info names close to the enum definition.
7912
7913 2007-01-15 Mark Mason <mason@broadcom.com>
7914
7915         * basic.cs, exceptions.cs: break up large tests to increase debugability.
7916
7917 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7918
7919         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7920
7921 2007-01-12  Raja R Harinath  <rharinath@novell.com>
7922
7923         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7924
7925 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7926
7927         * Makefile.am: distribute the mips sources.
7928
7929 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7930
7931         * mini-codegen.h: handle bug #80489 here, by excluding ecx
7932         directly.
7933
7934 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
7935
7936         * cpu-x86.md: back out for now as this triggers other regressions.
7937
7938 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7939
7940         * cpu-x86.md: force src1 and dest regpair for long shift instructions
7941         to eax:edx, so ecx can't get allocated to them (bug #80489).
7942
7943 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
7944
7945         * mini.c, mini-exceptions.c: enabled running fault handlers
7946         (bug #80469).
7947
7948 2007-01-03  Miguel de Icaza  <miguel@novell.com>
7949
7950         * driver.c: If nothing fail, do not use the string "failed",
7951         because it makes it very annoying to view test result logs on the
7952         web. 
7953
7954 2006-12-30  Miguel de Icaza  <miguel@novell.com>
7955
7956         * debug-debugger.c (mono_debugger_main): Rename "main" to
7957         "main_method" to prevent a warning.
7958
7959         Remove a warning for unused field.
7960
7961 2006-12-28  Martin Baulig  <martin@ximian.com>
7962
7963         * debug-debugger.c
7964         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
7965
7966 2006-12-22  Martin Baulig  <martin@ximian.com>
7967
7968         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
7969         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
7970         seperate `.mdb_debug_info' section, so we can access it from the
7971         debugger even if the binary is stripped.
7972
7973         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
7974         from the `.mdb_debug_info' here to prevent the linker from
7975         removing that section.
7976
7977         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
7978         mdb-debug-info64.s.
7979
7980 2006-12-19  Robert Jordan  <robertj@gmx.net>
7981
7982         * mini-x86: enable the code to return small structures in
7983         registers for FreeBSD as well. Fixes bug #80278.
7984         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
7985
7986 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
7987
7988         * mini-x86.c: align the stack when calling the profiler
7989         function instrumenting the prolog (on OSX).
7990
7991 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
7992
7993         * mini.c: emit a break opcode where Debugger.Break () is called.
7994
7995 2006-12-13  Miguel de Icaza  <miguel@novell.com>
7996
7997         * mini.c (mono_method_to_ir): Provide useful information on this
7998         assert, to prevent others from debugging like I did.
7999
8000 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8001
8002         * mini.c: enable code which was incorrectly commented
8003         (bug #80235).
8004
8005 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
8006
8007         * mini-x86.c: enable on OSX, too, the code to return small
8008         structures in registers.
8009
8010 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8011
8012         * mini-x86.c: remove the use of the dynamic code manager here, too.
8013
8014 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8015
8016         * mini.h, debug-debugger.c, tramp-*.c: fixed 
8017         mono_debugger_create_notification_function() to use
8018         mono_global_codeman_reserve () instead of a dynamic code manager.
8019
8020 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
8021
8022         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
8023         ves_array_element_address() jit icall and use a generated
8024         managed method instead (which is about 4 times faster for a rank 3
8025         array access).
8026
8027 2006-11-29  Mark Mason  <mason@broadcom.com>
8028
8029         * basic-calls.cs: additional tests for passing
8030         structures as function arguments.
8031
8032 2006-11-29  Mark Mason  <mason@broadcom.com>
8033
8034         * mini-mips.h: disable custom exception handling
8035         * mini-mips.c: throw/rethrow should use jalr to call
8036         exception stubs.  Fixed bug with passing structures
8037         by value. More support for tracing floating point
8038         functions.
8039
8040 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8041
8042         * mini.c: fixed typo in the soft-float ldind.r4 handling
8043         (bug #80086).
8044
8045 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8046
8047         * mini.c, mini.h, driver.c: added --runtime command line
8048         option to select a different runtime than the autodetected one.
8049         * jit.h: added API for embedders to initialize with a specific
8050         runtime version.
8051
8052 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8053
8054         * mini.c: handle also boxing of r4 values (bug #80024).
8055
8056 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8057
8058         * mini-ppc.c: force indirect calls until we reserve
8059         enough address space for all the generated code.
8060
8061 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
8062
8063         * exceptions-arm.c: workaround bugs in the libc definition
8064         of struct ucontext.
8065
8066 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8067
8068         * inssel.brg: fixes from me and Mark Mason.
8069
8070 2006-11-23  Dick Porter  <dick@ximian.com>
8071
8072         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
8073         semaphore display now we've fixed the initial value
8074
8075 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8076
8077         * inssel.brg: partially revert the last change to fix the build.
8078
8079 2006-11-21  Mark Mason  <mason@broadcom.com>
8080
8081         * inssel.brg: Add and use compare-and-branch macros to support
8082         architectures that do not have condition code registers (ie. MIPS).
8083         * *-mips.{c,brg,md}: Fix copyright statements
8084
8085 2006-11-20  Mark Mason  <mason@broadcom.com>
8086
8087         * Makefile.am: remove mini-codegen.c from list of MIPS sources
8088         * mini.c: Allow GET_CONTEXT to be specified by the arch port
8089         * mini.h: Added declaration for mono_print_ins()
8090         * mini-codegen.c: added ins_spec initializer for MIPS
8091         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
8092         vreg to be virtual and hreg to be non-virtual.
8093         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
8094         is not yet working/implemented correctly.
8095         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
8096         non-static, fixup calls to print_ins() from other parts in the file.
8097
8098 2006-11-20  Mark Mason  <mason@broadcom.com>
8099
8100         * basic-calls.cs: added tests for passing structures as arguments
8101         to calls.
8102
8103 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8104
8105         * inssel-long32.brg: optimize signed division by power of two.
8106
8107 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
8108
8109         * mini-arm.c: added support for interworking with thumb code
8110         (mono must be still be built using the ARM instruction encoding).
8111
8112 2006-11-19  Miguel de Icaza  <miguel@novell.com>
8113
8114         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
8115         verifier has different rules for it.   Fixes a few verifier issues
8116         in the test suite.
8117
8118         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
8119         at the end, so people know what happened.
8120
8121 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8122
8123         * brach-opts.c: in optimize_exception_target() make sure we
8124         are in a catch clause (fixes bug #79871).
8125
8126 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
8127
8128         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
8129         more soft-float support fixes.
8130
8131 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
8132
8133         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
8134         that are passed half on the stack and half in registers.
8135
8136 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
8137
8138         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
8139         more mips integration work from Mark E Mason 
8140         <mark.e.mason@broadcom.com>.
8141
8142 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8143
8144         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
8145         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
8146         tramp-mips.c: added sources for the mips port, not
8147         integrated in the build yet. Contributed by
8148         Mark E Mason <mark.e.mason@broadcom.com>.
8149
8150 2006-11-14  Neale Ferguson <neale@sinenomine.net>
8151
8152         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
8153
8154 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8155
8156         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
8157         put the soft-float rules in its own file since it seems to
8158         break s390 compilation.
8159
8160 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8161
8162         * mini-arm.c: fixed wrnings.
8163
8164 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
8165
8166         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
8167         inssel-arm.brg: ARM support for soft-float.
8168
8169 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
8170
8171         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
8172         loads and stores of 32 bit fp values.
8173
8174 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
8175
8176         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
8177
8178         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
8179         works. Fixes #79852 and #79463.
8180
8181 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
8182
8183         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
8184         more soft-float support WIP and fixes.
8185
8186 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
8187
8188         * mini-arm.c: some VFP updates.
8189
8190 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8191
8192         * mini-exceptions.c: 0 is a valid local var offset in some
8193         architectures, don't assert (bug #78508).
8194
8195 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
8196
8197         * exceptions-arm.c: fixed off by one error in stack walk code.
8198
8199 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
8200
8201         * mini.h, mini.c: more precise tracking of type load exceptions.
8202
8203 2006-11-03  Robert Jordan  <robertj@gmx.net>
8204
8205         * Makefile.am: [WIN32] Add monow.exe target.
8206         * driver.c: [WIN32] Don't detach the console when debugging.
8207         Fixes bug #79797.
8208         
8209 2006-10-30  Miguel de Icaza  <miguel@novell.com>
8210
8211         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
8212
8213 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
8214
8215         * aot-compiler.c (emit_method_info): Add a case missed earlier.
8216
8217         * driver.c (mini_regression): Fix --regression with AOT.
8218
8219         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
8220
8221 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
8222
8223         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
8224
8225         * mini-sparc.h: Don't use sigaction on sparc/linux.
8226
8227         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
8228
8229         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
8230
8231         * mini-exceptions.c: Add proper include files for getpid ().
8232
8233 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
8234
8235         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
8236         address instead of a MonoJitInfo* to avoid decoding the exception info for the
8237         method.
8238
8239         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
8240         name cache to reduce its size.
8241
8242         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8243
8244 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
8245
8246         * mini-x86.c: Save/restore the current LMF structure more efficiently using
8247         the mono_lmf TLS variable.
8248
8249         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
8250         trampoline lmf frames.  
8251
8252         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
8253
8254 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
8255
8256         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
8257         the mono_lmf TLS variable.
8258
8259         * mini-exceptions.c: Access the LMF structure through accessors.
8260
8261         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
8262         variable instead of in jit_tls->lmf.
8263
8264         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
8265         
8266         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
8267         trampoline lmf frames.
8268
8269         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
8270
8271 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
8272
8273        * mini.c trace.c mini-x86.c: Revert these too.
8274         
8275        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
8276        signature change.
8277
8278 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
8279
8280         * genmdesc.c: removed now dead code.
8281
8282 2006-10-09  Robert Jordan <robertj@gmx.net>
8283
8284         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
8285
8286 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
8287
8288         * mini.h: do not leave gaps in the opcode values.
8289
8290 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
8291
8292         * jit-icalls.h: flag functions as internal here, too.
8293
8294 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
8295
8296         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
8297         functions with the internal attribute.
8298
8299 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
8300
8301         * aot-compiler.c: fclose the file descriptor in the profile read loop.
8302
8303 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
8304
8305         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
8306         for soft-float.
8307
8308 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
8309
8310         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
8311         tail calls as on other platforms.
8312
8313         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
8314
8315         * iltests.il: Add a few tailcall tests.
8316
8317 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8318
8319         * driver.c: fix loop for old compilers (bug #79521).
8320
8321 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
8322
8323         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
8324
8325         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
8326
8327         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
8328         metadata without any code.
8329
8330         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
8331         more precise debugging information using gdb.
8332
8333 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
8334
8335         * inssel-ia64.brg: Make the helper methods static.
8336
8337 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8338
8339         * inssel-x86.brg: make the helper methods static.
8340
8341 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
8342
8343         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
8344
8345 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8346
8347         * mini.c: updates for monoburg changes.
8348         * inssel.brg: make a few helper functions static as they should.
8349
8350 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
8351
8352         * Makefile.am: Move mini-codegen.c to common_sources.
8353
8354 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8355
8356         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
8357         instructions.
8358         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
8359         mini-ppc.h: port to use the common local register allocator.
8360
8361 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8362
8363         * mini.h: Remove the comment too then.
8364
8365 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
8366
8367         * mini.h: put back backend.data which is to be used shortly and
8368         doesn't increase the size of MonoInst. If any 64 bit arch aligned
8369         pointers on 4 byte boundaries it'd have much bigger issues running
8370         and you can ifdef it out anyway.
8371
8372 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8373
8374         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
8375         MonoInst size by 4 bytes on 64 bit machines.
8376
8377 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8378
8379         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
8380         replacement with more meaningful field names. Arch maintainers, please
8381         check the assigned names are good enough for your arch.
8382
8383 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8384
8385         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
8386         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
8387
8388 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8389
8390         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
8391         relocations and memory requirements, put the optimization flags
8392         definitions in their own file.
8393
8394 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
8395
8396         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
8397
8398         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
8399
8400 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
8401
8402         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
8403
8404 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
8405
8406         * inssel.brg: use the correct function to get the size of an item
8407         in an array, given an element class.
8408         * aot-compiler.c: do not access class->class_size directly.
8409
8410 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8411
8412         * mini.h, debug-mini.c: added a debugging function to print
8413         info about local variables and arguments in a jitted method.
8414
8415 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
8416
8417         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8418
8419         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
8420
8421 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8422
8423         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
8424         inner and outer loops when passing vtypes.
8425
8426 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
8427
8428         * mini-ppc.c: take into account the cpu errata for cache flushing
8429         which caused some random errors (bug #79381).
8430
8431 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8432
8433         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
8434         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
8435
8436 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
8437
8438         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
8439         loaded.
8440
8441         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
8442         freebsd ports tree.
8443
8444         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
8445         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
8446
8447         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
8448         displacement.
8449
8450 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
8451
8452         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
8453
8454 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
8455
8456         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
8457         macro does not have to be changed during debugging.
8458
8459         * 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>.
8460
8461         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
8462
8463         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
8464         
8465         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
8466         MONO_ARCH_NO_EMULATE_MUL is defined.
8467
8468         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
8469
8470         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
8471
8472         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
8473
8474         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
8475         
8476 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
8477
8478         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
8479         stuff to mini-exceptions.c where it is used.
8480
8481         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
8482         setup code, the real one is in mini-exceptions.c.
8483
8484         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
8485         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
8486         some changes from the freebsd ports tree.
8487
8488         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
8489         constants.
8490         
8491         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
8492
8493 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
8494
8495         * mini.c: on Linux, check for /proc to be mounted
8496         (bug# 79351, novell bug#201204).
8497
8498 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
8499
8500         * mini.c: handle cases where pthread_attr_getstack() behaves
8501         incorrectly (bug #78096).
8502
8503 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
8504
8505         * mini-arm.c: support larger stack frames (bug #79272).
8506
8507 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
8508
8509         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
8510
8511         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
8512         tokens.
8513
8514         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
8515         mono_class_from_name () to find a class from its name.
8516
8517         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
8518
8519 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
8520
8521         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
8522
8523 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
8524
8525         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
8526
8527 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
8528
8529         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
8530         callinfo->trampoline.
8531
8532         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
8533         fixes #79271.
8534         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
8535         future.
8536
8537 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
8538
8539         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
8540
8541 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
8542
8543         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
8544         stats.method_trampolines, it is already done by the generic trampoline code.
8545
8546         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
8547         
8548 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
8549
8550         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
8551
8552         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
8553
8554         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
8555
8556         * mini.c (print_jit_stats): Print mscorlib mempool size too.
8557         
8558         * mini.c (print_jit_stats): Print new stats.
8559
8560         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8561
8562 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
8563
8564         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
8565         Address on two dimensional arrays. Fixes #78729.
8566
8567         * mini.h (MonoCompile): Add a 'skip_visibility' field.
8568
8569         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
8570         a method.
8571
8572         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
8573
8574         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
8575         #79130.
8576         
8577         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
8578         a race condition.
8579         (mini_get_ldelema_ins): Ditto.
8580
8581 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
8582
8583         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
8584         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
8585         Fixes #79213.
8586
8587 2006-08-29 Neale Ferguson <neale@sinenomine.net>
8588
8589         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
8590         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
8591
8592         * exceptions-s390x.c: Cosmetic change.
8593
8594         * tramp-s390.c: Fix warning.
8595
8596         * cpu-s390.md: Correct length of mul_imm.
8597
8598 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8599
8600         * aot-compiler.c: added binary writer with ELF backend
8601         implementation (only on Linux/x86 for now).
8602
8603 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8604
8605         * Makefile.am: Don't run net 2.0 AOT tests.
8606
8607         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
8608         (mono_compile_assembly): Skip net 2.0 assemblies as well.
8609
8610         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
8611
8612 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8613
8614         * aot-compiler.c: simplified and refactored the asm-writing code
8615         to allow different backends.
8616
8617 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8618
8619         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8620
8621         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
8622         little. Share patches of type TYPE_FROM_HANDLE as well.
8623
8624         * mini.c (mono_patch_info_equal): New helper function.
8625         (mono_patch_info_hash): Ditto.
8626
8627         * aot-compiler.c (emit_method_code): Fix s390 build.
8628
8629         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
8630         is not handled because it is stored as a flag and not as a type ctor. Fixes
8631         #79016.
8632
8633 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
8634
8635         * aot-compiler.c: Fix computation of GOT slot statistics.
8636         
8637         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
8638         Also remove support for not PIC AOT.
8639
8640         * mini.h: Bump AOT file format version.
8641
8642         * objects.cs: Add a test for #78990.
8643
8644         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
8645         (peter.dettman@iinet.net.au). Fixes #79087.
8646
8647         * basic-long.cs: Add a test for the above.
8648
8649 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
8650
8651         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
8652         
8653         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
8654         code somewhat.
8655
8656 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
8657
8658         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
8659         exceptions.
8660
8661 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
8662
8663         * mini.c: Don't verify COM proxy invoke calls
8664         
8665
8666 2006-08-10  Dick Porter  <dick@ximian.com>
8667
8668         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
8669         which process is holding semaphores locked.
8670
8671 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
8672
8673         * mini-ia64.c mini-amd64.c: Fix #79027.
8674
8675         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
8676
8677         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
8678
8679         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
8680         implicit arguments in a vararg call. Fixes #79027.
8681
8682 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
8683
8684         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
8685         (mono_get_array_new_va_signature): Ditto.
8686
8687 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
8688
8689         * aot-runtime.c: Call init_plt lazily.
8690
8691         * inssel-long.brg: Fix unsigned long->int conversion.
8692
8693         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
8694
8695         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
8696         that most data is now in the .rss/.data section.
8697
8698 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
8699
8700         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
8701
8702         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
8703
8704         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
8705
8706         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
8707
8708         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
8709         virtual call. Fixes #79010.
8710
8711         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
8712         and use the result as the this argument in the real call.
8713
8714         * generics.2.cs: Add a new test for #79010.
8715         
8716 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
8717
8718         * mini-x86.c: Fix a warning.
8719
8720         * aot-compiler.c: Add a bunch of statistics.
8721
8722         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
8723
8724 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
8725
8726         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
8727
8728 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
8729
8730         * 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>.
8731
8732 2006-07-13  Miguel de Icaza  <miguel@novell.com>
8733
8734         * mini.c (mono_method_to_ir): Obtain the original method in the
8735         CIL stream and use this to perform validation.
8736
8737         Fixed: #78816
8738
8739 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
8740
8741         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
8742         (mono_arch_call_opcode): Ditto.
8743
8744         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
8745         #78826.
8746
8747         * mini.c (mono_patch_info_dup_mp): New helper function.
8748         
8749         * aot-compiler.c (compile_method): Fix some of the memory allocated during
8750         compilation. Fixes #78827.
8751
8752 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
8753
8754         * declsec.c: Use original security informations for
8755           MONO_WRAPPER_MANAGED_TO_MANAGED.
8756
8757 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
8758
8759         * mini.c: Allow Com Interop methods/classes and
8760         don't verify COM wrapper calls
8761         
8762
8763 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
8764
8765         * inssel-long32.brg: Fix long->i4 checked conversion.
8766
8767         * exceptions.cs: Add a test for the above.
8768
8769 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
8770
8771         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
8772
8773         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
8774         leaks.
8775
8776         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
8777         #78775.
8778
8779 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
8780
8781         * mini.c: Fix solaris/x86 exception handling.
8782
8783         * Makefile.am: Get rid of $(ICU_LIBS).
8784
8785 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
8786
8787         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
8788         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
8789         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
8790
8791         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
8792
8793         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
8794         this function causes a SIGSEGV.
8795
8796 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
8797
8798         * mini.c: Remove unused solaris/x86 includes.
8799
8800 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
8801
8802         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
8803
8804 2006-06-20  Jb Evain  <jbevain@gmail.com>
8805
8806         * cpu-g4.md: fix max length of start_handler instruction.
8807
8808 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
8809         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8810
8811 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
8812         * ssa.c: Fixed bug 78653 for SSA based deadce.
8813         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8814         MonoInst.flags, used in SSA based deadce.
8815         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8816         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8817
8818 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8819
8820         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8821         it can end up using non executable memory on ppc64 systems
8822         running ppc32 userspace (fix from Johannes Berg).
8823
8824 2006-06-14  Dick Porter  <dick@ximian.com>
8825
8826         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8827         4.1.1
8828
8829 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
8830         * mini.c: Made so that inline is locally disabled if it would
8831         trigger a .cctor, because too many apps depend on this behavior
8832         (which seems to be also the one of the MS CLR).
8833
8834 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
8835
8836         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8837         No idea why this worked before.
8838
8839         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8840         which branch to outer exception clauses since they could skip the
8841         inner finally clauses. Fixes #78633.
8842
8843         * exceptions.cs: Add a test for the above.
8844
8845         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8846         Fixes #78629.
8847
8848         * iltests.il: Add a test for the above.
8849
8850 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
8851
8852         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8853         after the end of a try bblock, to prevent asserts in mini_method_compile ().
8854
8855         * iltests.il: Add a test for the above.
8856
8857 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
8858
8859         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8860         
8861         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8862         methods as instrinsics.
8863
8864 2006-06-09  Wade Berrier <wberrier@novell.com>
8865
8866         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8867         (simple-cee-ops.h ssapre-mini-ops.h)
8868
8869 2006-06-09  Neale Ferguson <neale@sinenomine.net>
8870
8871         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8872         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8873         instruction).
8874         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8875         * cpu-s390x.md: Fix max. length values for a couple of instructions.
8876
8877 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
8878
8879         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8880
8881 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
8882
8883         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8884         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8885         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8886         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8887         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8888         of opcodes, so that bug 78549 should not happen again.
8889         * ssapre.c: Updated to use the renamed files.
8890
8891 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
8892
8893         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
8894         in OP_ATOMIC_EXCHANGE_I4.
8895
8896 2006-06-07  Wade Berrier <wberrier@novell.com>
8897
8898         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
8899         in mono_debugger_create_notification_function)
8900
8901 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
8902
8903         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8904         
8905         * mini.c (type_from_stack_type): Disable some changes which do not
8906         seem to work.
8907
8908         * driver.c: Reenable opts.
8909
8910         * mini.h (MonoStackSlot): New structure to keep track of the verification state
8911         of the evaluation stack.
8912         
8913         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8914         evaluation stack trace at entry to the bblock.
8915
8916         * mini.c (merge_stacks): New function to perform verification of stack merges.
8917         Turned off by default.
8918
8919         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8920         STACK_MP.
8921         
8922 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
8923
8924         * local-propagation.c: Fixed bug 78549.
8925
8926 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
8927
8928         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
8929
8930 2006-06-02  Miguel de Icaza  <miguel@novell.com>
8931
8932         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
8933         tramp-arm.c, tramp-ia64.c
8934         (mono_debugger_create_notification_function): Update signature to
8935         new signature and use new protocol for creating the notification
8936         function.  
8937
8938         Should fix the build.
8939
8940 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
8941
8942         * exceptions-ppc.c (mono_jit_walk_stack)
8943         (ves_icall_get_frame_info): Fix the build
8944
8945 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
8946
8947         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
8948
8949 2006-05-31  Raja R Harinath  <rharinath@novell.com>
8950
8951         * il2tests.2.il: New file for generics CIL tests.  Add test for
8952         #78019.
8953         * Makefile.am: Update.
8954
8955         Fix #78019
8956         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
8957         to nullable types.
8958
8959 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
8960
8961         * aliasing.c: Fixed bug 78311.
8962
8963 2006-05-29  Martin Baulig  <martin@ximian.com>
8964
8965         * mini-exceptions.c (mono_find_jit_info): When computing the
8966         native offset, check whether we're actually inside the method's
8967         code; call mono_debug_print_stack_frame() to format the frame.
8968         (ves_icall_System_Exception_get_trace): Call
8969         mono_debug_print_stack_frame() to format the stack frame.
8970         (ves_icall_get_trace): Update to the new debugging API.
8971         (mono_jit_walk_stack_from_ctx): Likewise.
8972         (ves_icall_get_frame_info): Likewise.
8973
8974         * mini.c (get_method_from_ip): Use the new debugging API.
8975         (mono_print_method_from_ip): Likewise.
8976
8977         * exceptions-ppc.c
8978         (mono_jit_walk_stack): Use the new debugging API.
8979         (ves_icall_get_frame_info): Likewise.   
8980
8981 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
8982
8983         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
8984
8985 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
8986
8987         * mini.c: Added "limitator" to inline for debugging.
8988
8989 2006-05-24  Martin Baulig  <martin@ximian.com>
8990
8991         * debug-debugger.c (mono_debugger_init): Create a private,
8992         malloc()-based code manager for the notification function and
8993         intentionally leak it on exit.  This fixes the crash-on-exit race
8994         condition.
8995
8996         * tramp-amd64.c
8997         (mono_debugger_create_notification_function): Added
8998         `MonoCodeManager *' argument.
8999
9000         * tramp-x86.c
9001         (mono_debugger_create_notification_function): Added
9002         `MonoCodeManager *' argument.
9003
9004 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
9005
9006         * aliasing.c: Fixed 64 bit issue.
9007         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
9008         default since all known bugs are fixed (one more time!).
9009
9010 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
9011
9012         * mini.c: write barrier support.
9013
9014 2006-05-23  Martin Baulig  <martin@ximian.com>
9015
9016         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
9017         check at the top of the file.
9018
9019 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
9020
9021         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
9022         reverting changes without reason and without changelog entries.
9023
9024 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
9025
9026         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
9027         to a few opcodes. Fixes #78439.
9028
9029         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
9030         consistency with other archs.
9031
9032         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
9033
9034 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9035
9036         * debug-debugger.c: fix the build.
9037
9038 2006-05-17  Martin Baulig  <martin@ximian.com>
9039
9040         * debug-debugger.c
9041         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
9042         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
9043         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
9044         (debugger_attach): Call GC_mono_debugger_add_all_threads().
9045
9046 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
9047
9048         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
9049
9050 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
9051
9052         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
9053         MONO_TYPE_GENERICINST.
9054         
9055         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
9056         MONO_TYPE_GENERICINST.
9057
9058 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
9059
9060         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
9061         #78325.
9062
9063 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
9064
9065         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
9066         mempool.
9067         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
9068
9069 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
9070
9071         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
9072         mono_trace_cleanup ().
9073
9074         * iltests.il: Fix problem with the newly added test.
9075
9076         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
9077         due to register constraints, free up the previous hreg. Fixes #78314.
9078
9079         * iltests.il: Add new test for #78314.  
9080
9081         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
9082         Interlocked.Add. Fixes #78312.
9083
9084         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
9085         
9086 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
9087
9088         * inssel.brg (mini_emit_virtual_call): Fix a warning.
9089
9090 2006-05-05  Martin Baulig  <martin@ximian.com>
9091
9092         * debug-mini.c (mono_debug_open_block): New method.
9093
9094         * mini-amd64.c
9095         (mono_arch_output_basic_block): Call mono_debug_open_block() at
9096         the beginning of each basic block.
9097
9098         * mini-x86.c
9099         (mono_arch_output_basic_block): Call mono_debug_open_block() at
9100         the beginning of each basic block.
9101
9102 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
9103
9104         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
9105         default until I understand why they break the build on amd64.
9106
9107 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
9108
9109         * mini.c (mini_cleanup): Call mono_cleanup ().
9110
9111         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
9112         errors.
9113
9114 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
9115
9116         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
9117         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
9118         default since all known bugs are fixed, and I cannot reproduce bug
9119         77944... I'm asking Matt Hargett to test again after this commit.
9120
9121 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
9122
9123         * mini-codegen.c: Fixed typo that thrashed inline.
9124
9125 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
9126
9127         * dominators.c (compute_dominators): Avoid using a worklist since
9128         it is not correct in some cases. Instead, iterate over all bblocks as
9129         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
9130
9131 2006-04-28  Miguel de Icaza  <miguel@novell.com>
9132
9133         * mini.c (mono_jit_compile_method_inner): Use
9134         mono_prepare_exception_from_error that resets the value
9135         internally.
9136
9137 2006-04-27  Miguel de Icaza  <miguel@novell.com>
9138
9139         * mini.c: Move the mini_loader_error_to_exception to metadata. 
9140         
9141 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
9142
9143         * aliasing.c: Fixed bug 78210.
9144
9145 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
9146
9147         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
9148         default until all their problems (or the ones they trigger) are fixed.
9149
9150 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
9151
9152         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
9153         
9154         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
9155         as loaded only after resolving patches since that could invoke the same method.
9156
9157         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
9158
9159         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
9160         functions.
9161
9162         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
9163         AOT loader.
9164
9165         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
9166         stack.
9167
9168         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
9169         made from AOT code through the PLT table.
9170
9171         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
9172         holding the plt offset when a call is made to the aot plt trampoline.
9173         
9174 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
9175
9176         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
9177         amd64 AOT support.
9178
9179         * Makefile.am (common_sources): Fix build breakage.
9180
9181         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
9182         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
9183         intra-assembly calls if possible.
9184         
9185         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
9186
9187         * mini-trampolines.c: Handle PLT entries.
9188
9189         * mini.c: Avoid creating a GOT var for calls.
9190
9191         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
9192         from mscorlib code.
9193
9194         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
9195         from mscorlib code.
9196
9197         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
9198         AOT code.       
9199
9200         * mini.h: Bump AOT file format version.
9201         
9202         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
9203         covers more cases.
9204
9205 2006-04-25  Martin Baulig  <martin@ximian.com>
9206
9207         * driver.c: Disable copyprop, consprop and inline when running
9208         inside the debugger.
9209
9210 2006-04-25  Martin Baulig  <martin@ximian.com>
9211
9212         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
9213         with `get_current_thread' and added `detach'.
9214         (MonoDebuggerMetadataInfo): Added `thread_size',
9215         `thread_tid_offset', `thread_stack_ptr_offset' and
9216         `thread_end_stack_offset'.
9217
9218 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
9219
9220         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
9221         aot-runtime.c.
9222
9223         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
9224         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
9225
9226         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
9227
9228         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
9229
9230         * aot.c: Add support for ADJUSTED_IID.  
9231
9232 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
9233
9234         * aot.c (emit_method_order): Don't align method_order_end.
9235
9236         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
9237         the interface ID changes.
9238
9239 2006-04-21  Dick Porter  <dick@ximian.com>
9240
9241         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
9242         cleaning up a thread.  Fixes the new part of bug 77470.
9243
9244 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
9245
9246         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
9247         to managed wrapper.
9248                      
9249 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
9250
9251         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
9252         
9253         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
9254         SIGSEGV. Fixes #78072.
9255
9256         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
9257         unregister our SIGABRT handler.
9258
9259 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
9260
9261         * mini.c: Disabled inline where it can alter the call stack in a
9262         way visible from managed code.
9263         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
9264         default.
9265
9266 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
9267
9268         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
9269         on other platforms. Fixes #78089.
9270
9271 2006-04-13  Martin Baulig  <martin@ximian.com>
9272
9273         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
9274         determine whether we're inside the debugger.
9275
9276         * debug-debugger.h
9277         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
9278
9279 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
9280
9281         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
9282         handler clauses. Fixes #78024.
9283
9284         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
9285         in the CALL_MEMBASE opcodes. Fixes #78088.
9286         (mono_arch_get_vcall_slot_addr): Ditto.
9287
9288 2006-04-10  Martin Baulig  <martin@ximian.com>
9289
9290         * debug-debugger.c: The thread handling code has now been moved
9291         into ../metadata/threads.c.
9292
9293 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9294
9295         * driver.c (mono_main): Fix --with-gc=none build.
9296
9297         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
9298         (mono_spillvar_offset_float): Ditto.
9299         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
9300         hreg, not when its !global, since on ia64, there is a third category: stacked
9301         registers.      
9302
9303 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
9304
9305         * mini.c: set MonoInst->klass for load field address and a few other
9306         places.
9307
9308 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9309
9310         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
9311
9312 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
9313
9314         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
9315         the branch opt changes.
9316
9317 2006-04-06  Dick Porter  <dick@ximian.com>
9318
9319         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
9320         
9321         * wapihandles.c (mini_wapi_seminfo): 
9322         * driver.c (mono_main): Add semaphore info option
9323
9324 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
9325
9326         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
9327         branch optimization changes. Fixes #78009.
9328
9329 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9330
9331         * mini.c: ignore accessibility of methods in managed->native wrappers.
9332
9333 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
9334
9335         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
9336         
9337         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
9338
9339 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
9340
9341         * mini.c: Modify the branch optimizations to preserve the invariant that
9342         the entries inside the in_bb and out_bb arrays are unique.
9343         (mono_unlink_bblock): Avoid creation of new arrays.
9344
9345 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
9346
9347         * mini.c (mono_unlink_bblock): Fix regression caused by previous
9348         change (#77992).
9349
9350 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
9351
9352         * mini.c (optimize_branches): Remove the "optimizations" in
9353         the cbranch1/cbranch2 -> branch cases which were causing several
9354         problems in the past. Fixes #77986.
9355
9356 2006-03-31  Chris Toshok  <toshok@ximian.com>
9357
9358         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
9359         default optimizations :(
9360
9361 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
9362
9363         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
9364         branch.
9365
9366 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
9367
9368         * local-propagation.c: Added comments to structs and removed
9369         "Mono" prefixes from local tree mover types.
9370
9371 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
9372
9373         * Makefile.am (arch_sources): Define this for each architecture so 
9374         libmono_la_SOURCES is defined in one place.
9375
9376 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
9377
9378         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
9379         from handles/.
9380
9381 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
9382
9383         * driver.c: print the GC name supplied by configure.
9384
9385 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
9386
9387         * local-propagation.c: Added tree mover, and moved here all the
9388         local propagation code from mini.c
9389         * mini.c: Added support for treeprop, and moved all the local
9390         propagation code to local-propagation.c
9391         * mini.h: Added support for treeprop
9392         * driver.c: Added support for treeprop, enabled consprop, copyprop,
9393         treeprop, inline and deadce by default
9394         * Makefile.am: Added local-propagation.c
9395
9396 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
9397
9398         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
9399
9400 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
9401
9402         * debug-debugger.c: make it compile without the Boehm GC.
9403
9404 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9405
9406         * mini.c: fixed issue with mismatch when an icall is registered
9407         with multiple names but same address.
9408
9409 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9410
9411         * declsec.c, mini-exceptions.c: use write barrier to set reference
9412         fields of managed objects.
9413
9414 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9415
9416         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
9417         (can_access_internals): Fix a warning.
9418
9419         * mini.c (print_method_from_ip): Rename this to 
9420         mono_print_method_from_ip so it gets exported.
9421
9422         * trace.c: Deal with strings inside StringBuilder's containing garbage
9423         and fix memory leaks. Fixes #77848.
9424
9425 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9426
9427         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
9428         fixes #77787.
9429
9430 2006-03-16 Neale Ferguson <neale@sinenomine.net>
9431         
9432         * mini-s390.c: Remove OP_X86_TEST_NULL.
9433
9434 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9435
9436         * mini.c: use the correct GetHashCode() for the moving collector.
9437
9438 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
9439
9440         * liveness.c: Regalloc spill cost tuning.
9441
9442 2006-03-15 Neale Ferguson <neale@sinenomine.net>
9443         
9444         * mini-s390x.h: Correct S390_LONG macro.
9445
9446         * mini-s390x.c: Cleanup unused code.
9447
9448 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
9449
9450         * jit-icalls.h: New file.
9451
9452         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
9453         icalls and include that instead of including jit-icalls.c.
9454
9455         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
9456         OP_X86 opcodes.
9457
9458 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
9459
9460         * mini.c: when checking for member accessibility, also check for
9461         friend assemblies and for explicit interface implementations.
9462
9463 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
9464
9465         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
9466
9467         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
9468
9469         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9470         common cases are done first.    
9471
9472         * mini-ops.h: Only define platform specific opcodes on the given platform.
9473
9474         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
9475         branch.
9476         
9477 2006-03-14  Martin Baulig  <martin@ximian.com>
9478
9479         Revert Paolo's change from r57348:
9480
9481         * mini.h: don't use gboolean for bitfields.
9482         * mini.c: verifier changes for fields and methods accessibility.
9483
9484 2006-03-13  Neale Ferguson <neale@sinenomine.net>
9485
9486         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
9487
9488         * mini-s390x.c: Fix conv_r_un.
9489
9490         * cpu-s390, cpu-s390x.md: Fix lengths.
9491
9492 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9493
9494         * mini.c: nested types have access to all the nesting
9495         levels, not just the enclosing types.
9496
9497 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9498
9499         * mini.c: added a few more verification checks.
9500
9501 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
9502
9503         * liveness.c: Merge optimizations from the linear-il branch.
9504
9505 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9506
9507         * mini-ia64.c (emit_call): Add a comment.
9508
9509         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
9510
9511         * tramp-ia64.c: Fix some warnings.
9512
9513 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9514
9515         * mini.h: don't use gboolean for bitfields.
9516         * mini.c: verifier changes for fields and methods accessibility.
9517
9518 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9519
9520         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
9521         lazy icall wrapper changes.
9522
9523         * dominators.c: Replace all the dominator algorithms with faster
9524         ones from the linear-il branch.
9525
9526         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
9527         the mempool.
9528
9529         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9530         common cases are done first.
9531
9532         * mini-amd64.c: Fix some warnings.
9533
9534         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
9535         from the mempool.
9536
9537         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
9538         added code.
9539
9540         * mini.h: Add a missing prototype.
9541
9542 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
9543
9544         * mini.c: Compile icall wrappers lazily.
9545
9546         * mini-codegen.c: Use printf instead of g_print since its much faster.
9547
9548         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
9549         function.
9550
9551         * mini.c (optimize_branches): Cache the negative result from 
9552         remove_block_if_useless ().
9553
9554         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
9555         Also fix some bblock linking issues.
9556
9557         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
9558         assembly files.
9559
9560         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
9561
9562         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
9563         accessed fields first, for better cache behavior.
9564         
9565 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9566
9567         * mini.c: speedup IList<T> array accesses.
9568
9569 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
9570
9571         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
9572         inline_costs counter. Fixes #77190.
9573
9574 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
9575
9576         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
9577         trace messages. Fixes #77706.
9578
9579 2006-03-04  Martin Baulig  <martin@ximian.com>
9580
9581         * tramp-amd64.c, tramp-x86.c
9582         (mono_debugger_create_notification_function): Use
9583         mono_global_codeman_reserve() to allocate a buffer at runtime and
9584         return it.
9585
9586         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
9587
9588         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
9589         notification function at runtime and then call `initialize' in the
9590         `MONO_DEBUGGER__debugger_info' vtable.
9591
9592 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
9593
9594         * iltests.il: Fix a visibility problem.
9595
9596 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9597
9598         * driver.c, mini.c: add hooks for the counters API.
9599
9600 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9601
9602         * driver.c: show disabled options.
9603
9604 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9605
9606         * linear-scan.c: always use cost-driven selection.
9607
9608 2006-02-28  Raja R Harinath  <rharinath@novell.com>
9609
9610         * jit-icalls.c (helper_compile_generic_method): Revert change from
9611         2006-02-24.
9612
9613 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
9614
9615         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
9616
9617 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
9618
9619         * inssel.brg: style fixes, mostly to force the updated monoburg
9620         to run for people using svn.
9621
9622 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9623
9624         * mini.c: match monoburg changes.
9625
9626 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9627
9628         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
9629         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
9630         declaration in the header file.
9631
9632 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9633
9634         * helpers.c: reduce relocations and mem usage.
9635
9636 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9637
9638         * mini.h, mini-codegen.c: disable logging features if
9639         requested by configure.
9640
9641 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
9642
9643         * mini.c: tiny verifier changes.
9644
9645 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9646
9647         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
9648         cpu-pentium.md: stack alignment changes for osx/x86,
9649         partially from Geoff Norton <gnorton@customerdna.com>.
9650
9651 2006-02-24  Raja R Harinath  <harinath@gmail.com>
9652
9653         * jit-icalls.c (helper_compile_generic_method): Update to changes
9654         in metadata/class.c.
9655
9656 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
9657         
9658         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
9659         
9660         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
9661         interface calls with large offsets.
9662
9663 2006-02-23  Raja R Harinath  <rharinath@novell.com>
9664
9665         * jit-icalls.c (helper_compile_generic_method): Document the
9666         special-case we depend on so that we can inflate the method twice
9667         with the same context with no bad side-effects.
9668
9669 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9670
9671         * mini-x86.c, mini-amd64.c: fix for case when xen support
9672         is disabled.
9673
9674 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9675
9676         * mini-x86.c, mini-amd64.c: generate code to access tls items
9677         in a faster way for Xen systems.
9678
9679 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9680
9681         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
9682         updates and compilation fixes for the OSX/x86 port, mostly from
9683         Geoff Norton <gnorton@customerdna.com>.
9684
9685 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9686
9687         * inssel.brg: faster interface call implementation
9688         to sync with the interface_offsets MonoVTable changes.
9689
9690 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9691
9692         * mini.c: more verification checks.
9693
9694 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
9695
9696         * mini.c: added a few more verification checks.
9697
9698 2006-02-17      Neale Ferguson <neale@sinenomine.net>
9699
9700         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
9701         facility on the processor and use it if available.
9702
9703 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9704
9705         * driver.c, aot.c, mini.c: throw exception if the IL code is
9706         invalid or unverifiable.
9707
9708 2006-02-17  Raja R Harinath  <rharinath@novell.com>
9709
9710         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
9711         m.StructField.
9712
9713 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
9714
9715         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
9716
9717 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9718
9719         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
9720         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
9721         handling of instantiated generic valuetypes.
9722
9723 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
9724
9725         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
9726         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
9727         instead.
9728
9729         * generics.2.cs: Revert the nullable reftypes tests.
9730
9731 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
9732
9733         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
9734         using __builtin_frame_address (1) as it doesn't work in the presence
9735         of optimizations. Hopefully fixes #77273.
9736
9737         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
9738         -> generics.cs change as it doesn't work with some automake versions.
9739
9740 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9741
9742         * mini.c: handle systems that sue a different way to
9743         retrieve the stack address of the current thread.
9744
9745 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
9746
9747         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
9748         it specially in the makefile.
9749
9750         * generics.2.cs: Add tests for nullable reference types.
9751
9752 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9753
9754         * mini.c: always handle the case when mono_jit_init()
9755         is called in a thread different from the main thread,
9756         confusing libgc (bug #77309).
9757
9758 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
9759
9760         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
9761
9762 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9763
9764         * mini.c: change optimize_branches () to use a single loop
9765         and introduce a new optimization to simplify some range checks.
9766
9767 2006-02-03  Martin Baulig  <martin@ximian.com>
9768
9769         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
9770         and merged with debugger_thread_manager_add_thread().
9771         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
9772         inform the debugger about the main thread.
9773
9774 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9775
9776         * basic.cs: Add test for div.un/rem.un constant folding.
9777
9778 2006-02-03  Neale Ferguson <neale@sinenomine.net>
9779
9780         * cpu-s390x.md: correct int_xor_imm length
9781
9782 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9783
9784         * generics.2.cs: New test for #77442.
9785
9786         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
9787         #77442.
9788
9789 2006-02-02  Martin Baulig  <martin@ximian.com>
9790
9791         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
9792         <mono/metadata/mono-debug-debugger.h>   
9793
9794         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
9795
9796 2006-02-02  Martin Baulig  <martin@ximian.com>
9797
9798         * debug-debugger.h: New header file for debug-debugger.c.
9799
9800         * debug-debugger.c: Big API cleanup; don't run the managed Main()
9801         function is a separate thread anymore; add support for attaching.
9802
9803 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
9804
9805         * tramp-x86.c: Fix a warning.
9806
9807 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
9808
9809         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9810         on very large methods.
9811
9812         * aot.c (load_patch_info): Fix a warning.
9813
9814 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9815
9816         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9817         mini-ops.h: alu membase optimizations.
9818
9819 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9820
9821         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9822         to speedup StringBuilder.
9823
9824 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
9825
9826         * dominators.c (mono_compute_natural_loops): Fix detection of
9827         loop body start blocks.
9828
9829         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9830
9831 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
9832
9833         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9834         #75145.
9835
9836 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
9837
9838         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9839
9840 2006-01-25  Martin Baulig  <martin@ximian.com>
9841
9842         * debug-debugger.c: Moved the `MonoDebuggerManager' and
9843         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9844         started to cleanup this file a little bit.
9845
9846 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9847
9848         * mini.c: optimize a codepath frequently happening in generics code.
9849
9850 2006-01-23  Martin Baulig  <martin@ximian.com>
9851
9852         * Makefile.am: Only compile debug-debugger.c on supported platforms.
9853
9854         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9855         functions directly.
9856
9857         * driver.c: debug-debugger.c is only available if
9858         `MONO_DEBUGGER_SUPPORTED' is defined.   
9859
9860 2006-01-23  Martin Baulig  <martin@ximian.com>
9861
9862         * debug-debugger.c: Only enable this on platforms where the Mono
9863         Debugger is working (x86 and x86_64).
9864
9865 2006-01-21  Martin Baulig  <martin@ximian.com>
9866
9867         The Mono Debugger is now using the normal `mono' instead of the
9868         `mono-debugger-mini-wrapper' when executing managed code.
9869
9870         * debug-debugger.c: New file; previously known as
9871         debugger/wrapper/wrapper.c.
9872
9873         * debug-mini.c (mono_init_debugger): Removed.
9874
9875         * driver.c (mono_main): Added new `--inside-mdb' command line
9876         argument which is used when running inside the debugger.
9877
9878 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
9879
9880         * liveness.c (mono_analyze_liveness): Remove some unused data
9881         structures.
9882
9883 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
9884
9885         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9886
9887 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
9888
9889         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9890         depends on implementation details of monobitset.
9891
9892         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9893         Fixes #77271.
9894
9895 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
9896
9897         * liveness.c: Update after monobitset changes.
9898
9899 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
9900
9901         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9902
9903 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9904
9905         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9906
9907         * mini-s390x.c: Remove warning messages.
9908
9909 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
9910
9911         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9912
9913 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
9914
9915         * generics.2.cs: Add ldelem/stelem_any test.
9916
9917 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9918
9919         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9920
9921 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
9922
9923         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9924         
9925 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
9926
9927         * generics.2.cs: Reenable vtype tests.
9928
9929         * inssel-x86.brg: Remove an icorrect valuetype rule.
9930
9931 2006-01-06 Neale Ferguson <neale@sinenomine.net>
9932
9933         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
9934         initial support for OP_ABS.
9935
9936 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9937
9938         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
9939
9940 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9941
9942         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
9943         conversion and implement LADD/LSUB.
9944
9945         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
9946         architectures.
9947
9948 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9949
9950         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
9951
9952         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
9953         architectures.
9954
9955 2006-01-05 Neale Ferguson <neale@sinenomine.net>
9956
9957         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
9958         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
9959         (stack walk problem).
9960
9961 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
9962
9963         * aot.c (mono_aot_load_method): Fix a warning.
9964
9965 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9966
9967         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
9968
9969 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9970
9971         * iltests.il: Add test for #77148.
9972
9973         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
9974         #77148.
9975
9976 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9977
9978         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
9979
9980 2006-01-03  Neale Ferguson <neale@sinenomine.net>
9981
9982         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
9983         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
9984
9985         * basic-long.cs: Add lconv-to-r4/r8 tests.
9986
9987 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
9988
9989         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
9990
9991         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
9992         here as on other archs.
9993
9994 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9995
9996         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
9997
9998 2005-12-29 Neale Ferguson <neale@sinenomine.net>
9999
10000         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
10001         
10002         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
10003
10004         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
10005         instrument_prolog; Add memory_barrier instruction.
10006
10007 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
10008
10009         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
10010
10011 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
10012
10013         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
10014
10015         * aliasing.c inssel.brg: Fix warnings.
10016
10017         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
10018         could skip initialization of some parts of memory.
10019
10020         * mini.c mini-ia64.c: Fix warnings.
10021
10022         * inssel-sparc.brg: Add an implementation of lneg which actually works.
10023
10024 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
10025
10026         * aliasing.c (mono_build_aliasing_information): Add a workaround for
10027         a crash seen on sparc.
10028
10029         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
10030         
10031         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
10032
10033 2005-12-21 Neale Ferguson <neale@sinenomine.net>
10034
10035         * mini-ops.h: Add s390_backchain instruction
10036
10037         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
10038
10039         * cpu-s390.md: Add s390_backchain instruction
10040
10041         * mini-s390.c: Significant ABI changes
10042
10043         * mini-s390.h: Cater for zero length structures
10044
10045 2005-12-20 Neale Ferguson <neale@sinenomine.net>
10046
10047         * mini-s390.c: ABI fixes
10048
10049         * inssel-s390.brg: Remove debug statements
10050
10051         * cpu-s390.md: Fix length of ATOMIC_xx operations
10052
10053 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
10054
10055         * basic-float.cs: Add float<->long conversion tests.
10056
10057 2005-12-16 Neale Ferguson <neale@sinenomine.net>
10058
10059         * mini-s390.c: Fix LOCALLOC processing.
10060
10061         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
10062
10063 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
10064
10065         * iltests.il: Add tests for some opcodes not covered by the other
10066         tests.
10067
10068 2005-12-15 Neale Ferguson <neale@sinenomine.net>
10069
10070         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
10071         register loading for Tail processing; Correct trace output.
10072
10073         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
10074
10075         * cpu-s390.md: Correct size of jmp instruction. 
10076
10077 2005-12-13 Neale Ferguson <neale@sinenomine.net>
10078
10079         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
10080
10081 2005-12-13 Neale Ferguson <neale@sinenomine.net>
10082
10083         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
10084           Bring s390 up to current level.
10085
10086 2005-12-12  Zltan Varga  <vargaz@gmail.com>
10087
10088         * generics.2.cs: Disable the newly added tests as they do not work yet.
10089         
10090         * generics.2.cs: Add valuetype tests.
10091
10092 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
10093
10094         * basic-long.cs: Add i4->u8 test.
10095
10096         * objects.cs: Add tests for JIT intrinsic.
10097
10098         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
10099         optimizations lost by a mistake.
10100
10101 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
10102
10103         * basic-long.cs: Remove a test moved to objects.cs.
10104
10105         * arrays.cs: Add more array tests.
10106
10107 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
10108
10109         * arrays.cs: Add new tests for multi-dimensional arrays.
10110
10111 2005-12-06  Raja R Harinath  <rharinath@novell.com>
10112
10113         * Makefile.am (test_sources2): Add generics.2.cs.
10114         (EXTRA_DIST): Add test_sources2.
10115
10116 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
10117
10118         Support for boxing and unboxing nullable types as well as the
10119         isinst operation on nullables, per the CLI ammendment.
10120
10121         * inssel.brg (CEE_ISINST): Special case for nullable
10122
10123         * mini.c (handle_unbox_nullable): new method
10124         (handle_box): Special case for nullable types
10125         (mono_method_to_ir): Call handle_unbox_nullable in correct
10126         places.
10127
10128         * generics.2.cs: New test suite
10129
10130         * Makefile.am: Support for regression tests with generics.
10131
10132 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
10133
10134         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
10135         allocated to registers. Fixes #76800.
10136
10137 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
10138
10139         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
10140
10141 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
10142
10143         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
10144         of platforms.
10145
10146 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
10147
10148         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
10149         objects.cs.
10150
10151         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
10152         
10153         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
10154 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
10155
10156         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
10157         single precision before storing to a single precision location.
10158
10159 2005-11-28  Raja R Harinath  <rharinath@novell.com>
10160
10161         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
10162
10163 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
10164
10165         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
10166         correct files.
10167
10168         * basic.cs: Remove test_0_byte_compares test which was moved to
10169         objects.cs a long time ago.
10170
10171 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
10172
10173         * aliasing.c: Fixed aliasing issue on 64 bit archs.
10174
10175 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
10176
10177         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
10178         handlers are called.
10179
10180         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
10181         throwing code.
10182
10183          * mini-ia64.c: Add support for the throw->branch exception 
10184         optimization.   
10185
10186         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
10187
10188 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
10189
10190         * mini.c: Enabled "fastpath" deadce :-)
10191         
10192 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
10193
10194         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
10195         alias analysis pass to support it.
10196         * mini.h: Likewise.
10197         * ssa.c: Likewise.
10198         * liveness.c: Likewise (liveness computation can use aliasing
10199         information to be more accurate).
10200         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
10201         moreover made so that "--compile-all" uses the given optimization
10202         flags and not the default ones.
10203         * aliasing.c: Alias analysis (new file).
10204         * aliasing.h: Likewise.
10205         * Makefile.am: added "aliasing.c" and "aliasing.h".
10206         
10207 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
10208
10209         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
10210         OP_L opcodes.
10211
10212 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
10213
10214         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
10215         fp >= end_of_stack exit condition, as it is not needed, and it might
10216         become true for fp eliminated frames.
10217
10218 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
10219
10220         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
10221         coded offsets.
10222
10223 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
10224
10225         * mini-arm.c: fixed alignment of doubles/longs to match
10226         the C ABI (bug #76635).
10227
10228 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
10229
10230         * aot.c: fix compilation with --enable-minimal=aot.
10231
10232 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
10233
10234         * mini-arm.c: fixed compatibility with the new
10235         floating point emulator package for compares.
10236
10237 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
10238
10239         * mini.c : reverted sig->pinvoke changes (r51396-51397).
10240
10241 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
10242
10243         * mini-exceptions.c (print_stack_frame): Output to stderr.
10244         (mono_handle_native_sigsegv): Ditto.
10245
10246 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10247
10248         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
10249         OP_LCONV_TO_OVF_I implementation.
10250
10251         * mini-amd64.c: Add support for the throw->branch exception 
10252         optimization.
10253
10254         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
10255         when the catch clause catches a more general exception, i.e. Object.
10256
10257 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
10258
10259         * cpu-ia64.md: Remove unused opcodes.
10260
10261         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
10262         specific defines for architectures defining USE_SIGACTION.
10263
10264         * mini-ia64.c: Fix some warnings.
10265
10266         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
10267         version seemed to skip a frame.
10268
10269 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10270
10271         * mini.c: Clean up the usage of sig->pinvoke flag. Now
10272         only calls which are made to native code use this flag.
10273
10274 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
10275
10276         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
10277         varargs methods as well.
10278         
10279         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
10280         which have save_lmf set. Reorganize methods prologs a bit.
10281
10282         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
10283         debugger to the proper place.
10284
10285 2005-10-29  Martin Baulig  <martin@ximian.com>
10286
10287         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
10288         when running inside the debugger until the debugger has support
10289         for it.
10290
10291 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
10292
10293         * mini.h: Fix a warning.
10294
10295 2005-10-24  Miguel de Icaza  <miguel@novell.com>
10296
10297         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
10298         we expose publicly, this returns the string.
10299
10300 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
10301
10302         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
10303         with fp elimination.
10304
10305 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
10306
10307         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
10308         native stacktrace using the glibc 'backtrace' function if available.
10309
10310 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
10311
10312         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
10313
10314         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
10315         handle SIGSEGVs received while in native code.
10316
10317         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
10318         code, call mono_handle_native_sigsegv which will abort the runtime
10319         after printing some diagnostics, instead of converting it into a
10320         confusing NullReferenceException.
10321
10322 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
10323
10324         * cpu-pentium.md: Remove unused opcodes.
10325
10326 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
10327
10328         * mini-amd64.h (MonoLMF): Add rsp field.
10329
10330         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
10331         the lmf too.
10332
10333 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
10334
10335         * mini-codegen.c (get_register_spilling): Fix some warnings.
10336
10337 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
10338
10339         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
10340         elimination during exception handling. Enable fp elimination by
10341         default.
10342
10343         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
10344         elimination.
10345
10346 2005-10-16  Martin Baulig  <martin@ximian.com>
10347
10348         * mini-exceptions.c
10349         (mono_debugger_run_finally): New public method for the debugger.
10350
10351 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
10352
10353         * debug-mini.c (mono_debug_init_method): Fix warning.
10354
10355         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
10356         the 'exname' parameter const to fix some warnings.
10357
10358 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
10359
10360         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
10361         introduced by the previous patch.
10362
10363 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
10364
10365         * basic-float.cs: Add test for precision of float arithmetic.
10366
10367         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
10368         when loading/storing single values from/to memory.
10369
10370         * mini.c (mono_jit_compile_method_with_opt): Create the function
10371         pointers in the correct domain.
10372
10373 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
10374
10375         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
10376         introduced by previous patch.
10377         
10378         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
10379         when out_filter_idx is NULL.
10380
10381         * mini-exceptions.c: Don't run filter clauses twice during exception
10382         handling. Fixes #75755.
10383
10384 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
10385
10386         * aot.c: Add support for ldflda wrappers.
10387
10388         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
10389         #75902.
10390
10391 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
10392
10393         * mini.c, mini.h: do not consider exception handlers blocks when
10394         setting up interface variables.
10395
10396 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
10397
10398         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
10399
10400 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
10401
10402         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
10403         causes a regression.
10404
10405         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
10406
10407 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
10408
10409         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
10410         of the OP_P definitions.
10411
10412         * TODO: Add a proposal for dealing with the CEE/OP mess.
10413
10414         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
10415         optimizations from the x86 port.
10416
10417         * cpu-amd64.md: Ditto.
10418
10419         * basic.cs basic-long.cs: Add tests.
10420
10421 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
10422
10423         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
10424         Patrik Torstensson's implementation of my exception-handling
10425         optimization idea, when the exception object is not used
10426         (bug #62150).
10427
10428 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
10429
10430         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
10431         of the mul_imm optimizations from the old jit.
10432
10433 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
10434
10435         * mini.c, liveness.c: patch by Patrik Torstensson and
10436         Zoltan Varga to improve performance in methods with
10437         exception clauses.
10438
10439 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
10440
10441         * driver.c: Remove 'Globalization' entry from --version.
10442
10443 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
10444
10445         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
10446         there is a profiler interested in JIT events.
10447
10448         * aot.c: Load profile files produced by the AOT profiling module, and
10449         reorder methods based on the profiling info. Add a 'method_order' table
10450         to the AOT file to make mono_aot_find_jit_info work with the reordered
10451         methods.
10452
10453         * mini.h: Bump AOT file version info.
10454
10455 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
10456
10457         * mini-arm.h: work around what looks like a gcc bug when optimizations
10458         are enabled.
10459
10460 2005-09-28  Raja R Harinath  <rharinath@novell.com>
10461
10462         * Makefile.am (AM_CFLAGS): Don't use += to append inside
10463         conditionals.  Use ...
10464         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
10465
10466 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
10467
10468         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
10469         to determine the amount of memory to copy when passing valuetypes.
10470
10471         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
10472         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
10473
10474 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
10475
10476         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
10477         information about aot.
10478
10479 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
10480
10481         * *.c: Replace the use of {Enter,Leave}CriticalSection with
10482         macros. This will allow a deadlock debugger to easily be plugged
10483         in.
10484
10485 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
10486
10487         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
10488
10489 2005-09-27  Raja R Harinath  <rharinath@novell.com>
10490
10491         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
10492         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
10493         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
10494         ($(arch_built)) [CROSS_COMPILING]: Error out.
10495
10496 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
10497
10498         * aot.c: Add support for the no_special_static flag for classes.
10499
10500 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10501
10502         * Reapply reverted patches.
10503
10504         * *: Revert r50174 as well.
10505
10506         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
10507
10508 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10509
10510         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
10511
10512 2005-09-23  Miguel de Icaza  <miguel@novell.com>
10513
10514         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
10515         part of the SIG_HANDLER_SIGNATURE.  
10516
10517 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
10518
10519         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
10520         statistics.
10521
10522         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
10523         introduced by previous patch.
10524
10525 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
10526
10527         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
10528         saved registers too.
10529
10530         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
10531         upon the information returned by get_call_info ().
10532         
10533         * mini-x86.c (add_float): Fix stack size calculation.
10534         (mono_arch_call_opcode): Rewrite this so it works based up the
10535         information returned by get_call_info ().
10536         (mono_arch_get_this_vret_args): Ditto.
10537
10538 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
10539
10540         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
10541         in cinfo to determine the registers which need to be used.
10542
10543 2005-09-20  Miguel de Icaza  <miguel@novell.com>
10544
10545         * driver.c (mono_main): Add --server and --desktop flags. 
10546
10547 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
10548
10549         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
10550         registers as global registers.
10551
10552         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
10553         longer needed with the new register allocator.
10554
10555         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
10556
10557         * cpu-ia64.md: Remove unused opcodes.
10558         
10559         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
10560         
10561 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
10562
10563         * cpu-amd64.md: Remove unused opcodes.
10564
10565         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
10566         needed with the new register allocator.
10567
10568         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
10569         reg-reg moves.
10570
10571 2005-09-16  Raja R Harinath  <rharinath@novell.com>
10572
10573         * Makefile.am (check-local): Don't invoke semdel-wrapper.
10574
10575 2005-09-16  Martin Baulig  <martin@ximian.com>
10576
10577         * exceptions-amd64.c
10578         (throw_exception): Don't call mono_debugger_throw_exception() if
10579         we're a rethrow - see the FIXME in the code.
10580
10581 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
10582
10583         * mini.c (mono_init_exceptions): This only works on some architectures.
10584         
10585 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10586
10587         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
10588         on ia64.
10589
10590         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
10591
10592         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
10593         now in mini-exceptions.c.
10594
10595 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
10596
10597         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
10598         now in mini-exceptions.c.
10599
10600 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10601
10602         * exceptions-x86.c: Applied patch from Patrik Torstensson 
10603         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
10604
10605         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
10606         code into mini-exceptions.c. Add some assertions to it.
10607
10608 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
10609
10610         * aot.c (emit_section_change): Applied patch from "The Software Team" 
10611         (<software@solmersa.com>). Fix as errors on windows.
10612
10613 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10614
10615         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
10616         method info into the LMF.
10617
10618 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10619         
10620         * mini-ia64.c: Add proper unwind info for method epilogs.
10621
10622         * exceptions-ia64.c: Add some code to help debugging.
10623         
10624         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
10625
10626         * mini-exceptions.c: Fix warning.
10627
10628 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10629
10630         * mini.c: Really fix build.
10631
10632         * mini-x86.c mini-amd64.c: Fix build.
10633
10634 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10635
10636         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
10637
10638         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
10639         some Interlocked methods as intrinsics.
10640
10641         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
10642         for Thread methods as well.
10643
10644         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
10645
10646         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
10647
10648         * mini-ia64.c mini-x86.c mini-amd64.c 
10649         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
10650         OP_MEMORY_BARRIER.
10651         
10652         * mini.c (mono_init_exceptions): Fix build breakage.
10653
10654 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
10655
10656         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
10657         of instructions. Use the new ia64_unw_op macros for emitting unwind
10658         info.
10659
10660         * mini.c (mono_init_exceptions): Initialize exception handling
10661         related trampolines at startup.
10662
10663 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
10664
10665         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
10666
10667 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
10668
10669         * mini.c: Handle type loading errors gracefully during compilation and
10670         throw the appropriate exception.
10671
10672 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
10673
10674         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
10675         for the mono binary.
10676
10677 2005-09-09  Martin Baulig  <martin@ximian.com>
10678
10679         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
10680         the release.
10681
10682 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10683
10684         * mini-arm.h: use emulation for conv.r.un for the release.
10685
10686 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10687
10688         * mini-arm.c, objects.cs: more fixes and tests for them.
10689
10690 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10691
10692         * mini-arm.c: align structures to at least 4 bytes to be able
10693         to keep our current optimized memcpy.
10694
10695 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
10696
10697         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
10698
10699 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10700
10701         * mini.c: ignore SIGPIPE.
10702
10703 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
10704
10705         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
10706
10707         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
10708
10709 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
10710
10711         * mini.h: Add prototype for mono_allocate_stack_slots_full.
10712
10713 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10714
10715         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
10716         exception handling support.
10717         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
10718         patch by Brian Koropoff <briank@marakicorp.com>).
10719
10720 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
10721
10722         * mini.c: revert another 'optimization' which breaks when
10723         items on the eval stack need to be saved at a basic block end
10724         (bug #75940).
10725
10726 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10727
10728         * jit-icalls.c: for arrays, ensure we always provide
10729         lower bounds.
10730
10731 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
10732
10733         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
10734         
10735         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
10736
10737 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
10738
10739         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
10740         arguments in their original register.
10741
10742 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
10743
10744         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
10745         memset/memcpy.
10746
10747         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
10748         when ssapre is enabled.
10749
10750         * inssel-long.brg: Fix bug in previous patch.
10751
10752         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
10753         multiplication by a constant.
10754
10755 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
10756
10757         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
10758         icc.
10759
10760         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
10761         saving registers.
10762
10763 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
10764
10765         * inssel-arm.brg: apply changes tested by Brian Koropoff
10766         <briank@marakicorp.com>.
10767
10768 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
10769
10770         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
10771         
10772 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
10773
10774         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
10775         to the same register if dreg is just a base register.
10776         (print_ins): Improve printing of membase opcodes.
10777
10778         * inssel-x86.brg: Add optimized ldind(reg) rules.
10779
10780         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
10781
10782 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
10783
10784         * mini.c: when running under valgrind, set the stack bottom for
10785         the GC at the actual approximate stack for the app (fixes running
10786         mono with valgrind).
10787
10788 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
10789
10790         * mini.c: do no break at the first valuetype to init found
10791         (fixes bug #75791).
10792
10793 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
10794
10795         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
10796
10797 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
10798
10799         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
10800
10801 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
10802
10803         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
10804
10805 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10806
10807         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10808
10809         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10810         code.
10811
10812         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10813         code.
10814
10815         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10816         methods.
10817
10818 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10819
10820         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10821
10822 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10823
10824         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10825         in the tail recursion optimization.
10826
10827         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
10828         debug info into the assembly file.
10829
10830         * iltests.il: Add test for filter regions.
10831
10832         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10833         initial stack of filter regions. Fixes #75755.
10834
10835 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10836
10837         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10838         stack requirements.
10839
10840 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10841
10842         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10843         the check for an already compiled method on non-ia64 platforms.
10844         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10845         proper domain.
10846
10847         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10848
10849         * inssel-x86.brg: Add some optimized call rules.
10850
10851 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
10852
10853         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10854         method here.
10855
10856         * mini.h mini-trampolines.c: Pass the trampoline argument to 
10857         mono_arch_patch_delegate_trampoline.
10858
10859         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10860
10861         * mini-trampolines.c: Fix build.
10862
10863         * mini-amd64.h: Add delegate trampolines.
10864
10865         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10866
10867         * inssel-amd64.brg: Add optimized call rules.
10868         
10869         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10870
10871         * inssel-ia64.brg: Add optimized ldind(reg) rules.
10872
10873 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
10874
10875         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10876         change.
10877
10878         * mini-ia64.c: Remove LMF fixmes.
10879
10880         * mini-ia64.h: Remove most fields from LMF.
10881
10882         * inssel-ia64.brg (stmt): Fix unaligned access errors.
10883
10884         * mini-trampolines.c: Add support for IA64 function descriptors.
10885
10886         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10887         for IA64 function descriptors.
10888
10889 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10890
10891         * tramp-arm.c: patch the vtable for virtual calls. Added
10892         support code to register/unregister the LMF.
10893         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10894         more LMF work.
10895
10896 2005-08-19  Dick Porter  <dick@ximian.com>
10897
10898         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10899         bit value if needed.
10900
10901 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
10902
10903         * mini.c (mini_get_method): Move handling of wrapper data here.
10904
10905         * mini.c (mono_method_to_ir): Add support for dynamic methods.
10906
10907         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10908         virtual.
10909
10910         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
10911         bblock->code does not remain empty.
10912
10913 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
10914
10915         * arrays.cs: Add regression test for #75832.
10916
10917         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10918         rules. Fixes #75832.
10919
10920         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10921         instruction scheduling.
10922
10923 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
10924
10925         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
10926
10927 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
10928
10929         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
10930
10931         * mini-codegen.c: Fix VC build.
10932
10933         * cpu-pentium.md: Increase length of atomic_exhange_i4.
10934
10935 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10936
10937         * mini.h: fix signature for mono_register_opcode_emulation.
10938
10939 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
10940
10941         * mini.c: Get rid of most of the helper_sig_... constants using
10942         mono_create_icall_signature ().
10943
10944 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
10945
10946         * jit-icalls.c (helper_ldstr): New helper function.
10947
10948         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
10949
10950         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
10951         throw, load the string using a helper call instead of creating a string object.
10952
10953         * aot.c: Update after LDSTR changes.
10954
10955         * mini.h: Bump AOT file version.
10956         
10957         * aot.c: Save class size info into the AOT file. Print more statistics during
10958         compilation.
10959
10960         * mini.h: Bump AOT file version.
10961
10962         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
10963         ordering of disasm cases. Fixes #74957.
10964
10965 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
10966
10967         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
10968         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
10969         the generic code needed for the ARM port.
10970
10971 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
10972
10973         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
10974         inssel-arm.brg: more ARM features and fixes.
10975
10976 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
10977
10978         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
10979         ARM port work in progress.
10980
10981 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
10982
10983         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
10984
10985         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
10986
10987         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
10988
10989         * inssel.brg (mini_emit_memset): Add support for unaligned access.
10990
10991         * *-ia64.*: Ongoing IA64 work.
10992         
10993         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
10994
10995 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
10996
10997         * TODO: Remove out-of-data todo stuff.
10998
10999         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
11000         dead code.
11001
11002         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
11003
11004         * mini.h: Bump corlib version.
11005
11006 2005-07-27  Martin Baulig  <martin@ximian.com>
11007
11008         * mini-codegen.c
11009         (create_copy_ins): Added `const unsigned char *ip' argument; set
11010         `copy->cil_code' from it.
11011
11012 2005-07-27  Martin Baulig  <martin@ximian.com>
11013
11014         * mini-exceptions.c (mono_handle_exception): Don't call
11015         mono_debugger_handle_exception() for filters.
11016
11017 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
11018
11019         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
11020         as well.
11021
11022 2005-07-26  Martin Baulig  <martin@ximian.com>
11023
11024         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
11025
11026         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
11027         helper_compile_generic_method() if the method is actually virtual
11028         and non-final.
11029
11030 2005-07-26  Martin Baulig  <martin@ximian.com>
11031
11032         * mini.c
11033         (trampoline_code): Renamed to `mono_trampoline_code' and made it
11034         public; this is now accessed directly by the debugger.
11035         (mono_generic_trampoline_code): Removed.
11036
11037         * debug-mini.c
11038         (mono_debug_init_method): Also add interncalls and wrappers.
11039
11040 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
11041
11042         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
11043
11044 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
11045
11046         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
11047
11048 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
11049
11050         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
11051
11052 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
11053
11054         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
11055         getting TLS offsets on AMD64 too.
11056
11057 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
11058
11059         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
11060
11061 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
11062
11063         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
11064         inssel-arm.brg, mini-arm.h: ARM port work in progress.
11065
11066 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
11067
11068         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
11069
11070         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
11071         to mini.c.
11072
11073         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
11074         mono_sparc_is_virtual_call ().
11075         
11076         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
11077
11078         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
11079         trampoline parameters.
11080
11081         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
11082         
11083         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
11084         to mono_arch_get_vcall_slot_addr.
11085
11086         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
11087         trampoline code.
11088
11089         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
11090
11091 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
11092
11093         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
11094
11095 2005-07-19  Martin Baulig  <martin@ximian.com>
11096
11097         * exceptions-amd64.c (throw_exception): Call
11098         mono_debugger_throw_exception() here like we're doing it on i386.
11099
11100 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
11101
11102         * mini-ia64.c: Add optimized TLS access support.
11103
11104 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
11105
11106         * mini-exceptions.c: Ongoing IA64 work.
11107
11108         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
11109
11110         * mini.c: Use the default optimization set when embedding. Fixes
11111         #75194.
11112
11113 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
11114
11115         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
11116         of trampolines to a separate file.
11117
11118         * mini-trampolines.c: New file.
11119
11120         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
11121         separate file.
11122         
11123         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
11124         amd64/ia64 code.
11125
11126         * mini-codegen.c: Fix cygwin build.
11127
11128 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
11129
11130         * mini.c: Add some minor changes needed by the IA64 port.
11131
11132         * *-ia64.*: Ongoing IA64 work.
11133
11134 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
11135
11136         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
11137         trampolines into arch-independent and arch-dependent parts.
11138
11139         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
11140
11141 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
11142
11143         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
11144
11145         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
11146         the xp-regalloc-branch for amd64.
11147
11148         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
11149         xp-regalloc-branch for x86.
11150
11151 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
11152
11153         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
11154
11155 2005-07-06  Martin Baulig  <martin@ximian.com>
11156
11157         * mini.c
11158         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
11159         (mono_jit_runtime_invoke): Likewise.
11160
11161 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
11162
11163         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
11164         on x86 too.
11165         
11166         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
11167         without loading their metadata. Reorganize the file format so exception handling+
11168         debug info is kept separate from normal method info. Create MonoJitInfo 
11169         structures for methods lazily.
11170
11171         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
11172         loading metadata.
11173         (x86_class_init_trampoline): Patch AOT class init trampolines too.
11174
11175         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
11176
11177         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
11178         in AOT code.
11179
11180         * mini.h: Bump AOT file version.
11181
11182 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
11183
11184         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
11185
11186 2005-07-01  Raja R Harinath  <rharinath@novell.com>
11187
11188         * Makefile.am (check-local): Call semdel-wrapper.
11189
11190 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
11191
11192         * mini-x86.c: Revert the last change as it seems to break the build..
11193
11194 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
11195
11196         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
11197         
11198         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
11199
11200 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
11201
11202         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
11203         outside of the macro, so strange stuff doesn't happen with gcc4
11204         (NEW_AOTCONST_TOKEN): Likewise.
11205
11206 2005-06-28  Martin Baulig  <martin@ximian.com>
11207
11208         * mini.c (mini_class_is_system_array): New static method; use this
11209         instead of `klass->parent == mono_defaults.array_class' everywhere
11210         since this also works for the new generic array class.
11211
11212 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
11213
11214         * inssel.brg: Remove warnings.
11215
11216 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
11217
11218         * mini-ia64.c: Ongoing IA64 work.
11219
11220         * basic-float.cs: Add float->i1 conversion test.
11221
11222         * iltests.il: Add conv.u4 test.
11223
11224 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
11225
11226         * inssel-long.brg: Fix bug caused by last change.
11227
11228 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
11229
11230         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
11231         BSDs.  Allows the x86 JIT to work on OSX86
11232
11233 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
11234
11235         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
11236         u4->i8 conversion.
11237
11238         * mini-ia64.c: Ongoing IA64 work.
11239
11240 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
11241
11242         * mini-ia64.c: Ongoing IA64 work.
11243
11244         * driver.c: Clean up jit_code_hash as well when using --regression.
11245
11246         * inssel-long.brg: Fix long->i4/u4 conversion rules.
11247
11248         * basic-long.cs: Add tests for long->u4 conversion.
11249
11250 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
11251
11252         * mini.c: Take mono_get_domainvar out of macros. This makes sure
11253         that we do not depend on undefined C behavior: the order stuff
11254         gets evaluated within an expression. Fixes mono when compiled on
11255         GCC 4.
11256
11257 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
11258
11259         * *-ia64.*: Ongoing IA64 work.
11260
11261         * aot.c: Lower memory usage while loading AOT methods.
11262
11263         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
11264
11265         * mini.h: Bump AOT file format version.
11266
11267 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
11268
11269         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
11270
11271 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
11272
11273         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
11274         not on callee assembly). Fixed some comments.
11275
11276 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
11277
11278         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
11279         it gets proper disassembly.
11280         (emit_method_info): Remove some dead code.
11281
11282         * mini.c (mini_method_compile): Allways allocate the GOT var in
11283         mono_method_to_ir for emulating opcodes.
11284
11285 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
11286
11287         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
11288         before freeing the code memory. Fixes #74990.
11289
11290         * objects.cs: Add regression test for #74992.
11291
11292         * liveness.c: Extend live ranges of arguments to the beginning of the
11293         method. Fixes #74992.
11294
11295         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
11296         so it points into the faulting instruction.
11297
11298 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
11299
11300         * jit-icalls.c (mono_imul_ovf): Add exception handling.
11301
11302         * *-ia64.*: Ongoing IA64 work.
11303
11304         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
11305
11306 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
11307
11308         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
11309
11310         * *-ia64.*: Ongoing IA64 work.
11311
11312 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
11313
11314         * basic-long.cs: Add tests for add/sub.ovf.
11315
11316         * basic.cs: Add tests for sub.ovf.
11317
11318         * *-ia64.*: Ongoing IA64 work.
11319
11320 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
11321
11322         * *-ia64.*: Ongoing IA64 work.
11323
11324         * basic.cs: Add conv.ovf.i4.un test.
11325
11326 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
11327
11328         * mini.c: (remove_block_if_useless) Fixed bug 75061.
11329         
11330 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11331
11332         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
11333
11334 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
11335
11336         * *-ia64.*: Ongoing IA64 work.
11337
11338 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11339
11340         * trace.[ch]:
11341         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
11342
11343 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
11344
11345         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
11346
11347 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
11348
11349         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
11350
11351         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
11352         of a call is callable by a near call.
11353
11354 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
11355
11356         * mini-ia64.c: Ongoing IA64 work.
11357
11358 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
11359
11360         * genmdesc.c: Make the generated array non-static.
11361
11362         * inssel-long.brg: Fix LSHR_IMM rule.
11363
11364         * *-ia64.*: Ongoing IA64 work.
11365
11366         * *-ia64.*: Ongoing IA64 work.
11367
11368 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11369
11370         * *-ia64.*: Ongoing IA64 work.
11371
11372         * *-ia64.*: Ongoing IA64 work.
11373         
11374         * mini-ia64.c: Ongoing IA64 work.
11375
11376         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
11377
11378 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11379
11380         * objects.cs basic-calls.cs: Move some tests to objects.cs.
11381         
11382         * objects.cs basic-long.cs: Move some tests to objects.cs.
11383
11384 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
11385
11386         * *-ia64.*: Ongoing IA64 work.
11387
11388         * iltests.il: Add a new test.
11389
11390         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
11391         newobj. Fixes #75042.
11392
11393 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
11394
11395         * *-ia64.*: Ongoing IA64 work.
11396         
11397         * *-ia64.*: Ongoing IA64 work.
11398         
11399         * *-ia64.*: Ongoing IA64 work.
11400
11401         * basic.cs objects.cs: Move tests accessing static variables as well.
11402
11403         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
11404
11405 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
11406
11407         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
11408
11409         * driver.c: Always print failed tests.
11410
11411         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
11412         frame pointer.
11413
11414         * *ia64*: Ongoing IA64 work.
11415
11416 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
11417
11418         * basic.cs: Add tests for add.ovf. Fix warnings.
11419
11420 2005-05-18  Miguel de Icaza  <miguel@novell.com>
11421
11422         * driver.c (mono_main): Avoid crash if no argument is passed to
11423         --break;  Do not use g_error, but f_printf.   And fix all other
11424         ocurrences of the same crash.
11425
11426 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
11427
11428         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
11429         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
11430         Fixes #74742.
11431
11432 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
11433
11434         * *-ia64.*: Add beginnings of IA64 backend.
11435
11436         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
11437
11438 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
11439
11440         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
11441         Fixes #74925.
11442
11443         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
11444
11445         * mini-amd64.c: Fix a warning.
11446
11447 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
11448
11449         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
11450         in float_neg. Fixes #74897.
11451
11452         * mini-amd64.c (emit_call): Fix another near call bug.
11453
11454 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
11455
11456         * declsec.c: Keep the appdomain information in the structure. Added a 
11457         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
11458         value gets overwritten).
11459         * declsec.h: Set the default MonoArray for the the stack to 6. Added
11460         an MonoAppDomain member to MonoSecurityFrame.
11461         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
11462         used in the stack walk. Now use a MonoArray which grow (double) when
11463         it gets full.
11464
11465 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
11466
11467         * mini.c: Re-enabled runtime cleanup, since running threads should
11468         now properly stop when exiting.
11469
11470 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
11471
11472         * mini-codegen.c: New file contaning the arch-independent local
11473         register allocator. Not used by any architectures yet.
11474
11475         * mini.h linear-scan.c: Merge some changes from the 
11476         mini-xp-local-regalloc branch.
11477
11478 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
11479
11480         * mini-amd64.c (emit_call): Fix calls to native functions when the
11481         runtime is compiled as a shared library. Fixes #74756.
11482
11483         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
11484         on a literal field. Fixes #74751.
11485
11486 2005-04-25  Raja R Harinath  <rharinath@novell.com>
11487
11488         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
11489
11490 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
11491
11492         * objects.cs: Add missing null casting test.
11493
11494 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
11495
11496         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
11497         in wrapper methods. Also rename 'address' variable to 'offset'.
11498
11499 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
11500
11501         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
11502         warnings.
11503         
11504         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
11505
11506         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
11507         work on windows.
11508
11509 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11510
11511         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
11512
11513 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11514
11515         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
11516         just the last bytes.
11517
11518 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11519
11520         * aot.c (mono_compile_assembly): Fix warning.
11521
11522         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
11523         by the _MSC_VER stuff.
11524
11525 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
11526
11527         * inssel-long.brg: Fix #74588.
11528
11529         * cpu-amd64.md: Fix #74591.
11530
11531         * iltests.il: Add new regression tests.
11532
11533 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
11534
11535         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
11536         valuetype.
11537
11538 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
11539
11540         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
11541
11542         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
11543         from Bill Middleton <flashdict@gmail.com>.
11544
11545 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
11546
11547         * arrays.cs: Add new regression test. Fix warnings.
11548
11549 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
11550
11551         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
11552         and leakage in CKFINITE.
11553
11554         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
11555         this to a null op since it is called on amd64 too.
11556
11557         * exceptions-amd64.c (get_throw_trampoline): Align stack.
11558
11559         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
11560         body since this is not used on amd64.
11561         
11562         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
11563
11564         * mini-amd64.c: Remove obsolete fixmes.
11565
11566         * mini.c (print_method_from_ip): Fix debugging support.
11567
11568 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11569
11570         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
11571         so that expressions that don't give much gain are not reduced.
11572         * ssapre.h: Likewise.
11573
11574 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
11575
11576         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
11577
11578         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
11579
11580         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
11581
11582 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
11583
11584         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
11585
11586         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
11587
11588 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
11589
11590         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
11591         stack touching.
11592
11593         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
11594
11595         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
11596
11597         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
11598
11599         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
11600         MONO_ARCH_USE_SIGACTION. Fixes #74252.
11601
11602         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
11603
11604         * mini-x86.c: Fix up stack overflow handling.   
11605
11606         * exceptions.cs: Add new regression test.
11607
11608 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
11609
11610         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
11611         mono_jit_thread_attach.
11612
11613         * mini.c (mono_method_to_ir): Verify called method is not abstract.
11614
11615 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11616
11617         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
11618         avoid calling constructors using callvirt.
11619
11620         * inssel.brg: Fix #74073.
11621
11622 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
11623
11624         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
11625         compilation with non-GCC compilers.
11626         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
11627         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
11628
11629 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
11630
11631         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
11632         klass->interface_offsets (will likely fix bug#74073).
11633
11634 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11635
11636         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
11637
11638 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
11639
11640         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
11641         to amd64_div_reg_size ().
11642         
11643         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
11644
11645 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
11646
11647         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
11648
11649 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11650
11651         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
11652
11653 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11654
11655         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
11656         
11657         * mini.c (mono_precompile_assembly): Load and precompile referenced
11658         assemblies as well. Fixes #74015.
11659
11660 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
11661
11662         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
11663
11664 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
11665
11666         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
11667         a lot of checks and (anyway) permissions cannot work until corlib is 
11668         loaded.
11669
11670 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
11671
11672         * mini-ppc.c: fixed ABI issue on sysv/ppc.
11673
11674 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
11675
11676         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
11677         calls (fixes bug#72824).
11678
11679 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11680
11681         * mini.c: fix tail recursion elimination (see test in bug#73936).
11682
11683 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
11684
11685         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
11686         some fp functions in sse2 mode.
11687
11688 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
11689
11690         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
11691
11692 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
11693
11694         * mini.h mini.c: Add mono_get_jit_tls_key ().
11695
11696         * mini-x86.c: Enable fast TLS support on windows.
11697
11698 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
11699
11700         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
11701         * mini.c: Check for p/invoke method when generating code. If a
11702         p/invoke method, or it's class, isn't decorated with [Suppress
11703         UnmanagedCodeSecurity] then generate code to call System.Security.
11704         UnmanagedDemand (only if the security manager is active).
11705
11706 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11707
11708         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
11709         last change as it seems to cause strange crashes.
11710         
11711 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11712
11713         * *.c: handle unsafe function pointers where needed.
11714
11715 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11716
11717         * mini.c (mono_jit_free_method): Remove the fixme too.
11718
11719 2005-03-15  Miguel de Icaza  <miguel@novell.com>
11720
11721         * mini.c: As discussed, make the code actually free the delegate
11722         thunk now, to enable the debugging of delegate problems, use
11723         MONO_DEBUG=1 when running Mono. 
11724
11725         This takes also care of parts of the leaks as seen by Joe.
11726
11727 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
11728
11729         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
11730         thread_tls_offset calculation.
11731
11732 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
11733
11734         * declsec.c: Reworked linkdemand checks for icall. The previous code
11735         was using the declaration code (untrusted) and didn't work as expected
11736         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
11737         specific case.
11738
11739 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
11740
11741         * iltests.il: Add new localloc test.
11742
11743         * mini-amd64.c: Handle large stack allocations the same way as on
11744         windows if stack overflow handling is working.
11745         
11746         * mini-amd64.c: Allocate the signal stack using mmap.
11747
11748         * mini.c (sigsegv_signal_handler): Fix reading of context.
11749
11750         * mini-exceptions.c: Fix up stack overflow handling.
11751
11752         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
11753
11754         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
11755
11756         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
11757
11758         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
11759
11760         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
11761         tramp_init functions as they are no longer needed.
11762
11763 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
11764
11765         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
11766         
11767         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
11768
11769         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
11770         
11771         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
11772         support that now.
11773
11774         * mini-ops.h: Add OP_LMUL_IMM.
11775
11776         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
11777         long mul/div opcodes as intrinsic.
11778
11779         * mini-amd64.c (emit_call): Handle the case when the callee might be
11780         an AOT method.
11781
11782 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
11783
11784         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
11785         extra safe.
11786         
11787         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
11788
11789         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
11790
11791 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
11792
11793         * mini.c (mono_codegen): Don't leak here, to help people running
11794         monogrind.
11795
11796 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
11797
11798         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
11799         conversions in sse2 mode.
11800
11801         * basic-float.cs: Add regression test.
11802         
11803         * mini-amd64.c: Reenable sse2.
11804
11805 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11806
11807         * mini-amd64.c: Disable sse2 until some regressions are fixed.
11808
11809 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
11810
11811         * driver.c: Copyright text should include 2005.
11812         
11813 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11814
11815         * cpu-amd64.md (load_membase): Fix more max lengths.
11816
11817 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
11818
11819         * cpu-amd64.md (load_membase): Fix max length.
11820
11821         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11822
11823         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11824
11825         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11826         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11827
11828         * basic-float.cs: Add rounding regression test.
11829
11830         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11831
11832 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
11833
11834         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11835         structures in registers for pinvoke wrappers.
11836
11837 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
11838
11839         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11840
11841 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
11842
11843         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11844         wrapper to mono_jit_thread_attach.
11845
11846         * mini.c (mini_jit_thread_attach): New jit icall.
11847
11848         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
11849         native->managed wrappers.
11850
11851         * exceptions.cs: Add new regression test.
11852
11853         * mini.c (optimize_branches): Check regions in the cbranch to throw
11854         block case as well. Fixes #73242.
11855
11856 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11857
11858         * mini.c: thread safety fixes.
11859
11860 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
11861
11862         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11863         patching stuff, since delegates use jump trampolines so there is
11864         no caller.
11865
11866         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
11867         jump trampolines.
11868         
11869         * tramp-amd64.c: Fix build.
11870
11871         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11872         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11873
11874         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11875         Rename this to mono_arch....
11876         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11877
11878         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11879
11880         * mini-amd64.c (emit_call): If both the caller and the callee is
11881         guaranteed to have 32 bit addresses, emit a normal call.
11882
11883         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11884
11885         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
11886         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11887         method_ptr inside delegates.
11888
11889 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
11890
11891         * mini.c (mono_jit_free_method): Free the method info even if the native code is
11892         invalidated. Fixes #73001.
11893
11894         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11895
11896         * mini-x86.c: Only use stdcall for pinvokes on windows.
11897
11898 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11899
11900         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11901         * mini-x86.c: remove unreliable __thread var offset detection,
11902         use the correct accessors and enable by default.
11903
11904 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
11905
11906         * mini.c (mono_jit_free_method): Fix memory leak.
11907
11908 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
11909
11910         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
11911
11912 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
11913
11914         * cpu-amd64.md: Fix lengths of atomic opcodes.
11915
11916 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11917
11918         * driver.c: try to not imply using ICU is any good.
11919
11920 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
11921
11922         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
11923         functions as inline ops.
11924
11925         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11926         some Interlocked functions as inline ops.
11927
11928         * mini.c (move_basic_block_to_end): Fix bug in last patch.
11929
11930         * mini.h (MonoBasicBlock): Reorganize fields a bit.
11931
11932         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
11933
11934         * mini.c: Add support for OP_NOT_TAKEN.
11935
11936         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
11937         structures in registers for pinvoke wrappers.
11938
11939         * mini-amd64.c: Fix warnings.
11940
11941 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
11942
11943         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
11944
11945         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
11946
11947         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
11948         address instead of loading the address from it.
11949
11950         * mini-x86.c: Add support for returning small structs in registers
11951         on Win32. Fixes part of #70864.
11952         
11953 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
11954
11955         * trace.c (get_token): Improve error checking.
11956
11957 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
11958
11959         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
11960
11961 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
11962  
11963         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
11964         it can be reused for MonoClass.
11965         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
11966         _LINKDEMAND.
11967
11968 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
11969
11970         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
11971         instead of a MonoReflectionMethod. The method information wasn't used
11972         when displaying SecurityException details (but will be now).
11973
11974 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
11975
11976         * Makefile.am : windows build fix.
11977
11978 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
11979
11980         * iltests.il: Add new regression test.
11981
11982         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
11983         #72522.
11984
11985 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
11986  
11987         * mini.c: Moved linkdemand check into helper function check_linkdemand
11988         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
11989         LDFTN, LDVIRTFTN).
11990
11991 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
11992
11993         * declsec.c: Added statistics counter for different kinds of 
11994         LinkDemands.
11995         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
11996         (and commented) declaration.
11997         * mini.c: Added statistics counter for security Demand code 
11998         generation. Added display of security statistics.
11999
12000 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
12001
12002         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
12003         Fix compilation errors under gcc-2.95.
12004
12005 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
12006
12007         * mini.c, driver.c: Use the new jit trampoline hashtable
12008
12009 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12010
12011         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
12012
12013 2005-02-11  Martin Baulig  <martin@ximian.com>
12014
12015         * debug-mini.c (mono_debug_close_method): Free the line number array.
12016
12017 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
12018
12019         * aot.c: Break up large methods into smaller ones. Share GOT slots for
12020         icalls.
12021
12022         * mini.h: Bump AOT file format version. 
12023
12024 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
12025
12026         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
12027         APTC and P/Invoke.
12028         * declsec.h: Added macros to get/set lazyly initialized security 
12029         informations about assemblies. Added new enum for different type of
12030         possible LinkDemand violation. Added function to check LinkDemands.
12031         * mini.h: Added a field to MonoCompile to hold any security violation
12032         detected when JITting a method (so it can be thrown later).
12033         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
12034         and CEE_CALLVIRT. Added code to throw exception at the end of
12035         mini_method_compile (note: the exception is unhandled right now).
12036
12037 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
12038
12039         * mini.c, jit-icalls.c: use the managed implementation of
12040         memset for initobj and memset, to avoid managed <-> unmanaged
12041         transitions.
12042
12043 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
12044
12045         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
12046         optimization if it would need a GOT var.
12047
12048         * basic.cs: Add tests for constant propagation and switch statements.
12049
12050         * ssa.c: Fix out-of-range constant propagation and switch statements.
12051
12052 2005-02-09    <vargaz@freemail.hu>
12053
12054         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
12055
12056 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
12057
12058         * cpu-amd64.md (load_membase): Fix max length of load_membase.
12059
12060 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12061
12062         * mini.c: update to new signature of mono_class_get_allocation_ftn().
12063
12064 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
12065
12066         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
12067         arithmetic operations.
12068
12069 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
12070
12071         * mini-ppc.c: add a workaround for broken user code that
12072         DllImports vararg functions with non-vararg signatures.
12073
12074 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
12075
12076         * mini.c (mono_jit_compile_method_inner): Add detection and a 
12077         meaningfull error message for assemblies written in Managed C++.
12078
12079         * tramp-amd64.c mini-amd64.h: Add support for 
12080         create_trampoline_from_token ().
12081
12082         * aot.c mini-x86.c abcremoval.c: Applied patch from
12083         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
12084
12085 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
12086
12087         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
12088         which takes a MonoImage/token as parameter instead of a MonoMethod.
12089
12090         * aot.c: Use the new trampoline for initializing vtables.
12091
12092         * aot.c: Add support for ldfld/stfld_remote wrappers.
12093
12094         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
12095         rules for compare <MEM>, IMM.
12096
12097         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
12098
12099         * aot.c: Handle inherited finalizers correctly.
12100
12101 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
12102
12103         * inssel.brg (stmt): Add a missing _setup_... ().
12104
12105         * aot.c: Save some parts of the class state to the AOT file and use it
12106         to recompute that state when a class is initialized.
12107
12108         * mini.c: Install AOT hooks into the runtime.
12109
12110         * mini.h: Bump AOT file format version.
12111         
12112         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
12113         Fixes #72148.
12114
12115         * iltests.il: Add new test.
12116
12117 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12118
12119         * mini.c: fix typo.
12120
12121 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
12122
12123         * mini.c: setup the statistical profiler in the thread attach
12124         callback to cope with the new single thread code.
12125
12126 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
12127
12128         * mini-ppc.c: ensure we have enough room for the profiler
12129         calls (fixed bug#72084).
12130
12131 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
12132
12133         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
12134         it.
12135
12136 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12137
12138         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
12139
12140 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12141
12142         * ssapre.c: Fixed an issue with down safety (this allows IronPython
12143         to succesfully execute parrotbench).
12144         * ssapre.h: Likewise.
12145
12146 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12147
12148         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
12149         variable for stores to method arguments (fixes a SSAPRE issue).
12150
12151 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12152
12153         * mini.c: handle value types in dup, fixes gen-112.cs.
12154
12155 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
12156
12157         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
12158         sequence for calls in dynamic methods to avoid thunks.
12159
12160 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
12161
12162         * mini.c: correctly remove dynamic methods from the hashtable.
12163
12164 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12165
12166         * driver.c: Disabled SSAPRE until fix the bug that appears
12167         in IronPython's parrotbench.
12168
12169 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
12170
12171         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
12172
12173         * mini.c (mono_method_to_ir): Revert the previous change.
12174         
12175         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
12176         when AOT compiling.
12177
12178         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
12179         mono_jit_info_table_find () etc. when running under valgrind.
12180
12181         * inssel.brg: Fix warnings.
12182
12183         * mini-exceptions.c: Fix warnings.
12184
12185 2005-01-31  Martin Baulig  <martin@ximian.com>
12186
12187         * driver.c (compile_all_methods_thread_main): Don't try to compile
12188         generic methods or anything which has type parameters.
12189
12190 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
12191
12192         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
12193
12194         * TestDriver.cs: Add --verbose flags.
12195
12196         * graph.c ssa.c: Fix 64 bit warnings.
12197         
12198         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
12199         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
12200         Fix 64 bit warnings.
12201
12202         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
12203         variable not spotted by gcc.
12204         
12205         * mini-amd64.c inssel-amd64.brg: Applied patch from  
12206         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
12207         X86_COMPARE_MEMBASE opcodes.
12208
12209         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
12210
12211 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
12212
12213         * *: MonoMethod->signature might be NULL now. You *MUST* use
12214         mono_method_signature.
12215
12216 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
12217
12218         * driver.c (compile_all_methods_thread_main): Compile the methods
12219         without invoking cctors.
12220
12221 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12222
12223         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
12224         * basic-calls.cs: test for the above.
12225
12226 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
12227
12228         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
12229         MonoJitInfo changes.
12230
12231 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
12232
12233         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
12234         eagerly if it contains dynamic methods.
12235         
12236         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
12237
12238         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
12239         trace, it is now computed by an icall from trace_ips.
12240         
12241         * mini-exceptions.c: Fix a warning.
12242
12243 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
12244
12245         * mini-exceptions.c: don't bother getting stack trace info if
12246         it's not going to be used.
12247
12248 2005-01-27  Raja R Harinath  <rharinath@novell.com>
12249
12250         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
12251         ssapre-mini-ops.h.
12252
12253 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
12254
12255         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
12256
12257         * aot.c: Avoid calling mono_method_get_header () if not needed.
12258
12259         * mini.h: Bump AOT file format version.
12260         
12261         * mini.c (mono_emit_native_call): Allocate a GOT var here.
12262
12263         * mini.c (mono_print_tree): Print more info for calls.
12264
12265 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
12266
12267         * declsec.h: Remove warning by adding missing include for marshal.h
12268
12269 2005-01-26  Martin Baulig  <martin@ximian.com>
12270
12271         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
12272         `ip' twice.
12273
12274 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
12275
12276         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
12277         flags.
12278
12279         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
12280
12281         * aot.c (mono_compile_assembly): Fix a warning.
12282
12283 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
12284
12285         * declsec.c: Look for security attributes on the original MonoMethod 
12286         (and not the wrapped one). This fix permissions on icalls.
12287
12288 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12289
12290         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12291
12292         * mini.c (mono_allocate_stack_slots): Add a fixme.
12293
12294         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12295
12296 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12297
12298         * inssel.brg: optimize casts of sealed types (more
12299         optimizations waiting for fixes in remoting).
12300
12301 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12302
12303         * inssel.brg (stmt): Add another dummy rule.
12304
12305         * driver.c: Fix warnings.
12306
12307         * driver.c (mono_main): If running under valgrind, instruct glib to use
12308         the system allocation functions so valgrind can track the memory
12309         allocated by the g_... functions.
12310
12311         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
12312
12313         * mini-ops.h: Add OP_DUMMY_STORE opcode.
12314
12315         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
12316
12317         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
12318         variables in try regions.
12319
12320         * mini.c (mini_method_compile): Don't disable optimizations on large
12321         methods when AOT compiling.
12322
12323         * mini.c (mono_allocate_stack_slots): New arch independent method to 
12324         allocate stack slots. Not yet used.
12325
12326 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
12327
12328         * debug-mini.c (mono_debug_close_method): Plug some leaks.
12329
12330 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
12331
12332         * mini-ppc.c: make the branch info relative as the code
12333         buffer can be reallocated.
12334
12335 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
12336
12337         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
12338         * driver.c: Removed the AOT/security restriction. Now initialize the
12339         security manager (in metadata) if --security is used.
12340         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
12341         rather than the pointer to declarative security, when AOT is used.
12342
12343 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
12344
12345         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
12346         basic blocks, reduced intrinsic exception throwing code size.
12347
12348 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
12349
12350         * driver.c (mini_usage): Reorder the usage screen.
12351
12352 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
12353
12354         * mini.c (mono_resolve_patch_target): Fix warning.
12355
12356 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
12357
12358         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
12359         previous patch.
12360
12361         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12362
12363         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
12364         breaks the amd64 build.
12365
12366         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
12367         register allocation. Fixes #71454.
12368
12369         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12370
12371         * arrays.cs: Add new regression test.   
12372
12373 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12374
12375         * ssapre.c: Turned usage of snprintf to GString.
12376         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
12377         (I left it on by mistake in my previous commit).
12378
12379 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
12380
12381         * mini.c, cfold.c, basic-calls.cs: preserve side effects
12382         on cond branch optimization (fixes bug# 71515).
12383
12384 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12385
12386         * abcremoval.c: Fixed bug 71062.
12387         * abcremoval.h: Likewise.
12388
12389 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12390
12391         * mini.c: Added a new functionality to optimize_branches, the removal
12392         of useless basic blocks, and fixed some problem in the removal of
12393         critical edges; some utility functions added for both purposes.
12394         * ssapre.c: Added complex expression support, and fixed bug 70637.
12395         * ssapre.h: Likewise.
12396         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
12397         enabled in SSAPRE.
12398         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
12399         * driver.c: Re-enabled SSAPRE.
12400
12401 2005-01-19  Martin Baulig  <martin@ximian.com>
12402
12403         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
12404         the result of mono_get_method_constrained().
12405
12406 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
12407
12408         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
12409         manager.
12410
12411 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
12412
12413         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
12414         be detected.  Fixes #59296.
12415
12416 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12417
12418         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
12419         which can happen. Fixes #71361.
12420
12421 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12422
12423         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
12424         manager.
12425
12426 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12427
12428         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
12429         appdomain-unload.exe to fail.
12430         
12431         * mini.c: Fix some memory leaks.
12432
12433 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
12434
12435         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
12436         Fixed bug and sped up some codepaths.
12437
12438 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12439
12440         * mini.c: Fix some memory leaks.
12441
12442         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
12443         conversion.
12444
12445         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
12446
12447         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
12448         #71320.
12449
12450         * iltests.il: Add regression test for #71320.
12451
12452 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
12453
12454         * mini.c (mono_codegen): Fix installation of profiler hooks.
12455
12456         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
12457
12458 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12459
12460         * mini.h, mini.c, cfold.c: optimize access to enum
12461         readonly fields, too. Eval conditional branches if possible
12462         to perform unreachable code removal in more cases.
12463
12464 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
12465
12466         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
12467
12468         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
12469         code manager.
12470
12471         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
12472         WinXP DEP. Fixes #71244.
12473
12474 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
12475
12476         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
12477
12478 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
12479
12480         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
12481
12482 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
12483
12484         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
12485         changes.
12486
12487         * mini.h: Bump AOT version.
12488
12489         * mini.h (MonoCompile): Change exvar to a hash table.
12490
12491         * mini.c: Allocate a separate exvar for each handler block.
12492
12493         * mini.c: Get rid of the computation of filter_lengths, its not needed.
12494
12495         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
12496         ex var with the pending exception and only throw if the two are equal.
12497         Fixes #68552.
12498         
12499         * exceptions.cs: Add tests for rethrow and nested catch clauses.
12500
12501         * mini-x86.c: Fix warnings.
12502
12503         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
12504         used by all the ports now.
12505
12506         * aot.c: Add write-symbols and save-temps options.
12507
12508 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12509
12510         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
12511
12512 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
12513
12514         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
12515         operations.
12516
12517         * tramp-s390.c: Check vtable slot belongs to the domain.
12518
12519         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
12520         as per other platforms.
12521
12522         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
12523
12524 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
12525
12526         * driver.c: we don't run the Main() code in a subthread anymore.
12527
12528 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
12529
12530         * mini.c: added experimental rtc support in the statistical
12531         profiler: if the user has the permission, more accurate statistics
12532         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
12533         The MONO_RTC value must be restricted to what the linux rtc allows:
12534         power of two from 64 to 8192 Hz.
12535
12536 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12537
12538         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
12539
12540 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
12541
12542         * mini-ppc.c: better icache flush for smp.
12543
12544 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
12545
12546         * mini-amd64.c (emit_move_return_value): Fix memory leak.
12547
12548         * mini-x86.c (get_call_info): Add the get_call_info () code from the
12549         amd64 port, not yet used.
12550
12551 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12552
12553         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
12554         a struct type.
12555
12556 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
12557
12558         * driver.c: Added --security option to activate the security manager.
12559         Right now this will allow code generation for declarative demands and
12560         is disabled when AOT is specified.
12561         * mini.c: Add code generation for declarative security demands.
12562         * mini.h: Add mono_use_security_manager as an extern gboolean.
12563
12564 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12565
12566         * aot.c (mono_compile_assembly): Speed up compilation a bit by
12567         emitting more dense assembly code.
12568
12569         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
12570         exception throwing stuff.
12571
12572 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
12573
12574         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
12575         dead code.
12576
12577         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
12578         left in by mistake.
12579
12580         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
12581         fixed.
12582
12583         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
12584
12585         * tramp-*.c: Only patch vtable slots if the object is in the current
12586         domain. Fixes appdomain-unload.exe.
12587
12588         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
12589         
12590         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
12591         x86 branch.
12592
12593 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12594
12595         * mini.c (reverse_branch_op): New helper function.
12596
12597         * mini.c (optimize_branches): Run the new optimization only on 
12598         platforms which support it. Also reverse all kinds of branches.
12599
12600         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
12601
12602         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
12603         a throw statement.
12604
12605         * mini.c (optimize_branches): Reverse not-equals branches if the false
12606         bblock is a throw. This happens a lot of time with argument checking in
12607         corlib.
12608
12609         * mini.c (mono_codegen): Add support for placing basic blocks after
12610         the function epilogue.
12611
12612         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
12613         function epilogue.
12614         
12615 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
12616
12617         * mini.c (setup_stat_profiler): Only set this up if the platform
12618         supports ITIMER_PROF.
12619
12620 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12621
12622         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
12623         previous patch.
12624
12625         * inssel.brg: Fix a warning.
12626
12627 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
12628
12629         * mini.c: added support for statistical profiler 
12630         (run with: --profile=default:stat).
12631
12632 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
12633
12634         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
12635
12636         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
12637
12638         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
12639         related to global registers from the amd64 port.
12640
12641 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
12642
12643         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
12644
12645         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
12646         with global registers.
12647         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
12648
12649         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
12650
12651 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
12652
12653         * debug-mini.c (encode_value): Fix off-by-one.
12654
12655         * aot.c (encode_value): Likewise.
12656
12657         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
12658
12659 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
12660
12661         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
12662         AOT.
12663
12664         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
12665         
12666         * aot.c (emit_method_info): Increase size of temp buffer.
12667
12668         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
12669         the AOT case.
12670
12671 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
12672
12673         * aot.c (emit_method_info): Fix build.
12674         
12675         * aot.c: Further rework of the AOT file format to reduce the size of
12676         the method info data.
12677
12678         * mini.h: Bump AOT file format version.
12679
12680 2004-12-27  Martin Baulig  <martin@ximian.com>
12681
12682         * mini.c (mini_get_method): New static method; call
12683         mono_get_method_full() and mono_get_inflated_method().
12684         (mono_method_to_ir): Use mini_get_method() instead of
12685         mono_get_method_full(). 
12686
12687 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
12688
12689         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
12690
12691 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
12692
12693         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
12694
12695         * inssel-amd64.brg: Add some optimization rules.
12696
12697 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
12698
12699         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
12700         standard not GC'd stuff is fine.
12701
12702 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
12703
12704         * aot.c: Rework the AOT file format to get rid of most of the global
12705         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
12706
12707         * mini.h: Bump AOT file format version.
12708         
12709 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
12710
12711         * mini.h: Bump AOT file format version.
12712
12713         * aot.c (mono_aot_is_got_entry): New function to determine if an 
12714         address is inside a GOT.
12715
12716         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
12717
12718         * cpu-pentium.md: Increase the maximum size of some instructions which
12719         might involve a got access.
12720         
12721         * mini.c (get_method_from_ip): Another debug helper function.
12722
12723         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
12724         when got var accesses are created during the decompose phase.
12725
12726         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
12727
12728         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
12729         argument mini_compile_method and to MonoCompile, and use this to
12730         determine whenever a given method is compiled for AOT. This allows the
12731         other methods compiled during AOT compilation to be free of AOT stuff,
12732         so the backends does not need to add special support for them by
12733         creating a fake GOT etc.
12734
12735         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
12736         longer needed.
12737
12738 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12739
12740         * mini.c (mono_method_to_ir): It turns out that some of the
12741         x-appdomain wrappers are lax with types, so just ignore this for
12742         all wrappers.
12743
12744         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
12745         at the vtable->klass. If it is non-shared code we can just use the
12746         vtable.
12747
12748 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
12749
12750         * mini-ppc.c: access MonoDomain from tls, too.
12751
12752 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
12753
12754         * declsec.c: Removed unused variable (and related warning ;-)
12755
12756 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12757
12758         * iltests.il: New test for LDELEMA on an array of ref types.
12759
12760         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
12761         all ldelema's on reftypes.
12762         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
12763         it was the wrong place to put it.
12764
12765         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
12766         register to pop to make this cleaner, at the request of Paolo.
12767
12768 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12769
12770         * mini-ops.h (OP_GETHASHCODE): New op.
12771
12772         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
12773
12774         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
12775         operation.
12776
12777         For a microbenchmark, this reduces the cost of Hashtable.get_Item
12778         by 25%.
12779         
12780         * mini-x86.c (mono_arch_output_basic_block): Rather than
12781
12782         add ebp, 4
12783
12784         Emit
12785
12786         pop edx
12787
12788         The first is 3 bytes while the second is 1. This saves 36 kb on
12789         mscorlib, quite a big saving. When bootstraping mcs, I was able to
12790         see a small boost because of icache locality.
12791
12792         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
12793
12794 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
12795
12796         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
12797         started code sharing with the generic code.
12798
12799 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
12800
12801         * mini-ppc.c, cpu-g4.md: added code for direct access to
12802         tls data slots.
12803
12804 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
12805
12806         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
12807          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12808         to OP_TLS_GET.
12809
12810 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
12811
12812         * declsec.c|h: Added functions to cache the declarative stack modifiers
12813         in MonoJitInfo and to create a security frame from a MonoJitInfo 
12814         structure.
12815         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12816         created. Register internal calls for System.Security.SecurityFrame::
12817         _GetSecurityFrame and _GetSecurityStack.
12818         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12819         the definitions for the new stack walk/callback mechanism.
12820         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
12821         first security frame for LinkDemands and InheritanceDemands) and
12822         GetSecurityStack for Demands. Both use the new mono_walk_stack code
12823         from lupus.
12824         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12825         walk initialization (lupus).
12826
12827 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12828
12829         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12830         idiom.
12831         (handle_loaded_temps): Do not create a temporary variable for
12832         things that we know are temps. They will never be modified.
12833         (mono_spill_call): Set MONO_INST_IS_TEMP
12834         (mono_emulate_opcode): ditto
12835         (emit_tree): ditto
12836         (mono_method_to_ir.CEE_DUP): ditto
12837
12838 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
12839
12840         * mini.c (type_to_eval_stack_type): Make this handle the void type
12841         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12842         (emit_tree): use ip_in_bb to special case some common idioms
12843         Update all callers to pass in the IP.
12844         (mono_method_to_ir): Make CEE_CALL* do the above as well.
12845
12846         This gives us a nice 2% speedup in mcs bootstrap.
12847
12848         * mini-x86.c (peephole_pass): Peephole pass to make
12849         mov  [foo], eax
12850         push [foo]
12851
12852         into
12853
12854         mov [foo], eax
12855         push eax
12856
12857         * mini.c (ip_in_bb): new method.
12858         (mono_method_to_ir): use this method rather than doing the hash
12859         lookup ourselves.
12860
12861         * linear-scan.c (mono_linear_scan): When expiring actives, you
12862         don't need to keep around variables that expire on this
12863         instruction. This makes it so that:
12864              a = b + 1
12865         will turn into:
12866              store (ebx add (ebx, 1))
12867         which will become
12868              add ebx, 1
12869
12870 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
12871
12872         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
12873         combination to avoid doing two copies. Fix up problems with previous
12874         patch.
12875
12876         * mini.c: Fix 64 bit warnings.
12877
12878         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12879
12880 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
12881
12882         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12883         changes from the x86 code.
12884
12885         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12886
12887 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
12888
12889         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12890         throwing code to reduce its size, unify the AOT and non-aot code and 
12891         get rid of relocations in the AOT case.
12892
12893         * mini-x86.h mini.c exceptions-x86.c 
12894         (mono_arch_get_throw_corlib_exception): New arch specific function to 
12895         raise corlib exceptions which doesn't require relocations in the 
12896         caller.
12897
12898         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12899
12900 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
12901
12902         * mini.c (mono_emit_method_call): Only allocate the got var when it is
12903         needed.
12904
12905         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12906         in the AOT case.
12907
12908 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12909
12910         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12911         with add function when used from Inc/dec atomic 
12912         functions. Re-enabled optimization on x86.
12913         * mini-ops.h: renamed atomic_add functions to
12914         allow _add to match the Interlocked::Add and
12915         _add_next to match Interlocked::Inc/Dec.
12916
12917 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
12918
12919         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12920         linking of BBs to the end BB, and enabled SSAPRE also with
12921         consprop and copyprop (which was prevented by that bug).
12922
12923 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12924
12925         * mini-x86.c: disabling the Interlocked optimizing code. 
12926
12927 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12928
12929         * aot.c (load_aot_module): Move reading of got_addr after the AOT
12930         file version check.
12931         
12932 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12933
12934         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
12935         interlocked optimization due lack of support on x86, rewrote 
12936         exchange to take into account that base may be in eax.
12937         
12938         xsp works again; activated Interlocked optimizing code.
12939         
12940 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
12941
12942         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
12943
12944 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
12945
12946         * mini-ops.h: Add new opcodes.
12947
12948         * mini.h: Add new patch types. Add got_var to MonoCompile.
12949
12950         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
12951         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
12952         make it work with all kinds of patchable code.
12953
12954         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
12955         address of the GOT, and referencing entries in the GOT.
12956
12957         * mini.c: Add code to load the GOT address if needed by an opcode.
12958
12959         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
12960         independent AOT code on the x86 using an elf-style Global Offset Table.
12961
12962 2004-12-14  Raja R Harinath  <rharinath@novell.com>
12963
12964         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
12965
12966 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
12967
12968         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
12969         when running xsp.
12970
12971 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
12972
12973         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
12974         of Interlocked:Increment/Decrement/Add as inline ops.
12975         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
12976
12977 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
12978
12979         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
12980         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
12981
12982 2004-12-12  Duncan Mak  <duncan@ximian.com>
12983
12984         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
12985         again. `patch_info->table_size' is no longer valid after Zoltan's
12986         commit #37636.
12987
12988 2004-12-12  Martin Baulig  <martin@ximian.com>
12989
12990         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
12991         if we are the "real" method, ie. not an inlined method inside it.
12992
12993 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
12994
12995         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
12996         before we look in the special fields table. This fixes
12997         ../tests/thread-static-init.cs.
12998
12999 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13000
13001         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
13002         for Array get_Rank and get_Length. Fixes bug #70465.
13003
13004 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
13005
13006         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
13007         separate structure to reduce the size of MonoJumpInfo.
13008
13009 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
13010
13011         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
13012
13013 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
13014
13015         * mini.c (mini_get_inst_for_method): Changed to allow ports
13016         to return a MonoInst instead of opcode 
13017         (renamed mini_get_opcode_for_method to better reflect the new functionality)
13018         
13019         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
13020         Allow ports to return a created MonoInst instead of op-code, will enable
13021         new optimizations.
13022         (renamed mini_get_opcode_for_method to better reflected the functionality)
13023
13024 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
13025
13026         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
13027
13028 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
13029
13030         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
13031         Fixes #69985.
13032
13033 2004-12-08  Martin Baulig  <martin@ximian.com>
13034
13035         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
13036         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
13037
13038 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
13039
13040         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
13041         correctly.
13042
13043         * exceptions.cs: Disable some tests which depend on properties of x86 fp
13044         arithmetic.
13045
13046 2004-12-08  Raja R Harinath  <rharinath@novell.com>
13047
13048         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
13049
13050 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
13051
13052         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
13053         bug introduced by the previous patch.
13054
13055 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
13056
13057         * mini-ppc.c, objectc.cs: handle large structs passed by value
13058         (fixes bug #69972).
13059
13060 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
13061
13062         * mini-ppc.c: OP_ARGLIST implementation from
13063         Geoff Norton  <gnorton@customerdna.com>.
13064
13065 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13066
13067         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
13068         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
13069
13070 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
13071
13072         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
13073
13074 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13075
13076         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
13077         support.
13078
13079 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
13080
13081         * mini-sparc.c: Zero out localled-ed memory.
13082
13083         * iltests.il: Add tests for zeroing out localloc-ed memory.
13084
13085 2004-12-04  Martin Baulig  <martin@ximian.com>
13086
13087         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
13088         mono_method_get_signature_full().       
13089
13090 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
13091
13092         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
13093         and some utility functions (always for SSAPRE), integrated SSAPRE.
13094         * mini.h: Likewise.
13095         * driver.c: Added ssapre option.
13096         * ssa.c: Small fix on OP_ARG handling.
13097         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
13098         * Makefile.am: Likewise.
13099
13100 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
13101
13102         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
13103         now in the xp code.
13104
13105         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
13106         icall.
13107
13108 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13109
13110         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
13111         
13112         * cpu-s390.md : Increase instruction length of oparglist.
13113
13114         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
13115
13116 2004-11-30  Martin Baulig  <martin@ximian.com>
13117
13118         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
13119         virtual generic methods.  We call a special helper_compile_generic_method()
13120         icall to retrieve the method from the vtable, inflate and compile
13121         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
13122
13123         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
13124
13125 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
13126
13127         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
13128
13129 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
13130
13131         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
13132         Fixes #69929.
13133
13134 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
13135
13136         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
13137         platforms with PIC aot.
13138
13139 2004-11-28  Martin Baulig  <martin@ximian.com>
13140
13141         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
13142         Fixes gen-112.cs.
13143
13144 2004-11-28  Martin Baulig  <martin@ximian.com>
13145
13146         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
13147         the result of mono_type_get_underlying_type() to check whether
13148         we're byref.
13149
13150 2004-11-26  Martin Baulig  <martin@ximian.com>
13151
13152         * mini.c
13153         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
13154         in the g_assert().
13155
13156 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
13157
13158         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
13159         the same way as the other arguments so they won't get clobbered.
13160
13161         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
13162         calls through R11 since it is clobbered by the trampoline code.
13163
13164 2004-11-26  Raja R Harinath  <rharinath@novell.com>
13165
13166         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
13167         pick up in-tree mscorlib.dll.
13168
13169 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
13170
13171         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
13172
13173         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
13174         runtime data/code are now stored in a table similar to the GOT in ELF. 
13175         This allows the code itself to be position independent.
13176
13177         * aot.c: Fix loading of referenced assemblies after the lazy assembly
13178         loading changes.
13179
13180         * aot.c: Attach ELF type (object/function) directives to all global
13181         symbols.
13182
13183         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
13184
13185         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
13186
13187         * mini-amd64.h: Turn on PIC AOT code.
13188
13189         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
13190         returning the offset within an OP_AOTCONST instruction where the GOT
13191         offset needs to be added.
13192
13193         * mini.h: Bump AOT file format version.
13194
13195 2004-11-25  Martin Baulig  <martin@ximian.com>
13196
13197         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
13198         uninflated generic methods.
13199
13200 2004-11-25  Martin Baulig  <martin@ximian.com>
13201
13202         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
13203
13204 2004-11-24  Martin Baulig  <martin@ximian.com>
13205
13206         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
13207         original klass (this only applies for generic instances).
13208
13209 2004-11-24  Martin Baulig  <martin@ximian.com>
13210
13211         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
13212         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
13213         that array).
13214
13215 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
13216
13217         * mini.c (mono_method_to_ir): Disable inlining for methods containing
13218         localloc. Fixes #69678.
13219
13220         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
13221         
13222 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
13223
13224         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
13225         used SSE registers on pinvoke calls. Fixes #69774.
13226
13227 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
13228
13229         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
13230         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
13231
13232 2004-11-23  Raja R Harinath  <rharinath@novell.com>
13233
13234         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
13235         Refer directly to the mcs/ tree.
13236
13237 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13238
13239         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
13240         Check if a trampoline for a synchronized method is required. 
13241
13242 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
13243
13244         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
13245         with localloc if needed. Throe arithmetric exception in
13246         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
13247         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
13248
13249 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
13250
13251         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
13252         types before switching on type.  Fixes #69622.
13253
13254 2004-11-19  Raja R Harinath  <rharinath@novell.com>
13255
13256         * Makefile.am (check-local): New.  Integrate into 'make check'.
13257         (MCS,RUNTIME): Define using in-tree mono and mcs.
13258         (ILASM): New.
13259         (%.exe): Use $(ILASM).
13260
13261 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
13262
13263         * mini-ppc.c: adjust initial prolog size (bug #69691).
13264
13265 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
13266
13267         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
13268         #69664.
13269
13270 2004-11-17  Raja R Harinath  <rharinath@novell.com>
13271
13272         * Makefile.am (clean-local): Rename from 'clean'.
13273
13274 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13275
13276         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
13277         to mono_arch_is_int_overflow. 
13278         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
13279         SIGFPE events.
13280
13281 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
13282
13283         * declsec.c|h: New files to support declarative security attributes.
13284         Added function to check if a method has (applicable) security.
13285         * mini.c|h: Add check for declarative security attributes in
13286         mono_method_check_inlining.
13287         * Makefile.am: Added declsec.c and declsec.h to the build.
13288
13289 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13290
13291         * mini.c, mini.h: update to keep dynamic code info per-domain.
13292
13293 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
13294
13295         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
13296         (mini_init): Get rid of it from here too.
13297
13298 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13299
13300         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
13301         implemented OP_RETHROW (patch by Geoff Norton
13302         <gnorton@customerdna.com>).
13303
13304 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
13305
13306         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
13307         between appdomains.  Fixes appdomain-unload on PPC.
13308
13309 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
13310
13311         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13312         mini-exceptions.c: handle the new wrapper types.
13313         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
13314         token value as a MonoClass* when compiling a wrapper.
13315         mono_jit_create_remoting_trampoline now takes an additional
13316         MonoRemotingTarget parameter.
13317         
13318 2004-11-10  Martin Baulig  <martin@localhost>
13319
13320         * mini.c (mono_method_to_ir): Use `generic_container->context'
13321         rather than creating a new one.
13322
13323 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13324
13325         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
13326
13327         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
13328
13329 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
13330
13331         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
13332         the experimental aot cache stuff.
13333
13334 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13335
13336         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13337         mini-exceptions.c: update to exception clause structure changes.
13338
13339 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13340
13341         * exceptions-x86.c (throw_exception): Fix warnings.
13342
13343         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
13344         for OP_RETHROW.
13345
13346 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13347
13348         * exceptions-sparc.c (get_throw_exception): Really fix this.
13349
13350 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
13351
13352         * tramp-*.c: we no longer support icalls without wrappers, so
13353         a bit of code can be removed here
13354
13355 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
13356
13357         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
13358         patch.
13359
13360         * cpu-sparc.md: Add op_rethrow.
13361
13362         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
13363
13364         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
13365
13366         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
13367         * mini-ops.h: Add OP_RETHROW.
13368
13369         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
13370
13371         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
13372
13373 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
13374         
13375         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
13376         Makes the output much easier to read
13377
13378 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
13379
13380         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
13381         prevents another huge leak when compiling with ssa. Secondly, the
13382         performance of doing this rather than freeing the lists is much
13383         better. GList does a lock every time you allocate a list link,
13384         so that it can use a memory pool. So, it is better to just use
13385         a memory pool of our own.
13386         
13387         * ssa.c, linear-scan.c: replace g_list_remove_link with
13388         g_list_delete.  The remove one does not free the GList, so we were
13389         leaking memory. On -O=all --compile-all with corlib, this cut down
13390         3 MB of allocations.
13391
13392 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
13393
13394         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
13395
13396         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
13397
13398         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
13399         into a new function mono_create_jit_trampoline ().
13400
13401 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
13402
13403         * trace.c (get_spec): Allow tracing of classes without a namespace.
13404
13405 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
13406
13407         * mini.c: Fix pointer overwrite in mini_method_compile.
13408
13409 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
13410
13411         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
13412         The darwin ABI needs some special handling for 1 and 2 byte structs
13413         Lets use lbz/lhz instead of lwz everywhere.
13414         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
13415         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
13416         Use stb/sth for the former, and put the latter always on stack instead of in
13417         argument registers.
13418
13419 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
13420
13421         * trace.c (is_filenamechar): Add '_'.
13422
13423 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
13424
13425         * mini-s390.c: Fix prolog length to allow for large trace requirements.
13426
13427         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
13428
13429 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
13430
13431         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
13432         depends on libmonogc. Fixes #68805.
13433
13434 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
13435
13436         * mini.c (mono_jit_free_method): Provide extra information for
13437         this error.  Currently this leaks, but will be turned into a
13438         developer option in the future.
13439
13440 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
13441
13442         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
13443
13444 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
13445
13446         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
13447         boundary. Fixes reading of PATCH_INFO_R4 and R8.
13448         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
13449
13450 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
13451
13452         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
13453         trampolines for AOT code.
13454
13455 2004-10-22    <vargaz@freemail.hu>
13456
13457         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
13458         constructed types. Fixes #68136.
13459
13460 2004-10-21  Martin Baulig  <martin@ximian.com>
13461
13462         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
13463         if it returns true, unwind the stack to the call instruction.
13464
13465 2004-10-21    <vargaz@freemail.hu>
13466
13467         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
13468
13469         * mini.h: Bump AOT version number.
13470
13471         * objects.cs: Add another test for unbox trampolines.
13472
13473         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
13474         valuetype methods.
13475
13476 2004-10-20    <vargaz@freemail.hu>
13477
13478         * driver.c: Add SHARED to the set of optimizations tested.
13479
13480         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
13481
13482         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
13483         used by CEE_NEWARR.
13484
13485         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
13486
13487 2004-10-20  Martin Baulig  <martin@ximian.com>
13488
13489         * mini-exceptions.c (mono_handle_exception): Call
13490         mono_debugger_handle_exception() to tell the debugger about
13491         catch/finally clauses.
13492
13493 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
13494
13495         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
13496
13497         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
13498         #68447.
13499
13500 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
13501
13502         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
13503         methods as their native size, fixed bug #57543, #57545.
13504         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
13505         This saves a temporary register and mullw call down into 1 (minor perf
13506         increase for cases like sum = sum * 5;  This use to translate into:
13507             li r11,5
13508             mullw r28,r28,r11
13509         It now translates to
13510             mulli r28,r28,5
13511
13512 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
13513
13514         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
13515         #68388.
13516
13517 2004-10-11  Martin Baulig  <martin@ximian.com>
13518
13519         * mini.c (mono_method_to_ir): If we're a generic method, get the
13520         MonoGenericContainer from our MonoMethodNormal and create a
13521         MonoGenericContext from it.
13522
13523 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
13524
13525         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
13526
13527         * basic-long.cs: Add test for checked i8->i2 cast.
13528
13529 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13530
13531         * inssel-ppc.brg: added a couple of speedup rules.
13532
13533 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
13534
13535         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
13536         to speed up rebuilds.
13537
13538 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13539
13540         * mini-s390.c: Minor fix to OP_OR_IMM.
13541
13542 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
13543
13544         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
13545         better. Fixes appdomain-unload.exe on sparc.
13546
13547 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
13548
13549         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
13550         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
13551         see bug 67324.
13552
13553 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
13554
13555         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
13556
13557 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
13558
13559         * mini.c: Always generate a field read/write wrapper for members
13560         of the class MarshalByRefObject since the actual instance could
13561         be a CBO.
13562
13563 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
13564
13565         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
13566
13567 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
13568
13569         * driver.c mini.h trace.c: Move the setting of the main assembly into
13570         a separate function called mono_trace_set_assembly () and call it after
13571         actually loading the main assembly. Fixes #66872.
13572
13573 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
13574
13575         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
13576         using the code manager.
13577
13578 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
13579
13580         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
13581
13582 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
13583
13584         * cpu-amd64.md: Fix bug in previous patch.
13585         
13586         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
13587         #66650.
13588
13589 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
13590
13591         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13592         mini-exceptions.c: updates for changed stack walk interface.
13593
13594 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13595
13596         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
13597
13598 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
13599
13600         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
13601
13602 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
13603
13604         * driver.c (mini_regression_list): Do not call mono_assembly_close 
13605         since assemblies can't be unloaded.
13606         
13607 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13608
13609         * cpu-amd64.md: Fix more instruction lengths.
13610
13611         * cpu-amd64.md: Fix lengths of some instructions.
13612
13613 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
13614
13615         * inssel.brg: Make the array ldelema check aot friendly.
13616
13617 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13618
13619         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
13620
13621         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
13622
13623 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
13624
13625         * mini-x86.c: Fix build.
13626
13627         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
13628         mono_type_get_underlying_type () helper function to simplify code.
13629         
13630 2004-09-09  Martin Baulig  <martin@ximian.com>
13631
13632         * mini-amd64.c: Don't access `type->data.klass' directly, call
13633         mono_class_from_mono_type() instead since the type may be a
13634         generic instance.
13635
13636 2004-09-09  Martin Baulig  <martin@ximian.com>
13637
13638         * mini-amd64.c (get_call_info): Fix support for generic instances.
13639         (add_valuetype): Use mono_class_from_mono_type() to get the class
13640         since we can be a generic instance.
13641
13642 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
13643
13644         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
13645
13646 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13647
13648         * liveness.c: reset spill costs on each scan: bug 62107
13649
13650 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
13651
13652         * exceptions-sparc.c (mono_arch_find_jit_info): remove
13653         unnecessary line that doesn't compile
13654
13655 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
13656
13657         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
13658         trampolines, make them call an error function so people can fix their
13659         code.
13660
13661 2004-09-06  Martin Baulig  <martin@ximian.com>
13662
13663         * mini.c (mono_method_to_ir): When initializing locals, handle a
13664         generic instances like a valuetype if it's a valuetype and like a
13665         class if it's a class.
13666
13667 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13668
13669         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
13670         stack. Fixes #64674.
13671
13672         * exceptions.cs: Add test for unwinding of call arguments.
13673
13674 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
13675
13676         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
13677         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
13678         set the carry/borrow flag). The sparc and s390 implementations
13679         can now use optimized versions (and simplify the code). ppc bugfixes.
13680
13681 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13682
13683         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
13684
13685 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
13686
13687         * inssel-amd64.brg: Remove leftover 32 bit rule.
13688
13689         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
13690
13691 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
13692
13693         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
13694         mono_arch_find_jit_info functions into a new function. Fix a memory
13695         leak.
13696
13697         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
13698         refactored code.
13699         
13700 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13701
13702         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
13703         as well.
13704         
13705         * exceptions.cs: Add array size tests.
13706
13707         * mini.c: Allocate a separate icall wrapper for each arity of 
13708         mono_array_new_va. Fixes #59509.
13709
13710         * exceptions.cs: Add testcase for 64578.
13711
13712         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
13713
13714         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
13715         
13716 2004-09-02  Martin Baulig  <martin@ximian.com>
13717
13718         * mini.c (mono_method_to_ir): When initializing the locals, call
13719         handle_initobj() on the generic instance itself, not its
13720         underlying type.
13721
13722 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13723
13724         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
13725         MonoJitInfo for dynamic methods.
13726
13727         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
13728
13729         * mini.c: Add support for freeing JIT data for dynamic methods.
13730         
13731 2004-09-01  Martin Baulig  <martin@ximian.com>
13732
13733         * mini-x86.c (is_regsize_var): Added support for generic
13734         instances.
13735         (mono_arch_emit_prolog): Make this compile again, use
13736         `x86_push_imm_template (code)'.
13737
13738 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
13739
13740         * mini-x86.c: make all push_imm instructions that get
13741         patched always emit the long form
13742
13743 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
13744
13745         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
13746         in a per-domain hash.
13747
13748         * mini-amd64.c (merge_argument_class_from_type): Handle generic
13749         types.
13750
13751 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
13752
13753         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
13754         work.
13755         
13756         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
13757         work.
13758
13759         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
13760         Beginnings of SSE2 support.
13761
13762         * exceptions.cs: Add more tests for checked int<->uint casts.
13763
13764 2004-08-28  Martin Baulig  <martin@ximian.com>
13765
13766         * mini-x86.c (mono_arch_instrument_epilog): Added support for
13767         generic instances.
13768
13769         * mini.c
13770         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
13771         Handle generic instances recursively.
13772
13773 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13774
13775         * iltests.il: test for conv.u8 on a constant
13776
13777 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13778
13779         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
13780         LCONV_x4 (shrun_32 (membase)).
13781
13782 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13783
13784         * inssel-x86.brg: c&p rules for push/setret of long
13785
13786 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13787
13788         * inssel-x86.brg: c&p rules for compare (base, regvar) and
13789         compare (regvar, base)
13790
13791         * inssel-x86.brg: more burg love
13792
13793         * inssel.brg: more cleanup
13794
13795         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
13796
13797 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13798
13799         * basic-long.cs, basic-calls.cs: new tests for optimization.
13800
13801 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
13802
13803         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
13804         patch.
13805
13806 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13807
13808         * mini-amd64.c (read_tls_offset_from_method): Add another case.
13809         
13810 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
13811
13812         * inssel.brg (mini_emit_memcpy): use 
13813         NO_UNALIGNED_ACCESS to disable memcpy optimization
13814
13815 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13816
13817         * mini-amd64.c: Handle generic types in various places.
13818
13819         * mini.c (mono_method_to_ir): Handle generic types in init locals.
13820
13821 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
13822
13823         * mini.c (handle_box): Fix warning.
13824
13825         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13826
13827         * mini-amd64.h: Enable the emit_state optimization.
13828
13829         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13830
13831         * mini-amd64.c: Add some new 64 bit peephole opts.
13832
13833         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13834
13835         * cpu-amd64.md: sreg1 of div instructions must be %rax.
13836
13837         * mini-amd64.c: Register allocator fixes.
13838
13839         * mini.c: Add an optimization to emit_state to avoid allocation of new
13840         registers on some platforms.
13841
13842 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
13843
13844         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13845
13846         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13847         allocation. Fixes #63085.
13848
13849         * basic-long.cs: Add new regression test.
13850
13851         * mini-amd64.c: Register allocator improvements.
13852
13853 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
13854
13855         * mini-amd64.c (read_tls_offset_from_method): Add another code
13856         sequence.
13857
13858         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13859         instruction sequence for nullifying class init trampolines.
13860
13861         * objects.cs: Add new regalloc test.
13862
13863         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13864
13865 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13866
13867         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13868         
13869         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13870         arguments.
13871
13872         * driver.c: Fix profiling after TLS changes.
13873         
13874         * driver.c (mono_main): Set mono_stats.enabled if needed.
13875
13876         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13877         CEE_BOX.
13878
13879 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
13880
13881         * mini-x86.c: use a 1 op rather than a 2 op tls access
13882         instruction -> faster.
13883
13884 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13885
13886         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13887         x86 backend.
13888
13889 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13890
13891         * exceptions-sparc.c (throw_exception): fix typo
13892
13893 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13894
13895         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13896         set tree->dreg correctly with tls. Allow any
13897         register to be used.
13898
13899         * mini-x86.c (read_tls_offset_from_method): add new code
13900         generation pattern seen with GCC.
13901
13902
13903 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13904
13905         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13906         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13907         exceptions-sparc.c: fix some performance issues in exception
13908         handling and setting of the stack trace for exceptions that were
13909         already thrown.
13910
13911 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13912
13913         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
13914         x86 backend.
13915         
13916         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
13917         registers.
13918
13919 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13920
13921         This patch inlines tls access, when possible.
13922         
13923         * mini.h: new arch functions for TLS intrinsics.
13924         All platforms updated with a stub.
13925
13926         * mini.c: use the new intrinsics
13927
13928         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
13929         arch specific intrinsic for tls variables
13930
13931 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13932
13933         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
13934         under windows.
13935
13936 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
13937
13938         * mini.c: thread local allocation
13939
13940 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
13941
13942         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
13943
13944         * Makefile.am: Link against the static version of libmonogc.
13945         
13946         * Makefile.am: Link the static versions of the convenience libraries
13947         into the mono executable.
13948
13949         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
13950
13951 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
13952
13953         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
13954         on integer overflow.
13955
13956         * mini-amd64.c: Reorganize function call code.
13957
13958         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
13959
13960 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13961
13962         * inssel-x86.brg: use xor eax,eax.
13963         
13964         * basic.cs: new tests
13965
13966 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13967
13968         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
13969         in exception throwing code.
13970         
13971 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13972
13973         * inssel-x86.brg: use xor esi,esi.
13974
13975 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13976
13977         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
13978         can trace methods compiled during mini_init () too.
13979
13980         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
13981         CEE_CONV_U4.
13982
13983 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
13984
13985         * Makefile.am: static link on x86 (r=zoltan)
13986
13987 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
13988
13989         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
13990         code since it causes some programs to fail.
13991
13992 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
13993
13994         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
13995
13996 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
13997
13998         * mini.c: ovfops_op_map - add STACK_OBJ case for
13999         CONV_I 
14000         * basic.cs: add test_0_pin_string as test
14001         case for above.
14002
14003 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
14004
14005         * Makefile.am: build C# if srcdir != builddir
14006
14007 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14008
14009         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
14010         fall-through blocks.
14011
14012 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14013
14014         * driver.c: enable loop by default again and include abcrem in -O=all.
14015
14016 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
14017
14018         * iltests.il: Add some localloc tests.
14019
14020         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
14021
14022         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
14023         Fixes #62574.
14024
14025         * inssel-amd64.brg: Add some optimizations.
14026
14027         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
14028         for gcc-3.4.
14029
14030         * Makefile.am: Statically link mono against libmono on AMD64.
14031         
14032         * mini-amd64.c inssel-amd64.brg: Optimizations.
14033
14034 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
14035
14036         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
14037
14038         * tramp-amd64.c: Patch calling code in trampolines.
14039
14040 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
14041
14042         * mini-amd64.c: pinvoke struct passing fixes.
14043
14044 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
14045
14046         * mini-sparc.c: redo change, make mono_arch_cpu_init call
14047         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
14048
14049 2004-08-05  Duncan Mak  <duncan@ximian.com>
14050
14051         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
14052         CEE_LDELEM_ANY.
14053
14054 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
14055
14056         * mini-amd64.c (emit_move_return_value): Move return value for normal
14057         calls too.
14058
14059 2004-08-05  Martin Baulig  <martin@ximian.com>
14060
14061         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
14062         `type->type'; just modify `type' itself when dealing with enums
14063         and generic instances.
14064         (check_call_signature): Make `simple_type' a `MonoType *'.
14065
14066 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
14067
14068         * mini.c: Use OP_PADD to add offsets to addresses.
14069
14070         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
14071
14072 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
14073
14074         * mini-sparc.c (mono_arch_emit_epilog): fix check
14075         for folding last op into restore instruction
14076
14077 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
14078
14079         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
14080         helper methods using the code manager.
14081         
14082         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
14083
14084         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
14085
14086 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14087         
14088         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
14089           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
14090
14091         * mini-s390.c: fix tail processing
14092
14093 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
14094
14095         * mini-ppc.c: mul.ovf.un exception name fix.
14096
14097 2004-08-03  Martin Baulig  <martin@ximian.com>
14098
14099         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
14100         instances; before jumping to `handle_enum', also modify `ptype'.
14101
14102 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
14103
14104         * cpu-sparc.md: fcall maximal length too small.
14105
14106 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
14107
14108         * mini-amd64.c mini.h: Add initial support for passing/returning 
14109         structures to/from pinvoked methods.
14110
14111 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
14112
14113         * mini-ppc.c: reg allocator fix.
14114
14115 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
14116
14117         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
14118
14119         * inssel.brg: Optimize memset on 64 bit machines.
14120
14121         * mini-amd64.c: Fix some vararg cases.
14122
14123 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14124
14125         * mini-s390.c: Corrected macro in emit_float_to_int
14126
14127         * s390-abi.cs: Tests to exercise the s390 ABI
14128
14129 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
14130
14131         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
14132         caller saved regs.
14133
14134         * basic.cs: Add a test for add.ovf.un.
14135
14136 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
14137
14138         * mini-sparc.c: add case for OP_IDIV_UN
14139
14140 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
14141
14142         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
14143         
14144         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
14145
14146 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
14147
14148         * basic.cs: regression tests.
14149
14150         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
14151         regressions.
14152
14153 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
14154
14155         * basic.cs: Add a new test.
14156
14157         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
14158         and AOT. Various fixes and optimizations.
14159
14160         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
14161
14162 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
14163
14164         * mini-ppc.c: make sure temp regs are not used for global reg
14165         allocation.
14166
14167 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
14168
14169         * cpu-sparc.md: conv_i8 fix for 64bits
14170
14171         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
14172
14173 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
14174         
14175         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
14176         add opcode for cmp BYTE PTR [eax], imm.
14177
14178         * inssel.brg: Make memcpy and memset takes bases.
14179
14180 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
14181
14182         * *-amd64.*: More AMD64 work.
14183         
14184 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
14185
14186         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
14187         add a compare-not-equal opcode.
14188         
14189 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
14190
14191         * mini.c: Use mono_init_from_assembly instead of mono_init.
14192         
14193 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
14194
14195         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
14196
14197         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
14198
14199         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
14200
14201         * inssel.brg: 64 bit fixes.
14202
14203         * mini.h (MonoCallInst): Add some AMD64 specific data.
14204
14205         * mini.h: Add some OP_P opcodes.
14206
14207 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
14208
14209         * basic.cs: tests for 61797 and 61740
14210
14211 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
14212
14213         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
14214         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
14215
14216 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
14217
14218         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
14219
14220         * *-amd64*.*: Ongoing AMD64 work.
14221
14222 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
14223
14224         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
14225
14226         * *-amd64*: Ongoing AMD64 work.
14227
14228         * mini-arch.h: Add AMD64 support.
14229
14230         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
14231
14232         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
14233
14234         * mini-ops.h: Add new opcodes.
14235
14236         * Makefile.am: Add AMD64 support.
14237
14238         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
14239         rules into the inssel-long*.brg files.
14240
14241         * *-amd64.*: Add beginnings of AMD64 backend.
14242
14243 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
14244
14245         * mini.c (print_dfn): commenting out the code that prints
14246         the cil. With -O=deadce, this makes -v -v crash.
14247         
14248         * cpu-pentium.md: make checkthis have a length of 2
14249
14250 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
14251
14252         * mini-sparc.h: fix implementations of __builtin
14253         functions for Sun compiler for V9.
14254
14255 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
14256
14257         * mini.c: use the new stelem.ref wrapper
14258         * exceptions.cs, arrays.cs: new stelem.ref tests
14259
14260 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14261
14262         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
14263         new XSP should work with these changes).
14264
14265 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
14266         
14267         * inssel-{long32,x86,}.brg: trivial optimizations.
14268         
14269 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
14270
14271         * mini.c: load value when emitting box operation in
14272         constrained calls.
14273
14274 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
14275
14276         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
14277         is one byte shorter than cmp DWORD PTR [eax], 0.
14278
14279 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14280
14281         * inssel-ppc.brg: arguments on the stack are always
14282         relative to the stack pointer (spotted by Neale Ferguson).
14283
14284 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14285
14286         * exceptions-x86.c: delay appending the method name to the trace until
14287         after mono_jit_info_table_find is called, as this gets the real
14288         MonoMethod.
14289
14290 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
14291
14292         * aot.c: register roots
14293
14294 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14295
14296         * aot.c : I could just use PLATFORM_WIN32 flag.
14297
14298 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14299
14300         * aot.c : Reverting the previous fix. This time it broke linux build.
14301
14302 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14303
14304         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
14305
14306 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
14307
14308         * mini.c (handle_stack_args): Remove some more debugging code.
14309         
14310         * mini.c (handle_stack_args): Remove debug output left in by mistake.
14311
14312         * driver.c mini.h aot.c: Allow additional options to be specified with
14313         --aot and pass them to mono_compile_assembly.
14314
14315         * aot.c: Add experimental code to AOT compile all loaded assemblies
14316         on demand and save the code into a cache in the filesystem.
14317
14318         * aot.c: Add support for more wrapper methods.
14319         
14320         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
14321         58863.
14322
14323         * cpu-*.md: Remove removed opcodes.
14324
14325         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
14326         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
14327         related icalls to marshal.c.
14328
14329 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
14330
14331         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
14332
14333         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
14334
14335         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
14336
14337 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
14338         * liveness.c: If liveness is recomputated we need to reset the information
14339         for each variable. This way, if the liveness range has been narrowed
14340         by optimizations that happened after the last computation, we can return
14341         a smaller range.
14342         
14343         For example, if you have
14344         
14345         {
14346                 int i = 0;
14347                 
14348                 // Tons of code that does not affect i
14349                 
14350                 i = foo ();
14351                 ...
14352         }
14353         
14354         i = 0 is dead code and will be removed by SSA. However, when
14355         linear scan gets to the code, i will still appear to be live
14356         throughout the entire block. This prevents good register allocation.
14357
14358 2004-07-06  Martin Baulig  <martin@ximian.com>
14359
14360         * debug-mini.c (mono_debug_init_method): Allow
14361         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
14362         (mono_debug_add_icall_wrapper): New method.
14363
14364         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
14365
14366 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
14367
14368         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
14369         optimization.
14370
14371 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
14372
14373         * aot.c (mono_aot_load_method): Fix loading of debug info.
14374
14375 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14376
14377         * aot.c: Add logging support.
14378
14379 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14380
14381         * mini.h: Add prototype for mono_print_method_from_ip.
14382
14383         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
14384
14385         * inssel.brg: 64 bit fixes.
14386
14387         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
14388         inssel-long32.brg.
14389
14390         * Makefile.am: Add SPARC64 support.
14391
14392 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14393
14394         * aot.c: Fix alignment problems on 32 bit platforms.
14395
14396 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14397
14398         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
14399         SPARC64.
14400
14401         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
14402         problems.
14403
14404         * mini.h: Bump AOT file version. Some 64 bit fixes.
14405
14406 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14407
14408         * inssel-sparc.brg: Add new rule to avoid register moves.
14409
14410         * inssel.brg: Add ldind_to_load_membase helper function.
14411
14412 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
14413
14414         * mini.c: OffsetToStringData intrinsic.
14415         
14416 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14417
14418         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
14419
14420         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
14421         regression tests.
14422
14423         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
14424 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14425
14426         * mini.c: reinstated mono_compile_get_interface_var()
14427         on x86, too, since the change breaks the Gtk# build there as well.
14428
14429 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14430
14431         * driver.c: remove loop from the default optimizations: it seems to
14432         interact badly with some of the other options (see bug #60613).
14433
14434 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
14435
14436         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
14437         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
14438
14439 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
14440
14441         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
14442         vararg-using methods.
14443
14444 2004-06-21  Martin Baulig  <martin@ximian.com>
14445
14446         * mini/mini-exceptions.c
14447         (mono_handle_exception): Added `gpointer original_ip' argument.
14448         After calling mono_unhandled_exception(), call
14449         mono_debugger_unhandled_exception() and if that returns true,
14450         restore the context and return.
14451
14452 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14453
14454         * mini-ppc.c: prefer the use of relative branches so
14455         they won't need to be patched in aot code (patch from Patrick Beard).
14456
14457 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14458
14459         * aot.c: patch from Patrick Beard to make the output assembly
14460         more correct for the MacOSX assembler. Small tweak to
14461         generate sane images on Linux/PPC, too.
14462
14463 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14464
14465         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
14466         case until bug #59509 is fixed (shows up in #60332).
14467
14468 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14469
14470         * mini.c: make sure the needed wrappers are compiled, too, with
14471         precomp.
14472
14473 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
14474
14475         * driver.c: remove NPTL reference in --version output.
14476
14477 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14478
14479         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
14480         generate valid assembly for the Mach-O assembler.
14481
14482 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14483
14484         * driver.c: don't include abcrem in the all optimization specifier
14485         since it slows down jit compilation too much for now.
14486
14487 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
14488
14489         * mini.c: use BIGMUL only if both operands have the same signage.
14490         * iltests.il: Test for bug 60056. (errors related to signage in
14491         BIGMUL).
14492
14493         r=lupus.
14494
14495 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
14496
14497         * mini.c, aot.c: memory leak fixes.
14498
14499 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14500
14501         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
14502
14503 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
14504
14505         * Makefile.am: remove the -static hack completely, it links in
14506         statically glib as well.
14507
14508 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
14509
14510         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
14511         * exceptions.cs: make it compile with new mcs/csc.
14512
14513 2004-06-03 Massimiliano Mantione <massi@ximian.com>
14514         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
14515         and added relevant test case.
14516
14517 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14518
14519         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
14520         regressions in gtk-sharp.
14521
14522 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
14523
14524         * exceptions.cs: New regression tests.
14525
14526         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
14527
14528 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
14529
14530         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
14531
14532 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
14533
14534         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
14535
14536         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
14537
14538 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
14539
14540         * mini.c (mono_jit_runtime_invoke): Init class in this
14541         method instead of trusting mono_jit_compile_method to
14542         do the work (because wrappers can be in object class)
14543
14544 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
14545
14546         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
14547
14548         * basic-long.cs: New regression test.
14549
14550 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
14551
14552         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
14553         and div/rem checks.
14554
14555 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
14556
14557         * Makefile.am: fix miguel's change to build mono statically against
14558         libmono (track build dependencies).
14559
14560 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14561
14562         * cfold.c: Some glib versions do not have G_MININT32.
14563
14564 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
14565
14566         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
14567         with precision of tan, atan, sin and cos, and implemented related
14568         regressions tests (fixes bug 54467, but one new problem appeared and
14569         is not fixed yet).
14570
14571 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14572
14573         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
14574
14575         * exceptions.cs: Add test for constant folding && division by zero.
14576
14577         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
14578         since driver.c is in libmono too, so the optimization was useless.
14579
14580         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
14581         variable to driver.c so the compiler can emit more efficient code to
14582         access them.
14583
14584 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14585
14586         * Makefile.am: don't distribute generated inssel.[ch] files.
14587
14588 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
14589
14590         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
14591         into the default appdomain. Fixes #58707.
14592
14593         * jit-icalls.c: Remove the broken approximation for truncl, doing
14594         no conversion is better.
14595
14596         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
14597         Fixes #58863.
14598
14599 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14600
14601         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
14602         of the mcrxr instruction which is not available on some processors
14603         even if it's documented to be. Implement add and sub overflow correctly
14604         (still not complete for long unsigned). Speed up icalls a bit.
14605
14606 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
14607
14608         * mini.c (mono_jit_compile_method_with_opt): Make sure that
14609         we run .cctor in the current domain instead of target_domain.
14610         
14611         Fixes bug #58558, .cctor not being called in -O=shared.
14612
14613 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14614
14615         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
14616
14617 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
14618
14619         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
14620         which can be done with an imm8, do it that way.
14621         (mono_arch_output_basic_block): ditto for a jmp
14622         (mono_arch_emit_prolog): Computate maximum offset of a label.
14623
14624 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
14625
14626         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
14627         now tries to allocate prefered physical reg's for virtual
14628         regs. This reduces the number of emited spills/loads with
14629         20-30% on our core assemblies.
14630
14631 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14632
14633         * jit-icalls.c: truncl() is not needed and trunc() is
14634         the correct thing to do anyway (bug #58287).
14635
14636 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
14637
14638         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
14639         if available.
14640
14641 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
14642
14643         * driver.c: enable loop optimizations by default.
14644
14645 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14646
14647         * mini-x86.c: fix calc of max loop size when aligning loops start.
14648
14649 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
14650
14651         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
14652         the stack.
14653
14654 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
14655
14656         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
14657         should set carry.
14658
14659         * basic-long.cs: Add tests for add/subtract of immediates with carry.
14660
14661         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
14662         
14663         * mini.c (inline_method): Allways inline some wrappers even if the cost
14664         is too large. Fixes #58785.
14665
14666         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
14667         
14668 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
14669
14670         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
14671         (crichton@gimp.org). Beginning of support for sparc/linux.
14672
14673         * mini-sparc.c: Optimize retrieval of LMF address.
14674
14675 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
14676
14677         * exceptions-ppc.c:  handle alloca in methods with clauses.
14678
14679 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
14680
14681         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
14682
14683 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
14684
14685         * mini.c: Delegate most of the abort signal work to 
14686           mono_thread_request_interruption, which also handles Stop and Suspend
14687           states.
14688
14689 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
14690
14691         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
14692         supports the save/restore lmf opcodes.
14693
14694 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
14695
14696         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
14697         by gcc-3.4 as well.
14698
14699         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
14700
14701 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14702
14703         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
14704         methods which contain array accesses.
14705
14706         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
14707         boundaries. Fixes #58537.
14708
14709         * iltests.il: Add regression test for #58537.
14710
14711 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14712
14713         * mini-x86.c (mono_arch_local_regalloc): Last part of
14714         fix for bug #58633 (releasing register to early).
14715
14716 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
14717
14718         * basic-long.cs: Add new regression test.
14719
14720 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14721
14722         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
14723         register too early on the chain.
14724
14725 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14726
14727         * mini.c (create_helper_signature): Use a helper function to reduce
14728         the code which needs to be written. Also set the calling convention of
14729         icalls on windows. Fixes #57840.
14730
14731 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14732
14733         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
14734         exceptions-ppc.c: added helper function to get the instruction address
14735         from a signal handler context.
14736
14737 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14738
14739         * helpers.c: use g_get_tmp_dir. Invokes happyness 
14740         from gonzalo.
14741
14742 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14743
14744         * helpers.c: Add new env variable to pass args to objdump.
14745         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
14746
14747 2004-05-17  Radek Doulik  <rodo@ximian.com>
14748
14749         * Makefile.am (common_sources): added abcremoval.h so it get
14750         disted and daily mono packages on go-mono.com will build again
14751
14752 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
14753
14754         * abcremoval.c: Fixed coding style, added copyright header.
14755
14756         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
14757
14758         * mini.h: Added prototype for abc removal main function.
14759
14760         * build_relations_propagation_table.pl: Added copyright header.
14761
14762 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14763
14764         * basic-long.cs: reg test for complex ceq_long bug.
14765
14766 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14767
14768         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
14769         reg in long and clob case (bug #58343). Fixed/added comments.
14770
14771 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
14772
14773         * mini.c (mono_jit_runtime_invoke): Follow new convention
14774         of calling the invoke method with an function pointer.
14775
14776 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
14777
14778         * ChangeLog: Fix author of memory leak patch.
14779
14780 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
14781
14782         * Makefile.am: fix make dist as well...
14783
14784
14785 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
14786
14787         * cfold.c: Made so that conversions from pointer to int4 are no-ops
14788         on archs where pointers are 4 bytes long.
14789
14790         * Makefile.am: Added abcremoval.c source file.
14791
14792         * abcremoval.c: Added abcremoval.c.
14793
14794         * abcremoval.h: Added abcremoval.h.
14795
14796         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
14797
14798         * inssel.brg: Enabled bounds check removal.
14799
14800         * mini.c: Added support for abcrem optimization.
14801
14802         * mini.h: Added abcrem optimization label.
14803
14804         * driver.c: Added support for abcrem optimization.
14805
14806         * propagated_relations_table.def: Added propagated_relations_table.def.
14807
14808 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14809
14810         * mini.c, cfold.c: fix style.
14811
14812 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14813
14814         * mini.c: handle issue with the low-level implementation of
14815         some long opcodes (bug #54209).
14816
14817 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
14818
14819         * basic.cs: test for my new cmov stuff.
14820
14821 2004-05-13      Patrik Torstensson
14822
14823         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14824         opt and added peephole documentation.
14825
14826 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14827
14828         * tramp-ppc.c: rewrote the generic trampoline code.
14829
14830 2004-05-11      Patrik Torstensson
14831
14832         * mini-x86.c: optimize long shl/shr asm code (one less branch)
14833
14834 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14835
14836         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14837
14838         * mini.h mini.c dominators.c: Applied patch from Derek Woo
14839         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14840
14841         * mini.c: Add new icalls for AsAny marshalling.
14842
14843 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14844
14845         * tramp-ppc.c, mini-ppc.c: more cleanups.
14846
14847 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14848
14849         * mini.c: no warnings.
14850
14851 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14852
14853         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14854
14855 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14856
14857         * mini.c: In the thread abort signal handler, if the thread is in the
14858         process of being stoped, don't throw the Abort exception, just stop the
14859         thread.
14860
14861 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14862
14863         * tramp-ppc.c: removed old code.
14864
14865 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14866
14867         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14868         do some simple speed optimizations on ppc.
14869
14870 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14871
14872         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14873         and large offsets in load/store.
14874
14875 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14876
14877         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14878         it causes regressions.
14879
14880 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14881
14882         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14883         support.
14884
14885 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14886
14887         * jit-icalls.c: remove warnings.
14888         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14889         speedups for unsafe code.
14890
14891 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
14892
14893         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14894
14895 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
14896
14897         * basic-calls.cs: Add new regression test.
14898
14899         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14900         more portable.
14901
14902         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14903
14904         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14905         is no longer used.
14906
14907 2004-05-06      Patrik Torstensson
14908
14909         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14910         long reg allocation in any reg (not only eax:edx) and implemented 
14911         long shl/shr ops in asm instead of helpers.
14912
14913 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14914
14915         * mini-sparc.h: Fix warnings.
14916
14917         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14918         stack.
14919
14920         * mini-exceptions.c (mono_handle_exception): Call the filter in a
14921         separate statement for clarity.
14922
14923         * mini-sparc.c: Update status.
14924
14925 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
14926
14927         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
14928         here.
14929
14930 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14931
14932         * inssel-ppc.brg: another small pre-release workaround:
14933         we don't do overflow detection for long_sub_un.
14934
14935 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14936
14937         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
14938         (also works around a weird ppc bug: 57957).
14939
14940 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
14941
14942         * tramp-ppc.c: trampoline fixes.
14943
14944 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
14945
14946         * mini-ppc.c: fixed typos.
14947
14948 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14949
14950         * mini-ppc.c, exceptions-ppc.c: more code saves registers
14951         at the top of the stack. Fixed typos. Use a frame registers
14952         for all the methods with exception clauses.
14953
14954 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14955
14956         * exceptions-ppc.c: restore fp registers.
14957
14958 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14959
14960         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
14961         order from the stack top (moved the stack room to save the
14962         return value for trace after the param area). Fixed corruption
14963         in restoring registers on unwind.
14964
14965 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14966
14967         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
14968
14969 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14970
14971         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
14972         and prolog/epilog for methods that use it. Allow
14973         enough param area room for varargs methods. Fix miguel's
14974         breakage in exception handling.
14975
14976 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14977
14978         * Makefile.am: run genmdesc only on current arch.
14979
14980 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14981
14982         * exceptions-x86.c:
14983         * mini-x86.h: fix the build on windows.
14984
14985 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
14986
14987         * 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.
14988
14989         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
14990
14991         * mini-exceptions.c: New file.
14992         
14993         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
14994         Move some parts of the x86 exception handling code to an 
14995         arch-independent file so it can be shared with other ports.
14996
14997 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
14998
14999         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
15000
15001 2004-04-26  David Waite  <mass@akuma.org>
15002
15003         * driver.c: remove comma from end of enumeration declaration
15004
15005 2004-04-26  Jackson Harper  <jackson@ximian.com>
15006
15007         * driver.c: parse config file before loading first assembly. This
15008         allows the user gac to be enabled/disabled. 
15009         
15010 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
15011
15012         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
15013         simpler mechanism: we do not care what is encoded initially
15014         (branch absolute or relative), we care about the code and its
15015         target.  I kept the old code for reference for now.
15016
15017         The new code tries first to determine if the jump is anywhere in
15018         the -/+32 absolute meg range, if it succeeds, it encodes using the
15019         absolute branch;  If not, it tried to find something in the
15020         relative range, if not, it uses the handle_thunk code. 
15021
15022 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
15023
15024         * exceptions-ppc.c: use the correct ip register on macosx.
15025
15026 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
15027
15028         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
15029
15030 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
15031
15032         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
15033         Raise exception on integer divide by zero by hand since the hw
15034         doesn't support it. Handle NaNs in FP compares.
15035
15036 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
15037
15038         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
15039         code reducing duplication between the platforms and enabled
15040         signal exception handling (on linux for now).
15041
15042 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
15043
15044         * exceptions-ppc.c: more macosx support.
15045
15046 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15047
15048         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
15049
15050 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
15051
15052         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
15053
15054 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
15055
15056         * iltests.il: more tests.
15057
15058 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
15059
15060         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
15061         vars as well.
15062
15063 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15064
15065         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
15066
15067 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
15068
15069         * liveness.c: Mark variables as volatile in all basic blocks reachable
15070         from exception clauses.
15071
15072 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
15073
15074         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
15075         inlining.
15076
15077 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
15078
15079         * iltests.il, basic.cs: more tests for regalloc.
15080
15081 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15082
15083         * iltests.il: Some tests for register allocation modifications
15084         I have locally.
15085
15086 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
15087
15088         * exceptions.cs: Add regression test for bug #56782.
15089
15090         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
15091         original stack trace if an exception is rethrown. Fixes #56782. Oh,
15092         the beauty of fixing the same thing in 5 different files...
15093
15094 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
15095
15096         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
15097         methods.
15098
15099 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
15100
15101         * mini.c: Add support for STRWLPARRAY marshalling convention.
15102
15103 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15104
15105         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
15106         to init the context to setup the regs pointer).
15107
15108 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15109
15110         * exceptions-ppc.c: more exceptions work.
15111
15112 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15113
15114         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
15115         not allowed.
15116
15117 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
15118
15119         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
15120         can use the memory directly.
15121
15122         * cpu-pentium.md: Update documentation from a post from Zoltan. 
15123
15124         add x86_add_membase, x86_sub_membase, x86_mul_membase
15125
15126 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
15127
15128         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
15129         GENERAL_REGS they were also hardcoded for all PPC ports.
15130
15131         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
15132
15133         Remove hard-coded limit for floating point registers, use
15134         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
15135
15136         Notice that in MacOS X calling conventions you can fit a lot more
15137         floating point values in registers, so I should update the PInvoke
15138         test to excercise the passing of floating point values on the
15139         stack (currently broken).
15140         
15141 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
15142
15143         * tramp-ppc.c (create_trampoline_code): Added
15144         JUMP_TRAMPOLINE_SIZE. 
15145         (ppc_magic_trampoline): Follow the pattern from
15146         x86_magic_trampoline: if code is set to zero, return. 
15147         (create_trampoline_code): Always pass MonoMethod to the jump
15148         trampoline, before it was passing a null.
15149         (mono_arch_create_jump_trampoline): Implement the jump stub, could
15150         share the code with mono_arch_create_jit_trampoline. 
15151
15152         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
15153         implemented.
15154         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
15155         implemented.  
15156
15157         * cpu-g4.md: Added length for jmp instruction, the worst case
15158         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
15159         for save_lmf).
15160
15161 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
15162
15163         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
15164
15165 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
15166
15167         * mini.c: Only set bblock->real_offset when adding a new bblock, and
15168         before each IL instruction.
15169
15170         * mini.c (CEE_BOX): Fix warnings.
15171
15172 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15173
15174         * mini.c: removed a few unused vars and extra whitespace.
15175
15176 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
15177
15178         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
15179         checks.
15180         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
15181         index.
15182         (OP_GETCHR): use the above
15183         (CEE_LDELEMA): use the above.
15184
15185         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
15186         version of the generic impl.
15187         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
15188         (CEE_LDELEMA): use the above.
15189
15190 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
15191
15192         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
15193         Fixes #56317.
15194
15195         * iltests.il: Added new regression test for #56317.
15196
15197 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
15198
15199         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
15200         under NetBSD. Fixes #56450.
15201
15202         * liveness.c (update_gen_kill_set): Fix previous patch.
15203
15204 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15205
15206         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
15207
15208 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
15209
15210         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
15211         ldsfld and ldsflda.
15212
15213         * inssel-sparc.brg: Add more optimizations.
15214
15215         * mini-sparc.c: Replace multiply/divide with shifts if possible.
15216
15217 2004-04-01  Martin Baulig  <martin@ximian.com>
15218
15219         * mini.c (handle_box): New static function; moved the
15220         implementation of CEE_BOX here.
15221         (mono_method_to_ir): Added `constrained_call' variable.
15222         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
15223         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
15224         mono_method_get_constrained() to get the method.
15225
15226 2004-04-01  Martin Baulig  <martin@ximian.com>
15227
15228         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
15229         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
15230         (mono_method_to_ir): We don't need these macros anymore since
15231         mono_class_get_full() already takes care of it. 
15232
15233 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15234
15235         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
15236         use @function (as doesn't accept #function here) and check the return
15237         value of system and stop if fails.
15238
15239 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15240
15241         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
15242
15243 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
15244
15245         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
15246
15247         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
15248
15249         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
15250         #56223.
15251
15252         * basic-long.cs: Add test for negation of Int64.MinValue.
15253
15254 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
15255
15256         * mini-sparc.c: Update status.
15257
15258         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
15259
15260         * exceptions-sparc.c: Fix return value in filters.
15261
15262         * inssel-sparc.brg: Fix register allocation in some rules.
15263
15264 2004-03-28  Martin Baulig  <martin@ximian.com>
15265
15266         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
15267         if neccessary.  
15268
15269 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
15270
15271         * mini-x86.c (mono_arch_patch_code): Fix warnings.
15272         
15273         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
15274         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
15275         remove unused conv_u4 opcode.
15276
15277         * mini-x86.c: Remove valgrind workaround since it slows down things
15278         even when mono is not run under valgrind.
15279
15280 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
15281
15282         * mini-sparc.c: Update status.
15283
15284         * inssel-sparc.brg: Add some optimizations.
15285
15286         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
15287         future delay slot filling. Add support for varargs, tail calls and JMP.
15288
15289         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
15290         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
15291
15292         * inssel.brg: Fix register allocation in OP_ARGLIST.
15293
15294         * inssel.brg: Fix warnings.
15295
15296 2004-03-25  Martin Baulig  <martin@ximian.com>
15297
15298         * mini.c (inflate_generic_field): Removed.
15299         (mini_get_method): Removed, use mono_get_method_full(),
15300         (mini_get_class): Removed, use mono_class_get_full().
15301         (mono_method_to_ir): Pass our generic context to
15302         mono_field_from_token().        
15303
15304 2004-03-25  Martin Baulig  <martin@ximian.com>
15305
15306         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
15307         of a `MonoMethod *'.
15308         (mini_get_method): Take a `MonoGenericContext *' instead
15309         of a `MonoMethod *'.
15310         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
15311         a new local variable called `generic_context' which holds the
15312         current `MonoGenericContext *'; use it to lookup things.
15313
15314 2004-03-24  Martin Baulig  <martin@ximian.com>
15315
15316         * mini.c (mini_get_class): New static method; if we're inside a
15317         generic instance, inflate the class if neccessary.
15318         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
15319
15320 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
15321
15322         * iltests.il: New regression test for #55976.
15323
15324         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
15325         #55976.
15326
15327 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15328
15329         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
15330         output.
15331
15332 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15333
15334         * liveness.c: Consider SSA stores as well as loads when making vars
15335         volatile.
15336
15337         * exceptions.cs: New regression tests for register allocation.
15338         
15339 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
15340
15341         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
15342         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
15343           domain lock only to protect puntual access to data structures.
15344           Added access lock for sighash, jit_icall_hash_name, 
15345           jit_icall_hash_addr and domain->code_mp.
15346
15347 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
15348
15349         * driver.c: Print SIGSEGV handling method.
15350
15351         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
15352
15353         * mini.c (setup_jit_tls_data): Handle case when this is called
15354         multiple times for a thread.
15355
15356         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
15357         is different from fbxx_un. Fixes #54303. Also use constants instead of
15358         magic numbers in a lot of places.
15359
15360 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
15361
15362         * exceptions.cs: Fix cctor test when --regression is used.
15363
15364 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
15365
15366         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
15367         for Linux/ppc.
15368
15369 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15370
15371         * inssel-ppc.brg: fixed register assignments for some rules.
15372
15373 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15374
15375         * exceptions.cs: Add test for exceptions in static constructors.
15376
15377         * mini.c (mono_jit_compile_method_with_out): Move the calling of
15378         static constructors outside the domain lock. Fixes #55720.
15379
15380 2004-03-17  Martin Baulig  <martin@ximian.com>
15381
15382         * mini.c (get_generic_field_inst): Removed, this'll never happen.
15383         (inflate_generic_field): Take the `MonoMethod *' instead of the
15384         `MonoClass *' and added support for generic method.
15385         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
15386         have a `field->parent->gen_params', only inflate the field if it's
15387         an open constructed type.
15388
15389 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15390
15391         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
15392         exception object instead of the preconstructed ones.
15393
15394 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15395
15396         * mini.c: reverted changed to sigsegv_signal_handler commited
15397         accidentally in the previous patch.
15398
15399 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15400
15401         * mini.c:
15402         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
15403         running --aot with an old assembly.
15404
15405 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
15406
15407         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
15408         point values.
15409
15410         * mini-sparc.c: Add support for v9 branches with prediction.
15411
15412 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
15413
15414         * mini.c (mini_init): #warning is GNUC only
15415
15416         * mini-sparc.h: implement __builtin_frame_address
15417         and __builtin_return_address for Sun C compiler
15418
15419 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
15420
15421         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
15422
15423 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
15424
15425         * basic-calls.cs: Add test for unaligned byref long argument passing.
15426
15427         * mini-ops.h: Add sparcv9 compare and branch instructions.
15428
15429         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
15430         v9 instructions if we have a v9 cpu.
15431
15432         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
15433         registers for global allocation.
15434
15435         * exceptions-sparc.c: Fixes.
15436         
15437 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
15438
15439         * liveness.c (mono_analyze_liveness): Optimized version.
15440
15441         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
15442
15443         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
15444         sparc work.
15445
15446         * basic-float.cs basic-calls.cs: New regression tests.
15447
15448 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
15449
15450         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
15451         sigaltstack implementation.
15452
15453         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
15454         
15455         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
15456         stuff if SIGSEGV_ON_ALTSTACK is not defined.
15457
15458 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
15459
15460         * mini.c: Fix warnings.
15461         
15462         * mini.c (mono_resolve_patch_target): New function which contains the
15463         arch independent part of the patching process.
15464
15465         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
15466         patching code to a separate function.
15467
15468 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
15469
15470         * mini.c (add_signal_handler): ifdef out on Windows
15471
15472 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
15473
15474         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
15475         cpu-sparc.md: Add exception handling support + other fixes.
15476
15477         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
15478         typed GC detection in --version.
15479
15480         * basic.cs exceptions.cs: New regression tests.
15481
15482         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
15483         the arch specific code can store data during a compilation.
15484
15485         * mini-ops.h: Add OP_SETFRET.
15486
15487         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
15488         function, register a separate icall for each arity, so the icalls can
15489         get a wrapper.
15490         
15491         * mini.c (mono_print_tree): Print negative offsets in a more readable
15492         form.
15493         
15494         * mini.c: Make signal handling work on sparc.
15495         
15496         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
15497
15498         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
15499
15500         * jit-icalls.c: Emulate truncl by aintl on solaris.
15501
15502         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
15503
15504 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
15505
15506         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
15507
15508 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
15509
15510         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
15511         a MarshalByRef type, inline a method that performs the check, taking into
15512         account that the object can be a proxy. Also implemented tow new opcodes:
15513         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15514         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
15515         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15516
15517 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
15518
15519         * mini-ppc.c: if a relative branch displacement is too big
15520         but it points to and area reachable with an absolute branch, 
15521         avoid the thunks.
15522
15523 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15524
15525         * mini.c: optimize small copies in cpblk.
15526
15527 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
15528
15529         * basic-calls.cs basic-float.cs: New regression tests.
15530
15531         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
15532         negative offsets from %fp. Implement localloc. Fix local register 
15533         allocation. Fix the case when the this argument needs to be saved to
15534         the stack. Implement some missing opcodes.
15535
15536 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
15537
15538         * mini.c (mini_method_compile): Reenable global regalloc in methods
15539         with exception handlers.
15540
15541         * linear-scan.c (mono_varlist_sort): Fix warning.
15542
15543         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
15544
15545         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
15546         regalloc costs.
15547
15548         * liveness.c: Make all variables uses in exception clauses volatile, to
15549         prevent them from being allocated to registers. Fixes #42136.
15550
15551 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
15552
15553         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
15554         causes regressions.
15555
15556         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
15557         argument to mono_arch_regalloc_cost.
15558
15559         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
15560         precisely.
15561
15562 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
15563
15564         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
15565         Make the cost of allocating a variable to a register arch dependent.
15566
15567         * basic-calls.cs: Fix compilation of tests.
15568         
15569         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
15570         helper function to cut back on the number of #ifdefs needed.
15571
15572         * mini-ppc.c: Fix compilation.
15573
15574         * basic-calls.cs: New regression tests.
15575
15576         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
15577
15578         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
15579         of l0 since that is callee saved.
15580
15581         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
15582         to virtual calls.
15583
15584         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
15585         of delay instruction.
15586
15587         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
15588
15589         * mini.h (MonoCallInst): Add 'virtual' flag.
15590
15591         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
15592
15593 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
15594
15595         * *.cs: New regression tests.
15596
15597         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
15598         work.
15599
15600         * mini.c (mono_runtime_install_handlers): Fix build.
15601
15602         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
15603         'signal_stack_size' members.
15604
15605         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
15606         alternate signal stack.
15607
15608         * exceptions-x86.c: Add stack overflow handling.
15609
15610         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
15611         functions to arch independent code.
15612
15613         * mini.c (mono_print_tree): Print more detailed info for load_membase
15614         opcodes.
15615         
15616 2004-02-23  Martin Baulig  <martin@ximian.com>
15617
15618         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
15619
15620 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15621
15622         * mini-x86.c: fixed reg allocation for div/rem.
15623
15624 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
15625
15626         * driver.c (mono_main): Report some configuratio options on --version.
15627
15628 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
15629
15630         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
15631         low in the address space. Correctly flush memory in thunks where we
15632         output native code.
15633
15634 2004-02-20  Martin Baulig  <martin@ximian.com>
15635
15636         * mini.c (mini_get_method): New static method; inflate all generic
15637         methods and methods in open generic instances.
15638         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
15639         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
15640
15641 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15642
15643         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
15644
15645         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
15646
15647 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
15648
15649         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
15650
15651         * mini-sparc.c (flushi mono_arch_output_basic_block): make
15652         it compile using Sun's compiler.
15653
15654 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15655
15656         * 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.
15657
15658         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
15659
15660 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15661
15662         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
15663         code.
15664         * mini-ppc.c: handle calls outside of the allowed range with thunks
15665         allocated using the code manager.
15666         * tramp-ppc.c: use the code manager to hold generated native code.
15667         Fixed the magic trampoline to just patch vtable entries.
15668
15669 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
15670
15671         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
15672         independent file.
15673
15674 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
15675
15676         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
15677         PPC.
15678
15679         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
15680         if we have a working __thread implementation.
15681
15682         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
15683         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
15684
15685 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
15686
15687         * mini-x86.c: Fix compilation under gcc 2.
15688         
15689 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
15690
15691         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
15692         contains a call to the wrapped function.
15693
15694         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
15695         OP_<CALL>_IMM opcodes, and use them under X86.
15696         
15697         * mini.c (mono_jit_find_compiled_method): Fix warning.
15698
15699         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
15700
15701         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
15702
15703         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
15704         functionality to mini.c.
15705
15706         * mini.c (mono_create_jump_trampoline): New function to create a jump
15707         trampoline. Return a compiled method instead of a trampoline if it
15708         exists. Add a cache for jump trampolines.
15709
15710         * mini.c (mono_jit_find_compiled_method): New function to return a
15711         compiled method if it exists.
15712
15713         * mini-x86.c: Call mono_create_jump_trampoline instead of 
15714         mono_arch_create_jit_trampoline.
15715
15716         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
15717         a jump trampoline. Fixes #52092.
15718         
15719 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
15720
15721         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
15722         which is not up-to-date. Add check_corlib_version () instead.
15723
15724         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
15725         have to call it.
15726         
15727         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
15728         since newer valgrind versions do not need it.
15729
15730         * mini.c (mono_jit_compile_method_with_opt): New helper function to
15731         compile a method with a given set of optimizations.
15732
15733         * mini.c: Compile icall wrappers on-demand instead of at startup.
15734
15735         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
15736         wrapper for an icall.
15737
15738 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
15739
15740         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
15741         #54063.
15742
15743         * iltests.il: Add test for non-empty stack before switch instruction.
15744
15745 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
15746
15747         * mini.c: Add support for new stringbuilder marshalling conventions.
15748
15749         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
15750
15751 2004-02-01  Martin Baulig  <martin@ximian.com>
15752
15753         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
15754         in `ginst->mtype_argv'.
15755
15756 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
15757
15758         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
15759         facilitate grepping.
15760
15761 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
15762
15763         * mini.c: fixed buglet in initobj generic implementation for references.
15764
15765 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
15766
15767         * Makefile.am: make the version script conditional.
15768         * jit-icalls.c: handle missing truncl().
15769
15770 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
15771
15772         * exceptions.cs: Add more tests for double->int conversion.
15773
15774         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
15775         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
15776
15777 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
15778
15779         * driver.c: make --verbose --version emit an error
15780         if the loaded corlib doesn't match the runtime version.
15781
15782 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
15783
15784         * mini-ppc.h: export ppc_patch().
15785         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
15786         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
15787         on par or better than on MacOSX.
15788
15789 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
15790
15791         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
15792         mono_lookup_pinvoke_call.
15793
15794         * mini-x86.c: Under windows, the default pinvoke calling convention is
15795         stdcall. Fixes #52834.
15796
15797         * mini.c (optimize_branches): Add an upper bound to the number of
15798         iterations to prevent infinite loops on strange loops. Fixes #53003.
15799
15800 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
15801
15802         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
15803         and ISINST. Fixes #52093.
15804
15805         * objects.cs (test_0_vector_array_cast): New tests.
15806         
15807 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
15808
15809         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15810         checking in Array.Set ().
15811
15812         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15813         #52590.
15814
15815         * object.cs (test_0_multi_array_cast): New regression test.
15816
15817 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15818
15819         * exceptions-ppc.c: fix build on Linux/PPC.
15820
15821 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
15822
15823         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15824         running under valgrind.
15825         (x86_magic_trampoline): Fix build bustage.
15826
15827         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15828         negative values as well. This is needed for the encoding of the line number
15829         info, since sometimes the line numbers are not in increasing order.
15830
15831 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
15832
15833         * cpu-pentium.md (localloc): Increase the size of the localloc 
15834         instruction since it is a loop under Win32.
15835
15836         * debug-mini.c (record_line_number): Get rid of unneccesary memory
15837         allocation.
15838
15839 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
15840
15841         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
15842         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
15843         Max Horn (max@quendi.de). Fix file names in comments.
15844
15845 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
15846
15847         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15848         avoid stack overflow.
15849         (replace_usage): Avoid uninitialized variable warnings.
15850
15851         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15852         and taking the address of valuetype variables.
15853
15854 2004-01-03  Patrik Torstensson
15855
15856         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15857         for other purposes than FP later on.
15858
15859 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
15860
15861         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15862         of tail calls.
15863
15864 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15865
15866         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15867
15868 2003-12-30  Patrik Torstensson <p@rxc.se>
15869
15870         * mini-x86.h: Decreased number of availiable fp regs.
15871         Solves corner cases with FP spilling.
15872
15873 2003-12-23  Patrik Torstensson <p@rxc.se>
15874
15875         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15876         for floating point stack tracking / spilling on x86. 
15877         Fixes bug #49012.
15878         
15879         * basic-float.cs: added float mul overflow test.
15880
15881 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
15882
15883         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15884
15885 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15886
15887         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15888         supports for cond branches that overflow the immediate
15889         overflow offset. mcs can compile simple programs.
15890
15891 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15892
15893         * exceptions-ppc.c: exception handling support wip:
15894         finally handlers get run on exception.
15895
15896 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
15897
15898         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
15899         profiling.
15900
15901 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15902
15903         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15904         initial support for stack walking and unwinding.
15905
15906 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
15907
15908         * driver.c (mono_main): Make corlib-out-of-sync message more 
15909         descriptive. Also remove verify_corlib call.
15910
15911 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15912
15913         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
15914         not overlap with other call's arguments, too.
15915
15916 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15917
15918         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
15919         move to arch-specific code the choice of arch-specific
15920         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15921         * mini.c: ensure emulation calls will not interleave
15922         with other calls.
15923
15924 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15925
15926         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
15927         the magic trampoline stack frame is dropped before executing
15928         the new method.
15929
15930 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
15931
15932         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
15933         and integer to fp conversions. Added support for overflowing
15934         arguments on the stack. Reserve a couple more registers as temps.
15935         Added support for aot compilation (as output still needs to be
15936         tweaked, though).
15937
15938 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
15939
15940         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
15941         Don't overwrite return register in some corner cases.
15942
15943 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
15944
15945         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
15946         static constructors when AOT compiling.
15947
15948         * driver.c (mono_main): Call mono_check_corlib_version.
15949
15950 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
15951
15952         * cpu-g4.md, basic.cs: fixed div target register.
15953
15954 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
15955
15956         * mini-ppc.c, basic.cs: shl_imm fix with test.
15957
15958 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15959
15960         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
15961         structures by value. Misc fixes.
15962         * objects.cs: more tests.
15963
15964 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
15965
15966         * mini-ppc.c: lconv.ovf.i implemented.
15967
15968 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15969
15970         * mini.c:
15971         (mini_init): don't error out if someone already called g_thread_init.
15972
15973 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
15974
15975         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
15976         to be any type per the spec. Fix abnormal memory usage when
15977         the same object is repeatedly thrown.
15978
15979 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
15980
15981         * mini.c: check for overruns in IL code.
15982
15983 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
15984
15985         * TODO: Add/remove some todo entries.
15986
15987 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
15988
15989         * driver.c (mono_main): Call mono_verify_corlib.
15990
15991 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
15992
15993         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
15994         This has been moved to mini.c
15995         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
15996         type being casted is marshalbyref it could be a proxy, so instead of
15997         emitting the type check code, emit a call to a runtime method that will
15998         perform the check by calling CanCastTo if needed.
15999
16000 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
16001
16002         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
16003         methods with large stack frames under Win32.
16004
16005 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
16006
16007         * Makefile.am: Distribute regression tests.
16008
16009         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
16010         at the end instead of inserting each variable into the sorted list.
16011
16012         * linear-scan.c (mono_varlist_sort): New helper function.
16013         
16014 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
16015
16016         * mini.c: ensure arguments and locals are within bounds.
16017
16018 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16019
16020         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
16021         related fixes.
16022
16023 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
16024
16025         * mini.c (mono_cprop_copy_values): Fix crash.
16026
16027         * aot.c: Set verbosity back to 0.
16028         
16029 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16030
16031         * regalloc.c: complete memory leak fix by Laurent Morichetti
16032         (l_m@pacbell.net).
16033
16034 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
16035
16036         * driver.c (main_thread_handler): Revert the previous patch.
16037
16038         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
16039         under valgrind.
16040
16041         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
16042         memory from the memory pool.
16043
16044         * driver.c (main_thread_handler): Turn on all optimizations when
16045         --aot is used.
16046
16047         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
16048         an array for better performance.
16049
16050         * regalloc.c (mono_regstate_assign): Fix memory leak.
16051
16052         * debug-mini.c (mono_debug_serialize_debug_info): New function to
16053         serialize the debug info.
16054
16055         * debug-mini.c (mono_debug_add_aot_method): New function to load the
16056         debug info from the serialized representation.
16057
16058         * aot.c: Save debug info into the generated file and load it when 
16059         loading a method.
16060
16061         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16062
16063 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
16064
16065         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
16066         More FP-related fixes.
16067
16068 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
16069
16070         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
16071         and register allocation buglet. Hello world now runs.
16072
16073 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
16074
16075         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
16076         * tramp-ppc.c: fixed class init trampoline.
16077         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
16078
16079 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
16080
16081         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
16082         mini.c: more ppc changes/fixes.
16083
16084 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
16085
16086         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
16087         Also optimize the case when the arguments are the same in the caller 
16088         and in the callee.
16089
16090         * iltests.il: Add tests for tail calls with valuetype arguments.
16091
16092 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
16093
16094         * mini-ppc.c: fixes for struct return type.
16095
16096 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
16097
16098         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
16099         mono_spillvar_offset() to arch-specific code.
16100
16101 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
16102
16103         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
16104
16105 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
16106
16107         * exceptions-x86.c: Fix stack space leaks.
16108         
16109         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
16110         registers from the lmf if the method has save_lmf set.
16111
16112 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
16113
16114         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
16115         of icall wrappers into InvokeInDomain, since these are now per-domain.
16116
16117 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
16118
16119         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
16120         make some opcode emulation and intrinsic ops enabled/disabled 
16121         according to the architecture. More fixes.
16122
16123 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
16124
16125         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
16126
16127 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
16128
16129         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
16130         arch-specific handling for 'this' and struct return type to
16131         arch-specific code.
16132
16133 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16134
16135         * aot.c: prevent divide by zero error when reporting (it happened with
16136         Accessibility.dll).
16137
16138 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
16139
16140         * mini.h (inst_switch): Remove unused macro.
16141
16142 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16143
16144         * aot.c:
16145         (load_aot_module): free 'info->methods' and 'info' properly. No more
16146         "free(): invalid pointer blah" messages when you have an old aot
16147         compiled assembly.
16148
16149 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
16150
16151         * jit-icalls.c, mini.c: Added support for context static fields.
16152
16153 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
16154
16155         * mini.c (mono_method_blittable): Methods which set LastError are not 
16156         blittable either. Fixes #51108.
16157         
16158 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
16159
16160         * mini.c: flush icache.
16161         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
16162
16163 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
16164
16165         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
16166
16167 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
16168
16169         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
16170         safe on IA32.
16171
16172         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
16173         vararg calls.
16174
16175         * inssel.brg (CEE_MKREFANY): Fix AOT case.
16176
16177 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
16178
16179         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
16180         instruction when the result is discarded.
16181
16182         * iltests.il (test_0_div_regalloc): New regression test.
16183
16184         * arrays.cs: Fix compilation error.
16185
16186 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
16187
16188         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
16189         float rules to inssel-x86.brg: sane architectures with FP registers
16190         don't need to implement these rules.
16191
16192 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
16193
16194         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
16195
16196 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16197
16198         * mini.h, inssel-long32.brg: fixed endianess issues in int64
16199         implementation of 32 bit systems.
16200
16201 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
16202
16203         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
16204         (Jeroen Zwartepoorte).
16205
16206 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16207
16208         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
16209         the caller and the callee matches.
16210         
16211         * mini.c (mono_method_to_ir): Add comment.
16212
16213         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
16214         signbit is missing on some platforms.
16215
16216 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
16217
16218         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
16219
16220         * mini.c (setup_jit_tls_data): Call the new function.
16221         
16222         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
16223
16224         * mini-x86.c: Add experimental support for fast access to the lmf
16225         structure under NPTL/Linux 2.6.x.
16226
16227 2003-11-06  Martin Baulig  <martin@ximian.com>
16228
16229         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
16230         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
16231         the debugger.
16232
16233 2003-11-02  Martin Baulig  <martin@ximian.com>
16234
16235         * mini.c (inflate_generic_field): New static method.
16236         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
16237         generic instance and the field is declared in a generic type, call
16238         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
16239
16240 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
16241
16242         * mini.h mini.c (mono_method_same_domain): New function to return
16243         whenever the caller and the callee are in the same domain.
16244
16245         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
16246
16247 2003-10-30  Martin Baulig  <martin@ximian.com>
16248
16249         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
16250         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
16251         method parameters.
16252         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
16253         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
16254
16255 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
16256
16257         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
16258         propagation.
16259
16260         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
16261         object here, so it is in the correct appdomain etc.
16262
16263 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
16264
16265         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
16266         already done.
16267         (mono_method_to_ir): Avoid freeing the type created returned from
16268         mono_type_create_from_typespec, since it is put into an internal cache
16269         by the function. Fixes pointer.exe.
16270
16271         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
16272         trampolines for icalls and pinvokes as well. Fixes #33569.
16273
16274 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
16275
16276         * mini.c: Update after appdomain changes.
16277
16278         * mini.c (mono_jit_compile_method_inner): Allways compile native
16279         method wrappers in the root domain, since there can only be one
16280         instance of them, whose address is stored in method->info.
16281
16282 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
16283
16284         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
16285         environment variable. Instead detect automatically whenever running
16286         under valgrind using the magic macro RUNNING_ON_VALGRIND from
16287         valgrind.h.
16288
16289 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
16290
16291         * trace.c, trace.h: New files that implement the new trace option
16292         parsing. 
16293
16294         * driver.c: Document new --trace options.
16295
16296         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
16297         mini-x86.c: Apply:
16298
16299         -       if (mono_jit_trace_calls)
16300         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
16301
16302         * mini.h: prototypes.
16303         
16304 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
16305
16306         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
16307
16308         * mini.c inssel.brg: Implement typedefbyref opcodes.
16309
16310         * mini.c (mono_jit_compile_method): Remove unused local variable.
16311
16312         * mini.c (mono_jit_compile_method_inner): Ditto.
16313         
16314 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
16315
16316         * tramp-x86.c (x86_class_init_trampoline): Fix build.
16317         
16318         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
16319
16320 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
16321
16322         * mini.c (mono_no_aot): Remove unused global variable.
16323
16324         * mini.c: Thread safety fixes.
16325
16326 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
16327
16328         * mini.c (mono_create_class_init_trampoline): Add a lock around
16329         class_init_hash_addr.
16330
16331         * arrays.cs (test_0_newarr_emulation): Add new regression test for
16332         #30073.
16333
16334         * mini.c: Decompose the NEWARR instruction before decomposing its
16335         arguments. Fixes #30073.
16336
16337 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
16338
16339         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
16340         convention.
16341
16342 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
16343
16344         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
16345
16346         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
16347
16348         * driver.c: Add support for compiling icall wrappers to --compile.
16349
16350 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
16351
16352         * inssel.brg: The empty value in class->interface_offsets is -1, not
16353         0. Fixes #49287.
16354
16355 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
16356
16357         * objects.cs: New test for 'is' operator on an array of interfaces.
16358
16359 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16360
16361         * tramp-ppc.c: update trampoline code to support jumps
16362         and class initialization.
16363
16364 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
16365
16366         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
16367
16368         * inssel.brg (OP_UNBOXCAST): Fix #46027.
16369
16370         * inssel.brg (OP_UNBOX): Remove unused rule.
16371
16372         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
16373         region instead of one for each method. Fixes #47813.
16374
16375 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
16376
16377         * exceptions.cs (test_0_nested_finally): New regression test for
16378         nested exception handlers.
16379
16380         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
16381
16382         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
16383
16384         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
16385         inlining.
16386
16387         * mini.c (mono_method_check_inlining): Make the inlining limit 
16388         configurable by an environment variable.
16389         
16390         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
16391
16392         * mini.h: Bump AOT file version.
16393
16394         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
16395         token, store the image along with the token, since the token might not 
16396         refer to the same image as the method containing the relocation, 
16397         because of inlining.
16398
16399 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
16400
16401         * mini.c (mono_precompile_assemblies): New function to compile
16402         all methods in all loaded assemblies.
16403
16404         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
16405
16406         * regalloc.h regalloc.c (MonoRegState): Change the type of 
16407         iassign and fassign to int*, since they can contain large negative
16408         values if the register is spilled. Also added some comments. Fixes
16409         #45817.
16410
16411         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
16412         under Win32. Fixes #42964.
16413
16414 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
16415
16416         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
16417
16418         * aot.c: Added support for AOT compiling methods which contain calls
16419         to wrappers. Currently, only remoting-invoke-with-check wrappers are
16420         handled.
16421         
16422         * driver.c (compile_all_methods): Run the compilation in a thread
16423         managed by mono. Fixes #44023.
16424
16425         * mini.c (mono_codegen): Print full method name in verbose output.
16426
16427         * mini-x86.c (mono_arch_patch_code): Fix warning.
16428         
16429         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
16430         jumps, since the method we are jumping to might be domain-specific.
16431
16432         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
16433
16434 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16435
16436         * inssel.brg: string chars are unsigned.
16437
16438 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
16439
16440         * TODO: New todo item.
16441
16442         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
16443         which calls mono_runtime_class_init and patches the call site to
16444         avoid further calls.
16445         (mono_arch_create_class_init_trampoline): New arch specific function 
16446         to create a class init trampoline.
16447         (create_trampoline_code): Generalized so it can create
16448         class init trampolines as well.
16449
16450         * mini.c (helper_sig_class_init_trampoline): New helper variable.
16451         (mono_create_class_init_trampoline): New function to create and cache
16452         class init trampolines.
16453         (mono_find_class_init_trampoline_by_addr): New function to lookup the
16454         vtable given the address of a class init trampoline. Used by the
16455         patching process.
16456         (mono_codegen): Generate a call to a trampoline instead of
16457         mono_runtime_class_init in LDSFLD[A].
16458         (mono_codegen): Add relocations for the new trampoline.
16459         
16460         * mini.h mini-x86.c aot.c: Added a new relocation type: 
16461         MONO_PATCH_INFO_CLASS_INIT.
16462
16463         * mini.h: Bump AOT version number.
16464
16465         * aot.c: Create a copy of the loaded code instead of using the original
16466         so methods which call each other will be close in memory, improving
16467         cache behaviour.
16468         
16469         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
16470         patch since it breaks the regression tests.
16471         
16472         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
16473         for the register saving instruction sequence since the 
16474         frame_state_for function in glibc 2.3.2 don't seem to detect it.
16475
16476 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
16477
16478         * TODO: Fix todo item && remove another.
16479
16480 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
16481
16482         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
16483         previous checkin.
16484
16485         * aot.c: Moved the check for MONO_LASTAOT into the initialization
16486         function of the module.
16487
16488         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
16489         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
16490         --no-aot command line option.
16491
16492 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
16493
16494         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
16495         by Bernie Solomon (bernard@ugsolutions.com).
16496
16497         * inssel.brg: Refactor the interface offset table related code into
16498         its separate functions and add support for the AOT case.
16499
16500 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
16501
16502         * aot.c (mono_aot_get_method_inner): Fix memory leak.
16503         
16504         * aot.c: Added mono_aot_verbose variable and made all debugging
16505         output depend on the value of this variable.
16506
16507         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
16508         method_label and info_label.
16509
16510         * mini.h mini-x86.c aot.c: Added a new relocation type 
16511         MONO_PATCH_INFO_IID for klass->interface_id.
16512
16513         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
16514         the MonoJitInfo structure.
16515
16516         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
16517         a non-root appdomain in shared mode.
16518
16519 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16520
16521         * aot.c: make aot loader less verbose. Remove free of unused variable.
16522
16523 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
16524
16525         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
16526
16527         * .cvsignore: Added *.dll.
16528
16529         * mini.c (mono_print_tree_nl): New function callable while debugging.
16530
16531         * mini.c (mono_print_code): Export this.
16532
16533         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
16534         patched code.
16535
16536 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
16537
16538         * mini.h (MonoCompile): Added 'jit_info' field.
16539
16540         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
16541         the cfg structure, since it is needed by the AOT compiler.
16542
16543         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16544
16545         * aot.c: A major rewrite. Changes include:
16546         - save exception tables for methods which have them.
16547         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
16548         to g_module_symbol.
16549         - reworked the file format so it is now much smaller and needs
16550         fewer relocation entries.
16551         
16552 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16553
16554         * aot.c (load_aot_module): Fix build bustage on platforms without
16555         Boehm GC.
16556
16557 2003-09-04  Martin Baulig  <martin@ximian.com>
16558
16559         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
16560
16561 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16562
16563         * TODO: Some new optimization ideas.
16564
16565         * aot.c: Move AOT module loading logic here from mono_assembly_open.
16566
16567         * aot.c: Save the optimization flags used to compile the code into
16568         the AOT module.
16569
16570         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
16571         support emitting domain specific code.
16572         
16573         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
16574         no longer domain neutral. It can be made domain neutral by compiling 
16575         with --optimize=shared.
16576
16577         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
16578         between appdomains.
16579
16580         * driver.c mini.h mini.c: New --no-aot debugging option which disables
16581         loading of AOT code.
16582
16583         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
16584         
16585         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
16586         if there is no domain neutrality information.
16587
16588 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
16589
16590         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
16591         format version into the generated library.
16592
16593         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
16594         callee method into the caller since one of them could be shared.
16595
16596         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
16597         system exceptions from AOT code now works.
16598
16599         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
16600         method if it is domain neutral and the callee is not.
16601
16602         * graph.c (cfg_emit_one_loop_level): Fix warning.
16603
16604 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
16605
16606         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
16607         last checkin.
16608
16609 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
16610
16611         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
16612         is needed  by code which is executed before mono_runtime_init ().
16613         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
16614         
16615         * mini.c (mono_thread_abort): Fix warning.
16616         (mono_jit_compile_method): Call static constructor in the AOT case too.
16617
16618         * aot.c (mono_compile_assembly): Fix warning.
16619
16620 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16621
16622         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
16623
16624 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
16625
16626         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
16627
16628         * cpu-pentium.md: Fix the length of call opcodes so they include the
16629         ESP restoring instruction. Fixes #47968.
16630
16631 2003-08-28  Martin Baulig  <martin@ximian.com>
16632
16633         * mini-x86.c (mono_arch_call_opcode): Added support for
16634         MONO_TYPE_GENERICINST.
16635
16636         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
16637
16638 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
16639
16640         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
16641         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
16642
16643         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
16644         metadata_section.
16645
16646 2003-08-26  Martin Baulig  <martin@ximian.com>
16647
16648         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
16649         when reporting an error, set this to the actual error location.
16650         (mono_method_to_ir): Report the correct error location if
16651         get_basic_blocks() returned an error.
16652
16653 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
16654
16655         * mini.c (mono_type_blittable): OBJECT is not blittable.
16656         (mono_method_blittable): Methods which have marshalling descriptors
16657         are not blittable either. Fixes #47842.
16658
16659 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
16660
16661         * driver.c mini.c: Use an environment variable instead of a global 
16662         variable. Also fix the build.
16663
16664         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
16665         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
16666         reporting this. 
16667
16668         * driver.c mini.c: Added --with-valgrind option to turn off some
16669         code which prevents mono from running under valgrind.
16670
16671         * mini.c (mono_emit_call_args): Fixed warning.
16672
16673         * mini.c (mono_emulate_opcode): Fixed warning.
16674
16675 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16676
16677         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
16678         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
16679         regalloc.c, regalloc.h: specify available registers in arch-specific
16680         code and support floats in the regallocator (patch by Laurent Morichetti 
16681         <l_m@pacbell.net>)
16682
16683 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16684
16685         * mini.c: mono_thread_current() can be called only after
16686         mono_runtime_init(): rearrange code to not call it early on.
16687
16688 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16689
16690         * mini.c: allocate jump tables in the code mempools.
16691
16692 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16693
16694         * mini.c, mini.h: make sure per-thread data allocated by the jit is
16695         freed.
16696
16697 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
16698
16699         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
16700         12 to 16.  This fixes bug #47453.
16701
16702
16703 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16704
16705         * mini-ppc.c: fixed indexed load and unsigned compares.
16706
16707 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
16708
16709         * mini.c: reenabled installation of handler for
16710           thread abort signal.
16711
16712 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16713
16714         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
16715         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
16716         until it's fixed and actually useful.
16717
16718 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16719
16720         * inssel-long32.brg: couple more opcodes implemented.
16721
16722 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16723         
16724         * mini-sparc.c: Even more opcodes implemeted.
16725
16726 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
16727
16728         * mini-sparc.c: More opcodes implemented.
16729
16730 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
16731
16732         * mini-sparc.c: More opcodes implemented.
16733
16734 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16735
16736         * inssel-sparc.brg: Add some needed rules.  Direct
16737         copy from PPC.
16738         * Makefile.am: Use inssel-sparc.brg
16739         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
16740         an assert happy for now.
16741
16742 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
16743
16744         * mini-sparc.c: Fixed compile errors.
16745         * exceptions-sparc.c: Same.  We now produce a mono binary 
16746         on sparc-linux.  Yea.
16747
16748 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
16749
16750         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
16751         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
16752         They compile, but do not work.
16753
16754 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16755
16756         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
16757         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
16758         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
16759         (ct@gentoo.org).
16760
16761 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16762
16763         * mini.c: more opcodes implemented and better support for generics.
16764
16765 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16766
16767         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
16768         * mini.c, mini.h: first cut at generics support: some new instructions 
16769         added and changed the behaviour of some of the existing ones.
16770
16771 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
16772
16773         * mini.c: Removed definition of metadata_shared mutex here.
16774
16775 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16776
16777         * mini-x86.c: make vararg calls work for instance methods.
16778
16779 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16780
16781         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
16782         returns the arguments in a separte list, now.
16783
16784 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16785
16786         * aot.c, mini.c: updates for array type representation changes.
16787
16788 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
16789
16790         * mini.c: register function to perform jit shutdown.
16791
16792 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16793
16794         * mini.c: use a faster allocator if possible.
16795
16796 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16797
16798         * aot.c: some cleanups and portability changes.
16799
16800 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16801
16802         * mini.c: use faster allocation for CEE_BOX if possible.
16803
16804 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16805
16806         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
16807         Moved inlined mempcy code to its own function so that is can be
16808         reused. Added an inline memset function as well (optimized initobj).
16809         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16810
16811 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16812
16813         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16814
16815 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16816
16817         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16818         arch code can setup the cpu for CLR execution, if needed.
16819         We use it on x86 to set the precision of FP operations.
16820
16821 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16822
16823         * mini.c: disable some optimizations if we can guess they'll cost too
16824         much for a given method.
16825
16826 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16827
16828         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16829         
16830 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16831         * mini.h mini.c mini-x86.c: Added instruction level coverage 
16832         info collection support.
16833
16834 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16835
16836         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16837         is now implemented in the profiling API. Get rid of a couple of
16838         unnecessary global variables.
16839
16840 2003-06-15  Nick Drochak <ndrochak@gol.com>
16841
16842         * basic-long.cs: tests for negative values for bigmul, and unsigned.
16843         * cpu-g4.md: add op_bigmul and op_bigmul_un
16844         * cpu_pentium.md: add op_bigmul_un
16845         * inssel-long32.brg: add rule for unsigned bigmul
16846         * mini-ops.h: define OP_BIGMUL_UN
16847         * mini-x86.c: THE BUG: handle (un)signed properly
16848         * mini.c: choose unsigned opcode if needed.
16849         This set of patches fixes bug #44291
16850
16851 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
16852
16853         * mini.c (optimize_branches): improved to handle all kinds of
16854         conditional branches.
16855
16856 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16857
16858         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16859         don't raise exceptions.
16860
16861 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16862
16863         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16864         to arch-specific files.
16865
16866 2003-06-09  Martin Baulig  <martin@ximian.com>
16867
16868         * Makefile.am (libs): Added $(LIBGC_LIBS).
16869
16870 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16871
16872         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16873         and OP_ATAN (fixes bug#44293).
16874
16875 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16876
16877         * Makefile.am, mini-x86.c: rename cpu description array to
16878         pentium_desc, since some compilers define the 'pentium' preprocessor
16879         symbol.
16880
16881 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
16882
16883         * mini.c (mini_select_instructions): add explicit branch if the
16884         following block is not the false target of a conditional branch -
16885         we need this with any optimization that reorder or remove bblocks
16886
16887         * mini.c (optimize_branches): bug fixes
16888
16889 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
16890
16891         * mini.c (mono_method_to_ir): inline static readonly fields
16892
16893         * ssa.c (fold_tree): start cfold support for long (very simple
16894         cases only)
16895
16896         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16897
16898 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16899
16900         * inssel.brg: fixed memcpy (bug #44219).
16901
16902 2003-06-05  Dick Porter  <dick@ximian.com>
16903
16904         * driver.c: Set the glib log levels to not abort if g_message
16905         recurses.
16906
16907         g_set_prgname() has to happen before mini_init() so that the
16908         process handle gets the info.
16909         
16910 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16911
16912         * driver.c: add intrins to the default optimizations to get wider
16913         exposure.
16914
16915 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16916
16917         * mini.h: some large basic blocks will overflow a 16-bit
16918         integers for symbolic registers.
16919
16920 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16921
16922         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16923         (mono_arch_output_basic_block): fix bug 43499 
16924
16925 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16926
16927         * mini.c: kill duplicated definition of mono_debug_format.
16928
16929 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
16930
16931         * mini-x86.c, arrays.cs: fixed register allocation bug.
16932
16933 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16934
16935         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
16936
16937         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
16938
16939 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16940
16941         * mini.c:
16942         (print_method_from_ip): also print source location information if
16943         available.
16944
16945 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
16946
16947         * mini.c (mono_find_block_region): bug fix in region code
16948         (mini_method_compile): enable removing unreachable code again, but
16949         only in methods without exception clauses.
16950
16951 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16952
16953         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
16954         Implemented arglist opcode and handling of TypedReference type.
16955         Fixed x86 call convention when a structure is returned.
16956         Minimal support for calling static vararg methods.
16957
16958 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
16959
16960         * mini.c (mini_method_compile):  always remove unreachable code,
16961         because the code in them may be inconsistent  (access to dead
16962         variables for example).
16963
16964 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
16965
16966         * driver.c, debug-mini.c: warning fixes.
16967
16968 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
16969
16970         * Makefile.am, jit.h, mini.h: install header for embedding mono.
16971
16972 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
16973
16974         * mini.c: thread-static fields are registered in mono_class_vtable(),
16975         so ensure the function is called before checking for them.
16976
16977 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
16978
16979         * mini.c (optimize_branches): fix for bug 43586
16980
16981         * jit-icalls.c (mono_llmult_ovf): added an additional check for
16982         overflow (fixes Bug #43639)
16983
16984 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16985
16986         * mini.c, objects.cs: allow the use of stobj for primitive types.
16987
16988 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16989
16990         * mini.c: be less strict about argument checking until we support
16991         running the verifier.
16992
16993 2003-05-27  Nick Drochak <ndrochak@gol.com>
16994
16995         * basic-long.cs: tests for (ulong)int * (ulong)int also
16996         * mini.c: use the same trick for (ulong)int * (ulong)int
16997
16998 2003-05-27  Nick Drochak <ndrochak@gol.com>
16999
17000         * basic-long.cs: add regression test for (long)int * (long)int
17001         * cpu-pentium.md: add op_bigmul specification
17002         * inssel-long32.brg: add OP_BIGMUL rule
17003         * mini-ops.h: add OP_BIGMUL
17004         * mini-x86.c: register allocator: handle case where src1 needs to be
17005         in EAX.
17006         * mini.c: substitute special BIGMUL opcode in the tree for 
17007         (long)int * (long)int
17008
17009 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
17010
17011         * jit-icalls.c: call the type ctor on field access if needed.
17012
17013 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17014
17015         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
17016         to a method (including results of ldelema, bug#43207).
17017
17018 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
17019
17020         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
17021         colors to show exception handler blocks.
17022
17023         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
17024         (fix for pinvoke7.cs).
17025
17026 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17027
17028         * mini.h, mini.c: ensure correct initialization order for types that
17029         require it. Prepare for lazy compilation of jit icall wrappers.
17030         Provide a name for opcode emulation to reduce unneeded mallocing.
17031
17032 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
17033
17034         * mini-x86.c: better register restoring code and profiling
17035         support for tail calls.
17036
17037 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17038
17039         * mini.h, driver.c: prepare for leaf methods optimization.
17040
17041 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17042
17043         * mini.c: get targets of branches before converting a method.
17044
17045 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
17046
17047         * mini.c (optimize_branches): added some experimental code (disbaled) 
17048
17049 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
17050
17051         * mini.c (optimize_branches): fix branch to branch optimization 
17052
17053         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
17054
17055         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
17056
17057         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
17058
17059         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
17060         if needed.
17061
17062 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
17063
17064         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
17065         enable use of interface variables again.
17066
17067         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
17068         I1 to registers because there is no simply way to sign extend 8bit
17069         quantities in caller saved registers on x86.
17070
17071         * inssel-float.brg: set costs of some rules to 2 so
17072         that monobure always select the arch. specific ones if supplied,
17073         regardless of the order we pass the files to monoburg.
17074
17075 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17076
17077         * mini.c, mini-x86.c: since the magic trampoline for jumps
17078         can't patch the code directly, we do it as soon as the
17079         method gets compiled.
17080
17081 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
17082
17083         * mini-x86.c, mini.h: introduce a new patching method
17084         to support CEE_JMP and tail calls.
17085         * mini.c: obey tail.call. Don't precompile methods target
17086         of CEE_JMP.
17087         * tramp-x86.c: new trampoline code to handle methods
17088         reached through a jump.
17089
17090 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
17091
17092         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
17093         bit values to registers
17094
17095 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
17096
17097         * mini.c (mono_compile_get_interface_var): share interface
17098         variables if possible.
17099
17100 2003-05-16  Martin Baulig  <martin@ximian.com>
17101
17102         * debug-mini.c (mono_init_debugger): New function to initialize
17103         the debugger.  This is not in the debugger since it needs to
17104         access some of mini's internals.
17105
17106 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
17107
17108         * mini.c (mono_method_to_ir): inlining fixes/cleanups
17109
17110 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
17111
17112         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
17113         for value type handling.
17114
17115 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
17116
17117         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
17118         (mono_method_check_inlining): enable inlining of all kinds of wrappers
17119
17120 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
17121
17122         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
17123           the constructor through a proxy.
17124
17125 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17126
17127         * jit-icalls.c, inssel.brg: fixes to array element address
17128         calculations.
17129
17130 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
17131
17132         * mini-x86.c (is_regsize_var): allocate pointer to registers
17133
17134 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17135
17136         * driver.c: fixed typo, added intrins to the set of optimizations
17137         tested with regressions.
17138
17139 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
17140
17141         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
17142         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
17143         test case.
17144
17145 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
17146
17147         * inssel.brg: remove some common pop instructions without side effects
17148
17149 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
17150
17151         * inssel-x86.brg: fixed thinko in int to double conversions.
17152
17153 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
17154
17155         * mini.c, jit-icalls.c: added runtime thread-static variable support.
17156
17157 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
17158
17159         * inssel-long32.brg: two more missing instructions.
17160
17161 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
17162
17163         * mini.c (mono_emit_call_args): set the cil_code for all arguments
17164         if not already set.
17165
17166 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
17167
17168         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
17169         correctly.
17170
17171         * basic-float.cs: Added tests for negative zero.
17172
17173 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17174
17175         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
17176         a couple of missing operations for long casts, with test cases.
17177
17178 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17179
17180         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
17181
17182 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
17183
17184         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
17185         code size estimation.
17186
17187 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
17188
17189         * mini.c (mono_jit_create_remoting_trampoline): make it work with
17190         abstract methods (fix bug 42542)
17191
17192         * aot.c: add ability to handle array types
17193         
17194 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
17195
17196         * mini.c: Call the _specific versions of the object allocation
17197         functions if possible.
17198
17199 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
17200
17201         * driver.c: call setlocale ().
17202
17203 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
17204
17205         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
17206         windows build.
17207
17208 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
17209
17210         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
17211
17212         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
17213         wrappers (fix bug 42122)
17214
17215 2003-05-04  Martin Baulig  <martin@ximian.com>
17216
17217         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
17218
17219         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
17220         s/mini_set_defaults/mono_set_defaults/g.
17221
17222 2003-05-04  Martin Baulig  <martin@ximian.com>
17223
17224         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
17225
17226 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17227
17228         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
17229         (reported by Don Roberts).
17230
17231 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
17232
17233         * mini.c: temporarily work around two bugs for this release.
17234
17235 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17236
17237         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
17238         that contains -export-dynamic and it makes using the ld script
17239         useless.
17240         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
17241
17242 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17243
17244         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
17245         specific cpu.
17246
17247 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17248
17249         * mini.c: make sure leave calls all the needed finally blocks,
17250         even when the target jumps out of multiple exception clauses.
17251
17252 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17253
17254         * ldscript, Makefile.am: add linker script to reduce the number of
17255         exported symbols (should also fix the issues with libwine defining
17256         some of the same symbols in io-layer).
17257
17258 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
17259
17260         * driver.c (mini_main): Avoid assertion when no file name is given on 
17261         the command line.
17262
17263 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
17264
17265         * driver.c: added --version/-V command line option.
17266         Added the inline optimization in the regression tests.
17267
17268 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17269
17270         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
17271         to the type in the method signature (fixes bug#42134).
17272
17273 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
17274
17275         * mini.c: when inlining, check this is not null only when needed (bug #42135).
17276
17277 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
17278
17279         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
17280
17281 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17282
17283         * driver.c: fixed bug #42100.
17284
17285 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
17286
17287         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
17288
17289 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17290
17291         * mini.c: moved most of the code required to do inlining to its own
17292         function so it can be reused. Inline also ctors if appropriate.
17293
17294 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
17295
17296         * Makefile.am: Link with -export-dynamic so shared libs loaded by
17297         the runtime can call mono API functions.
17298
17299 2003-04-27  Martin Baulig  <martin@ximian.com>
17300
17301         * debug-mini.c (mono_debug_init_method): Added
17302         `guint32 breakpoint_id' argument; if the method has a breakpoint,
17303         send a notification to the debugger.
17304
17305         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
17306         running in the Mono Debugger, just pass the breakpoint number to
17307         mono_debug_init_method().
17308
17309         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
17310
17311 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
17312
17313         * mini.c: allow some more unsafe compares.
17314
17315 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17316
17317         * mini-x86.c, Makefile.am: make distcheck works (partially from
17318         a patch by Richard Lee <r.h.lee@attbi.com>).
17319         * regset.c, regset.h: removed, they are unused.
17320
17321 2003-04-25  Dick Porter  <dick@ximian.com>
17322
17323         * driver.c: Usage reports the name as 'mono' not 'mini'
17324         * exceptions-x86.c: Build and run on freebsd
17325
17326 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17327
17328         * Makefile.am: install the program with the 'mono' name and
17329         the library as libmono instead of mini and libmini.
17330
17331 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17332
17333         * driver.c: provide the APIs for the embedding interface of the old jit.
17334
17335 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
17336
17337         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
17338
17339 2003-04-23  Martin Baulig  <martin@ximian.com>
17340
17341         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
17342
17343         * driver.c: Added `--debug' command line argument to enable
17344         debugging support.
17345
17346 2003-04-23  Martin Baulig  <martin@ximian.com>
17347
17348         * debug.[ch]: Removed.  The code is now in
17349         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
17350
17351         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
17352         last six months.
17353
17354 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
17355
17356         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
17357
17358 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17359
17360         * mini.c:
17361         (mini_cleanup): moved mono_runtime_cleanup call after the call to
17362         mono_domain_finalize.
17363         (mini_method_compile): use mono_method_profile* if the the option is
17364         enabled.
17365
17366 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
17367
17368         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17369         methods with their wrapper.
17370
17371         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17372         methods with their wrapper.
17373
17374         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
17375         their wrapper.
17376
17377         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
17378         wrapper.
17379
17380         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
17381         methods.
17382
17383 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
17384
17385         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
17386
17387 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
17388
17389         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
17390         of the mempool. This is slightly faster and uses less memory
17391
17392 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17393
17394         * mini.c: avoid O(n) allocation for variables.
17395
17396 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17397
17398         * mini.c: handle items on the stack after inlining methods.
17399
17400 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17401
17402         * mini.c: make the method->opcode optimization dependent
17403         on MONO_OPT_INSTRINS and do it lazily.
17404
17405 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17406
17407         * driver.c: print overall results at the end of regression run.
17408
17409 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17410
17411         * inssel.brg: don't overwrite symbolic registers.
17412
17413 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17414
17415         * inssel-x86.brg: fix conversion from long to float.
17416
17417 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
17418
17419         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
17420
17421 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
17422
17423         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
17424
17425         * driver.c: Added --print-vtable option as in the old JIT.
17426
17427 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17428
17429         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
17430
17431 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
17432
17433         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
17434
17435 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
17436
17437         * mini.c regalloc.c regalloc.h: Fix memory leak.
17438
17439 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
17440
17441         * aot.c (mono_aot_get_method): register all used strings
17442
17443 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17444
17445         * mini.c: always intern strings references with ldstr at compile time.
17446
17447 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17448
17449         * Makefile.am: add BUILT_SOURCES.
17450
17451 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17452
17453         * driver.c: give a better error message when the assembly to execute
17454         doesn't have an entry point.
17455
17456 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
17457
17458         * Makefile.am: added hack for automake
17459
17460         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
17461         correct sematics.
17462
17463         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
17464
17465 22003-04-07  Martin Baulig  <martin@ximian.com>
17466
17467         * Makefile.am: Added Makefile.am.
17468
17469         * debugger-main.c: Removed, this is now in the debugger where it
17470         belongs.
17471
17472         * mini.pc.in: Call this package `mini' for the moment.
17473
17474
17475
17476
17477
17478
17479
17480
17481
17482
17483
17484
17485
17486