2008-11-21 Zoltan Varga <vargaz@gmail.com>
[mono.git] / mono / mini / ChangeLog
1 2008-11-21  Zoltan Varga  <vargaz@gmail.com>
2
3         * mini-ops.h: Correct the dreg type of OP_LOADI8_MEMBASE.
4         
5         * mini-ops.h: Correct the dreg type of a few long opcodes.
6
7         * mini-amd64.h: Applied patch from Mihai Chelaru <kefren@ngnetworks.ro>.
8         Add netbsd support.
9
10 Fri Nov 21 12:52:23 CET 2008 Paolo Molaro <lupus@ximian.com>
11
12         * mini-ppc.c: remove negative stack references in epilog
13         for platforms that don't support the red zone.
14
15 2008-11-21  Mark Probst  <mark.probst@gmail.com>
16
17         * mini-ppc64.h, cpu-ppc64.md: Fixed caller/callee saved floating
18         point regs.  Now PPC64 passes basic-calls.exe.
19
20 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
21
22         * basic-simd.cs: Add tests for accessors of Vector2l.
23
24 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
25
26         * mini-ops.h: Added OP_INSERTX_I8_SLOW,.
27
28         * mini-x86.c (mono_arch_decompose_long_opts): Decompose OP_INSERTX_I8_SLOW.
29         
30         * simd-intrinsics.c: Add support for Vector2l and Vector2ul.
31
32 2008-11-21  Mark Probst  <mark.probst@gmail.com>
33
34         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Several fixes.  Now
35         PPC64 passes basic-long.exe.
36
37 2008-11-20  Mark Probst  <mark.probst@gmail.com>
38
39         * decompose.c: Decompose carry and overflow add on PPC64 like on
40         other 64 bit archs.  Don't decompose sub at all on PPC64.
41
42         * mini-ppc64.c, exceptions-ppc64.c, tramp-ppc64.c, cpu-ppc64.md:
43         Several fixes and new opcodes.  Now PPC64 runs (but doesn't pass)
44         basic-long.exe.
45
46 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
47
48         * basic-simd.cs: Add tests for accessors of Vector2d.
49
50 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
51
52         * mini-ops.h: Added OP_INSERTX_R8_SLOW,.
53
54         * cpu-x86.md: Same.
55
56         * mini-x86.c (mono_arch_output_basic_block): Same.
57         
58         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector2d.
59
60 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
61
62         * basic-simd.cs: Add tests for accessors of Vector4f.
63
64 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
65
66         * mini-ops.h: Added OP_INSERTX_R4_SLOW,.
67
68         * cpu-x86.md: Same.
69
70         * mini-x86.c (mono_arch_output_basic_block): Same.
71         
72         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4f.
73
74 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
75
76         * basic-simd.cs: Add tests for accessors of Vector4i and Vector4ui.
77
78 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
79
80         * mini-ops.h: Added OP_INSERTX_I4_SLOW,.
81
82         * cpu-x86.md: Same.
83
84         * mini-x86.c (mono_arch_output_basic_block): Same.
85         
86         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector4i and Vector4ui.
87
88 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
89
90         * cpu-x86.md: Use reasonable sizes for extractx_u2 and insertx_u1_slow.
91
92 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
93
94         * simd-intrinsics.c: Enable setters for Vector16sb.
95
96 2008-11-20  Rodrigo Kumpera  <rkumpera@novell.com>
97
98         * mini-ops.h: Added OP_EXTRACTX_U2, OP_INSERTX_U1_SLOW.
99
100         * cpu-x86.md: Same.
101
102         * mini-x86.c (mono_arch_output_basic_block): Same.
103         
104         * simd-intrinsics.c (simd_intrinsic_emit_setter): Add support for Vector16b.
105
106 2008-11-19  Rodrigo Kumpera  <rkumpera@novell.com>
107
108         * simd-intrinsics.c: Implement setter for Vector8us.
109
110 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
111
112         * aot-compiler.c (mono_save_xdebug_info): Emit correct location info
113         for dead variables.
114
115 Wed Nov 19 18:27:41 CET 2008 Paolo Molaro <lupus@ximian.com>
116
117         * mini-ppc.c: remove references to the red zone in the prolog
118         (for systems that don't support it).
119
120 2008-11-19  Mark Probst  <mark.probst@gmail.com>
121
122         * cpu-ppc64.md: Fixed a few instruction lengths.
123
124         * mini-ppc64.c: Don't emit SETLRET.  PPC64 passes basic-float.exe,
125         now.
126
127 2008-11-19  Mark Probst  <mark.probst@gmail.com>
128
129         * mini-ppc64.c, cpu-ppc64.md: Fixed some opcodes.  PPC64 passes
130         basic.exe now.
131
132 2008-11-19  Zoltan Varga  <vargaz@gmail.com>
133
134         * aot-compiler.c (mono_save_xdebug_info): Add more parameter types.
135
136 2008-11-18  Rodrigo Kumpera  <rkumpera@novell.com>
137
138         * mini-ops.h: Added OP_INSERT_I2.
139
140         * cpu-x86.md: Same.
141
142         * mini-x86.c (mono_arch_output_basic_block): Same.
143         
144         * simd-intrinsics.c: Implement setter for Vector8s.
145
146         * simd-methods.h: Add the names of get setters of Vector8s.
147
148 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
149
150         * aot-compiler.c (mono_save_xdebug_info): Add support for parameters.
151         
152         * aot-compiler.c (mono_save_xdebug_info): Add preliminary support for
153         parameters.
154
155         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
156
157 2008-11-18  Mark Probst  <mark.probst@gmail.com>
158
159         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, cpu-ppc64.md: Changes
160         for PPC64.  An empty program runs now.
161
162 2008-11-18  Zoltan Varga  <vargaz@gmail.com>
163
164         * unwind.h (MonoUnwindOp): Change the 'val' to a signed type.
165
166         * aot-compiler.c mini.c mini.h: Add a JIT debugging mode modelled after
167         a similar mode in Kaffe: When the the MONO_XDEBUG env var is set, debugging
168         info for JITted code is emitted into a shared library, loadable into gdb.
169
170 2008-11-18  Mark Probst  <mark.probst@gmail.com>
171
172         * Makefile.am: Changes to build PPC64.
173
174         * mini-arch.h: Include mini-ppc64.h on PPC64.
175
176 2008-11-18  Mark Probst  <mark.probst@gmail.com>
177
178         * mini-ppc64.c, mini-ppc64.h, cpu-ppc64.md: Updated with changes
179         in PPC code up to r119147.
180
181 2008-11-18  Mark Probst  <mark.probst@gmail.com>
182
183         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
184         cpu-ppc64.md: Changes for PPC64.
185
186         Based on code submitted by andreas.faerber@web.de at
187         https://bugzilla.novell.com/show_bug.cgi?id=324134 under the
188         X11/MIT license.
189
190 2008-11-18  Mark Probst  <mark.probst@gmail.com>
191
192         * mini-ppc64.c, mini-ppc64.h, tramp-ppc64.c, exceptions-ppc64.c,
193         cpu-ppc64.md: Copied from the corresponding PPC files from
194         r118846.
195
196 2008-11-18  Scott Peterson  <lunchtimemama@novell.com>
197
198         * mini-ops.h: Added OP_ROUND.
199
200         * cpu-x86.md: Added round.
201
202         * mini-x86.c: Added support for intrinsicing Math.Round (double).
203
204         * basic-math.cs: Added test_0_round to test rounding.
205
206         Contributed under MIT/X11 license.
207
208 2008-11-17  Bill Holmes  <billholmes54@gmail.com>
209
210         * aot-compiler.c : Fix the Winx64 build.
211
212         Contributed under MIT/X11 license.
213
214 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
215
216         * mini-x86.c (mono_arch_output_basic_block): Use movsd instead of monvups
217         in OP_EXTRACT_R8 to avoid possible stack corruption.
218
219 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
220
221         * mini-ops.h: Added OP_EXTRACT_R8/I8.
222
223         * cpu-x86.md: Added extract_r8.
224
225         * mini-x86.c (mono_arch_output_basic_block): Emmit OP_EXTRACT_R8.
226         
227         * mini-x86.c: Added mono_arch_decompose_long_opts to break OP_EXTRACT_I8 into
228         a couple of OP_EXTRACT_I4.
229
230         * mini-x86.h: Define MONO_ARCH_HAVE_DECOMPOSE_LONG_OPTS if simd is enabled.
231
232         * simd-intrinsics.c: Implement getters for Vector2l/2ul/2d.
233
234 2008-11-17  Rodrigo Kumpera  <rkumpera@novell.com>
235
236         * simd-intrinsics.c (vector2l_intrinsics): CompareGreaterThan requires sse 4.2
237         and not 4.1. 
238
239 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
240
241         * method-to-ir.c (handle_delegate_ctor): Emit the address of the delegate
242         trampoline as an AOT const of the proper type instead of MONO_PATCH_INFO_ABS.
243
244         * mini.c (mono_codegen): Remove the handling of delegate trampolines, they
245         are not needed any more.
246
247         * mini.h: Remove the unused INS_LIST macros.
248
249         * mini.c (mini_method_compile): Remove a disable globalra case which is no
250         longer needed.
251
252         * *.h *.c: Remove duplicate MonoInst emission macros, use the ones in
253         ir-emit.h.
254
255         * regalloc.h *.c: Remove references to mono_regstate_next_int (), use
256         mono_alloc_ireg () instead.
257
258         * mini-<ARCH>.c: Include ir-emit.h. Remove duplicate MonoInst emission
259         macros.
260
261         * mini-amd64.c (emit_load_volatile_arguments): Removed, not needed
262         on amd64.
263
264         * aot-runtime.c (load_aot_module): Disable AOT when running under
265         CAS.
266
267         * mini-amd64.h: Change the monitor fastpath defines to check for
268         !PLATFORM_WIN32 so they work on *bsd too.
269
270         * mini.h mini.c mini-hhpa.c: Remove more unused code.
271
272         * mini-s390.c mini-s390x.c: Remove !cfg->new_ir code.
273
274         * mini.h (MonoCompile): Remove new_ir flag.
275
276         * regalloc.h regalloc.c: Remove unused code.
277
278         * cpu-*.md: Remove more unused opcodes.
279
280         * simple-cee-ops.h simple-mini-ops.h: Removed.
281
282         * mini-ops.h *.c cpu-<ARCH>.md: Remove more unused opcodes.
283         
284 2008-11-17  Zoltan Varga  <vargaz@gmail.com>
285
286         * aliasing.h: Removed.
287
288         * *.c: Remove references to aliasing.h and inssel.h.
289
290         * mini.c: Remove additional unused functions.
291
292         * mini-ops.h cpu-*.md: Remove unused opcodes.
293
294 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
295
296         Remove the old JIT code.
297
298         * inssel*.brg: Removed.
299
300         * ssa.c abcremoval.c aliasing.c: Removed.
301
302         * ssa2.c: Renamed to ssa.c.
303
304         * abcremoval2.c: Renamed to abcremoval.c.
305
306         * *.c: Removed all !cfg->new_ir code.
307
308         * mini-<ARCH>.c: Removed mono_arch_call_opcode (), 
309         mono_arch_emit_this_vret_args (), and mono_arch_get_inst_for_method ().
310
311         * mini.c: Removed the old mono_method_to_ir () and all the code used by it.
312         
313 2008-11-16  Zoltan Varga  <vargaz@gmail.com>
314
315         * aot-compiler.c aot-runtime.c: Emit most of the non-table data in a structure
316         to simplify the code and cut back on the number of global symbols in the AOT
317         file.
318         
319         * aot-compiler.c aot-runtime.c: Get rid of the unused plt_jump_table.
320
321 2008-11-15  Zoltan Varga  <vargaz@gmail.com>
322
323         * aot-runtime.c aot-compiler.c: Unify the plt_jump_table/plt_info tables
324         with the got/got_info tables.
325
326         * mini.h: Bump AOT file format version.
327         
328         * unwind.h: New file, contains definitions for stack unwinding.
329
330         * mini.c (mono_emit_unwind_op): New helper function to append an unwind op
331         to cfg->unwind_ops.
332         
333         * aot-compiler.c: Generalize the emitting of unwind information to use the
334         information in cfg->unwind_ops.
335
336         * mini-amd64.c (mono_arch_emit_prolog): Emit unwind info.
337
338         * aot-compiler.c: Emit dwarf unwind information so gdb can unwind through
339         AOT method frames. Enable writing symbols for methods by default.
340
341 2008-11-14  Rodrigo Kumpera  <rkumpera@novell.com>
342
343         * simd-intrinsics.c (simd_intrinsic_emit_getter): Generalize this code
344         and make it work with vectors of element sizes 1, 2 and 4.
345
346         * simd-intrinsics.c: Enable getter for all vectors with element size
347         1, 2 or 4.
348
349         * simd-methods.h: Add the names of other getters.
350
351         * mini-ops.h: Added OP_EXTRACT_I2/U2/I1/U1.
352
353         * cpu-x86.md: Same.
354
355         * mini-x86.c: Same.
356
357 Fri Nov 14 15:54:18 CET 2008 Paolo Molaro <lupus@ximian.com>
358
359         * mini-ppc.h: portability fix.
360
361 Fri Nov 14 15:39:50 CET 2008 Paolo Molaro <lupus@ximian.com>
362
363         * mini-ppc.h, mini-ppc.c: avoid using the red zone as some kernels are
364         buggy and will overwrite it.
365
366 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
367
368         * aot-compiler.c: Add functionality to emit local symbols to the elf writer.
369         Use it to emit local symbols for all methods so AOTed methods show up with
370         their full name in gdb/valgrind output.
371
372 Fri Nov 14 12:56:27 CET 2008 Paolo Molaro <lupus@ximian.com>
373
374         * mini-ppc.c: portability fixes.
375
376 2008-11-14  Zoltan Varga  <vargaz@gmail.com>
377
378         * mini-trampolines.c (mono_magic_trampoline): Move the patching of plt
379         entries out of the if (!generic_shared...) code so it is always done.
380         (mono_class_init_trampoline): Do the patching when running under valgrind
381         too, newer versions of valgrind have no problems with it.
382
383 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
384
385         * aot-compiler.c (emit_writeout): Rework this to make it easier to add
386         further sections.
387
388 2008-11-13  Mark Probst  <mark.probst@gmail.com>
389
390         * mini-ppc.c, cpu-ppc.md: Reserve space for the parameter area in
391         filters.
392
393 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
394
395         * simd-intrinsics.c: Add getter support for Vector4i and Vector4ui. 
396
397 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
398
399         * mini-ops.h: Kill diplicated ops OP_SHUFLEPS.
400
401         * cpu-x86.md: Same.
402
403         * mini-x86.c: Same.
404
405         * simd-intrinsics.c: Same.
406
407 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
408
409         * simd-intrinsics.c: Enable constructor intrinsics for all types.
410
411 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
412
413         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Generalize this method
414         to work with more Vector types.
415
416 2008-11-13  Rodrigo Kumpera  <rkumpera@novell.com>
417
418         * simd-intrinsics.c (simd_intrinsic_emit_ctor): If the target is already a pointer
419         store the elemens directly instead of using and intermediate.
420
421 2008-11-13  Zoltan Varga  <vargaz@gmail.com>
422
423         * mini-amd64.c (emit_call_body): Avoid aligning call sites in AOTed code.
424
425         * tramp-x86.c (mono_arch_create_trampoline_code): Rework the return sequence
426         to preserve %eax for aot plt trampolines.
427
428         * aot-compiler.c (compile_method): Don't skip synchronized methods.
429         (encode_method_ref): Flag synchronized methods so they won't go through
430         the AOT trampoline.
431
432         * aot-compiler.c: Additional work to support AOTing synchronized methods/
433         wrappers.
434
435         * cpu-ia64.md (jmp): Increase max length.
436
437 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
438
439         * aot-runtime.c (load_method): Avoid calling runtime_class_init () for
440         open generic classes.
441
442         * aot-compiler.c: Enable the ELF writer on ELF platforms.
443
444         * method-to-ir.c (mono_method_to_ir2): Revert the last change to the
445         box+brtrue optimization since it causes test failures on x86.
446
447 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
448
449         * mini-ops.h: Remove OP_PUSH_R4 and OP_LOADX_STACK.
450
451         * cpu-x86.md: Same.
452
453         * mini-x86.c: Same.
454
455         * mini.h (struct MonoCompile): Add simd_ctor_var to be used as storage
456         for simd ctor values. 
457
458         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Use simd_ctor_var for the constructor
459         instead of directly pushing the values on stack. This saves about 15 bytes of generated code.
460
461 2008-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
462
463         * simd-methods.h: Rename SubWithSaturation, ArithmeticRightShift and
464         LogicalRightShift.
465
466         * simd-instrincs.c: Same.
467
468         * basic-simd.cs: Same.
469
470 2008-11-12  Zoltan Varga  <vargaz@gmail.com>
471
472         * ratests.cs: Add more tests.
473
474         * regalloc2.c (add_spill_code): Handle more corner cases.
475
476 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
477
478         * regalloc2.c (INS_POS_INTERVAL): Decrease this to 8 to avoid overflows.
479         (update_liveness): Avoid holes in the liveness ranges of hregs if they are
480         both the source an destination of an instruction.
481
482 Tue Nov 11 19:30:50 CET 2008 Paolo Molaro <lupus@ximian.com>
483
484         * jit-icalls.c, local-propagation.c, mini.c, ssa.c, ssapre.c, trace.c,
485         wapihandles.c: more portability changes.
486
487 Tue Nov 11 18:56:33 CET 2008 Paolo Molaro <lupus@ximian.com>
488
489         * aot-compiler.c, aliasing.c, abcremoval.c: portability changes.
490         * mini.c mini.h, aot-runtime.c: the aot segfault-handling code is not
491         safe to execute in a signal handler and the kernel provides better
492         the info in /proc/self/smaps. Avoid the assert on sigaction during
493         cleanup.
494
495 2008-11-11  Zoltan Varga  <vargaz@gmail.com>
496
497         * method-to-ir.c (mono_method_to_ir2): In the box+brtrue optimization, only
498         do the bblock linking hack if it is actually needed.
499
500         * Makefile.am (patch-libtool): New helper target to patch libtool to speed
501         up linking.
502
503         * liveness.c (ENABLE_LIVENESS2): Reenable this for 64 bit archs as the
504         crash problem is fixed.
505
506         * branch-opts.c (mono_remove_critical_edges): Link up newly added
507         bblocks.
508
509         * mini.c (mini_method_compile): Compute unreachable bblocks properly even
510         for catch clauses.
511         (mini_method_compile): Set the starting value of next_vreg to 
512         MAX_IREGS + MAX_FREGS when using globalra.
513
514         * method-to-ir.c (mono_method_to_ir2): Mark bblocks starting
515         filter clauses with BB_EXCEPTION_HANDLER.
516
517         * regalloc2.c (assign_spill_slots): Set cfg->rgctx_var.
518
519 2008-11-10  Mark Probst  <mark.probst@gmail.com>
520
521         * mini-x86.c (mono_arch_get_argument_info): Don't align argument
522         space for stdcall.  Fixes regressions on Win32.
523
524 2008-11-10  Zoltan Varga  <vargaz@gmail.com>
525
526         * regalloc2.c (handle_reg_constraints): Avoid adding code to unreachable
527         bblocks.
528         (linear_scan): Remove an assert which doesn't seem to be needed.
529
530         * local-propagation.c (mono_local_deadce): Avoid a call to
531         MONO_DELETE_INS which would screw up the instruction linking.
532
533         * mini.c (mono_decompose_op_imm): Make this work with globalra.
534
535         * regalloc2.c: Upgrade to work the current JIT code.
536
537 2008-11-09  Zoltan Varga  <vargaz@gmail.com>
538
539         * method-to-ir.c (inline_method): Merge more basic blocks to help the AOT
540         case.
541
542         * aot-runtime.c: Remove some dead code.
543
544         * tramp-arm.c: Use 'code' as the runnning pointer in code generation for
545         consistency.
546         (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Implement aot support.
547
548         * aot-runtime.c (load_named_code): Decode the offset of lazy fetch
549         trampolines using sscanf since atoi doesn't work on large unsigned values.
550
551         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): 
552         Initialize code_size.
553
554 2008-11-08  Mark Probst  <mark.probst@gmail.com>
555
556         * method-to-ir.c (mini_emit_inst_for_method): Make
557         Interlocked.CompareExchange work for Int arguments on 32 bit
558         archs, as well.
559
560 2008-11-07  Mark Probst  <mark.probst@gmail.com>
561
562         * method-to-ir.c (mono_method_to_ir2): Fixed a funny commit error.
563
564 2008-11-06  Bill Holmes  <billholmes54@gmail.com>
565
566         * main.c Fix MSVC build.
567
568         Contributed under MIT/X11 license.
569
570 2008-11-06  Mark Probst  <mark.probst@gmail.com>
571
572         * mini-x86.c (mono_arch_allocate_vars): Make sure locals that need
573         alignment larger than 8 bytes are aligned correctly, too.
574
575         * mini.c: Honor the min_align field of MonoClass when laying out
576         the stack.
577
578 2008-11-06  Zoltan Varga  <vargaz@gmail.com>
579
580         * method-to-ir.c (mono_method_to_ir2): Fix AOT support for CEE_SWITCH on arm.
581
582         * aot-compiler.c (emit_plt): Fix a warning.
583         
584         * aot-compiler.c: Implement ARM support in the binary writer.
585
586 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
587
588         * basic-simd.cs: Add test for getter with byref arg.
589         Fix the naming of a few tests.
590         Add missing checks to a test.
591
592 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
593
594         * aot-compiler.c (emit_plt): Make the arm code work with the binary writer.
595
596         * aot-compiler.c aot-runtime.c mini-trampolines.c tramp-amd64.c: Implement
597         most of the full-aot support for monitor enter/exit trampolines.
598
599         * tramp-x86.c tramp_amd64.c: Add AOT compatible variants of the monitor
600         enter/exit trampoline creation functions.
601
602         * Makefile.am: Fix the generation of buildver.h so it is not invoked during
603         make dist.
604
605 Wed Nov 5 16:28:53 CET 2008 Paolo Molaro <lupus@ximian.com>
606
607         * mini.h, aot-compiler.c, method-to-ir.c, aot-runtime.c: remove the
608         incorrectly added MONO_WRAPPER_MONITOR_* (in r117651-r117652) and
609         implement the needed functionality without adding crap to the runtime.
610
611 2008-11-05  Zoltan Varga  <vargaz@gmail.com>
612
613         * mini-trampolines.c (mono_create_monitor_enter_trampoline): Fix the
614         non-x86 builds.
615
616         * mini.c (mono_build_date): New global version holding the build date in
617         string format.
618         
619         * Makefile.am (buildver.c): Generate a file containing the build date.
620
621         * main.c: Set the build date from the generated file.
622
623         * mini.c (mono_get_runtime_build_info): New helper function returning build
624         information in a string format.
625         
626         * driver.c (mono_main): Print the build date in --version.
627
628         * aot-compiler.c aot-runtime.c: Embed the build information into the AOT
629         file when the bind-to-runtime-version option is used.
630
631 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
632
633         * simd-intrinsics.c: Fix bug when using getters and byref args. 
634
635 2008-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
636
637         * simd-methods.h: Rename prefetch methods.
638
639         * simd-intrinsics.c: Same.      
640
641 2008-11-05  Mark Probst  <mark.probst@gmail.com>
642
643         * tramp-amd64.c: Enlarge the Monitor.Enter/Exit trampoline code
644         sizes.
645
646 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
647
648         * aot-compiler.c: Use the bundled elf header files instead of depending on
649         the system one.
650         
651         * aot-compiler.c (emit_symbol_diff): Allocate memory from the acfg
652         mempool.
653
654         * method-to-ir.c (mono_method_check_inlining): Avoid a getenv () call
655         on every call.
656
657 2008-11-04  Rodrigo Kumpera  <rkumpera@novell.com>
658
659         * cpu-x86.md: Add store nta ops.
660
661         * mini-ops.h: Same.
662
663         * mini-x86.c: Same.
664
665         * mini.h: Add an enum for simd prefetch modes.
666
667         * simd-methods.h: Refactor the store_aligned code to handle multiple kinds
668         of store. Use the changed code to support store nta.
669
670         * simd-intrinsics.c: Add prefetch ops for all vector types.
671
672 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
673
674         * aot-compiler.c: Add an option for JIT compiling the methods by multiple 
675         threads.
676         
677         * aot-compiler.c: Use statically allocated buffers for constructing symbol 
678         names.
679
680         * aot-runtime.c aot-compiler.c: Add support for the MONITOR_ENTER/EXIT
681         trampolines.
682
683 2008-11-04  Mark Probst  <mark.probst@gmail.com>
684
685         * mini-x86.c: Fixed commit.
686
687 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
688
689         * aot-compiler.c (emit_plt): Align the plt section only on x86.
690
691 2008-11-04  Mark Probst  <mark.probst@gmail.com>
692
693         * mini-trampolines.c, mini.h: Two new trampolines: MONITOR_ENTER
694         and MONITOR_EXIT, for the ASM fastpaths.
695
696         * method-to-ir.c: Use the ASM fastpath for Monitor.Enter/Exit if
697         available.
698
699         * mini.c, patch-info.h: Signature and patch infos for
700         Monitor.Enter/Exit trampolines.
701
702         * mini-amd64.c, mini-x86.c: Make emit_tls_get() non-static.
703
704         * tramp-amd64.c, tramp-x86.c, mini-amd64.h, mini-amd64.h:
705         Monitor.Enter/Exit ASM fastpath for Linux.
706
707 2008-11-04  Zoltan Varga  <vargaz@gmail.com>
708
709         * mini.c (mono_method_to_ir): Fix soft-float support in Array.Get/Set.
710
711         * objects.cs: Add a new test.
712         
713         * aot-compiler.c: Use mono_100ns_ticks () for computing the profiling info.
714
715         * aot-runtime.c (load_method): Run class initialization in the PLT case even
716         if MONO_LOG_LEVEL is set.
717
718         * debug-mini.c (serialize_variable): Fix the encoding of dead variables.
719
720         * aot-runtime.c (mono_aot_get_method): Skip out-of-date AOT modules.
721
722         * aot-compiler.c (emit_and_reloc_code): Speed this up a little.
723         
724         * aot-compiler.c: Change the relocation code to use virtual addresses instead
725         of file offsets. Align the sections belonging to the data segment to 
726         PAGESIZE.
727
728 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
729
730         * aot-compiler.c: Simplify the elf writer by depending on the definitions in
731         elf.h. Port it to amd64.
732
733 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
734
735         * driver.c: Enable SIMD by default.
736
737 2008-11-03  Rodrigo Kumpera  <rkumpera@novell.com>
738
739         * cpu-x86.md: Add prefetch op.
740
741         * mini-ops.h: Same.
742
743         * mini-x86.c: Same.
744
745         * mini.h: Add an enum for simd prefetch modes.
746
747         * simd-methods.h: Add prefetch function names.
748
749         * simd-intrinsics.c: Add prefetch ops for all vector types.
750
751 2008-11-03  Zoltan Varga  <vargaz@gmail.com>
752
753         * aot-compiler.c (emit_bytes): Speed this up a little.
754
755 2008-11-02  Zoltan Varga  <vargaz@gmail.com>
756
757         * aot-compiler.c: Add JIT time etc. statistics.
758         
759         * aot-compiler.c (compile_method): Fix the copying of the cfgs array.
760
761         * mini.h (MonoCompile): Add 'got_offset' field.
762
763         * aot-compiler.c: Store the got offset in MonoCompile, get rid of the
764         method_got_offsets array.
765
766         * aot-compiler.c aot-runtime.c: Add support for the monitor enter/exit
767         wrappers.
768
769         * aot-compiler.c (compile_method): Add generic method instances referenced
770         by the method to the list of methods to be compiled, this is required so if
771         A<T> references B<T>, and another assembly references A<int>, then it will
772         also get a copy of B<int>.
773
774         * method-to-ir.c (mini_emit_inst_for_method): Use the proper wrapper type
775         when checking for monitor enter/exit.
776
777 2008-10-30  Mark Probst  <mark.probst@gmail.com>
778
779         * method-to-ir.c (mini_emit_inst_for_method): Use the IL fastpaths
780         for Monitor.Enter and Monitor.Exit if enabled.
781
782         * mini-x86.h, mini-amd64.h: Enable the IL fastpaths for Linux and
783         Solaris.
784
785 2008-10-30  Zoltan Varga  <vargaz@gmail.com>
786
787         * method-to-ir.c (type_from_op): Convert CEE_CONV_U on OP_ICONV_TO_U instead
788         of an OP_MOVE. Fixes #440046.
789
790         * basic-long.cs: Add a new test.
791
792 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
793
794         * mini.h: Add synchronization note for the managed counter-part.
795
796         * simd-intrinsics.c: Add SimdRuntime.get_AccelMode intrinsic that
797         returns the simd caps of the current cpu.
798
799 2008-10-29  Rodrigo Kumpera  <rkumpera@novell.com>
800
801         * basic-simd.cs: Remove Console.WriteLine.
802
803 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
804
805         * basic-simd.cs: New tests for Vector2ul.
806
807 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
808
809         * simd-intrinsics.c: Add new vector type Vector2ul.
810
811 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
812
813         * basic-simd.cs: New tests for Vector2l.
814
815 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
816
817         * cpu-x86.md: Add long version of most packed int ops.
818
819         * mini-ops.h: Same.
820
821         * mini-x86.h: Same.
822
823         * simd-intrinsics.c: Add new vector type Vector2l.
824
825 2008-10-28  Rodrigo Kumpera  <rkumpera@novell.com>
826
827         * simd-intrinsics.c: Replace SN_op_BitwiseXor with SN_op_ExclusiveOr.
828
829         * simd-methods.h: Remove SN_op_BitwiseXor.
830
831 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
832
833         * mini.c (mono_allocate_stack_slots_full): Align the size of vtypes to their
834         alignment.
835
836 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
837
838         * basic-simd.cs: Test for Vector2d.
839
840         * basic-simd.cs (test_vector8s_pack_signed_sat): Fixed broken
841         value.
842
843 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
844
845         * cpu-x86.md: Add double version of all packed float ops.
846
847         * mini-ops.h: Same.
848
849         * mini-x86.h: Same.
850
851         * simd-intrinsics.c: Add new vector type Vector2d.
852
853         * simd-intrinsics.c (vector4f_intrinsics): Fix ordering.
854
855         * simd-methods.h: Add Duplicate.
856
857 2008-10-27  Rodrigo Kumpera  <rkumpera@novell.com>
858
859         * basic-simd.cs: Test for packing with signed saturation.
860
861 2008-10-28  Zoltan Varga  <vargaz@gmail.com>
862
863         * aot-compiler.c (add_generic_instances): Add all methods of generic instances
864         found in the TYPESPEC table.
865
866 2008-10-26  Zoltan Varga  <vargaz@gmail.com>
867
868         * aot-runtime.c (mono_aot_get_method): Log not found methods for extra methods
869         too.
870
871         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
872
873         * mini.c (mono_method_to_ir): For MONO_PATCH_INFO_RVA, save field the token
874         instead of the RVA, since the RVA can be changed by tools like the cil 
875         stripper.
876
877         * method-to-ir.c (mono_method_to_ir2): Ditto.
878
879         * debug-mini.c (serialize_variable): Handle ADDRESS_MODE_DEAD.
880         (deserialize_variable): Ditto.
881
882 2008-10-25  Martin Baulig  <martin@ximian.com>
883
884         * debug-mini.c (write_variable): Use
885         `MONO_DEBUG_VAR_ADDRESS_MODE_DEAD' for dead variables.
886
887 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
888
889         * cpu-x86.md: Add unsigned variants of packd and packw.
890
891         * mini-ops.h: Same.
892
893         * mini-x86.h: Emit the right instruction for packd and packw.
894         Add unsigned variants of packd and packw.
895
896         * simd-intrinsics.c: Packd and packw were used in place of their
897         unsigned variants. Change that.
898         Add intrinsics for (Signed)PackWithSignedSaturation.
899
900         * simd-methods.h: Add (Signed)PackWithSignedSaturation.
901
902 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
903
904         * simd-intrinsics.c (vector4i_intrinsics): New table of intrinsic type.
905
906 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
907
908         * mini-ops.h: Remove dword packed add/sub with saturation ops.
909
910         * cpu-x86.md: Remove dword packed add/sub with saturation ops.
911
912         * simd-intrinsics.c (vector4ui_intrinsics): Remove methods without
913         sse instructions.
914
915         * simd-intrinsics.c (vector8s_intrinsics): Fix ordering.
916
917 2008-10-24  Mark Probst  <mark.probst@gmail.com>
918
919         * method-to-ir.c, mini.c: Special casing for the synchronized
920         wrapper for the ldtoken+GetTypeFromHandle case.
921
922 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
923
924         * mini.c (mono_replace_ins): Move this to branch-opts.c.
925
926         * mini.c (mono_replace_ins): Propagate has_array_access flag to the newly
927         created/split bblocks.
928
929 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
930
931         * mini-ops.h: Add packed signed mul high.
932         
933         * cpu-x86.md: Same.
934
935         * mini-x86.c (mono_arch_output_basic_block): Same.
936
937         * simd-methods.h: Add PackWithUnsignedSaturation and ShiftRightLogic.
938
939         * simd-intrinsics.c (vector8s_intrinsics): New table of intrinsic type.
940
941 2008-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
942
943         * basic-simd.cs: Tests for Vector16sb.
944
945 2008-10-24  Zoltan Varga  <vargaz@gmail.com>
946
947         * inssel.brg (stmt): Fix OP_HARD_NOP rule.
948
949 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
950
951         * mini-ops.h: Add packed signed min, max and compare greater.
952         
953         * cpu-x86.md: Same.
954
955         * mini-x86.c (mono_arch_output_basic_block): Same. Add packed add/sub with
956         saturation.
957
958         * simd-methods.h: Add CompareGreaterThan.
959
960         * simd-methods.h: Remove CompareEquals.
961
962         * simd-intrinsics.c: Add new TODO entry and some cosmetic changes.
963
964         * simd-intrinsics.c (vector16sb_intrinsics): New table of intrinsic type.
965
966         * simd-intrinsics.c (vector4f_intrinsics): Rename CompareEquals to
967         CompareEqual.
968
969 2008-10-23  Rodrigo Kumpera  <rkumpera@novell.com>
970
971         * basic-simd.cs: Fix tests due to change in the API.
972
973 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
974
975         * mini.c method-to-ir.c: Use mono_field_get_name () for accessing field->name.
976
977 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
978
979         * basic-simd.cs: Fix name change in Vector4f::CompareEqual.
980
981         * simd-intrinsics.c (simd_intrinsic_emit_store_aligned): Don't use
982         inst_offset as this has invalid values for LDADDR.
983
984 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
985
986         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
987
988         * simd-intrinsics.c (vector4ui_intrinsics): Add SignedPackWithUnsignedSaturation.
989
990 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
991
992         * method-to-ir.c (initialize_array_data): Use mono_field_get_data ()
993         for accessing field->data.
994
995 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
996
997         * basic-simd.cs: Test for SignedPackWithUnsignedSaturation.
998
999 2008-10-21  Rodrigo Kumpera  <rkumpera@novell.com>
1000
1001         * simd-methods.h: Add SignedPackWithUnsignedSaturation.
1002
1003         * simd-intrinsics.c (vector8us_intrinsics): Add SignedPackWithUnsignedSaturation.
1004
1005 2008-10-21  Zoltan Varga  <vargaz@gmail.com>
1006
1007         * dominators.c (mono_compute_natural_loops): Allocate GList enties
1008         from the cfg mempool.
1009
1010 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
1011
1012         * basic-simd.cs: Tests for new methods in Vector8us.
1013
1014 2008-10-20  Rodrigo Kumpera  <rkumpera@novell.com>
1015
1016         * mini-ops.h: Add multiply and store high.
1017         
1018         * cpu-x86.md: Same.
1019
1020         * mini-x86.c (mono_arch_output_basic_block): Same.
1021
1022         * simd-methods.h: Same.
1023
1024         * simd-intrinsics.c (vector8us_intrinsics): Add MultiplyStoreHigh
1025         and CompareEqual.
1026
1027 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
1028
1029         * method-to-ir.c (mono_emit_method_call_full): Remove a needless call to
1030         mono_class_setup_vtable ().
1031
1032         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Use
1033         mono_class_get_vtable_entry () for accessing klass->vtable.
1034
1035         * aot-runtime.c (load_method): Avoid a crash when using MONO_LOG_LEVEL.
1036
1037         * aot-compiler.c (add_generic_instances): Avoid a crash if a class is not
1038         found.
1039
1040         * method-to-ir.c (mono_save_token_info): Don't save references made from
1041         wrappers.
1042
1043         * aot-compiler.c (add_generic_instances): Add static rgctx wrappers for cctors
1044         of generic instances.
1045
1046         * aot-runtime.c (find_extra_method): Search in all loaded AOT images.
1047
1048 2008-10-19  Mark Probst  <mark.probst@gmail.com>
1049
1050         * cpu-ppc.md, mini-ppc.c: The length of the code generated for
1051         OP_JMP depends on the method signature.  Calculate it properly.
1052
1053 2008-10-19  Zoltan Varga  <vargaz@gmail.com>
1054         
1055         * aot-runtime.c (mono_aot_find_jit_info): Handle extra methods which are
1056         called directly.
1057
1058         * aot-compiler.c (emit_and_reloc_code): Allow direct calling of generic
1059         instances.
1060         (emit_extra_methods): Add another table mapping method indexes to 
1061         offsets in the extra_method_info table.
1062
1063         * mini.h: Bump AOT file format version.
1064         
1065         * aot-runtime.c: Merge most of the code from mono_aot_get_method
1066         and mono_aot_get_method_from_token () into one function.
1067
1068 2008-10-19  Mark Probst  <mark.probst@gmail.com>
1069
1070         * mini-ppc.c (emit_load_volatile_arguments): Inner loop needs a
1071         separate counter.
1072
1073 2008-10-18  Zoltan Varga  <vargaz@gmail.com>
1074
1075         * aot-compiler.c aot-runtime.c: Fix the hash function used for the extra
1076         methods.
1077
1078         * method-to-ir.c (mono_method_to_ir2): Change a !compile_aot assert to
1079         disable_aot.
1080
1081         * mini.c (mono_patch_info_equal): Compare the generic context as well.
1082
1083         * mini.h: Bump aot file format version.
1084
1085         * aot-compiler.c aot-runtime.c: Generalize the wrapper handling code so the
1086         AOT file can contain native code for methods which are not in the METHOD
1087         table. Generate code for non-sharable generic instances of generic methods
1088         found in the METHODSPEC table.
1089         
1090         * method-to-ir.c (mono_method_to_ir2): Remove the aot restriction when
1091         encoding generic type handles.
1092
1093         * ir-emit.h (NEW_AOTCONST_TOKEN): Add a generic_context argument.
1094         (NEW_TYPE_FROM_HANDLE_CONST): Add a generic_context argument.
1095
1096         * ir-emit.h: Rewrite the EMIT_NEW_XXXCONST macros to use the NEW_XXXCONST
1097         macros + MONO_ADD_INS.
1098
1099         * mini.c (mono_jump_info_token_new2): New function which takes a generic
1100         context as well.
1101
1102         * mini.h (MonoJumpInfoToken): Include fields for a generic context.
1103
1104         * mini.h: Bump aot file format version.
1105
1106         * aot-compiler.c aot-runtime.c: Update after changes to MonoJumpInfoToken.
1107
1108 2008-10-17  Mark Probst  <mark.probst@gmail.com>
1109
1110         * mini-x86.h, mini-x86.c, exceptions-x86.c: Align stack on all
1111         platforms, with definable stack alignment value.  Set to 16 now
1112         for all platforms.
1113
1114         * mini.c, mini.h, driver.c: Command line option for disabling
1115         stack alignment.
1116
1117 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
1118
1119         * basic-simd.cs: Tests for new methods in Vector4ui.
1120
1121 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
1122
1123         * mini-ops.h: Add packed int shuffle.
1124         
1125         * cpu-x86.md: Same.
1126
1127         * mini-x86.c (mono_arch_output_basic_block): Same.
1128
1129         * simd-intrinsics.c (vector4ui_intrinsics): Add compare equal,
1130         extract mask, max, min, shuffle.
1131
1132         * simd-intrinsics.c (vector8us_intrinsics): Add max and min.
1133
1134 2008-10-17  Rodrigo Kumpera  <rkumpera@novell.com>
1135
1136         * basic-simd.cs: Tests for new methods in Vector8us.
1137
1138 2008-10-17  Mark Probst  <mark.probst@gmail.com>
1139
1140         * method-to-ir.c (mono_method_to_ir2): "refanytype" produces a
1141         RuntimeTypeHandle, not a TypedReference.
1142
1143 Fri Oct 17 14:40:50 CEST 2008 Paolo Molaro <lupus@ximian.com>
1144
1145         * simd-intrinsics.c: remove relocations.
1146
1147 2008-10-17  Zoltan Varga  <vargaz@gmail.com>
1148
1149         * mini-amd64.c (mono_arch_output_basic_block): Port the IREM_IMM 
1150         optimizations from the x86 backend.
1151
1152 Fri Oct 17 12:00:51 CEST 2008 Paolo Molaro <lupus@ximian.com>
1153
1154         * simd-methods.h, simd-intrinsics.c: debloat method names and
1155         prepare for no relocations.
1156
1157 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1158
1159         * mini-ops.h: Add packed min/equal and sum of absolute differences.
1160         
1161         * cpu-x86.md: Same.
1162
1163         * mini-x86.c (mono_arch_output_basic_block): Same.
1164
1165         * simd-intrinsics.c (vector16b_intrinsics): Add average, compare equal,
1166         extract mask, max, min and sum of absolute differences.
1167
1168         * simd-intrinsics.c: Increase SIMD_INTRINSIC_NAME_MAX due to new huge
1169         method name.
1170
1171 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1172
1173         * basic-simd.cs: Test for the other mono_simd_simplify_indirection bug.
1174         Renamed one test for consistency.
1175
1176 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1177
1178         * simd-intrinsics.c (mono_simd_simplify_indirection): Apply the previous
1179         fix to the code that deal with other blocks.
1180
1181 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1182
1183         * basic-simd.cs: Test for the mono_simd_simplify_indirection bug.
1184
1185 2008-10-16  Rodrigo Kumpera  <rkumpera@novell.com>
1186
1187         * simd-intrinsics.c (mono_simd_simplify_indirection): Simplify the code
1188         that deals with vreg interference. Explicitly check for OP_LDADDR to be
1189         able to process the source reg.
1190
1191 2008-10-16  Martin Baulig  <martin@ximian.com>
1192
1193         * mini-ops.h, cpu-amd64.md, cpu-x86.md: Added new `hard_nop' opcode.
1194
1195         * inssel.brg: Add `OP_HARD_NOP'.
1196
1197         * mini.h (MonoCompile): Added `keep_cil_nops' flag.
1198
1199         * mini.c (mono_method_to_ir): In `CEE_NOP': generate a
1200         `OP_HARD_NOP' instruction when running inside the debugger.
1201
1202         * method-to-ir.c (mono_method_to_ir2): In `CEE_NOP': generate a
1203         `OP_HARD_NOP' instruction when running inside the debugger.
1204
1205 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1206
1207         * simd-intrinsics.c (get_simd_vreg): Using sreg1 of OP_XMOVE
1208         now works. The issue with the regalloc tripping up no longer
1209         happens.
1210
1211         * simd-intrinsics.c (load_simd_vreg): Same.
1212
1213 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1214         
1215         * basic-simd.cs: Tests for new Vector8ui methods.
1216
1217 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1218
1219         * simd-intrinsics.c (get_simd_vreg): Simplify code and test
1220         only for type. This fixes crashes where MonoInst::klass is checked
1221         for ops of type != VTYPE or OBJ.
1222
1223         * simd-intrinsics.c (load_simd_vreg): Same.
1224
1225 2008-10-15  Rodrigo Kumpera  <rkumpera@novell.com>
1226
1227         * mini-ops.h: Add ops for packed shuffle/max/avg and
1228         extract mask.
1229         
1230         * cpu-x86.md: Same.
1231
1232         * mini-x86.c (mono_arch_output_basic_block): Same.
1233
1234         * simd-intrinsics.c (vector8us_intrinsics): Add avg, shuffle and
1235         extract mask.
1236
1237         * simd-intrinsics.c (simd_intrinsic_emit_extract_mask): New function
1238         to emit extract mask op.
1239
1240         * simd-intrinsics.c (simd_intrinsic_emit_shuffle): Retrofic this function
1241         to emit word shuffles.
1242
1243 2008-10-15  Mark Probst  <mark.probst@gmail.com>
1244
1245         * mini.c (mono_allocate_stack_slots_full): Align stack frame to
1246         the largest alignment needed by a variable, but at least
1247         sizeof(gpointer).
1248
1249 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1250
1251         * basic-simd.cs: Tests for the fixes in the last commit.
1252
1253 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1254
1255         * simd-intrinsics.c (get_simd_vreg): Drop the is_this_ptr, this function
1256         no longer handles STACK_PTR input.
1257
1258         * simd-intrinsics.c (get_simd_vreg): Don't crash when MonoInst::klass == -1.
1259
1260         * simd-intrinsics.c (load_simd_vreg): New function that works like 
1261         get_simd_vreg   but handles STACK_PTR input.
1262
1263         * simd-intrinsics.c (simd_intrinsic_emit_getter): Use load_simd_vreg
1264         as the input can be an arbitrary pointer.
1265
1266         * simd-intrinsics.c (simd_intrinsic_emit_ctor): Try the
1267         LDADDR local optimization directly otherwise use a store op.
1268
1269 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1270
1271         * basic-simd.cs: Tests for dup low and dup high.
1272
1273 2008-10-14  Rodrigo Kumpera  <rkumpera@novell.com>
1274
1275         * mini-ops.h: Add dup low and dup high ops.
1276         
1277         * cpu-x86.md: Same.
1278
1279         * mini-x86.c (mono_arch_output_basic_block): Same.
1280
1281         * simd-intrinsics.c (vector4f_intrinsics): Same.
1282
1283 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1284
1285         * basic-simd.cs: Tests for recently added functionality.
1286
1287 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1288
1289         * mini-ops.h: Add remaining sse1 fp ops.
1290         
1291         * cpu-x86.md: Add remaining sse1 fp ops.
1292
1293         * mini-x86.c (mono_arch_output_basic_block): Same.
1294
1295         * mini.h: Add enum for simd FP compare conditions.
1296
1297         * simd-intrinsics.c (vector4f_intrinsics): Add all new ops.
1298
1299         * simd-intrinsics.c (simd_intrinsic_emit_binary): Set inst_c0 to flags
1300         so the backed can generate the appropriate op.
1301
1302 2008-10-13  Rodrigo Kumpera  <rkumpera@novell.com>
1303         This patch squeese one more byte from the SimdIntrinsc struct.
1304
1305         * mini-x86.c (mono_arch_cpu_enumerate_simd_versions: Use the version number
1306         a a shift amount intead of simply or'ing it.
1307
1308         * mini.h: Change SIMD_VERSION_* values to be sequential intead of masks.
1309
1310         * simd-intrinsics.c (struct SimdIntrinsc): Squeese simd_version and simd_emit_mode into a single
1311         byte so we can have an aditional flags field without increasing struct size.
1312
1313         * simd-intrinsics.c (emit_intrinsics): Use the value of simd_version as a shift amount before checking
1314         against the simd_supported_versions bitmask.
1315
1316         * simd-intrinsics.c: Set SIMD_INTRINSIC_NAME_MAX to an appropriate value.
1317
1318 Mon Oct 13 10:58:10 CEST 2008 Paolo Molaro <lupus@ximian.com>
1319
1320         * mini.c: remove rawbuffer code (the only use here is unsafe because
1321         it takes locks during signal handling and the kernel now provides much
1322         better info in proc/pid/smaps these days).
1323
1324 2008-10-13  Zoltan Varga  <vargaz@gmail.com>
1325
1326         * mini-amd64.c (mono_arch_output_basic_block): Fix the changes to
1327         OP_X86_PUSH_OBJ. Fixes #434620.
1328
1329         * objects.cs: Add a test.
1330         
1331 2008-10-12  Rodrigo Kumpera  <rkumpera@novell.com>
1332
1333         * basic-simd.cs: Remove PackWithUnsignedSaturation tests as it turns out
1334         that the packuswb/packusdw don't work with unsigned numbers for what
1335         would be negative numbers in signed format.
1336
1337         * cpu-x86.md: Add doubleword forms of many ops and packing ones.
1338         Fix the len of fconv_to_r8_x and xconv_r8_to_i4.
1339
1340         * mini-ops.h: Add doubleword forms of many ops and packing ones.
1341
1342         * mini-x86.c: Emit doubleword forms of many ops and packing ones.
1343
1344         * simd-intrinsics.c (SimdIntrinsc): Rename the flags field to simd_version.
1345
1346         * simd-intrinsics.c (vector4f_intrinsics): Use simd_version field for sse3 ops.
1347
1348         * simd-intrinsics.c (vector4u_intrinsics): Rename to vector4ui_intrinsics and
1349         add more ops.
1350
1351         * simd-intrinsics.c (simd_version_name): New function, returns the name of the
1352         version as the enum in mini.h.
1353
1354         * simd-intrinsics.c (emit_intrinsics): Instead of having a special emit mode
1355         for sse3 ops, check the simd_version field if present. This way the code
1356         works with all versions of sse.
1357
1358 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1359
1360         * simd-intrinsics.c: Fixed intrinsic name typo.
1361
1362         * mini.h: Added missing simd exported function.
1363
1364         * basic-simd.cs: Added tests for Vector4ui.
1365         Fixed broken test for Vector16b.
1366
1367 2008-10-10  Zoltan Varga  <vargaz@gmail.com>
1368
1369         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): Increase
1370         the max length to 64.
1371
1372 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1373
1374         * method-to-ir.c: Only do the fast virtual generic method call for
1375         non-wrapper methods.
1376
1377         * mini.h, mini-trampolines.c: The new generic virtual remoting
1378         trampoline handles virtual method calls via the vtable (as done by
1379         the fast virtual generic method calls) to remoting proxies.
1380
1381         * mini.c (mono_jit_create_remoting_trampoline): For generic
1382         methods reate a generic virtual remoting trampoline.
1383
1384         * mini-amd64.h: Enable fast virtual generic method calls again.
1385
1386 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1387
1388         * mini-ppc.c: Use SP (r1), not frame_reg (which might be r31) to
1389         restore registers when doing tail calls.
1390
1391 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1392
1393         * simd-intrinsics.c (emit_intrinsics): Vector4u was renamed to
1394         Vector4ui.
1395
1396 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1397
1398         * basic-simd.cs: Add test for Vecto16b.PackWithUnsignedSaturation.
1399
1400 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1401
1402         * simd-intrinsics.c (emit_intrinsics): Retrofit to new type names.
1403
1404 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1405
1406         * basic-simd.cs: Retrofit for API changes.
1407
1408 2008-10-10  Mark Probst  <mark.probst@gmail.com>
1409
1410         * mini-ppc.c: Handle integer stack arguments for tail calls.
1411
1412 2008-10-10  Rodrigo Kumpera  <rkumpera@novell.com>
1413
1414         * optflags-def.h: Removed sse3 optimization.
1415
1416         * driver.c: Same.
1417
1418         * mini-x86.c (mono_arch_cpu_optimizazions): Remove detection of
1419         sse3.
1420
1421         * mini-x86.c: Added mono_arch_cpu_enumerate_simd_versions.
1422
1423         * mini.h: Added enumeration with simd versions.
1424
1425         * simd-intrinsics.c (emit_intrinsics): Use the new static var
1426         for detecting SSE3.
1427
1428         * simd-intrinsics.c: Added mono_simd_intrinsics_init.
1429
1430         * mini.c (mini_init): Call mono_simd_intrinsics_init.
1431
1432 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1433
1434         * basic-simd.cs: Added tests for Vector8u and Vector16u.
1435
1436         * basic-simd.cs: Fixed test naming.
1437
1438 2008-10-09  Rodrigo Kumpera  <rkumpera@novell.com>
1439
1440         * mini-ops.h: Added ops for packed and saturated math, shifts
1441         and packing/unpacking.
1442
1443         * cpu-x86.md: Added descriptors for the above ops.
1444
1445         * mini-x86.c: Added code to emmit the above ops.
1446
1447         * simd-intrinsics.c: Added support for Vector16u and Vector8u.
1448
1449 2008-10-08  Zoltan Varga  <vargaz@gmail.com>
1450
1451         * aot-compiler.c (compile_method): Enable AOT for generic code.
1452
1453         * ir-emit.h (NEW_DOMAINCONST): Use domainvars in AOT code as well.
1454
1455 Wed Oct 8 16:35:43 CEST 2008 Paolo Molaro <lupus@ximian.com>
1456
1457         * mini.c: add a workaround for a common screwup that ends up blamed
1458         to mono (other processes blocking signal delivery).
1459
1460 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1461
1462         * method-to-ir.c (mono_method_to_ir2): Clear ins_flag on all code paths
1463         in the LDFLD/STFLD opcodes. Fixes #432673.
1464
1465         * iltests.il.in: Add a new test.
1466
1467 Tue Oct 7 19:59:07 CEST 2008 Paolo Molaro <lupus@ximian.com>
1468
1469         * mini-arm.c: attach the thread in unmanaged->managed transitions
1470         using delegates (bug #433148).
1471
1472 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1473
1474        * basic-simd.cs: Use new ShuffleSel constants.
1475
1476 2008-10-07  Rodrigo Kumpera  <rkumpera@novell.com>
1477
1478         * driver.c (opt_sets): Added combinations of simd, sse2 and sse3.
1479
1480         * mini-x86.c (mono_arch_cpu_optimizazions): Detect sse3 and now
1481         only disable simd intrinsics if no sse2 is detected.
1482
1483         * optflags-def.h: Added sse3.
1484
1485         * simd-intrinsics.c: Avoid generated sse3 intrinsics if the optimization
1486         is disabled.
1487
1488 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1489
1490         * aot-compiler.c (add_wrappers): Fix Delegate/MulticastDelegate classes
1491         when adding delegate-invoke wrappers.
1492
1493 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1494
1495         * Makefile.am: Reenable the simd tests.
1496
1497 2008-10-07  Bill Holmes  <billholmes54@gmail.com>
1498
1499         * mini-amd64.c (mono_arch_emit_outarg_vt) : In the ArgValuetypeAddrInIReg case,
1500           add a call to mono_call_inst_add_outarg_reg for the arg->dreg to make sure that no
1501           other vreg is allocated to that hreg.
1502
1503         Contributed under MIT/X11 license.
1504
1505 2008-10-07  Zoltan Varga  <vargaz@gmail.com>
1506
1507         * Makefile.am: Disable the simd tests for now as Mono.Simd is not
1508         yet checked in.
1509
1510 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1511
1512         * basic-simd.cs: New test suite for SIMD intrinsics.
1513
1514         * Makefile.am: Added new tests.
1515
1516 2008-10-06  Rodrigo Kumpera  <rkumpera@novell.com>
1517
1518         * cpu-x86.md: Added new instructions to handle float to int using SSE regs.
1519
1520         * mini-ops.h: Same.
1521
1522         * mini-x86.h: Enable mono_arch_decompose_opts if simd intrinsics are enabled.
1523
1524         * mini-x86.c (mono_arch_decompose_opts): Decompose float to int conversion
1525         using SSE2 aware opcodes.
1526
1527         * mini-x86.c (emit_float_to_int): Disable the SSE2 optimization if OPT_SIMD
1528         is enabled, this code path is only reachable if conversion ops are emmited after
1529         mono_method_to_ir.
1530
1531         * mini.h: Added MonoCompile::fconv_to_r8_x_var to hold the float to int var.
1532
1533         This optimization saves 6 bytes per conversion against the old version.
1534
1535 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1536
1537         * aot-compiler.c (compile_method): Don't skip methods referencing 
1538         generic methods without a corresponding entry in token_info_hash, since
1539         encode_method_ref () can handle all generic methods now.
1540
1541         * method-to-ir.c (mono_save_token_info): Don't save the token info if a 
1542         generic context is set.
1543         
1544         * method-to-ir.c (mono_method_to_ir2): Put back a disable_aot for
1545         generic sharing of LDTOKEN.
1546
1547 2008-10-06  Mark Probst  <mark.probst@gmail.com>
1548
1549         * mini-amd64.h: Temporarily disabled fast virtual generic method
1550         calls because it breaks the System.Runtime.Remoting tests.
1551
1552 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1553
1554         * aot-compiler.c (add_wrappers): Add delegate-invoke wrappers.
1555
1556         * method-to-ir.c (check_inline_called_method_name_limit): Return TRUE
1557         so inlining actually works.
1558         (check_inline_caller_method_name_limit): Ditto.
1559
1560 Mon Oct 6 11:04:38 CEST 2008 Paolo Molaro <lupus@ximian.com>
1561
1562         * mini-ppc.c: mono_arch_flush_icache () cast pointer using gsize for
1563         64 bit safety (from Olaf Hering and Andreas Färber).
1564
1565 2008-10-06  Zoltan Varga  <vargaz@gmail.com>
1566         
1567         * mini-trampolines.c (mono_aot_trampoline): Delegate processing to
1568         mono_magic_trampoline () if aot_get_method_from_token () fails. Remove
1569         unused virtual call support code.
1570
1571         * aot-runtime.c (decode_method_ref): Add a 'no_aot_trampoline' out argument.
1572         
1573         * aot-runtime.c (mono_aot_get_method_from_vt_slot): Return NULL for methods
1574         which can't use aot trampolines.
1575         (decode_patch): Don't create aot trampolines for methods which can't use
1576         them.
1577
1578         * aot-compiler.c (encode_method_ref): Add a marker for methods which can't
1579         use aot trampolines.
1580
1581         * mini.h: Bump AOT image format version.
1582         
1583 2008-10-05  Zoltan Varga  <vargaz@gmail.com>
1584
1585         * method-to-ir.c (mono_method_to_ir2): Pass cil_method instead of cmethod
1586         to save_token_info () since cmethod is inflated for constrained calls.
1587
1588         * mini-<ARCH>.h mini-x86.c: Remove some unused defines.
1589
1590 2008-10-04  Andreas Färber  <andreas.faerber@web.de>
1591
1592         * Makefile.am: Add build rules for ppc64.
1593         This avoids the build failing at pedump with unresolved symbols
1594         due to lack of arch_sources. Instead it will now fail earlier
1595         due to lack of cpu-ppc64.md.
1596
1597         Contributed under MIT/X11 license.
1598
1599 2008-10-04  Mark Probst  <mark.probst@gmail.com>
1600
1601         * mini-amd64.c (mono_arch_emit_call): Support stack arguments for
1602         tail calls.
1603
1604         * iltests.il.in: Add test case for tail call with many arguments.
1605
1606 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1607
1608         * method-to-ir.c (mono_method_to_ir2): Add an !cfg->compile_aot assert
1609         to the fast virtual generic method code until the aot case is fixed.
1610
1611 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1612
1613         * mini-ppc.c, mini-ppc.h: Implement generic virtual method thunks.
1614
1615 2008-10-03  Mark Probst  <mark.probst@gmail.com>
1616
1617         * mini-amd64.c, mini-amd64.h: Implement generic virtual method
1618         thunks.
1619
1620 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1621         
1622         * simd-intrinsics.c: Forgot to add this one.
1623
1624         * mini-codegen.c: Fix macro in case SIMD is not supported.
1625
1626 2008-10-03  Rodrigo Kumpera  <rkumpera@novell.com>
1627         
1628         This patch land initial JIT support for simd intrinsics.
1629
1630         * mini-x86.h: Added new define to make --enable_minimal work on x86.
1631
1632         * Makefile.am: Added simd-intrinsics.c
1633
1634         * simd-intrinsics.c: New file with simd instrinsic related
1635         code.
1636
1637         * cfold.c (mono_constant_fold_ins2): Fold XZERO.
1638
1639         * cpu-x86.md: Add simd related instructions.
1640
1641         * driver.c: Added MONO_OPT_SIMD to the default set of optimizations.
1642
1643         * driver.c: Added two new --regression variants.
1644
1645         * ir-emit.h (MONO_EMIT_NEW_VZERO): Emit XZERO if the type is a simd intrinsic.
1646
1647         * local-propagation.c (mono_local_cprop2): Eliminate useless XMOVE.
1648
1649         * local-propagation.c (mono_local_deadce): Use new macro MONO_IS_NON_FP_MOVE and
1650         extract some complicated logic to helper functions.
1651
1652         * method-to-ir.c (mono_type_to_regmove): Handle simd intrinsics.
1653
1654         * method-to-ir.c (mini_emit_inst_for_method): Emit simd intrinsics.
1655
1656         * method-to-ir.c (mono_handle_global_vregs): If a simd intrinsic was found, apply
1657         the specialized simplification pass.
1658
1659         * method-to-ir.c (mono_spill_global_vars): Use new macro.
1660
1661         * mini-codegen.c: Added SIMD constants to all regbanks arrays.
1662
1663         * mini-codegen.c: Added reg_bank_table_init to initialize the reg desc -> bank
1664         table.
1665
1666         * mini-codegen.c: Define a version of the reg_bank macro that uses desc_to_reg_type
1667         if MONO_ARCH_NEED_SIMD_BANK is defined.
1668
1669         * mini-ops.h: Added the new simd ops.
1670
1671         * mini-x86.c: Added mono_arch_xregname.
1672
1673         * mini-x86.c (mono_arch_cpu_optimizazions): Disable MONO_OPT_SIMD if SSE3 is not detected.
1674
1675         * mini-x86.c (mono_arch_output_basic_block): Add simd related opcodes.
1676
1677         * mini-x86.h: Define simd related MONO_ARCH macros.
1678
1679         * mini.c (mono_type_to_load_membase): Handle simd intrinsics.
1680
1681         * mini.c (mono_type_to_store_membase): Handle simd intrinsics.
1682
1683         * mini.h: Added new macros MONO_IS_NON_FP_MOVE, MONO_IS_REAL_MOVE, MONO_IS_ZERO and
1684         MONO_CLASS_IS_SIMD to deal with simd related IR.
1685
1686         * mini.h (MonoInst): Added spill_var to the backend union.
1687
1688         * mini.h (MonoCompile): Added uses_simd_intrinsics and iconv_raw_var.
1689
1690         * mini.h: Added forward declarations of the new simd fuctions.
1691
1692         * optflags-def.h: Added new optimization names SIMD.
1693
1694         * regalloc.c (mono_regstate_reset): Set next vreg to be the max value of the 3 reg banks.
1695
1696         * regalloc.h: Added support for working with 3 register banks.
1697
1698         * regalloc.h (MonoRegState): Added xsymbolic field if a third regbank is required.
1699
1700         * ssa2.c (mono_ssa_deadce2): Use new MONO_IS_ZERO macro.
1701
1702 Fri Oct 3 16:03:22 CEST 2008 Paolo Molaro <lupus@ximian.com>
1703
1704         * mini-exceptions.c: remove 64 bit related ifdef clutter.
1705
1706 2008-10-03  Zoltan Varga  <vargaz@gmail.com>
1707
1708         * mini-exceptions.c (mono_handle_soft_stack_ovf): Unprotect two pages
1709         instead of one on 64 bit systems.
1710
1711         * method-to-ir.c: Remove unused includes.
1712
1713 2008-10-02  Zoltan Varga  <vargaz@gmail.com>
1714
1715         * aot-compiler.c (emit_exception_debug_info): Use jinfo->used_regs instead of
1716         cfg->used_int_regs, since the two are different on arm.
1717
1718 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1719
1720         * method-to-ir.c, inssel.brg, mini-trampolines.c: Use
1721         mono_method_get_vtable_index() to get the vtable index.
1722
1723 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1724
1725         * method-to-ir.c (mono_method_to_ir2): Don't create native
1726         wrappers for array methods, because they're never called (and if
1727         they were called they wouldn't work).
1728
1729 2008-10-02  Mark Probst  <mark.probst@gmail.com>
1730
1731         * method-to-ir.c (mono_method_to_ir2): Array methods are
1732         special-cased and must not be invoked indirectly via the (M)RGCTX
1733         when generic sharing is turned on.  Fixes #431413.
1734
1735 2008-10-01  Mark Probst  <mark.probst@gmail.com>
1736
1737         * method-to-ir.c: When generic sharing is active, call
1738         non-interface virtual generic methods via the standard trampoline.
1739
1740         * mini-trampolines.c: Handle virtual generic shared methods.
1741
1742         * mini.h, mini-x86.c, mini-x86.h: New argument for
1743         mono_arch_build_imt_thunk() which is non-NULL for virtual generic
1744         method thunks and which is the trampoline to call if the lookup
1745         fails.  Enable the virtual generic method thunk for x86.
1746
1747         * mini-amd64.c, mini-arm.c, mini-ia64.c, mini-sparc.c,
1748         mini-ppc.c (mono_arch_build_imt_thunk): Add the additional
1749         argument but assert that it's NULL, because these archs don't yet
1750         implement the virtual generic method thunk.  Changes in the IMT
1751         thunk data structures.
1752
1753 2008-10-01  Zoltan Varga  <vargaz@gmail.com>
1754
1755         * aot-compiler.c (emit_globals): Avoid invalid characters in
1756         the static linking symbol.
1757
1758         * objects.cs: Add a test for the range check optimization. Fix warnings.
1759
1760         * branch-opts.c (mono_if_conversion): Add back the 'optimize range checks'
1761         optimization from the current JIT.
1762
1763         * method-to-ir.c (mini_emit_inst_for_method): Decompose String.Length
1764         later in decompose_array_access_opts () to allow more optimizations.
1765
1766         * method-to-ir.c (mono_handle_soft_float): Rename this to 
1767         mono_decompose_soft_float () for consistency.
1768
1769         * mini-ops.h: Fix arguments of OP_STRLEN.
1770
1771         * method-to-ir.c (save_cast_details): Extract the cast details saving code
1772         into a separate function.
1773         (reset_cast_details): Ditto.
1774         (handle_unbox): Save cast details. Fixes #431254.
1775
1776         * method-to-ir.c: Remove some obsolete FIXMEs.
1777
1778 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1779
1780         * ir-emit.h (alloc_dreg): Write a warning before crashing.
1781
1782 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1783
1784         * mini-codegen.c: More work on macros to make them
1785         ready for multiple regbanks.
1786
1787 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1788
1789         * method-to.ir.c (mono_type_to_regmove): Remove static modifier.
1790
1791         * mini.h: Export mono_type_to_regmove. Fix signature of mono_regname_full.
1792
1793 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1794
1795         * mini-codegen.c (mono_spillvar_offset): Proper support for
1796         multiple regbanks.
1797
1798 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1799
1800         * mini-amd64.c (mono_arch_emit_epilog): Remove some duplicated code from
1801         the stack overflow changes.
1802
1803 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1804
1805         * mini-codegen.c: Make all bank macros depend on reg_bank.
1806
1807         * mini-codegen.c (mono_local_regalloc): Make free mask
1808         initialization regbank aware.
1809
1810 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1811
1812         * mini-codegen.c (mono_local_regalloc): Extract callee
1813         mask selection to a function and make it regbank aware.
1814
1815 2008-09-30  Rodrigo Kumpera  <rkumpera@novell.com>
1816
1817         * mini-codegen.c (mono_local_regalloc): Changed the cloberring
1818         code to deal with many regbanks.
1819
1820 2008-09-30  Zoltan Varga  <vargaz@gmail.com>
1821
1822         * mini-codegen.c: More fp->regbank changes.
1823
1824 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1825
1826         * mini-codegen.c: Change asserts to use MONO_NUM_REGBANKS instead
1827         of a hardcoded constant.
1828
1829 2008-09-29  Rodrigo Kumpera  <rkumpera@novell.com>
1830
1831         * method-to-ir.c (type_from_stack_type): Fix typo.
1832
1833 2008-09-29  Zoltan Varga  <vargaz@gmail.com>
1834
1835         * mini-ia64.c (emit_move_return_value): Convert float return values to
1836         double.
1837
1838         * objects.cs: Add a new test.
1839         
1840         * mini-ia64.c (mono_arch_allocate_vars): Disable fp elimination for
1841         VARARG methods to fix an assert later.
1842
1843         * mini-mips.h mini-mips.c mini-ops.h cpu-mips.md: Update the mips back
1844         end so it at least compiles.
1845
1846 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1847
1848         * method-to-ir.c (emit_optimized_ldloca_ir): Fix this.
1849
1850 2008-09-28  Rodrigo Kumpera  <rkumpera@novell.com>
1851
1852         * method-to-ir.c (mono_method_to_ir2): Extract the ldloca + initobj
1853         optimization to a new function (emit_optimized_ldloca_ir) and enable
1854         it for both ldloca and ldloca_s.
1855
1856 2008-09-28  Zoltan Varga  <vargaz@gmail.com>
1857
1858         * method-to-ir.c (mono_method_to_ir2): Remove an unnecessary assert in the
1859         gshared CASTCLASS code.
1860
1861         * driver.c (mono_main): Add a workaround for shutdown crashes seen on
1862         amd64, where the libc stack unwinder encounters stack frames referring to
1863         native code in unmapped memory.
1864
1865         * method-to-ir.c (mini_emit_check_array_type): Add support for generic
1866         sharing.
1867
1868         * generics.cs: Add new test.
1869
1870 2008-09-27  Zoltan Varga  <vargaz@gmail.com>
1871
1872         * mini-arm.h driver.c: Print the fp model when using --version on arm. Also,
1873         add a check that one of the ARM_FPU_ constants is defined.
1874
1875         * mini-exceptions.c (mono_handle_soft_stack_ovf): Really fix the build.
1876         
1877         * mini-exceptions.c: Fix build on non-altstack platforms.
1878
1879         * method-to-ir.c (mono_method_to_ir2): Fix aot support for the
1880         sharing of vtypes.
1881
1882         * ir-emit.h: Add a comment to NEW_PCONST.
1883
1884         * mini-exceptions.c (mono_altstack_restore_prot): Fix a warning.
1885
1886         * mini.h (MonoJitDomainInfo): Move some fields here from MonoDomain.
1887
1888         * mini.c aot-runtime.c method-to-ir.c driver.c mini-trampolines.c: Update
1889         after the changes to MonoJitDomainInfo.
1890
1891 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1892
1893         * mini-ppc.c, tramp-ppc.c, mini-ppc.h: Implement generic code sharing.
1894
1895 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1896
1897         * mini-ppc.c: Compiler warning fixes.
1898
1899 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1900
1901         * mini-ppc.c: Special handling for 1/2 byte structs on Darwin only
1902         for pinvokes.
1903
1904 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1905
1906         * exceptions-ppc.c, mini-ppc.h: Compile
1907         mono_arch_handle_altstack_exception() on Darwin, too.
1908
1909 2008-09-27  Mark Probst  <mark.probst@gmail.com>
1910
1911         * method-to-ir.c (mono_emit_rgctx_method_call_full): Must also
1912         work on archs which don't have generic sharing implemented, only
1913         without the vtable_arg.
1914
1915 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1916
1917         * mini.c: Added comment explaining why delegate ctor icall
1918         wrappers are compiled.
1919
1920 2008-09-26  Mark Probst  <mark.probst@gmail.com>
1921
1922         * mini.c: Don't produce trampolines to delegate ctor icall
1923         wrappers but compile them upfront.
1924
1925 Fri Sep 26 17:00:46 CEST 2008 Paolo Molaro <lupus@ximian.com>
1926
1927         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: amd64 support code for calling a
1928         runtime-set function when going back to managed code. Currently this
1929         is used to set back the protection on the soft ovf pages and/or to
1930         throw the stack overflow exception that happened in unmanaged code.
1931
1932 Fri Sep 26 16:46:23 CEST 2008 Paolo Molaro <lupus@ximian.com>
1933
1934         * tramp-x86.c, mini-x86.h, mini-x86.c: x86 support code for calling a
1935         runtime-set function when going back to managed code. Currently this
1936         is used to set back the protection on the soft ovf pages and/or to
1937         throw the stack overflow exception that happened in unmanaged code.
1938
1939 Fri Sep 26 16:34:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
1940
1941         * mini.h, mini.c, mini-trampolines.c, mini-exceptions.c: added
1942         the support code for restoring stack protection after stack overflows
1943         that happen in unmanaged code. Don't set the exec permission on the
1944         soft overflow area.
1945
1946 2008-09-26  Zoltan Varga  <vargaz@gmail.com>
1947
1948         * mini-trampolines.c (mono_delegate_trampoline): Add wrappers even if
1949         delegate->method_ptr is set. Fixes #428054.
1950
1951 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1952
1953         * tests.cs: Rename to ratests.cs.
1954
1955         * method-to-ir.c: Merge the emit_get_rgctx () calls into the 
1956         emit_get_rgctx_... functions.
1957
1958 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1959
1960         * method-to-ir.c: Eliminated macro EMIT_GET_RGCTX.
1961
1962 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1963
1964         * mini-trampolines.c (mono_magic_trampoline): Unwrap wrappers
1965         before asserting that method is sharable.
1966
1967 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1968
1969         * method-to-ir.c, mini.c, jit-icalls.c: New function for checking
1970         whether method needs a static RGCTX wrapper used instead of
1971         complex conditions.
1972
1973         * generic-sharing.c, mini.h: A few functions moved to
1974         metadata/generic-sharing.c.
1975
1976 2008-09-25  Mark Probst  <mark.probst@gmail.com>
1977
1978         * method-to-ir.c, mini.c, mini-exceptions.c, mini-trampolines.c:
1979         Generic code sharing for value types, which essentially means
1980         treating value type methods like static methods.  The RGCTX is
1981         passed in the same way.
1982
1983 2008-09-25  Zoltan Varga  <vargaz@gmail.com>
1984
1985         * method-to-ir.c (mono_method_to_ir2): Avoid an assert in the NEWOBJ
1986         opcode when creating multi-dimensional arrays of open types.
1987
1988         * generic-sharing.c (mono_method_check_context_used): Handle arrays of
1989         open generic types.
1990
1991         * generics.cs: Add a test.
1992
1993         * mini-codegen.c: Use macros everywhere for checking floats instead of == 'f'.
1994
1995 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
1996
1997         * mini.h (MonoCompile): Add 'disable_vreg_to_lvreg' flag.
1998
1999         * mini.c (mini_method_compile): Set it when running under the debugger. 
2000
2001         * method-to-ir.c (mono_handle_global_vregs): Disable global->local
2002         vreg optimization if the flag is set.
2003
2004         * driver.c (mono_main): Add --attach= option to pass options to
2005         the attach agent.
2006
2007         * mini.c (sigquit_signal_handler): Start the attach agent.
2008
2009         * ssapre.c: Disable this to save space since it is not yet ported to
2010         linear IR.
2011
2012         * regalloc2.c: Disable this to save space.
2013
2014         * mini.h (MonoJitStats): Remove unused analyze_stack_repeat.
2015
2016 Wed Sep 24 16:01:49 CEST 2008 Paolo Molaro <lupus@ximian.com>
2017
2018         * decompose.c, method-to-ir.c, mini-codegen.c, regalloc2.c: make
2019         the -v option useful again.
2020
2021 2008-09-24  Zoltan Varga  <vargaz@gmail.com>
2022
2023         * mini-amd64.c (mono_arch_output_basic_block): Add support for
2024         --break-at-bb.
2025
2026         * inssel.brg (mini_emit_castclass): Avoid the szarray!=array checks for
2027         arrays of arrays. Fixes #428406.
2028
2029         * method-to-ir.c (mini_emit_castclass): Ditto.
2030
2031         * objects.cs: Add new test.
2032         
2033 2008-09-23  Rodrigo Kumpera  <rkumpera@novell.com>
2034
2035         * method-to-ir.c (type_to_eval_stack_type): The code path for the new JIT
2036         was wrong at it choked against target_type_is_incompatible for byref types.
2037
2038 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
2039
2040         * mini-codegen.c: Use 'bank' macros instead of 'is_fp' macros in most 
2041         places.
2042
2043 Tue Sep 23 15:31:45 CEST 2008 Paolo Molaro <lupus@ximian.com>
2044
2045         * mini-exceptions.c: update a few more exceptions-related counters.
2046
2047 Tue Sep 23 15:28:29 CEST 2008 Paolo Molaro <lupus@ximian.com>
2048
2049         * aot-runtime.c, method-to-ir.c, mini.c, mini-trampolines.c: use the
2050         new functions to allocate from persistent mempools.
2051
2052 2008-09-23  Zoltan Varga  <vargaz@gmail.com>
2053
2054         * mini.h regalloc.h mini-codegen.c: Generalize the regalloc code to allow 
2055         multiple register banks in the future.
2056
2057         * mini-codegen.c (mono_local_regalloc): Fix a warning.
2058
2059 2008-09-22  Rodrigo Kumpera  <rkumpera@novell.com>
2060
2061         * mini.c (type_to_eval_stack_type): Remove duplicated function.
2062
2063         * method-to-ir.c (type_to_eval_stack_type): Make this version compatible with both JIT.
2064
2065         * mini.h: Export type_to_eval_stack_type.
2066
2067         This function was nearly duplicated in method-to-ir.c and mini.c. The difference
2068         is only ins->klass of byref types.
2069
2070 2008-09-22  Zoltan Varga  <vargaz@gmail.com>
2071
2072         * method-to-ir.c (mini_emit_memset): Use a default alignment of 4.
2073         (mini_emit_memcpy2): Ditto.
2074
2075         * mini-amd64.c: Fix a warning.
2076
2077 2008-09-21  Mark Probst  <mark.probst@gmail.com>
2078
2079         * exceptions-ppc.c (mono_arch_get_call_filter): Fixed stack frame
2080         linking.
2081
2082 2008-09-19  Rodrigo Kumpera  <rkumpera@novell.com>
2083
2084         * method-to-ir.c: Extract stloc micro-optimization to a
2085         function and apply it to all cases.
2086
2087 2008-09-19  Mark Probst  <mark.probst@gmail.com>
2088
2089         * method-to-ir.c: Don't fail generic code sharing in cases we
2090         already support.
2091
2092 2008-09-18  Mark Probst  <mark.probst@gmail.com>
2093
2094         * mini-ppc.c: Handle structs in tailcalls on Darwin.
2095
2096 Tue Sep 16 21:07:11 CEST 2008 Paolo Molaro <lupus@ximian.com>
2097
2098         * *.c, *.md, mini-ops.h: introduced relaxed_nop opcode for spin wait
2099         implementation.
2100
2101 Tue Sep 16 16:39:16 CEST 2008 Paolo Molaro <lupus@ximian.com>
2102
2103         * trace.c: make tracing more useful and correct, with per-thread
2104         id and indent info.
2105
2106 2008-09-15  Mark Probst  <mark.probst@gmail.com>
2107
2108         * mini-ppc.c (mono_arch_emit_call): Convert floats to R4 when
2109         doing a method call and the argument is an R4.
2110
2111 2008-09-14  Zoltan Varga  <vargaz@gmail.com>
2112
2113         * aot-compiler.c (add_wrappers): Do not generate runtime invoke wrappers for
2114         generic methods.
2115
2116 2008-09-13  Mark Probst  <mark.probst@gmail.com>
2117
2118         * mini-ppc.c: Convert result to single for OP_ICONV_TO_R4.
2119
2120 2008-09-12  Zoltan Varga  <vargaz@gmail.com>
2121
2122         * mini.h (MONO_IS_JUMP_TABLE): Handle GOT_ENTRY.
2123         (MONO_JUMP_TABLE_FROM_INS): Ditto.
2124
2125 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
2126
2127         * driver.c: Add a --agent argument (not supported yet) to load managed
2128         agent assemblies before loading the main assembly, similarly to how the
2129         Java VM handles agents.
2130
2131 2008-09-11  Mark Probst  <mark.probst@gmail.com>
2132
2133         * mini-ppc.c (mono_arch_allocate_vars): Use arch-independent
2134         function to do stack layout of local variables.
2135
2136 2008-09-11  Mark Probst  <mark.probst@gmail.com>
2137
2138         * mini-ppc.c (calculate_sizes): Bugfix in sigcookie position
2139         calculation.
2140
2141 2008-09-11  Zoltan Varga  <vargaz@gmail.com>
2142
2143         * method-to-ir.c ssa2.c mini.c mini-amd64.c decompose.c ssa.c abcremoval.c
2144         abcremoval2.c branch-opts.c driver.c dominators.c: Disable parts of the
2145         JIT if DISABLE_JIT is defined.
2146
2147         * Makefile.am: Avoid compiling/linking in inssel.c if DISABLE_JIT is
2148         defined.
2149
2150 2008-09-10  Mark Probst  <mark.probst@gmail.com>
2151
2152         * iltests.il.in: Disable the fconv test on PPC (the result is
2153         undefined according to ECMA).
2154
2155 2008-09-10  Mark Probst  <mark.probst@gmail.com>
2156
2157         * iltests.il.in: Enable tail call tests for PPC.
2158
2159         * mini.h: Add variable for storing incoming valuetype argument
2160         addresses for tail calls.
2161
2162         * mini-ppc.c: Implement valuetype arguments and return values for
2163         tailcalls on Linux.
2164
2165 2008-09-09  Mark Probst  <mark.probst@gmail.com>
2166
2167         * mini-ppc.c: Partially implement tail calls (struct arguments and
2168         return values not supported).
2169
2170         * method-to-ir.c: Enable tail calls on PPC.
2171
2172 2008-09-08  Zoltan Varga  <vargaz@gmail.com>
2173
2174         * aot-compiler.c (emit_wrapper_info): Omit the klass name from
2175         runtime-invoke wrappers to work around the problem of them getting
2176         assigned to a random class.
2177
2178         * aot-runtime.c (mono_aot_get_method): Ditto.
2179         
2180 2008-09-07  Zoltan Varga  <vargaz@gmail.com>
2181
2182         * mini-exceptions.c mini-mips.h mini-s390.h exceptions-mips.c: Kill
2183         the CUSTOM_EXCEPTION_HANDLING and CUSTOM_STACK_WALK defines.
2184
2185 2008-09-07  Mark Probst  <mark.probst@gmail.com>
2186
2187         * method-to-ir.c (mono_method_to_ir2): Disable tail calls for PPC
2188         until they're implemented properly.
2189
2190         * exceptions-ppc.c: Use arch-independent exception-handling code
2191         instead of custom one.
2192
2193         * exceptions-ppc.c, mini-ppc.c, mini-ppc.h: Bug fixes and changes
2194         for Linear IR.
2195
2196         * tramp-ppc.c, mini-ppc.c: Fixed warnings.
2197
2198         * decompose.c, aot-runtime.c, aot-compiler.c: PPC code also
2199         applies when __powerpc__ is defined.
2200
2201 2008-09-06  Zoltan Varga  <vargaz@gmail.com>
2202
2203         * aot-runtime.c (mono_aot_get_method): Add another cache mapping wrapper
2204         methods to their code to avoid computing the full name of wrappers and
2205         doing a lookup in a string hash table.
2206
2207 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
2208
2209         * method-to-ir.c: Remove the CHECK_BBLOCK () stuff it is not needed since
2210         we identify bblocks before method_to_ir () is ran.
2211
2212         * branch-opts.c (mono_optimize_branches): Avoid nullifying the exit bblock.
2213         Also avoid optimizing branches pointing to themselves.
2214
2215         * mini.c (mini_method_compile): Ditto. Fixes #422947.
2216
2217 2008-09-05  Rodrigo Kumpera  <rkumpera@novell.com>
2218
2219         * driver.c (mono_main): Enable the new verifier under core-clr and cas.
2220
2221 2008-09-05  Zoltan Varga  <vargaz@gmail.com>
2222
2223         * tramp-arm.c (mono_arch_nullify_class_init_trampoline): Implement this.
2224         (mono_arch_patch_plt_entry): Fix the calculation of the jump_entry.
2225         (mono_arch_get_nullified_class_init_trampoline): Return 'code' instead of
2226         'buf'.
2227
2228         * aot-compiler.c (emit_plt): Fix the arm plt entries, previously they all 
2229         jumped to the same entry in plt_jump_table.
2230
2231 2008-09-02  Rodrigo Kumpera  <rkumpera@novell.com>
2232
2233         * method-to-ir.c (initialize_array_data): Handle field with RVA from
2234         dynamic images.
2235
2236 2008-08-31  Zoltan Varga  <vargaz@gmail.com>
2237
2238         * method-to-ir.c (handle_isinst): Do the assignment at the beginning, so the
2239         other assignment can be if converted. Saves 1.5% on corlib size and fixes
2240         #421807.
2241
2242 2008-08-29  Geoff Norton  <gnorton@novell.com>
2243
2244         * aot-compiler.c: The Mach/ARM compiler doesn't understand the bss
2245         segment, and doesn't properly handle .space as .text.  Fixes
2246         AOT Mach/ARM
2247
2248 2008-08-29  Geoff Norton  <gnorton@novell.com>
2249
2250         * mini.c: Disable the mach exception handler when running on 
2251         ARM
2252
2253 2008-08-29  Geoff Norton  <gnorton@novell.com>
2254
2255         * aot-compiler.c: Patch from Renaldas Zioma to properly register 
2256         globals on Darwin/ARM
2257
2258 2008-08-28  Zoltan Varga  <vargaz@gmail.com>
2259
2260         * mini.c: Avoid not initializing the runtime when doing AOT compilation, 
2261         since too many things depend on it. Instead, call 
2262         mono_runtime_set_no_exec ().
2263         
2264         * mini.c (mono_create_tls_get): Call mono_alloc_preg (cfg) when running with
2265         the new JIT.
2266
2267         * aot-compiler.c: Add an 'asm-only' AOT option.
2268
2269         * mini.c: Avoid initializing the runtime when doing AOT compilation.
2270                 
2271         * aot-compiler.c (compile_method): Disable gshared support for now as it
2272         doesn't yet work.
2273
2274 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
2275
2276         * mini-amd64.h : Fix a compiler warning.
2277
2278         * exceptions-amd64.c (mono_arch_unwindinfo_install_unwind_info) :
2279           Changed to use a callback function to retrieve the unwind info.
2280           This avoids problems observed when code blocks were removed by
2281           unloading an app domain.
2282
2283         * mini-amd64.c (mono_arch_cpu_optimizazions) : Removing the peephole 
2284           and branch excludes for Winx64.  The fix in exceptions-amd64.c allows them
2285           to work properly.
2286
2287         Contributed under MIT/X11 license.
2288
2289 2008-08-27  Bill Holmes  <billholmes54@gmail.com>
2290
2291         * mini-amd64.c (mono_arch_output_basic_block) : Fix the OP_X86_PUSH_OBJ
2292           case to keep the stack aligned to 8.
2293
2294         Contributed under MIT/X11 license.
2295
2296 2008-08-26  Zoltan Varga  <vargaz@gmail.com>
2297
2298         * aot-runtime.c (mono_aot_get_method): Add a cache for wrapper names to
2299         avoid repeated linear searches.
2300
2301 2008-08-25  Zoltan Varga  <vargaz@gmail.com>
2302
2303         * aot-compiler.c (add_wrappers): Avoid calling get_runtime_invoke with
2304         methods it can't handle.
2305         
2306         * aot-compiler.c (add_method): Avoid adding a method twice.
2307         (add_wrappers): Add runtime invoke wrappers for all methods.
2308
2309         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline_full): New
2310         function to create an aot-compatible version of this trampoline.
2311
2312         * aot-compiler.c aot-runtime.c: Add support for AOT rgctx fetch trampolines.
2313
2314 2008-08-24  Zoltan Varga  <vargaz@gmail.com>
2315
2316         * aot-compiler.c (compile_method): Skip wrappers of generic icalls.
2317
2318         * method-to-ir.c (mono_method_to_ir2): Replace an assert in UNBOX_ANY
2319         with a generic sharing failure.
2320
2321         * aot-compiler.c (emit_klass_info): Call mono_class_get_nested_types ().
2322
2323         * method-to-ir.c (mono_method_to_ir2): Rethrow the correct exception in
2324         CEE_RETHROW. Fixes #419634.
2325
2326         * mini.c (mono_method_to_ir): Ditto.
2327
2328         * exceptions.cs: Add a new test.
2329         
2330         * generic-sharing.c (mini_type_stack_size): Always pass TRUE as allow_open
2331         to mono_type_stack_size_internal () since some callers might not pass in
2332         an rgctx.
2333
2334         * mini-x86.c (mono_arch_emit_prolog): Store the rgctx before calling
2335         instrument_prolog. Fixes #419878.
2336
2337         * mini.c (mono_compile_create_var_for_vreg): Make the lvars representing
2338         doubles in soft float mode volatile.
2339
2340 2008-08-23  Zoltan Varga  <vargaz@gmail.com>
2341
2342         * ir-emit.h (NEW_ARGSTORE): Use cfg->args and cfg->arg_types to fix the build.
2343
2344         * method-to-ir.c (mono_save_args): Use ARGSTORE instead of TEMPSTORE
2345         to handle soft float correctly.
2346
2347         * tramp-arm.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Implement
2348         the fast path.
2349
2350         * mini.h (struct MonoCallInst): Add dynamic_imt_arg boolean field.
2351
2352         * exceptions-arm.c (mono_arch_find_jit_info): Set ctx->regs [ARMREG_R11]
2353         to sp, since the generics catch code requires it.
2354
2355         * mini-arm.h (MONO_ARCH_VTABLE_REG): Use R0 for this to avoid needless
2356         copying.
2357
2358         * method-to-ir.c (emit_imt_argument): Pass imt_arg to 
2359         mono_arch_emit_imt_argument ().
2360
2361         * mini-<ARCH>.c (mono_arch_emit_imt_argument): Add an 'imt_arg' argument.
2362
2363         * mini-arm.c tramp-arm.c: Generic sharing updates.
2364
2365 2008-08-22  Zoltan Varga  <vargaz@gmail.com>
2366
2367         * mini-arm.c: Fix the arm build.
2368
2369         * generic-sharing.c (mini_type_get_underlying_type): New helper function
2370         handling enums, generic instances and generic sharing.
2371         (mini_type_stack_size_full): Ditto.
2372
2373         * mini-amd64.c mini-x86.c mini-arm.c: Use the new functions.
2374         
2375         * mini.h (struct): Add 'uses_rgctx_reg' and 'uses_vtable_reg' fields.
2376
2377         * method-to-ir.c: Set the new fields when using RGCTX_REG/VTABLE_REG.
2378
2379         * tramp-arm.c: Implement the rgctx fetch and the generic class init 
2380         trampolines.
2381
2382         * mini-arm.c: Various small generic sharing changes.
2383
2384         * tramp-x86.c (mono_arch_create_generic_class_init_trampoline): Implement
2385         this for x86.
2386         (mono_arch_create_trampoline_code): Remove most of the GENERIC_CLASS_INIT
2387         custom code.
2388
2389         * mini-trampolines.c (mono_create_generic_class_init_trampoline): New
2390         helper function to return a generic class init trampoline.
2391
2392         * method-to-ir.c mini.c: Use it.
2393         
2394         * tramp-amd64.c (mono_arch_create_generic_class_init_trampoline): New
2395         arch-specfic function to return a generic class init trampoline.
2396
2397         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Remove most of
2398         the GENERIC_CLASS_INIT custom code.
2399
2400         * method-to-ir.c (mono_method_to_ir2): If RGCTX_REG is not defined, that is
2401         a fatal error, not a sharing failure.
2402
2403         * tramp-<ARCH>.c (mono_arch_get_rgctx_lazy_fetch_offset): Removed, no longer
2404         needed.
2405
2406         * mini-trampolines.c (mono_rgctx_lazy_fetch_trampoline): Get the additional
2407         trampoline argument from MONO_ARCH_VTABLE_REG.
2408
2409         * tramp-x86.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2410         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2411         argument, and pass the vtable in VTABLE_REG.
2412
2413         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Change the
2414         order of the arguments to the C trampoline: pass 'slot' as the trampoline
2415         argument, and pass the vtable in VTABLE_REG.
2416         (mono_arch_create_trampoline_code_full): Remove some special casing for
2417         the rgctx fetch trampoline.
2418
2419         * mini.c (mono_method_to_ir): Fix the STELEM_ANY+null value optimization.
2420         Fixes #419273.
2421
2422         * iltests.il: Add a test for it.
2423
2424 2008-08-21  Zoltan Varga  <vargaz@gmail.com>
2425
2426         * aot-compiler.c (compile_method): Enable AOT support for generics sharing.
2427
2428         * method-to-ir.c (mono_method_to_ir2): Remove an aot restriction which is
2429         no longer needed.
2430
2431         * mini-trampolines.c (mono_magic_trampoline): Add a sync wrapper here,
2432         use mono_jit_info_table_find () to avoid recursion.
2433         (mono_delegate_trampoline): Add a sync wrapper here.
2434
2435         * method-to-ir.c (mono_method_to_ir2): Don't call mono_ldftn_nosyc
2436         here.
2437
2438         * mini.c (mono_method_to_ir): Ditto.
2439         
2440         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Remove
2441         add_sync_wrapper argument. Don't add a sync wrapper here.
2442         (mono_create_jump_trampoline): Don't add a sync wrapper here.
2443
2444         * jit-icalls.c (mono_ldftn_nosync): Removed, no longer needed.
2445         
2446 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2447
2448         * exceptions-amd64.c (seh_handler):  For Winx64 adding missing copy 
2449           of nonvolatile registers back from MonoContext to CONTEXT.
2450
2451         Contributed under MIT/X11 license.
2452
2453 2008-08-20  Bill Holmes  <billholmes54@gmail.com>
2454
2455         * mini-amd64.c (mono_arch_get_delegate_invoke_impl):  When shifting the
2456           arguments on Winx64 there are only 4 argument registers.  For this
2457           logic to work the last argument must be pulled from the stack.  
2458
2459         Contributed under MIT/X11 license.
2460
2461 2008-08-20  Zoltan Varga  <vargaz@gmail.com>
2462
2463         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2464
2465         * aot-runtime.c aot-compiler.c patch-info.h mini.c: Get rid of
2466         MONO_PATCH_INFO_WRAPPER, encode/decode wrapper methods like the others in
2467         encode/decode_method_ref ().
2468
2469         * aot-compiler.c (encode_patch): Handle STATIC_RGCTX_INVOKE wrappers.
2470
2471         * aot-runtime.c (decode_patch): Ditto.  
2472
2473         * mini.c (mono_resolve_patch_target): Handle RGCTX_FETCH sub-patches of type
2474         MONO_PATCH_INFO_METHOD.
2475
2476         * aot-runtime.c (decode_exception_debug_info): Decode the contents of
2477         MonoGenericJitInfo.
2478
2479         * aot-compiler.c (emit_exception_debug_info): Emit the contents of
2480         MonoGenericJitInfo.
2481
2482         * method-to-ir.c (emit_imt_argument): Fix AOT+gshared support.
2483
2484         * mini-amd64.c (add_valuetype): Use a dummy gsctx if we didn't receive
2485         one from the caller.
2486
2487         * aot-runtime.c (decode_generic_inst): New function to decode and
2488         return a interned generic inst.
2489         (decode_klass_ref): Use it.
2490         (decode_method_ref): Ditto.
2491
2492         * aot-compiler.c (emit_exception_debug_info): Save 
2493         jinfo->has_generic_jit_info too.
2494
2495 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2496
2497         * mini-ia64.c (mono_arch_output_basic_block): Add OP_FCONV_TO_I.
2498
2499         * iltests.il.in: Add a test for fconv_to_i.
2500
2501         * liveness.c: Disable the liveness2 pass for now to save space.
2502
2503         * regalloc2.c: Include mempool-internals.h to fix warnings.
2504
2505         * aot-compiler.c (encode_method_ref): Encode the context of generic
2506         instance methods.
2507
2508         * aot-runtime.c (decode_method_ref): Inflate generic methods using
2509         the context saved in the aot file.
2510
2511         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
2512
2513         * mini-x86.c (mono_arch_output_basic_block): Disable AOT for OP_JMP.
2514
2515         * method-to-ir.c (mono_method_to_ir2): When using CEE_JMP, make arguments
2516         volatile so they won't be optimized away.
2517
2518 2008-08-19  Rodrigo Kumpera  <rkumpera@novell.com>
2519
2520         * ssa.c:
2521         * ssa2.c:
2522         * mini.c:
2523         * regalloc2.c:
2524         * dominators.c: Remove duplicated functions that now are in
2525         mempool-internals.h.
2526
2527 2008-08-19  Zoltan Varga  <vargaz@gmail.com>
2528
2529         * aot-compiler.c: Fix warnings.
2530
2531         * aot-runtime.c (decode_klass_ref): Add support for VARs/MVARs.
2532
2533         * aot-compiler.c (encode_klass_ref): Encode is_method too for VARs/MVARs.
2534
2535         * method-to-ir.c (emit_get_rgctx_method): Use MONO_PATCH_INFO_METHODCONST
2536         as the patch type.
2537
2538         * mini.c (mono_resolve_patch_target): Ditto.
2539         
2540         * aot-compiler.c (encode_patch): Add support for RGCTX_FETCH.
2541         (encode_klass_ref): Add support for encoding VARs/MVARs.
2542
2543         * mini.c (mono_patch_info_dup_mp): Handle RGCTX_FETCH.
2544
2545         * aot-runtime.c (decode_patch_info): Rename to 'decode_patch'. Split out
2546         the handling of the got entries into a separate 'decode_got_entry' function.
2547         Add support for RGCTX_FETCH.
2548
2549         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RDI since RAX is
2550         clobbered by the trampoline code.
2551
2552         * tramp-amd64.c mini-amd64.h: Change the VTABLE_REG to RAX since that is
2553         not clobbered by the indirect calling code.
2554
2555 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2556
2557         * mini-x86.c (mono_arch_patch_code): Handle RGCTX_FETCH/GENERIC_CLASS_INIT
2558         to fix the build.
2559
2560 2008-08-18  Rodrigo Kumpera  <rkumpera@novell.com>
2561
2562         * method-to-ir.c (mono_emit_method_call_full): Alloc the constructor
2563         signature using the compilation mempool otherwise we would leak it.
2564
2565 2008-08-18  Zoltan Varga  <vargaz@gmail.com>
2566
2567         * method-to-ir.c (mono_method_to_ir2): Emit the generic class inits using
2568         mono_emit_abs_call ().
2569
2570         * patch-info.h: Add GENERIC_CLASS_INIT.
2571
2572         * mini.c (mono_resolve_patch_target): Handle GENERIC_CLASS_INIT.
2573
2574         * mini-amd64.c (emit_call_body): Treat abs calls which have a patch info
2575         as their target as a near call.
2576
2577         * mini.c (mono_codegen): Handle patches stored in cfg->abs_patches in the
2578         ABS handling code.
2579         (mono_resolve_patch_target): Add support for MONO_PATCH_INFO_RGCTX_FETCH.
2580
2581         * method-to-ir.c (mono_emit_abs_call): New helper function which emits a
2582         call to a runtime function described by a patch.
2583
2584         * method-to-ir.c: Emit rgctx entry fetches and class init trampolines using
2585         mono_emit_abs_call, this has the advantage that the ABS handling code in
2586         mono_codegen () can handle them both, and can handle other stuff in the
2587         future without additional code.
2588
2589         * mini.h (struct MonoJumpInfoRgctxEntry): New structure describing an rgctx
2590         entry.
2591         (MonoCompile): Add 'abs_patches' hashtable, which contains patches describing
2592         abs addresses.
2593
2594         * mini.h: Add missing bblock related prototypes.
2595
2596         * mini.h (MonoCompile): Remove unused reverse_inst_list and
2597         reverse_inst_list_len fields.
2598
2599         * mini.c: Refactor this file a bit by moving branch optimizations to 
2600         branch-opts.c.
2601
2602         * method-to-ir.c: Merge generic sharing changes missed earlier.
2603
2604         * aot-compiler.c (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST.
2605
2606         * aot-runtime.c (decode_patch_info): Refactor the code dealing with the
2607         shared patches. Process METHODCONST as a shared patch.
2608
2609         * liveness.c (mono_analyze_liveness): Disable the liveness2 code for now
2610         as it crashes on the 2.0 mscorlib.
2611
2612         * aot-compiler.c (is_shared_got_patch): Revert the last change as it seems
2613         to cause crashes.
2614         
2615         * aot-compiler.c: Use is_plt_patch () in a few additional places.
2616         (is_shared_got_patch): Add MONO_PATCH_INFO_METHODCONST, which is generated
2617         by IMT.
2618
2619         * aot-compiler.c: Reorganize the got handling code to be a bit more
2620         understandable.
2621
2622 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2623
2624         * aot-compiler.c: Make the patch_to_plt_offset hash table use 
2625         mono_patch_info_equals/hash, and use it to massively simplify
2626         get_plt_index ().
2627
2628         * mini.c (mono_patch_info_hash): Simplify this and add support for
2629         more patch types.
2630
2631         * patch-info.h: Rename RGCTX_LAZY_FETCH_TRAMPOLINE to just RGCTX_FETCH.
2632
2633         * mini.c aot-compiler.c aot-runtime.c: Revert the LAZY_FETCH_TRAMPOLINE
2634         handling code, since an offset is not enough to identify a trampoline.
2635
2636         * method-to-ir.c: Remove some g_assert (!cfg->compile_aot) lines.
2637
2638 2008-08-17  Mark Probst  <mark.probst@gmail.com>
2639
2640         * mini.c (mono_op_imm_to_op): Add case for OP_IMUL_IMM.
2641
2642         * method-to-ir.c (mono_method_to_ir2): Decompose OP_CKFINITE.
2643
2644         * mini-ops.h: Argument and result types for OVF_CARRY ops.
2645
2646         * decompose.c: PPC decompositions for various ops.
2647
2648         * cpu-ppc.md, inssel-ppc.brg, mini-ppc.c: PPC changes for Linear IL.
2649
2650 2008-08-17  Zoltan Varga  <vargaz@gmail.com>
2651
2652         * tramp-amd64.c (mono_arch_create_rgctx_lazy_fetch_trampoline): Make this
2653         call the generic trampoline code using a call, instead of a jump, to
2654         remove some special casing from the generic trampoline code.
2655
2656         * mini.c (mono_resolve_patch_target): Handle LAZY_FETCH_TRAMPOLINE.
2657         (mono_codegen): Ditto.
2658
2659         * aot-compiler.c aot-runtime.c: Ditto.
2660
2661         * patch-info.h: Add MONO_PATCH_INFO_RGCTX_LAZY_FETCH_TRAMPOLINE.
2662
2663         * mini-trampolines.c (mono_find_rgctx_lazy_fetch_trampoline_by_addr): New
2664         helper function to find the offset corresponding to a lazy fetch trampoline.
2665
2666         * mini.h (MonoCompile): Add 'orig_method' field to hold the original method
2667         when doing generic sharing.
2668
2669         * aot-compiler.c: Use cfg->orig_method instead of cfg->method in a lot of
2670         places.
2671         
2672         * mini.c (mono_create_rgctx_lazy_fetch_trampoline): Move this to
2673         mini-trampolines.c to be with the other trampoline creation functions.
2674
2675         * method-to-ir.c (mono_emit_method_call): Remove the 'signature' argument
2676         as it is equal to method->signature in most cases, add a 
2677         mono_emit_method_call_full variant which takes a signature and an imt
2678         argument as well.
2679
2680 2008-08-16  Zoltan Varga  <vargaz@gmail.com>
2681
2682         * jit-icalls.c (mono_helper_compile_generic_method): Don't pass the context
2683         to this function, since it could be computed easily from the method 
2684         argument.
2685         (mono_helper_compile_generic_method_wo_context): Removed, not needed any
2686         more.
2687
2688         * method-to-ir.c mini.c: Remove references to 
2689         compile_generic_method_wo_context.
2690
2691         * method-to-ir.c (mono_method_to_ir2): Enable AOT for virtual
2692         generic method calls.
2693         
2694         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_1 for 1
2695         dimensional non-szarrays.
2696
2697         * mini.c (mini_init): Register mono_array_new_1.
2698
2699         * jit-icalls.c (mono_array_new_1): New jit icall.
2700
2701         * mini-trampolines.c (mono_magic_trampoline): For jumps, patch the GOT entries
2702         pointing to the method.
2703
2704         * aot-runtime.c (mono_aot_get_method_from_token): Register GOT slots holding
2705         method addresses belonging to METHOD_JUMP patches in the 
2706         jump_target_got_slot_hash.
2707         (mono_aot_load_method): Ditto.
2708
2709         * aot-compiler.c (compile_method): Allow AOT compilation of methods with
2710         METHOD_JUMP patches.
2711
2712         * mini.c (mini_create_jit_domain_info): New helper function which 
2713         initializes/frees domain->runtime_info.
2714         (mini_free_jit_domain_info): Ditto.
2715         (mini_init): Install the domain hook functions with the runtime.
2716
2717         * mini.h (MonoJitDomainInfo): New structure which stores the domain specific
2718         information maintained by the JIT.
2719
2720         * mini.c (mono_resolve_patch_target): For PATCH_INFO_METHOD_JUMP, move the
2721         insertion into jump_table_hash into mono_codegen (), also implement proper
2722         locking.
2723
2724         * method-to-ir.c (mono_method_to_ir2): Don't disable AOT for CEE_JMP and
2725         tail calls, it is already done by the aot code.
2726         
2727         * method-to-ir.c (mono_method_to_ir2): Handle CEE_JMP using the tail call
2728         mechanism on amd64.
2729
2730         * iltests.il.in: Make the jmp test a bit more complex.
2731
2732         * aot-compiler.c (encode_method_ref): Handle references to normal methods of
2733         generic instances which doesn't have a token.
2734
2735         * aot-runtime.c (decode_method_ref): Ditto.
2736         
2737         * method-to-ir.c (handle_unbox_nullable): Don't disable AOT, the aot code
2738         can handle this case now.
2739         (handle_box): Ditto.
2740
2741 2008-08-15  Geoff Norton  <gnorton@novell.com>
2742
2743         * mini-x86.c: Fix alignment on Apple x86, and re-disable the alignment
2744         debugging check.
2745
2746 2008-08-15  Zoltan Varga  <vargaz@gmail.com>
2747
2748         * method-to-ir.c (mono_method_to_ir2): Allow AOT compilation of methods
2749         calling generic methods.
2750
2751         * aot-compiler.c (encode_patch): Handle MONO_PATCH_INFO_METHOD_RGCTX.
2752
2753         * aot-runtime.c (decode_patch_info): Ditto.
2754
2755         * mini.c (mono_resolve_patch_target): Ditto.
2756         
2757         * patch-info.h: Add METHOD_RGCTX.
2758
2759         * mini-amd64.c (mono_arch_output_basic_block): Optimize LOCALLOC_IMM.
2760
2761 2008-08-14  Zoltan Varga  <vargaz@gmail.com>
2762
2763         * mini-amd64.c (mono_arch_emit_call): Nullify call->vret_var if returning
2764         arguments in registers.
2765
2766         * decompose.c (mono_decompose_vtype_opts): Create a var for the vreg in
2767         OP_VCALL too, don't depend on OP_OUTARG_VTRETADDR doing it.
2768
2769         * mini.c (mini_method_compile): Abort aot compilation for generic
2770         methods if generic sharing is disabled.
2771         
2772         * mini.c (mono_method_to_ir): Disable AOT for virtual calls requiring
2773         an mrgctx.
2774
2775         * method-to-ir.c (mono_method_to_ir2): Disable AOT for virtual calls 
2776         requiring an mrgctx.
2777
2778         * decompose.c (mono_decompose_vtype_opts): Emit the correct sized
2779         store instructions when converting a vcall to a normal call.
2780
2781         * mini.c (sigprof_signal_handler): Call mono_find_jit_info instead of
2782         mono_arch_find_jit_info.
2783
2784 2008-08-13  Zoltan Varga  <vargaz@gmail.com>
2785
2786         * method-to-ir.c (check_inline_called_method_name_limit): Optimize this to
2787         avoid calling mono_method_full_name () for every method even if the
2788         env var is not set.
2789         (check_inline_caller_method_name_limit): Ditto.
2790
2791 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2792
2793         * driver.c (main_thread_handler): Allow AOT compilation of multiple 
2794         assemblies in one run.
2795
2796         * aot-compiler.c (mono_compile_assembly): Only print out a count of
2797         skipped methods if it is not 0.
2798
2799         * Makefile.am (aotcheck): AOT compile all test assemblies in one run.
2800
2801 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2802
2803         * mini.c (mono_codegen):  Changing a preprocessor check from WIN64 to
2804           MONO_ARCH_HAVE_UNWIND_TABLE.
2805
2806         Contributed under MIT/X11 license.
2807
2808 2008-08-12  Bill Holmes  <billholmes54@gmail.com>
2809
2810         * mini-amd64.c (mono_arch_cpu_optimizazions):  Remove peephole and branch
2811           from default optimizaton list on Winx64.
2812
2813         * mini-amd64.c (emit_tls_get):  Added Winx64 specific implementation for GetTLS.
2814
2815         * mini-amd64.c (mono_arch_emit_prolog):  Adding an offset on Winx64 to get
2816           the LMF from the MonoJitTlsData structure.
2817
2818         * mini-amd64.c (mono_arch_setup_jit_tls_data):  Added Winx64 implementation.
2819
2820         Contributed under MIT/X11 license.
2821
2822 2008-08-12  Zoltan Varga  <vargaz@gmail.com>
2823
2824         * mini.c (sigsegv_signal_handler): Fix the build.
2825
2826         * mini-amd64.c (emit_call_body): Use image->aot_module instead of 
2827         assembly->aot_module.
2828
2829         * aot-runtime.c: Use image->aot_module instead of searching in the aot_modules
2830         hash table. This simplifies and speeds up a lot of code, and fixes support
2831         for .netmodules.
2832
2833         * mini.c (SIG_HANDLER_SIGNATURE): Avoid crashes if the thread is not registered
2834         with the runtime.
2835
2836         * mini-exceptions.c: Ditto.
2837         
2838         * exceptions-*c.c (mono_arch_find_jit_info): Remove unused 'trace' and
2839         'native_offset' argument, since these are computed in the 
2840         mono_find_jit_info () function.
2841
2842         * mini-exceptions.c (mono_find_jit_info): Make this non-static, as it
2843         is used by exceptions-ppc.c.
2844
2845         * exceptions-ppc.c: Call mono_find_jit_info () instead of 
2846         mono_arch_find_jit_info ().
2847         
2848         * mini-ppc.h exceptions-ppc.c mini-mips.h mini-mips.c exceptions-mips.c
2849         mini-exceptions.c: Get rid of the CUSTOM_STACK_WALK stuff, use the
2850         generic code in mini-exceptions.c.
2851
2852 2008-08-11  Zoltan Varga  <vargaz@gmail.com>
2853
2854         * mini-ppc.c (mono_arch_flush_register_windows): Add this for ppc.
2855
2856         * aot-runtime.c (mono_aot_get_plt_info_offset): Fix a warning.
2857         
2858         * aot-runtime.c (mono_aot_get_method): Avoid doing all the loading inside
2859         the aot lock, to avoid deadlocks when mono_aot_get_class_from_name () is
2860         called while holding the loader lock. Fixes #415608.
2861         (mono_aot_get_method_from_token_inner): Ditto.
2862
2863 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2864
2865         * exceptions-ppc.c (mono_jit_walk_stack): Use MONO_INIT_CONTEXT_FROM_CURRENT
2866         to reduce differences between this and the generic implementation in
2867         mini-exceptions.c.
2868         (ves_icall_get_frame_info): Ditto.
2869
2870         * mini-ppc.h (MONO_INIT_CONTEXT_FROM_CURRENT): Define this for ppc too.
2871
2872         * mini-exceptions.c (mono_exceptions_init): Remove an #ifdef which is no
2873         longer neccesarry.
2874
2875         * exceptions-ppc.c (arch_get_call_filter): Rename this to 
2876         mono_arch_get_call_filter () and make it non-static, for consistency with the
2877         other architectures.
2878
2879 2008-08-09  Rodrigo Kumpera  <rkumpera@novell.com>
2880
2881         * mini.c:
2882         * local-propagation.c:
2883         * mini-x86.c: Correct the name of arch defines.
2884
2885 2008-08-09  Zoltan Varga  <vargaz@gmail.com>
2886
2887         * method-to-ir.c (mono_op_to_op_imm_noemul): Correct name of
2888         NO_EMULATE_LONG_SHIFT_OPS define.
2889
2890 2008-08-08  Zoltan Varga  <vargaz@gmail.com>
2891
2892         * method-to-ir.c (mono_method_to_ir2): Remove some code from CEE_MONO_LDPTR
2893         now that aot-ed icall wrappers use CEE_MONO_ICALL_ADDR.
2894
2895         * aot-compiler.c aot-runtime.c: Add support for static aot compilation.
2896         MACH fixes. Merged from the 2.0 branch.
2897
2898         * method-to-ir.c (mono_method_to_ir2): Handle CEE_MONO_ICALL_ADDR.
2899
2900         * mini.c (mono_resolve_patch_target): Error out if an icall is not found.
2901         (mono_method_to_ir): Handle CEE_MONO_ICALL_ADDR.
2902
2903         * exceptions-arm.c (mono_arch_get_throw_exception_generic): Add AOT support.
2904
2905         * method-to-ir.c mini.c driver.c aot-compiler.c: Update after
2906         mono_marshal_get_native_wrapper () signature changes.
2907
2908 2008-08-07  Rodrigo Kumpera  <rkumpera@novell.com>
2909
2910         * jit-icalls.c (mono_fconv_ovf_u8): Work around soft-float double to long
2911         conversion bug under arm.
2912
2913 2008-08-06  Rodrigo Kumpera  <rkumpera@novell.com>
2914
2915         * cpu-arm.md: Increase long_conv_to_ovf_i4_2 max length to 36.
2916
2917         * mini-arm.c (mono_arch_output_basic_block): Implement long to int conversion
2918         with overflow checking.
2919
2920 2008-08-05  Marek Habersack  <mhabersack@novell.com>
2921
2922         * Makefile.am (GENMDESC_PRG): when cross-compiling use full path
2923         to the genmdesc.pl file
2924
2925 2008-08-05  Zoltan Varga  <vargaz@gmail.com>
2926
2927         * ir-emit.h (EMIT_NEW_ARGSTORE): Fix the usage of param_types and
2928         arg_array in the soft-float versions of the LOAD/STORE macros.
2929
2930         * method-to-ir.c (mono_method_to_ir2): Fix a warning in the arm switch
2931         implementation.
2932
2933         * ir-emit.h (NEW_VARLOADA): Handle SOFT_FLOAT correctly.
2934
2935 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2936
2937         * mini-ia64.c (add_valuetype): Only reserve half parameter slot for each member of
2938         a float HFA. Fixes #413621.
2939
2940 2008-08-02  Gert Driesen  <drieseng@users.sourceforge.net>
2941
2942         * mini-x86.c (mono_arg_get_argument_info): Rename last occurrence of
2943         frame_size to args_size. Fixes build.
2944
2945 2008-08-02  Zoltan Varga  <vargaz@gmail.com>
2946
2947         * mini-x86.c (mono_arch_get_argument_info): Rename frame_size to args_size,
2948         and don't align it to MONO_ARCH_FRAME_ALIGNMENT.
2949
2950         * mini-x86.h: Change MONO_ARCH_FRAME_ALIGNMENT to 8 so doubles stored on
2951         the stack are not unaligned. Fixes #413247.
2952         
2953 Fri Aug 1 18:46:42 CEST 2008 Paolo Molaro <lupus@ximian.com>
2954
2955         * mini.c: update jitted methods performance counters.
2956
2957 Fri Aug 1 16:30:37 CEST 2008 Paolo Molaro <lupus@ximian.com>
2958
2959         * mini-exceptions.c: increase the exceptions thrown performance
2960         counter in mono_handle_exception ().
2961
2962 2008-07-29  Zoltan Varga  <vargaz@gmail.com>
2963
2964         * aot-runtime.c: Use MonoImage's as keys in the aot_modules hash so the aot
2965         can work with netmodules.
2966
2967 2008-07-28  Geoff Norton  <gnorton@novell.com>
2968
2969         * mini-x86.h: Correct the frame alignment on OSX.  Fixes the jit 
2970         regression tests.
2971
2972 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
2973
2974         * mini-x86.c (mono_arch_emit_call): Emi the osx stack alignment at the
2975         correct place.
2976
2977 2008-07-28  Bill Holmes  <billholmes54@gmail.com>
2978
2979         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
2980           The float param registers and other param registers must be the 
2981           same index on Windows x64.
2982
2983         * mini-amd64.c (mono_arch_allocate_vars) : Implementing the 
2984           ArgValuetypeAddrInIReg argument case.  Setting the argument
2985           op to OP_VTARG_ADDR (OP_REGOFFSET)).
2986
2987         * mini-amd64.c (mono_arch_call_opcode) : Winx64 fix.  Use the size
2988           variable computed above as the copy length for arguments of storage
2989           type ArgValuetypeAddrInIReg.
2990
2991         * mini-amd64.c (mono_arch_emit_call) :  Implementing the 
2992           ArgValuetypeAddrInIReg argument case.  This case will rely on
2993           mono_arch_emit_outarg_vt to emit the correct code later in the process.
2994
2995         * mini-amd64.c (mono_arch_emit_call) :  On Winx64 there always needs to be
2996           a 32 byte stack allocation for all calls.  We will omit the adjustment for
2997           jump and tail call instructoins as they do not follow the typical call behavior.
2998
2999         * mini-amd64.c (mono_arch_emit_outarg_vt) :  Implementing the case for
3000           ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
3001           local variable and pass the local variable by reference to the called method.
3002
3003         * mini-amd64.c (mono_arch_emit_prolog, emit_load_volatile_arguments) :
3004           Implementing the ArgValuetypeAddrInIReg argument case.  When the address
3005           of a struct is passed in a register it must be saved with the other
3006           volatile argument on the stack.
3007
3008         * mini-amd64.c (mono_arch_emit_prolog) : Winx64 fix.  When omitting the
3009           frame pointer the stack adjustment value must be saved to the unwind 
3010           info structure.
3011
3012         Contributed under MIT/X11 license.
3013
3014 2008-07-28  Zoltan Varga  <vargaz@gmail.com>
3015
3016         * inssel-x86.brg (stmt): Add missing OP_X86_OUTARG_ALIGN_STACK rule
3017         which got lost in the merge.
3018
3019 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
3020
3021         * method-to-ir.c: Make the helper_sig variables extern to fix the ppc
3022         build.
3023
3024         * mini-amd64.c (emit_call_body): Add a no_patch case missed earlier.
3025         
3026         * mini-amd64.c (emit_call_body): Avoid aligning the call instruction on
3027         icalls, since they won't be patched.
3028
3029         * exceptions-amd64.c (mono_arch_get_restore_context_full): Use a slightly
3030         different code sequence when running under valgrind to prevent some valgrind
3031         errors.
3032
3033         * iltests.il.in: Add new regression test.
3034
3035         * method-to-ir.c (mono_method_to_ir2): Fix handling of inlined methods which
3036         end with a throw.
3037
3038         * method-to-ir.c (mono_method_to_ir2): Use get_vreg_to_inst () instead of
3039         accessing cfg->vreg_to_inst directly to prevent a crash in LDFLD.
3040
3041         * iltests.il.in: Add new test.
3042
3043         * aot-compiler.c: Fix some warnings.
3044
3045         * decompose.c (mono_decompose_long_opts): Implement OP_ICONV_TO_OVF_I8_UN.
3046         Fixes #412494.
3047
3048 2008-07-27  Zoltan Varga  <vargaz@gmail.com>
3049
3050         * driver.c (mono_main): Fix the --gc=none build. Fixes #412482.
3051         (mini_usage_jitdeveloper): Add a missing --wapi option.
3052
3053 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
3054
3055         * mini-codegen.c: Simplify the is_fp macros.
3056         (free_up_ireg): Remove, use free_up_reg instead.
3057         (free_up_reg): Fix the fp case.
3058
3059 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
3060
3061         * cpu-arm.md (loadr8_membase): Increase the length of this as this is not
3062         lowered earlier.
3063
3064         * exceptions-x86.c: Merge some changes which seemed to have got lost
3065         in the linear-ir merge.
3066
3067         * liveness.c: Disable the liveness2 pass on 32 bit platforms.
3068
3069         * method-to-ir.c (mono_handle_global_vregs): Make the component vregs of a
3070         long vreg volatile even if the variable was already created.
3071
3072         * liveness.c (update_liveness2): Avoid eliminating dead definitions of
3073         volatile variables.
3074
3075 2008-07-26  Zoltan Varga  <vargaz@gmail.com>
3076
3077         * cpu-x86.md (fcall_membase): Increase the size of the fcall opcodes.
3078
3079         * mini.c (mono_jit_compile_method_inner): Add support for 
3080         MONO_EXCEPTION_BAD_IMAGE.
3081
3082         * method-to-ir.c (mono_method_to_ir2): Avoid a crash if 
3083         mini_method_get_context () returns NULL. Fixes #356531.
3084
3085         * mini.c (mono_method_to_ir): Ditto.
3086         
3087         * method-to-ir.c (mono_method_to_ir2): Create a variable if needed when
3088         accessing a field of a valuetype in LDFLD/STFLD. Fixes #412399.
3089
3090 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
3091
3092         * method-to-ir.c (mono_method_to_ir2): Initialize an uninitialized variable
3093         in the LDFTN implementation.
3094
3095 2008-07-25  Mark Probst  <mark.probst@gmail.com>
3096
3097         * mini-trampolines.c (mono_magic_trampoline): When sharing generic
3098         code, patch calls to icalls, too, even if they're not in the
3099         shared generic code hash.  Fixes #411962.
3100
3101 2008-07-25  Zoltan Varga  <vargaz@gmail.com>
3102
3103         * cpu-x86.md: Increase the length of the fcall opcodes.
3104
3105         * mini-x86.c (emit_move_return_value): Avoid some precision issues for
3106         calls returning floats.
3107
3108         * method-to-ir.c (mono_method_to_ir2): Remove the generic sharing restrictions
3109         on NEWARR.
3110         
3111         * method-to-ir.c (mono_method_to_ir2): Merge some LDFTN gsharing changes
3112         missed earlier.
3113
3114         * method-to-ir.c (handle_delegate_ctor): Avoid putting dynamic methods
3115         into the domain->method_code_hash.
3116
3117         * aot-compiler.c: Fix win32 build.
3118
3119         * method-to-ir.c (EMIT_GET_RGCTX): Call EMIT_NEW_LDARG in emit_get_rgctx ().
3120         
3121         * method-to-ir.c (mono_method_to_ir2): Use mono_array_new_specific in the
3122         gshared NEWARR implementation.
3123
3124         * cpu-sparc.md: Remove duplicate localloc_imm opcode.
3125
3126         * ir-emit.h (NEW_ARGLOAD): Use cfg->args and cfg->arg_types so this macro
3127         can be used outside of method_to_ir.
3128
3129         * mini.h (MonoCompile): Add arg_types field.
3130
3131         * method-to-ir.c (inline_method): Save/Restore cfg->args and cfg->arg_types.
3132         
3133         * method-to-ir.c (mono_method_to_ir2): Set cfg->args and cfg->arg_types to
3134         the values of the local arg_array and param_types array.
3135
3136 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
3137
3138         * method-to-ir.c (mono_method_to_ir2): Allocate a GOT var for NEWOBJ, since
3139         got accesses might only get generated later when NEWOBJ is decomposed.
3140         
3141         * method-to-ir.c (handle_delegate_ctor): Add an optimization to avoid
3142         looking up the native code of the target method when a delegate is called
3143         for the first time.
3144
3145         * mini-trampolines.c (mono_delegate_trampoline): Add the other half of the
3146         optimization.
3147
3148         * debug-debugger.c (MONO_DEBUGGER__debugger_info): Fix a warning.
3149
3150         * aot-runtime.c aot-compiler.c: Add a new option 'no-dlsym' which makes
3151         AOT work on platforms without a working dlsym implementation.
3152
3153         * mini.h: Bump AOT image format version.
3154         
3155 2008-07-24  Mark Probst  <mark.probst@gmail.com>
3156
3157         * mini-exceptions.c: Free a MonoType with
3158         mono_metadata_free_type() instead of g_free().
3159
3160         * aot-runtime.c: Free a MonoType.
3161
3162 2008-07-24  Zoltan Varga  <vargaz@gmail.com>
3163
3164         * method-to-ir.c (mono_method_to_ir2): Add a comment for the box+brtrue
3165         optimization.
3166
3167         * mini-codegen.c (mono_local_regalloc): Remove the remaining items from the
3168         fp stack on x86.
3169
3170 2008-07-23  Massimiliano Mantione  <massi@ximian.com>
3171         * mini.c (sigprof_signal_handler): call the new "runtime initialized"
3172         profiler hook.
3173
3174 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
3175
3176         * method-to-ir.c (mono_method_to_ir2): Set the stack type properly for
3177         NEWOBJ calls on valuetypes.
3178
3179         * iltests.il.in: Add new test.
3180
3181         * mini-x86.c (mono_arch_emit_call): Use mini_type_stack_size ().
3182
3183 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
3184
3185         * mini-exceptions.c: Fix some warnings. Remove one ia64 special case as it
3186         is no longer needed.
3187
3188         * mini-ia64.c (mono_arch_emit_prolog): In native-to-managed wrappers, widen
3189         non register sized integer arguments.
3190         (mono_arch_call_opcode): Add support for ArgInFloatRegR4.
3191         (mono_arch_emit_outarg_vt): Pass a more reasonable alignment to 
3192         emit_memcpy2 ().
3193
3194         * method-to-ir.c (mono_method_to_ir2): Handle the ret_var_is_local case in
3195         CEE_MONO_RETOBJ.
3196         
3197         * method-to-ir.c (ADD_WIDEN_OP): New macro to insert a widening op when
3198         two a binop with different sized arguments is emitted.
3199
3200         * mini.c (mono_bblock_insert_after_ins): Properly link up with the next
3201         instruction in the ins==NULL case.
3202
3203 2008-07-23  Zoltan Varga  <vargaz@gmail.com>
3204
3205         * mini-ops.h: Add OP_X86_OUTARG_ALIGN_STACK.
3206
3207         * mini-x86.c: Fix osx build.
3208
3209         * mini-amd64.c (mono_arch_output_basic_block): Handle varargs in the CALL_REG
3210         opcodes as well.
3211
3212         * method-to-ir.c (mono_spill_global_vars): Avoid fusing a load+store into the
3213         instruction for non int sized variables.
3214
3215         * method-to-ir.c (mono_method_to_ir2): Fix an assert in the LDFLD
3216         implementation.
3217
3218 2008-07-23  Robert Jordan  <robertj@gmx.net>
3219
3220         * method-to-ir.c: Fix MSVC build.
3221
3222 2008-07-22  Zoltan Varga  <vargaz@gmail.com>
3223
3224         * method-to-ir.c (mono_method_to_ir2): When calling native code which returns
3225         a non int sized type, widen it to an int since newer versions of gcc seem to
3226         generate code which needs this.
3227
3228         * ssa2.c abcremoval2.c: Fix warnings.
3229
3230         * *: Merge the Linear IR branch.
3231
3232         The original branch is at trunk/branches/vargaz/mini-linear-il, and
3233         the ChangeLog file there describes all the changes done over the years. 
3234         Further documentation can be found at www.mono-project.com/Linear_IL.
3235
3236 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
3237
3238         * mini-amd64.c (get_call_info): Winx64 fix for passing floats.
3239           The float param registers and other param registers must be the 
3240           same index on Windows x64.
3241
3242         Contributed under MIT/X11 license.
3243
3244 2008-07-21  Rodrigo Kumpera  <rkumpera@novell.com>
3245
3246         * mini.c: Make the previous fix GC safe.
3247
3248 2008-07-21  Raja R Harinath  <harinath@hurrynot.org>
3249
3250         * Makefile.am (version.h): Allow a trailing '/' in the repository URL.
3251
3252 2008-07-21  Bill Holmes  <billholmes54@gmail.com>
3253
3254         * mini-amd64.c (get_call_info): Correcting the case for MONO_TYPE_TYPEDBYREF
3255           on Winx64.  This type will not be passed on the stack (ArgOnStack), but 
3256           ArgValuetypeAddrInIReg instead.
3257
3258         Contributed under MIT/X11 license.
3259
3260 2008-07-21  Zoltan Varga  <vargaz@gmail.com>
3261
3262         * mini-codegen.c (get_register_spilling): Fix a warning.
3263
3264 2008-07-17  Rodrigo Kumpera  <rkumpera@novell.com>
3265
3266         * mini.c: Use mono_runtime_class_init_full to avoid leaking memory
3267         for types which the initialization fails. Raises the provided exception
3268         at the right stop after cleanup.
3269
3270 2008-07-16  Zoltan Varga  <vargaz@gmail.com>
3271
3272         * aot-compiler.c: Free most of the memory allocated during compilation.
3273
3274         * mini.c (mini_parse_debug_options): Fix a leak.
3275         
3276         * mini.c (mini_method_compile): Don't add the method to the jit info tables
3277         during aot compilation.
3278
3279 2008-07-14  Zoltan Varga  <vargaz@gmail.com>
3280
3281         * mini.c (mono_method_to_ir): Disable aot for code using CCASTCLASS on x86 as 
3282         it has too much register pressure.
3283
3284 2008-07-13  Zoltan Varga  <vargaz@gmail.com>
3285
3286         * inssel.brg (CEE_CASTCLASS): Remove some dead code.
3287
3288 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3289
3290         * mini-x86.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3291         on x86.
3292
3293         * mini-amd64.h aot-compiler.c aot-runtime.c: Store the plt info offset inline
3294         on amd64 similar to the way it is done on arm.
3295
3296         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3297
3298         * aot-runtime.c (load_aot_module): Rename 'info' to 'amodule' for 
3299         consistency, normalize error messages, avoid loading aot-only modules in
3300         normal mode.
3301
3302         * driver.c (mono_main): Rename --aot-only command line option to --full-aot
3303         for consistency.
3304
3305         * aot-compiler.c aot-runtime.c tramp-arm.c: Implement aot-only support.
3306
3307 2008-07-11  Martin Baulig  <martin@ximian.com>
3308
3309         * debug-debugger.h
3310         (MonoDebuggerInfo): Add `interruption_request'.
3311
3312 2008-07-12  Zoltan Varga  <vargaz@gmail.com>
3313
3314         * aot-compiler.c (emit_plt): Remove some dead code.
3315
3316         * exceptions-arm.c (mono_arch_get_call_filter_full): Initialize ji.
3317
3318         * aot-runtime.c (mono_aot_get_plt_info_offset): New helper function to
3319         return the plt info offset belonging to a given plt entry.
3320
3321         * mini-trampolines.c (mono_aot_plt_trampoline): Use 
3322         mono_aot_get_plt_info_offset.
3323         
3324         * aot-runtime.c aot-compiler.c tramp-arm.c: Change the arm plt code to be
3325         similar to the amd64 code by makeing jumps through a separate jump table 
3326         instead of embedding the jump addresses into the code.
3327
3328 2008-07-11  Zoltan Varga  <vargaz@gmail.com>
3329
3330         * mini.c (mono_method_to_ir): Disable aot for calling ldtoken in a generic
3331         method.
3332
3333 2008-07-10  Martin Baulig  <martin@ximian.com>
3334
3335         * mini.c (mini_method_compile): Disable generics sharing when
3336         running in the debugger.
3337
3338 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3339
3340         * mini.c (mono_method_to_ir): Create the got var in CEE_REFANYVAL.
3341
3342         * inssel.brg (CEE_CASTCLASS): Avoid reusing temporary registers to prevent
3343         the local register allocator from running out of registers on x86 when 
3344         using aot.
3345
3346 2008-07-10  Bill Holmes  <billholmes54@gmail.com>
3347
3348         * inssel-long.brg For OP_LCONV_TO_OVF_I4 an int cast is needed when 
3349         expressing IntMin for the VS Compiler.  See Compiler Warning (level 2) 
3350         C4146.
3351
3352         Contributed under MIT/X11 license.
3353
3354 2008-07-10  Zoltan Varga  <vargaz@gmail.com>
3355
3356         * aot-compiler.c: Get rid of whitespace in the generated assembly file to
3357         speed up the assembler.
3358
3359 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3360
3361         * mini-arm.h tramp-arm.c exceptions-arm.c aot-compiler.c: Beginnings of aot-only
3362         support.
3363
3364         * mini.c: Move the soft float handling macros a bit earlier, add 
3365         NEW_TEMPSTORE_SOFT_FLOAT macro, fix warnings, add soft-float support in one
3366         place.
3367
3368         * mini.h: Add prototype for mono_arch_fixup_jinfo.
3369
3370         * mini.c (mini_init): In aot-only mode, set the root domain code manager to
3371         read-only to help catch code allocation requests.
3372         
3373         * mini.c inssel.brg aot-compiler.c: Make the use of IMT runtime configurable,
3374         and turn it off when using --aot-only or when compiling with --aot=full.
3375
3376         * mini.c (mono_resolve_patch_target): In aot-only mode, allocate the
3377         jump table for switches from the normal domain mempool, not the code
3378         manager.
3379
3380         * mini-trampolines.c (get_unbox_trampoline): New function to return an
3381         unbox trampoline which handles aot-only mode too.
3382
3383         * aot-runtime.c (mono_aot_get_unbox_trampoline): New function to lookup
3384         an AOTed unbox trampoline.
3385
3386         * aot-compiler.c (emit_trampolines): Emit unbox trampolines.
3387
3388 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3389
3390         * wapihandles.c: Fixing MSVC builds.  Include statement changed from <> to
3391         ""
3392
3393         Contributed under MIT/X11 license.
3394
3395 2008-07-09  Bill Holmes  <billholmes54@gmail.com>
3396
3397         * mini.c (mono_codegen):  Allocate space at the end of the code block and store
3398           the unwind information for the method at the end of the allocated block.
3399           
3400         * mini-amd64.h: Added declarations for the unwind routines and adding field to 
3401           MonoCompileArch to hold the unwind info for SEH on Winx64
3402         
3403         * mini-amd64.c (mono_arch_emit_prolog): Calls to the unwind routines added to store
3404           frame pointer info for the method being compiled.
3405           
3406         * exceptions-amd64.c (mono_arch_get_throw_corlib_exception): Added a stack adjustment before
3407           the call to mono_exception_from_token.
3408           
3409         * exceptions-amd64.c: Added mono_arch_unwindinfo* implementations.  This code is responsible
3410           storing the method prolog information in a format that the Winx64 SEH can understand.  This
3411           information is stored a the end of the method block because it is all 32-bit offset based.
3412
3413         Contributed under MIT/X11 license.
3414
3415 2008-07-09  Zoltan Varga  <vargaz@gmail.com>
3416
3417         * mini.h: Remove duplicate definitions of the mini_wapi_ functions.
3418
3419         * wapihandles.c: Fix warnings.
3420
3421         * aot-runtime.c (load_aot_module): Add a missing error message in aot-only
3422         mode.
3423
3424         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): Avoid calling 
3425         mono_jit_compile_method in aot-only mode since that calls the type 
3426         initializer.
3427         
3428         * mini-trampolines.c (mono_create_delegate_trampoline): Avoid calling
3429         get_delegate_invoke_impl in aot-only mode.
3430
3431         * mini.c (mono_global_codeman_reserve): Reenable the aot-only check.
3432
3433 2008-07-08  Zoltan Varga  <vargaz@gmail.com>
3434
3435         * trace.c (mono_trace_enter_method): Fix printing of Type instances.
3436
3437         * aot-compiler.c (compile_method): Disable the check for GSHARED since it
3438         is on by default.
3439
3440         * inssel-long.brg (reg): Add a rule for LCALL_REG (OP_I8CONST).
3441
3442         * tramp-amd64.c (mono_arch_nullify_plt_entry): Read the nullified class
3443         init trampoline from the AOT file as well.
3444
3445         * mini-amd64.c (mono_arch_register_lowlevel_calls): Register
3446         mono_amd64_throw_exception as a jit icall since it is needed by the aot-only
3447         code.
3448
3449         * mini.c (mini_init): Move the call to mono_exceptions_init () after 
3450         mono_init.
3451
3452         * exceptions-amd64.c: Add _full variants for the remaining exception code
3453         creation functions as well, allow emission of relocatable code, remove
3454         caching since that is now done by the caller.
3455
3456         * mini-exceptions.c: Add _full variants for the remaining exception code
3457         creation functions as well, add aot-only support.
3458
3459         * aot-compiler.c (compile_method): Allow calls to methods of constructed types
3460         if we can determine a proper token for them.
3461         (add_wrappers): Add a few more wrappers.
3462         (emit_method_code): Remove some dead code.
3463         (emit_trampolines): Emit exception code too.
3464
3465         * mini.c (mono_method_to_ir): Call mono_array_new_2 if possible.
3466
3467         * jit-icalls.c (mono_array_new_2): New jit icall, specialized version of
3468         mono_array_new_va which avoids varargs.
3469
3470         * mini-exceptions.c (mono_exceptions_init): Fix the ppc build.
3471
3472         * mini-trampolines.c: Call mono_create_specific_trampoline () instead of
3473         mono_arch_create_specific_trampoline () in all places.
3474
3475         * aot-compiler.c aot-runtime.c: Refactor the trampoline emitting/loading code
3476         a bit so it can be used for other things as well.
3477         
3478         * mini-exceptions.c (mono_exceptions_init): Initialize throw_exception_by_name
3479         on demand as well.
3480
3481         * exceptions-amd64.c: Rename the caching from the exception code creation
3482         functions, it is done by the caller instead.
3483         
3484         * exceptions-amd64.c: Change the signature of the exception code creation 
3485         functions to allow the creation of relocatable code later.
3486
3487         * mini-exceptions.c: Add a set of functions to query the various 
3488         runtime-generated exception functions.
3489
3490         * mini.c mini-exceptions.c: Use the newly added functions instead of the
3491         mono_arch_.. () functions.
3492         
3493 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3494
3495         * mini-trampolines.c (mono_aot_get_trampoline_code): Removed, no longer used.
3496
3497         * aot-runtime.c aot-compiler.c: AOT the generic trampolines in aot-only mode.
3498
3499         * mini.c (mini_get_imt_trampoline): Call mono_create_specific_trampoline ().
3500         (mini_get_vtable_trampoline): Ditto.
3501
3502         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Create relocatable
3503         code in the AOT case by returning the code size and a list of relocations to
3504         the caller.
3505
3506         * mini-trampolines.c (mono_create_specific_trampoline): New helper function.
3507
3508 2008-07-07  Bill Holmes  <billholmes54@gmail.com>
3509
3510         * mini-amd64.c:  On Winx64 the calling convention always requires the caller to 
3511           clean the stack.
3512
3513         Contributed under MIT/X11 license.
3514
3515 2008-07-07  Zoltan Varga  <vargaz@gmail.com>
3516
3517         * aot-compiler.c (emit_exception_debug_info): Serialize the debug info first
3518         so the buffer size can be computed correctly. Fixes #404735.
3519
3520         * debug-mini.c (mono_debug_serialize_debug_info): Lookup the debug info
3521         normally as cfg->debug_info is already freed.
3522
3523 2008-07-06  Zoltan Varga  <vargaz@gmail.com>
3524
3525         * mini-amd64.c: For calls returning vtypes in registers, don't store
3526         the return address on the stack, instead allocate a separate local for
3527         it. Fixes #404729.
3528
3529 2008-07-05  Mark Probst  <mark.probst@gmail.com>
3530
3531         * mini-trampolines.c, mini.h: Add an argument to
3532         mono_create_jit_trampoline_in_domain() for turning off the adding
3533         of the sync wrapper.
3534
3535         * mini.c: Use the JIT trampoline without sync instead of
3536         ldftn_nosync in static RGCTX invoke wrappers so that the call can
3537         be patched.
3538
3539 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3540
3541         * driver.c: Turn on GSHARED optimization by default.
3542
3543 2008-07-04  Zoltan Varga  <vargaz@gmail.com>
3544
3545         * mini-trampolines.c mini.c mini.h tramp-<ARCH>.c: Rename MONO_TRAMPOLINE_GENERIC
3546         to MONO_TRAMPOLINE_JIT since it better reflects what it does.
3547
3548         * mini-trampolines.c (mono_get_aot_trampoline_code): New internal function to
3549         create a variant of the generic trampoline code callable from AOTed trampolines.
3550
3551         * tramp-amd64.c (mono_arch_create_trampoline_code_full): Add support for generic
3552         trampoline code callable from AOTed trampolines.
3553
3554         * aot-compiler.c aot-runtime.c: Add support for AOTing trampolines.
3555
3556 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3557
3558         * inssel.brg, mini-ops.h: New opcode for doing CHECK_THIS in a
3559         pass-through manner.
3560
3561         * mini.c: Generic method sharing.  Pass MRGCTX to generic methods
3562         and don't fail sharing for them anymore.
3563
3564         * mini-exceptions.c: Handle exceptions in shared generic methods.
3565
3566         * generic-sharing.c: When checking the context of a generic
3567         method, also check its class's context.  Don't treat wrappers as
3568         sharable.
3569
3570         * mini-trampolines.c: Some code factored out to
3571         metadata/generic-sharing.c.  Handle the MRGCTX case.
3572
3573         * jit-icalls.c, jit-icalls.h: ldvirtfn icall for generic sharing -
3574         we must deal with the method being of another instantiation of the
3575         class.  Add static rgctx invoke wrappers to generic methods.
3576
3577 2008-07-04  Mark Probst  <mark.probst@gmail.com>
3578
3579         * mini.c: Provide all jit infos of generic shared methods with a
3580         generic jit info.
3581
3582         * mini-exceptions.c: Handle the new situation that a generic info
3583         might be available, but not info about the this/vtable/mrgctx
3584         variable.
3585
3586 2008-07-03  Mark Probst  <mark.probst@gmail.com>
3587
3588         * mini.c: Don't accept ldftn and ldvirtftn with uninstantiated
3589         generic methods.
3590
3591 2008-07-03  Zoltan Varga  <vargaz@gmail.com>
3592
3593         * dominators.c (check_dominance_frontier): Fix a warning.
3594
3595         * mini.h: Add some missing prototypes.
3596
3597         * ssa.c local-propagation.c debug-debuger.c: Fix warnings.
3598
3599         * driver.c (mono_jit_init_version): Correct the comments since the first
3600         argument should be the name of the root domain, not a filename.
3601
3602         * aot-runtime.c (make_writable): Error out if this is called while running
3603         with --aot-only.
3604         (load_aot_module): Ditto.
3605
3606         * aot-compiler.c: Really fix the computation of method indexes.
3607
3608         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Remove the previous 
3609         optimizations as this is no longer called frequently.
3610
3611         * mini-trampolines.c (mono_create_delegate_trampoline): Precompute the invoke
3612         method and the invoke impl code and pass it to the delegate trampoline instead of
3613         just the delegate class.
3614
3615 2008-07-02  Zoltan Varga  <vargaz@gmail.com>
3616
3617         * aot-compiler.c: Fixup the computation of method indexes.
3618         (add_wrappers): Create the base methods of the runtime invoke wrappers using
3619         the method builder infrastructure.
3620
3621         * aot-runtime.c (decode_exception_debug_info): Don't crash if the method
3622         has no header.
3623
3624         * mini-trampolines.c (mono_create_jit_trampoline_in_domain): In aot-only
3625         mode, load the method right away instead of creating a trampoline.
3626
3627         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Eliminate locking.
3628
3629         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Eliminate locking, speed up
3630         some checks a bit.
3631
3632 2008-07-01  Zoltan Varga  <vargaz@gmail.com>
3633
3634         * aot-runtime.c (decode_patch_info): Don't create trampolines in aot_only mode.
3635         (mono_aot_load_method): Use method_index instead of method->token.
3636
3637         * mini.c (mono_jit_compile_method_inner): Move the aot_only check down, so it
3638         can handle icalls etc. properly.
3639
3640         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
3641
3642         * aot-compiler.c aot-runtime.c: Allow AOTing many wrapper types.
3643
3644         * mini.c (mono_resolve_patch_target): Handle JIT_ICALL_ADDR.
3645         (mono_codegen): Convert calls made by JIT icall wrappers to the icalls into
3646         JIT_ICALL_ADDR patch type.
3647
3648         * patch-info.h: Add JIT_ICALL_ADDR patch type.
3649
3650         * mini.c (mono_method_to_ir): Allow AOTing methods which access the interruption
3651         request flag.
3652         (mono_resolve_patch_target): Handle INTERRUPTION_REQUEST_FLAG.
3653
3654         * patch-info.h: Add INTERRUPTION_REQUEST_FLAG.
3655
3656 2008-06-30  Zoltan Varga  <vargaz@gmail.com>
3657
3658         * mini.c: Use domain->jit_code_hash_lock for controlling access to
3659         domain->jit_code_hash.
3660
3661 2008-06-29  Zoltan Varga  <vargaz@gmail.com>
3662
3663         * mini.c (mini_parse_debug_options): Add 'dont-free-domains' option.
3664
3665 2008-06-27  Zoltan Varga  <vargaz@gmail.com>
3666
3667         * mini-trampolines.c (mono_delegate_trampoline): Don't pass a gsctx to
3668         get_this_arg_from_call, let it compute it when needed.
3669
3670         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'code' argument, compute
3671         gsctx from code only when needed.
3672
3673         * mini-trampolines.c (get_generic_context): Rename this to 
3674         mono_get_generic_context_from_code (), and move it to generic-sharing.c, where
3675         it can be called by the arch backends.
3676
3677         * mini-exceptions.c (mono_print_thread_dump): Allow the argument to be NULL.
3678
3679 2008-06-26  Zoltan Varga  <vargaz@gmail.com>
3680
3681         * driver.c (mono_main): Add experimental --aot-only command line option.
3682
3683         * mini.c: Error out when creating trampolines or JIT compiling if --aot-only is
3684         set.
3685
3686 2008-06-26  Kornél Pál  <kornelpal@gmail.com>
3687
3688         * driver.c (DllMain): Remove mono_module_handle.
3689
3690         Contributed under MIT/X11 license.
3691
3692 2008-06-25  Zoltan Varga  <vargaz@gmail.com>
3693
3694         * aot-compiler.c: Add not-yet-usable 'full' option. Add some infrastructure code
3695         for emitting methods which are not in the source assembly. Detect and report
3696         failure of assembling+linking.
3697         
3698         * aot-compiler.c (emit_klass_info): Call mono_class_setup_vtable ().
3699
3700         * aot-compiler.c: Move the contents of the has_glot_slots array to MonoCompile.
3701
3702 2008-06-24  Rodrigo Kumpera  <rkumpera@novell.com>
3703
3704         * mini.c: Check if stats is enabled so we don't allocate memory when not needed.
3705
3706 2008-06-24  Zoltan Varga  <vargaz@gmail.com>
3707
3708         * mini.h: Remove some obsolete prototypes.
3709
3710         * mini.c: Avoid storing MonoMethod pointers in the JIT stats, store their string format instead.
3711
3712 2008-06-24  Mark Probst  <mark.probst@gmail.com>
3713
3714         * mini.c (get_object_generic_inst): Variable-sized arrays are not
3715         supported by Visual Studio, so use alloca().
3716
3717 2008-06-23  Zoltan Varga  <vargaz@gmail.com>
3718
3719         * mini-ia64.c (add_valuetype): Increase *gr too when passing a HFA to be in sync with the ABi.
3720         Fixes #402585.
3721
3722 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3723
3724         * mini.c: Fail sharing of a generic method if it contains an open
3725         catch clause (because we don't pass MRGCTXs yet).
3726
3727 2008-06-23  Mark Probst  <mark.probst@gmail.com>
3728
3729         * mini.c: When compiling a method with generic sharing, insert the
3730         method instantiated with an all-Object generic context into the
3731         jit info table, instead of the context of the first instantiation
3732         of the method we happen to compile.
3733
3734 2008-06-18  Martin Baulig  <martin@ximian.com>
3735
3736         * debug-debugger.h (MonoDebuggerInfo): Replaced `version' with
3737         `major_version' and `minor_version'.
3738
3739 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3740
3741         * generic-sharing.c, mini.c, mini.h, aot-runtime.c:
3742         mono_method_is_generic_sharable_impl() takes an additional
3743         argument specifying whether to treat type variables as reference
3744         types.
3745
3746 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3747
3748         * mini.h: Removed obsolete prototypes.
3749
3750 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3751
3752         * mini.c: Don't fail generic sharing for initobj and sizeof - we
3753         already handle them.
3754
3755 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3756
3757         * mini.h, mini-trampolines.c, tramp-alpha.c, tramp-amd64.c,
3758         tramp-arm.c, tramp-hppa.c, tramp-ia64.c, tramp-mips.c,
3759         tramp-ppc.c, tramp-s390.c, tramp-s390x.c, tramp-sparc.c,
3760         tramp-x86.c: Added a MonoGenericContext* argument to
3761         mono_arch_get_unbox_trampoline() so that it can call other
3762         functions which require it.
3763
3764 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3765
3766         * mini.h, mini-trampolines.c, mini-amd64.c, mini-x86.c,
3767         mini-alpha.c, mini-arm.c, mini-ia64.c, mini-ppc.c:
3768         mono_arch_get_this_arg_from_call() takes a
3769         MonoGenericSharingContext* as well.
3770
3771 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3772
3773         * mini.c: Factor out code for emitting unbox into emit_unbox() and
3774         implement generic sharing of unbox.
3775
3776 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3777
3778         * mini.c: Don't compute the vtable to determine whether a field is
3779         special static, because it might not work for open types.
3780
3781 2008-06-17  Mark Probst  <mark.probst@gmail.com>
3782
3783         * mini.c: Removed the unused token_type and token_source arguments
3784         from get_runtime_generic_context_ptr().
3785
3786 2008-06-17  Marek Habersack  <mhabersack@novell.com>
3787
3788         * mini.c (ADD_BINOP): fix the build
3789
3790 2008-06-16  Zoltan Varga  <vargaz@gmail.com>
3791
3792         * mini.c (ADD_BINOP): When operating on a native int and an int32, insert
3793         a widening op.
3794
3795 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3796
3797         * mini.h: Removed class relations enum that's not used anymore.
3798
3799 2008-06-16  Mark Probst  <mark.probst@gmail.com>
3800
3801         * tramp-x86.c, tramp-amd64.c: Slot access code for MRGCTXs.
3802
3803         * mini-trampolines.c: Distinguish between RGCTXs and MRGCTXs in
3804         the lazy fetch trampoline access code.
3805
3806 2008-06-15  Zoltan Varga  <vargaz@gmail.com>
3807
3808         * mini-codegen.c (mono_local_regalloc): Add some micro optimizations.
3809
3810 2008-06-14  Zoltan Varga  <vargaz@gmail.com>
3811
3812         * mini.c: Fix some soft-float bugs. Fixes #378735 and #398348.
3813
3814         * mini.h (MONO_INST_LIST_ENTRY): Fix warnings on arm.
3815
3816         * mini.c (mono_method_to_ir): Check call signature for NEWOBJ as well.
3817
3818 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3819
3820         * mini-x86.c inssel-x86.brg cpu-x86.md: Implement unsigned min/max
3821         intrinsics.
3822
3823         * mini-ops.h: Add MIN/MAX_UN opcodes.
3824
3825         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Implement unsigned min/max
3826         intrinsics.
3827
3828         * basic-math.cs: Add more min/max tests.
3829
3830         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3831
3832 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3833
3834         * mini.c: Small fix in the prologue of emit_castclass.
3835
3836 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3837
3838         * inssel.brg: Remove the OP_MIN/OP_MAX rules. Fix a warning.
3839
3840         * mini.c (mini_get_inst_for_method): Remove the Min/Max intrinsics, they
3841         do not work even for unsigned types. Fixes #400014.
3842
3843         * basic-math.cs: Add regression tests for unsigned Min/Max.
3844
3845 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3846
3847         * mini.c: Added additional context_used argument to several
3848         functions, which will be needed for sharing generic methods.  Use
3849         GET_RGCTX macro wherever appropriate.  Declare only one
3850         context_used in mono_method_to_ir().
3851
3852 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3853
3854         * mini.c, generic-sharing.c: Removed generic class relations.
3855
3856         * mini.c, tramp-amd64.c, tramp-x86.c: Additional arguments to
3857         functions due to MRGCTX changes.
3858
3859 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3860
3861         * inssel.brg, inssel-long.brg, inssel-long32.brg, mini-ops.h,
3862         graph.c, local-propagation.c, aliasing.c: New opcodes for calls
3863         with calculated IMT.
3864
3865         * mini.c: Generic sharing of calls via generic interfaces.
3866
3867         * jit-icalls.c, jit-icalls.h: Helper function for compiling a
3868         generic method with non-constant MonoGenericContext*.  Instead,
3869         the context is taken out of the method itself.
3870
3871 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3872
3873         * mini.c: Generic sharing of ldvirtftn.
3874
3875 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3876
3877         * mini.c: Generic sharing of ldftn.
3878
3879 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3880
3881         * mini.c: Do pass VTable/RGCTX argument to static generic methods.
3882
3883 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3884
3885         * mini.c: Generic sharing of the special case of ldtoken followed
3886         by a call to GetTypeFromHandle.
3887
3888 2008-06-13  Mark Probst  <mark.probst@gmail.com>
3889
3890         * mini.c: Generic sharing of box for nullable types.
3891
3892 2008-06-13  Zoltan Varga  <vargaz@gmail.com>
3893
3894         * mini-s390x.c (add_stackParm): Fix computation of offsets when arguments
3895         are passed on the stack. Fixes #324807.
3896
3897 2008-06-12  Bill Holmes  <billholmes54@gmail.com>
3898
3899         * mini-amd64.c:add_valuetype: Adding Winx64 code to fill the ArgInfo
3900         for the ArgValuetypeAddrInIReg case.
3901
3902         * mini-amd64.c:mono_arch_allocate_vars:  Adding a case for 
3903         ArgValuetypeAddrInIReg to avoid asserts.  Code needs to be added here.
3904
3905         * mini-amd64.c: mono_arch_call_opcode:  Adding Winx64 code for an ArgInfo of 
3906         type ArgValuetypeAddrInIReg.  The code emitted will copy the argument to a 
3907         local variable and pass the local variable by reference to the called method.
3908           
3909         * mini-amd64.c: mono_arch_emit_prolog:  Adjust the stack for calls to
3910         mono_jit_thread_attach and mono_get_lmf_addr for Winx64.
3911
3912         Contributed under MIT/X11 license.
3913
3914 2008-06-10  Rodrigo Kumpera  <rkumpera@novell.com>
3915
3916         * debug-mini.c (mono_debug_free_method_jit_info): Moved to metadata/mono-debug.c.
3917
3918         * debug-mini.c (mono_debug_print_vars): Release memory after printing
3919         everything.
3920
3921 2008-06-10  Martin Baulig  <martin@ximian.com>
3922
3923         * debug-mini.c
3924         (mono_debug_close_method): Check whether `cfg->epilogue_begin != NULL'.
3925
3926 2008-06-09  Kornél Pál  <kornelpal@gmail.com>
3927
3928         * main.c: Add and set argv [argc] to NULL to match C specification that fixes
3929         possible error when no arguments are passed.
3930
3931         Contributed under MIT/X11 license.
3932
3933 2008-06-09  Rodrigo Kumpera  <rkumpera@novell.com>
3934
3935         * mini-exceptions.c (ves_icall_get_trace): Skip source locations
3936         where the file name is NULL.
3937
3938 2008-06-09  Zoltan Varga  <vargaz@gmail.com>
3939
3940         * mini.c: Fix s390 build.
3941
3942 2008-06-08  Zoltan Varga  <vargaz@gmail.com>
3943
3944         * trace.c (mono_trace_parse_options): Fix warnings.
3945
3946         * mini-amd64.c: Revert most of the last patch for now as it breaks the build.
3947
3948 2008-06-07  Zoltan Varga  <vargaz@gmail.com>
3949
3950         * mini.c (remove_block_if_useless): Avoid printing the method name.
3951         
3952         * mini.c: Remove needless setting of ins->cil_code which is now done by 
3953         MONO_INST_NEW.
3954
3955         * mini-amd64.c: Add some code to avoid saving callee saved registers in the
3956         LMF. Not yet used.
3957
3958         * tramp-amd64.c (mono_arch_patch_callsite): Tell valgrind to discard the
3959         translated code after it has been patched.
3960
3961 2008-06-06  Zoltan Varga  <vargaz@gmail.com>
3962
3963         * mini-amd64.c (emit_call_body): Align the call displacement to 4 bytes to
3964         avoid problems during code patching on SMP systems.
3965         (emit_call): Avoid adding a patch info which is already added by 
3966         emit_call_body.
3967         (mono_arch_emit_exceptions): Ditto.
3968
3969 2008-06-05  Zoltan Varga  <vargaz@gmail.com>
3970
3971         * tramp-*.c (mono_arch_get_unbox_trampoline): No need to check for ret->byref,
3972         MONO_TYPE_ISSTRUCT already checks for it.
3973
3974 2008-06-05  Bill Holmes  <billholmes54@gmail.com>
3975
3976         * mini-amd64.c:merge_argument_class_from_type: When marshaling 
3977           structs with floats on Winx64 the float registers are not used.  
3978           The integer registers are always used..
3979         * mini-amd64.c:add_valuetype:  When marshaling structs on Winx64 
3980           only one register will be used and only if the size of the struct 
3981           is 1,2,4, or 8 bytes.
3982
3983         * tramp-amd64.c :  Adjusting size used for mono_global_codeman_reserve
3984           to work for Winx64.
3985
3986         Contributed under MIT/X11 license.
3987
3988 2008-06-05  Martin Baulig  <martin@ximian.com>
3989
3990         * debug-debugger.c (debugger_lookup_class): Also call
3991         mono_class_setup_methods() here; we're only called from RTI.
3992
3993 2008-06-05  Andreas Färber  <andreas.faerber@web.de>
3994
3995         * mini.c (mini_init): Add DTrace probes ves-init-{begin,end}.
3996         (mini_method_compile) Add DTrace probes method-compile-{begin,end}.
3997         * Makefile.am (libmono_la_LIBADD,libmono_static_la_LIBADD,mono_LDADD):
3998         Post-process object files and add dtrace-generated object, if necessary.
3999
4000         Contributed under MIT/X11 license.
4001
4002 2008-06-04  Mark Probst  <mark.probst@gmail.com>
4003
4004         * inssel.brg, mini-ops.h: Added opcode for unboxcast with computed
4005         element class.
4006
4007         * mini.c: Generic sharing for unbox.any and castclass.
4008
4009 2008-06-04  Mark Probst  <mark.probst@gmail.com>
4010
4011         * mini.c: Ignore tailcall prefix in shared generic code and when
4012         doing calls which require a vtable/rgctx argument.
4013
4014 2008-06-04  Mark Probst  <mark.probst@gmail.com>
4015
4016         * mini.c: Don't free the JIT info.
4017
4018         * driver.c: Changes in the JIT info table testing code.
4019
4020 2008-06-03  Zoltan Varga  <vargaz@gmail.com>
4021
4022         * tramp-arm.c (mono_arch_create_trampoline_code): Check for thread 
4023         interruption. Fix some warnings.
4024
4025         * tramp-*.c (mono_arch_create_trampoline_code): Call the _force_ variant of
4026         interruption_checkpoint.
4027
4028 Tue Jun 3 13:07:03 CEST 2008 Paolo Molaro <lupus@ximian.com>
4029
4030         * jit.h, mini.h, trace.c, driver.c: introduce an API to enable tracing
4031         from embedding applications.
4032
4033 2008-06-02  William Holmes  <billholmes54@gmail.com>
4034
4035         * mini-amd64.c :  Correcting some of the issues for Winx64 dealing with
4036           reserving 32 bytes on the stack when making calls. 
4037
4038         Contributed under MIT/X11 license.
4039
4040 2008-06-01  Zoltan Varga  <vargaz@gmail.com>
4041
4042         * mini-arm.c (mono_arch_output_basic_block): Merge some small fixes from
4043         the linear IL branch.
4044
4045         * driver.c: Print out more information for --version on arm.
4046
4047 2008-05-30  Zoltan Varga  <vargaz@gmail.com>
4048
4049         * mini-amd64.c (mono_arch_emit_prolog): Increase max_offset when processing
4050         bb_exit instead, since out of line bblocks might not actually be emitted
4051         out-of-line.
4052         
4053         * mini-amd64.c (mono_arch_emit_prolog): Increase bb->max_offset by the
4054         maximum epilog size for out of line bblocks if tracing is enabled.
4055
4056         * iltests.il.in: Merge tests/long-shift.regalloc.il into this file.
4057
4058 2008-05-28  Rodrigo Kumpera  <rkumpera@novell.com>
4059
4060         * arrays.cs: Regression tests for allocating arrays with negative sizes.
4061
4062 2008-05-28  Zoltan Varga  <vargaz@gmail.com>
4063
4064         * mini-x86.h mini-x86.c inssel-x86.brg cpu-x86.md: Add support for
4065         CAS instrinsics. Optimize the implementation of the ATOMIC_EXCHANGE 
4066         opcodes.
4067
4068 2008-05-27  Zoltan Varga  <vargaz@gmail.com>
4069
4070         * mini.c (mini_get_inst_for_method): Add support for CAS instrinsics when
4071         the 'value' to store is a constant.
4072
4073         * mini-ops.h: Add OP_ATOMIC_CAS_IMM opcodes.
4074
4075         * mini-amd64.c (mono_arch_output_basic_block): Optimize the the implementation
4076         of ATOMIC_EXCHANGE opcodes, add support for the CAS opcodes.
4077
4078 2008-05-26  Zoltan Varga  <vargaz@gmail.com>
4079
4080         * mini.c generic-sharing.c jit-icalls.c aot-compiler.c: Use accessor functions
4081         for accessing method->generic_container.
4082
4083 2008-05-24  Zoltan Varga  <vargaz@gmail.com>
4084
4085         * mini.c (mono_method_check_inlining): Avoid creating vtables if possible.
4086         
4087         * mini.c (SIG_HANDLER_SIGNATURE): Fix sparc build too.
4088
4089         * mini.c (SIG_HANDLER_SIGNATURE): Fix IA64 build.
4090
4091         * mini.c (mono_jit_compile_method_inner): Avoid a crash if mono_class_vtable ()
4092         fails.
4093
4094 2008-05-23  Zoltan Varga  <vargaz@gmail.com>
4095
4096         * driver.c (mono_main): Set mono_setup_vtable_in_class_init to FALSE.
4097
4098         * mini.c: Handle the case when mono_class_vtable () fails.
4099
4100 2008-05-23  Massimiliano Mantione  <massi@ximian.com>
4101         * mini.c (sigprof_signal_handler): Support call chains (backtrace) in
4102         the stat profiler.
4103
4104 2008-05-22  Mark Probst  <mark.probst@gmail.com>
4105
4106         * mini.c, jit-icalls.c, jit-icalls.h: Make generic sharing work
4107         together with domain sharing.
4108
4109 2008-05-22  Mark Probst  <mark.probst@gmail.com>
4110
4111         * mini.c: Treat callvirts to final methods like non-virtual calls
4112         when doing generic sharing, i.e. look them up in the runtime
4113         generic context.
4114
4115 2008-05-22  Mark Probst  <mark.probst@gmail.com>
4116
4117         * inssel.brg, mini-ops.h: Added opcodes for mkrefany and refanyval
4118         with computed types (for generic sharing).
4119
4120         * mini.c: Generic sharing for mkrefany and refanyval.
4121
4122 2008-05-22  Zoltan Varga  <vargaz@gmail.com>
4123
4124         * inssel.brg (mini_emit_virtual_call): Avoid constructing a generic vtable if
4125         possible.
4126
4127         * mini-trampolines.c (mono_magic_trampoline): Avoid calling setup_methods () in
4128         the generic sharing code.
4129         
4130         * mini-trampolines.c (mono_magic_trampoline): Call mono_class_setup_methods ()
4131         when needed.
4132
4133 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
4134
4135         * mini.h: Remove the declaration of mono_aot_init_vtable ().
4136
4137 2008-05-21  C.J. Adams-collier <cjac@colliertech.org>
4138
4139         * driver.c: updated copyright date
4140
4141 2008-05-21  Zoltan Varga  <vargaz@gmail.com>
4142
4143         * aot-runtime.c mini.c: Remove the AOT init_vtable stuff as it is no longer
4144         needed.
4145
4146 2008-05-19  Martin Baulig  <martin@ximian.com>
4147
4148         * debug-debugger.h (MonoDebuggerInfo): Add `using_mono_debugger'
4149         pointing to the new `_mono_debug_using_mono_debugger' variable.
4150
4151         * driver.c
4152         (mono_main): Check mono_debug_using_mono_debugger() rather than
4153         the `MONO_INSIDE_MDB' environment variable to check whether we're
4154         inside the debugger.
4155
4156 2008-05-19  Zoltan Varga  <vargaz@gmail.com>
4157
4158         * mini.c (mini_method_compile): Use cfg->args [0] for accessing the this
4159         argument.
4160
4161 2008-05-08  Rodrigo Kumpera  <rkumpera@novell.com>
4162
4163         * declsec.h: Move MONO_SECMAN_FLAG to metadata/metadata-internals.h.
4164
4165         * mini.c: Added mini_assembly_can_skip_verification. This
4166         function checks if the assembly requested to skip verification. 
4167         Fixes part of #387274.
4168
4169 2008-05-07  Zoltan Varga  <vargaz@gmail.com>
4170
4171         * mini.c (mini_get_method): Disable the check for open generic classes when
4172         using generic sharing.
4173
4174         * generics.cs: Add a test for #387034.
4175
4176         * mini.c (mini_get_method): Check whenever the method class is an open generic
4177         type, and return NULL in that case, causing a verification error. Fixes
4178         #384123.
4179
4180 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
4181
4182         * driver.c (mono_main): Revert r102623. The right
4183         thing to do is to enable the verifier under verifiable
4184         unless a --security flag was passed.
4185
4186         We need this non-trivial behavior for --verify-all otherwise
4187         mcs-compileall won't be able to use it. As it needs everything to
4188         be verified under validil.
4189
4190 2008-05-06  Martin Baulig  <martin@ximian.com>
4191
4192         Fix #383749.
4193
4194         * debug-mini.c (mono_debugger_thread_created): Add proper locking.
4195         (mono_debugger_thread_cleanup): Likewise.
4196         (mono_debugger_extended_notification): Likewise.
4197
4198 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
4199
4200         * mini.c (mono_method_to_ir): Verify visibility of call related opcodes
4201         against both inflated and non-inflated methods. We need to check against the
4202         generic definition for cases where the instantiated method is not visible.
4203         We need to check against the inflated types for cases where the instantiation
4204         changes any super type. This fixes #382986.
4205
4206         Note that this doesn't need to be applied to other parts of mono_method_to_ir
4207         that check for visibiliy as generic params only appears as the type subject
4208         of tokens on call opcodes. Field manipulation and ldftn must always
4209         target an exact type.
4210
4211 2008-05-06  Rodrigo Kumpera  <rkumpera@novell.com>
4212
4213         * driver.c (mono_main): Using --verify-all enables the verifier under validil mode
4214         if no related --security flag is passed.
4215
4216 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4217
4218         * mini-arch.h: Prepare support for ppc64.
4219
4220         Contributed under MIT/X11 license.
4221
4222 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4223
4224         * aot-runtime.c: Prepare support for ppc64.
4225
4226         Contributed under MIT/X11 license.
4227
4228 2008-05-05  Andreas Färber  <andreas.faerber@web.de>
4229
4230         * mini-ops.h: Prepare support for ppc64.
4231
4232         Contributed under MIT/X11 license.
4233
4234 2008-05-04  Andreas Färber  <andreas.faerber@web.de>
4235
4236         * helpers.c: Add support for OSX/ppc64 and Linux/ppc64 (dis)assemblers.
4237
4238         Contributed under MIT/X11 license.
4239
4240 2008-05-03  Zoltan Varga  <vargaz@gmail.com>
4241
4242         * aot-runtime.c (load_aot_module): Avoid trying to load aot code for dynamic
4243         assemblies, since aot_name is not a full path, causing us to load MS.NET 
4244         assemblies on windows.
4245
4246 2008-04-28  Kornél Pál  <kornelpal@gmail.com>
4247
4248         * mini.c (mono_jit_compile_method_inner): Use g_warning instead of g_error
4249         for unsupported METHOD_IMPL_ATTRIBUTE_NATIVE.
4250         * main.c: Use UTF-8 encoded command line instead of Windows default code
4251         page on Windows to support Unicode.
4252         * driver.c (DllMain): New function for mixed-mode assembly support.
4253         * Makefile.am: Add -Wl,--kill-at to libmono_la_LDFLAGS on Windows to
4254         export __stdcall functions without decoration.
4255
4256         Contributed under MIT/X11 license.
4257
4258 2008-04-28  Mark Probst  <mark.probst@gmail.com>
4259
4260         * tramp-amd64.c, mini-amd64.c: Preserve R11 in the trampoline by
4261         saving it very early.
4262
4263 2008-04-28  Mark Probst  <mark.probst@gmail.com>
4264
4265         * mini.h, mini.c: Lots of code for accessing the old RGCTX
4266         deleted.  The only way to access the new RGCTX is via the
4267         trampline.
4268
4269         * mini.c, mini-amd64, mini-x86.c, mini-exceptions.c: Pass the
4270         vtable instead of the RGCTX to static methods.
4271
4272         * mini-tramplines.c, tramp-amd64.c, tramp-x86.c: Trampoline for
4273         accessing the new RGCTX.
4274
4275         * generic-sharing.c: There is no separation between self, type
4276         arguments and other types in the RGCTX anymore.
4277
4278 2008-04-25  Jonathan Chambers <joncham@gmail.com>
4279
4280         * mini-amd64.c (add_general): Remove previous stack adjustment.
4281         (mono_arch_call_opcode): Remove OP_OUTARG_MEMBASE and instead simply
4282         adjust stack pointer after pushing args. Adjust ARGS_OFFSET to account
4283         for 32 bytes of stack space reserved for all calls.
4284         
4285         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Remove.
4286         (OP_AMD64_OUTARG_ALIGN_STACK): Take argument to specify size of stack 
4287         adjustment.
4288         
4289         Code contributed under MIT/X11 license.
4290
4291 2008-04-23  Rodrigo Kumpera  <rkumpera@novell.com>
4292
4293         * mini.c (mini_method_verify): Only verify non-inflated methods, check
4294         against the root definition, peeling out method and type instantiations.
4295         Cache verify success results, code that fails verification is still
4296         checked multiple times.
4297
4298 2008-04-23  Zoltan Varga  <vargaz@gmail.com>
4299
4300         * mini.c (mono_method_to_ir): Avoid inserting write barriers for stores of null.
4301
4302 2008-04-23  Jonathan Chambers <joncham@gmail.com>
4303
4304         * mini-amd64.c (add_general): Always increment stack on Win64.
4305         (mono_arch_call_opcode): Use OP_OUTARG_MEMBASE instead of OP_OUTARG
4306         on Win64.
4307         
4308         * inssel-amd64.brg (OP_OUTARG_MEMBASE): Add OP_OUTARG_MEMBASE for 
4309         stack based argument handling on Win64.
4310         
4311         Code contributed under MIT/X11 license.
4312
4313 2008-04-23  Raja R Harinath  <harinath@hurrynot.org>
4314
4315         * Makefile.am (version.h): Add support for git-svn.
4316
4317 2008-04-22  Zoltan Varga  <vargaz@gmail.com>
4318
4319         * mini-exceptions.c (mono_handle_native_sigsegv): Rework the gdb calling code
4320         so instead of calling g_spawn_command_line_sync, we do everything by hand, 
4321         avoiding allocations and libc functions which might deadlock.
4322         
4323         * mini-exceptions.c (mono_handle_native_sigsegv): Avoid calling gdb if the
4324         'no-gdb-backtrace' option is set.
4325
4326         * mini.c (mini_parse_debug_options): Parse 'no-gdb-backtrace' option.
4327
4328         * mini.h (MonoDebugOptions): Add 'no_gdb_backtrace' option.
4329
4330 2008-04-21  Martin Baulig  <martin@ximian.com>
4331
4332         * debug-debugger.h (MonoDebuggerInfo): Removed `attach', `detach'
4333         and `get_lmf_addr'; `notification_address' is no longer a pointer.
4334
4335 2008-04-21  Martin Baulig  <martin@ximian.com>
4336
4337         * debug-debugger.h (MonoDebuggerInfo): Added `thread_vtable_ptr',
4338         `thread_vtable', `event_handler_ptr' and `event_handler'.
4339
4340 2008-04-21  Martin Baulig  <martin@ximian.com>
4341
4342         * debug-debugger.h (MonoDebuggerInfo): Added `init_code_buffer';
4343         allows delayed initialization of the `executable_code_buffer' when
4344         attaching.
4345
4346 2008-04-21  Martin Baulig  <martin@ximian.com>
4347
4348         * mini.h (mono_debugger_create_notification_function): Removed.
4349         * tramp-*.c (mono_debugger_create_notification_function): Removed.
4350
4351         * mdb-debug-info64.s
4352         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4353
4354         * mdb-debug-info32.s
4355         (MONO_DEBUGGER__notification_function): Added this in the .text section.
4356
4357         * Makefile.am: Fix the mdb-debug-info*.s logic; the debugger
4358         currently only works on x86 and x86_64, so don't create it on ppc.
4359
4360 2008-04-21  Martin Baulig  <martin@ximian.com>
4361
4362         * mini.h (MonoDebugOptions): Added `mdb_optimizations'.
4363
4364         * mini.c
4365         (mini_method_compile): In the fp elimination check, check
4366         `debug_options.mdb_optimizations' in addition to
4367         mono_debug_using_mono_debugger().       
4368
4369         * driver.c (mono_main): Added `--debug=mdb-optimizations' option to
4370         disable some JIT optimizations which are only disabled when
4371         running inside the debugger.
4372         Added `--help-debug' option to describe the debugging options.
4373         (parse_debug_options): New static function to parse the `--debug'
4374         options, so we can easily add more stuff in future.
4375
4376 2008-04-20  Zoltan Varga  <vargaz@gmail.com>
4377
4378         * mini.c (set_exception_type_from_invalid_il): Avoid reading invalid memory when
4379         the method has no body.
4380
4381 2008-04-19  Jonathan Chambers <joncham@gmail.com>
4382
4383         * mini-amd64.c (cpuid): Implement with MSVC intrinsic as inline
4384         assembly is not allowed in MSVC 64-bit compiler. 
4385         (mono_arch_cpu_init): Don't set floating point precision on MSVC build
4386         as we get floating point exceptions everywhere.
4387         
4388         * exceptions-amd64.c (get_throw_trampoline): Push empty args on stack to
4389         correctly align arguments for call to throw_exception.
4390         (prepare_for_guard_pages): Cast to guint64 instead of unsigned long.
4391         
4392         Code contributed under MIT/X11 license.
4393
4394 2008-04-19  Zoltan Varga  <vargaz@gmail.com>
4395
4396         * mini-amd64.c (amd64_patch): Make the check for (%rip) addressing more strict.
4397
4398 2008-04-17  Zoltan Varga  <vargaz@gmail.com>
4399
4400         * inssel.brg (OP_SWITCH): Use (gint64) instead of (long) to cast a large constant.
4401
4402         * mini-amd64.c (NEW_INS): Set cil_code.
4403
4404         * mini.c (mini_method_compile): Move the disabling of fp elimination to here
4405         from mini-amd64.c so all debugger related logic is in one place.
4406
4407         * mini.c: Set cfg->ip to NULL after passes which set it so instructions created
4408         later won't have a random ip assigned to them.
4409
4410 2008-04-16  Zoltan Varga  <vargaz@gmail.com>
4411
4412         * mini-trampolines.c (mono_create_jump_trampoline): Add an assert to check that
4413         the arch specific function initializes code_size.
4414         (mono_create_delegate_trampoline): Ditto.
4415
4416         * mini-mips.h mini-mips.c inssel-mips.brg inssel-long32-mips.brg cpu-mips.md
4417         tramp-mips.c: Resurrect MIPS port and also fix the issues on little-endian
4418         platforms.
4419
4420         * liveness.c (mono_analyze_liveness): Disable the initlocals optimization if 
4421         running under the debugger.
4422
4423         * linear-scan.c (mono_linear_scan): Avoid sharing registers if running under the
4424         debugger.
4425
4426         * mini.c (mini_method_compile): Set a few flags in cfg if running under the
4427         debugger. Also move the disabling of optimizations here from driver.c.
4428         (mono_allocate_stack_slots_full): Avoid sharing stack slots if running under the
4429         debugger.
4430
4431         * mini.h (MonoCompile): Add a few new flags.
4432
4433 2008-04-15  Zoltan Varga  <vargaz@gmail.com>
4434
4435         * mini.c (mono_method_to_ir): Set cfg->ip before processing an IL instruction
4436         so the cil_code field of created MonoInst's is properly set.
4437         (mini_select_instructions): Ditto.
4438
4439         * mini.h (MONO_INST_NEW): Initialize the cil_code field using cfg->ip.
4440         (MONO_INST_NEW_CALL): Ditto.
4441
4442         * mini.c inssel.brg inssel-x86.brg inssel-amd64.brg: Use MONO_INST_NEW ()
4443         in many places so the ins->cil_code field is properly initialized.
4444
4445         * mini.c (mono_bblock_add_inst): Call MONO_ADD_INS () so the logic is in one
4446         place.
4447
4448 2008-04-14  Zoltan Varga  <vargaz@gmail.com>
4449
4450         * mini.c (mini_method_compile): Print a different message when compiling a 
4451         shared method.
4452         
4453         * mini.c (GENERIC_SHARING_FAILURE): Print a failure message when verbose_level
4454         > 1.
4455
4456 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4457
4458         * mini-amd64.c (mono_arch_output_basic_block): Implement OP_ABS directly using
4459         SSE2 instructions.
4460
4461         * basic-math.cs: Fix warnings. Add a test for Math.Abs ().
4462         
4463 2008-04-11  Zoltan Varga  <vargaz@gmail.com>
4464
4465         * mini.c (handle_stack_args): Make this return void since its return value was
4466         never used. Also set cfg->unverifiable for invalid IL instead of calling
4467         G_BREAKPOINT ().
4468
4469 2008-04-10  Mark Probst  <mark.probst@gmail.com>
4470
4471         * mini.c: Make sure "this" is live in catch clauses with type
4472         variables in shared generic code.
4473
4474 2008-04-08  Mark Probst  <mark.probst@gmail.com>
4475
4476         * mini.c: Replaced uses of MONO_TYPE_IS_REFERENCE with calls to
4477         generic_class_is_reference_type() to ensure the proper behaviour
4478         when sharing generic code and the type in question is a type
4479         argument.
4480
4481 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4482
4483         * mini-exceptions.c: Applied patch from Mark Spruiell (mes@zeroc.com). Fix
4484         race conditions when printing thread dumps. Fixes #377738.
4485
4486 2008-04-08  Massimiliano Mantione  <massi@ximian.com>
4487         
4488         aliasing.c (update_aliasing_information_on_inst): Fixed a bug which
4489         shows up when both MonoInst arguments can cause aliasig.
4490         There is likely no way in the current JIT to trigger this problem, but
4491         it showed up in the development of generics sharing, when in a new
4492         opcode both args of an OP_GROUP can be aliases (addresses of a local).
4493         When the generics sharing code will be committed, its tests will be
4494         valid also for this bug.
4495
4496 2008-04-08  Zoltan Varga  <vargaz@gmail.com>
4497
4498         * aot-runtime.c (decode_patch_info): Always transform PATCH_INFO_WRAPPER to
4499         PATCH_INFO_METHOD.
4500
4501         * mini.c (mono_resolve_patch_target): Fix a crash in the AOT case if method is
4502         NULL.
4503
4504 2008-04-07  Zoltan Varga  <vargaz@gmail.com>
4505
4506         * mini-exceptions.c (mono_handle_exception_internal): When --debug=casts is used,
4507         use a more detailed exception message for InvalidCastException.
4508
4509         * mini.h (MonoJitTlsData): Add 'class_cast_from' and 'class_cast_to' fields.
4510
4511         * driver.c (mono_main): Add --debug=casts option to turn on better 
4512         InvalidCastException message details.
4513
4514         * mini.c (mini_get_debug_options): New helper function to return the address of
4515         the debug_options variable.
4516
4517         * mini.c (mono_get_jit_tls_intrinsic): New helper function to create a load of
4518         the jit_tls TLS variable.
4519
4520         * mini.c (mono_jit_tls): New TLS variable.
4521
4522         * inssel.brg: Save the details of a cast to a TLS variable when the --debug=casts
4523         option is used.
4524
4525 2008-04-07  Rodrigo Kumpera  <rkumpera@novell.com>
4526
4527         * mini.h: Removed verifer related stuff. This code was moved to verify.c
4528
4529         * mini.c: Removed verifer related stuff, code moved to verify.c.
4530
4531         * driver.c: Using code from verify.c instead of mini.c.
4532
4533 2008-04-05  Zoltan Varga  <vargaz@gmail.com>
4534
4535         * mini.c (check_for_method_verify): Remove the mscorlib comment since it is no
4536         longer valid.
4537
4538 2008-04-04  Rodrigo Kumpera  <rkumpera@novell.com>
4539
4540         * mini.c (check_for_method_verify): Enabling verification of
4541         corlib if mono_verify_all is set. Bugs in the verifier preventing that
4542         have been fixed.
4543
4544 2008-04-04  Zoltan Varga  <vargaz@gmail.com>
4545
4546         * exceptions-amd64.c (throw_exception): Unify the win32/non-win32 cases, save
4547         caller saved registers as well.
4548         
4549         * exceptions-amd64.c (mono_arch_get_restore_context): Restore most caller
4550         saved registers as well.
4551
4552 2008-03-30  Zoltan Varga  <vargaz@gmail.com>
4553
4554         * mini-x86.c cpu-x86.md inssel-x86.brg: Add min/max intrinsics.
4555
4556         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of the non-SSE2 floating point
4557         code.
4558
4559 2008-03-27  Zoltan Varga  <vargaz@gmail.com>
4560
4561         * mini-amd64.c (mono_arch_get_this_arg_reg): Add a 'gsctx' argument and pass it
4562         to get_call_info.
4563         (get_call_info): Take a gsctx argument instead of 'cfg'.
4564
4565 2008-03-26  Zoltan Varga  <vargaz@gmail.com>
4566
4567         * mini.c (check_for_method_verify): Avoid verifying mscorlib methods even if
4568         mono_verify_all is set.
4569
4570         * driver.c (compile_all_methods_thread_main): Don't exit at the first error.
4571
4572         * mini.c mini.h: Remove the unused and incomplete stack merge verification code.
4573
4574 2008-03-25  Zoltan Varga  <vargaz@gmail.com>
4575
4576         * driver.c (compile_all_methods_thread_main): Error out if compilation fails with
4577         an exception.
4578
4579         * driver.c mini.c mini.h: Add a --verify-all development option to test the
4580         verifier and the code generated by the compiler.
4581
4582 2008-03-25  Mark Probst  <mark.probst@gmail.com>
4583
4584         * mini.c: Generic sharing of the non-nullable case of the box
4585         instruction.
4586
4587 2008-03-24  Zoltan Varga  <vargaz@gmail.com>
4588
4589         * inssel.brg: Fix the build.
4590
4591         * iltests.il.in: Add a test for lconv.ovf.u8.un.
4592
4593 2008-03-24  Rodrigo Kumpera  <rkumpera@novell.com>
4594
4595         * mini.c (mono_method_to_ir): Implement readonly for ldelema and
4596         Array:Address. Fixes #372410.
4597
4598         * iltests.il.in: New tests for readonly prefix.
4599
4600 2008-03-23  Zoltan Varga  <vargaz@gmail.com>
4601
4602         * mini.h mini.c mini-trampolines.c: Move trampoline related code to 
4603         mini-trampolines.c.
4604
4605         * mini.h mini.c mini-exceptions.c: Move mini_init_exceptions () to 
4606         mini-exceptions.c.
4607
4608         * mini-amd64.c mini-s390.c (mono_arch_lowering_pass): Use mono_decompose_op_imm ().
4609         
4610         * mini.c (mono_decompose_op_imm): New helper function.
4611
4612         * mini-s390x.c (calculate_sizes): Rename this to get_call_info for consistency
4613         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4614         return value.
4615
4616         * mini-s390x.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4617         mono_arch_output_basic_block. Fix warnings.
4618
4619         * inssel-s390x.brg: Remove the unneccesary OP_LMUL_IMM rule to fix the s390x build
4620         for now.
4621
4622 2008-03-22  Zoltan Varga  <vargaz@gmail.com>
4623
4624         * mini-exceptions.c (ves_icall_get_frame_info): Remove the ia64/s390 workarounds
4625         since the extra frame is now detected automatically inside the loop.
4626
4627         * mini-s390.c (mono_arch_peephole_pass_2): Remove the arch independent peephole 
4628         opts which are now in mono_peephole_ins ().
4629         
4630         * mini-s390.c (mono_arch_output_basic_block): Fix OP_FCALL_MEMBASE.
4631
4632         * mini-exceptions.c (ves_icall_get_frame_info): Skip native-to-managed wrapper
4633         frames and skip duplicate managed-to-native frames. Fixes #367665.
4634
4635         * mini-x86.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4636         opts which are now in mono_peephole_ins ().
4637         (mono_arch_peephole_pass_2): Ditto.
4638
4639         * mini-codegen.c (mono_peephole_ins): Fix a problem on 32 bit platforms.
4640
4641         * mini-codegen.c (mono_peephole_ins): New helper function containing the
4642         arch independent peephole optimizations.
4643
4644         * mini-amd64.c (mono_arch_peephole_pass_1): Remove the arch independent peephole
4645         opts which are now in mono_peephole_ins ().
4646
4647         * mini-amd64.c (mono_arch_peephole_pass_2): Ditto.
4648         
4649         * mini-s390.c (mono_arch_output_basic_block): Fix build.
4650
4651         * tramp-s390.c (mono_arch_get_vcall_slot): Handle an additional instruction
4652         pattern.
4653
4654         * mini-s390.c (mono_arch_output_basic_block): Handle big offsets in the
4655         CALL_MEMBASE opcodes. Fix setting of the destination in the OP_LCONV_TO_OVF_I
4656         opcode. 
4657
4658 2008-03-21  Zoltan Varga  <vargaz@gmail.com>
4659
4660         * mini-s390.c (calculate_sizes): Rename this to get_call_info for consistency
4661         with the other architectures, add an 'mp' argument, fold 'sz' argument into the
4662         return value.
4663
4664         * mini-s390.c: Handle DIV_IMM/REM_IMM in the lowering pass instead of in 
4665         mono_arch_output_basic_block. Fix warnings.
4666
4667 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4668
4669         * inssel-long32.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4670         conv.ovf.u.un.
4671
4672 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4673
4674         * inssel-long.brg: Add rules for long conv.ovf.i/conv.ovf.u/conv.ovf.i.un/
4675         conv.ovf.u.un.
4676
4677         * iltests.il: Add new tests.
4678
4679 2008-03-20  Kornél Pál  <kornelpal@gmail.com>
4680
4681         * mini.c: Removed Windows version macros.
4682
4683 2008-03-20  Mark Probst  <mark.probst@gmail.com>
4684
4685         * generic-sharing.c: Put reflection types in the extensible part
4686         of the runtime generic context.
4687
4688         * mini.c: Generic sharing of the GetTypeHandle special case of the
4689         ldtoken instruction.
4690
4691 2008-03-20  Zoltan Varga  <vargaz@gmail.com>
4692
4693         * mini.h (MONO_BB_FOR_EACH_INS_SAFE): New helper macro.
4694
4695         * mini-<ARCH>.c: Use the new macro instead in the peephole/lowering passes.
4696         
4697         * mini.h (MONO_DEL_INS): Rename to MONO_DELETE_INS and Add a 'bb' argument for 
4698         consistency with the other version on the linear IR branch.
4699
4700         * mini-<ARCH>.c: Update callers of MONO_DEL_INS.
4701
4702         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i/conv.ovf.u.
4703
4704         * iltests.il.in: Add new tests.
4705
4706 2008-03-19  Zoltan Varga  <vargaz@gmail.com>
4707
4708         * inssel-long32.brg inssel-long.brg: Add rules for conv.ovf.i.un/conv.ovf.u.un.
4709
4710         * iltests.il.in: Add new tests.
4711
4712 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4713
4714         * mini.c: Two variables with the same name were declared in
4715         nesting contexts and one wasn't initialized.  Fixed.
4716
4717 2008-03-19  Mark Probst  <mark.probst@gmail.com>
4718
4719         * mini.c: Generic sharing of the initobj instruction.
4720
4721 Tue Mar 18 20:18:02 CET 2008 Paolo Molaro <lupus@ximian.com>
4722
4723         * mini.c: make the test to optimize ldtoken from typeof() more
4724         precise.
4725
4726 2008-03-18  Mark Probst  <mark.probst@gmail.com>
4727
4728         * mini.c: Generic sharing of the initobj instruction for reference
4729         types.
4730
4731 Tue Mar 18 12:39:27 CET 2008 Paolo Molaro <lupus@ximian.com>
4732
4733         * mini.h, mini-amd64.c, mini-x86.c, tramp-amd64.c, tramp-x86.c: change
4734         the mono_breakpoint_clean_code() code to perform bound checks.
4735
4736 Tue Mar 18 11:50:14 CET 2008 Paolo Molaro <lupus@ximian.com>
4737
4738         * mini.h, mini-trampolines.c, tramp-*.c: change the signature of
4739         mono_arch_patch_callsite() to include the start of the managed method
4740         to be able to perform bound checks.
4741
4742 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4743
4744         * mini.c: Generic sharing for the isinst instruction.
4745
4746 2008-03-17  Mark Probst  <mark.probst@gmail.com>
4747
4748         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4749         inssel-long32-mips.brg: Added opcodes for doing indirect calls
4750         with the runtime generic context argument.
4751
4752         * mini.c: Share calls to several types of unsharable methods by
4753         putting the address of the method code in the runtime generic
4754         context and doing an indirect call.
4755
4756         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4757         to switches.
4758
4759 2008-03-16  Mark Probst  <mark.probst@gmail.com>
4760
4761         * generic-sharing.c: Change due to a change in the runtime genric
4762         context API.
4763
4764 2008-03-15  Martin Baulig  <martin@ximian.com>
4765
4766         * tramp-x86.c
4767         (mono_arch_nullify_class_init_trampoline): Add call to
4768         mono_breakpoint_clean_code() to make things work when running
4769         inside the debugger.
4770
4771         * tramp-amd64.c
4772         (mono_arch_nullify_class_init_trampoline): Add call to
4773         mono_breakpoint_clean_code() to make things work when running
4774         inside the debugger.
4775
4776 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4777
4778         * inssel-long.brg (reg): Fix 64 bit build.
4779
4780 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4781
4782         * mini.c, mini.h: Share static generic code by passing it an
4783         implicit argument pointing to the runtime generic context.
4784
4785         * mini-ops.h, inssel.brg, inssel-long.brg, inssel-long32.brg,
4786         inssel-long32-mips.brg: New opcodes for calling shared static,
4787         which need to be passed the runtime generic context.
4788
4789         * mini-amd64.c, mini-x86.c: Save the runtime generic context
4790         argument on the stack in the prologue if needed.  New function for
4791         finding the runtime generic context argument from the registers
4792         saved by the trampoline.
4793
4794         * mini-amd64.h, mini-x86.h: Specify which register to use for the
4795         runtime generic context argument.
4796
4797         * tramp-amd64.c: Also restore the register used for the runtime
4798         generic context argument.
4799
4800         * mini-trampoline.c: Resolve shared static calls by consulting the
4801         runtime generic context via the new argument.
4802
4803         * generic-sharing.c: Add an argument to sharability-checking
4804         functions that specifies whether type variables should be treated
4805         as sharable type arguments.
4806
4807         * inssel-x86.brg: Removed a superfluous, buggy rule.
4808
4809         * graph.c, local-propagation.c, aliasing.c: Added the new opcodes
4810         to switches.
4811
4812 2008-03-14  Martin Baulig  <martin@ximian.com>
4813
4814         * debug-debugger.c (main_thread_handler): Call
4815         mono_runtime_run_main() without sending any notifications.
4816
4817         * debug-debugger.h (MonoDebuggerInfo): Added `get_method_signature.
4818
4819 2008-03-14  Zoltan Varga  <vargaz@gmail.com>
4820
4821         * mini-trampolines.c (mono_magic_trampoline): Fix build on platforms without IMT.
4822
4823 2008-03-14  Mark Probst  <mark.probst@gmail.com>
4824
4825         * tramp-x86.c: Fixed register restore offsets in the trampoline
4826         code for ECX and EDX.
4827
4828 2008-03-12  Geoff Norton  <gnorton@novell.com>
4829
4830         * mini-arm.h: Add some #defines for locating sp, pc, r4 with
4831         different ucontext_t implementations.
4832         * exceptions-arm.c: Use the above defines to get exceptions working on 
4833         iPhone (based on a patch by Luke Howard lukeh@padl.com)
4834         * mini-arm.c: Implement iPhone icache support (based on a patch by
4835         Luke Howard lukeh@padl.com)
4836
4837 2008-03-12  Mark Probst  <mark.probst@gmail.com>
4838
4839         * mini.c: Enable generic sharing of calls to non-static
4840         non-interface non-generic non-value-type methods.
4841
4842         * mini-trampolines.c: Resolve calls from shared generic code.
4843
4844 2008-03-11  Zoltan Varga  <vargaz@gmail.com>
4845
4846         * Makefile.am il2tests.il iltests.il.in: Delete il2tests, merge it into iltests.
4847
4848         * tramp-amd64.c (mono_arch_create_trampoline_code): Correctly save RBP as well.
4849
4850 Mon Mar 10 11:59:34 CET 2008 Paolo Molaro <lupus@ximian.com>
4851
4852         * mini.c: some fixes for the AOT compiler.
4853
4854 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4855
4856         * cpu-amd64.md: Add clob:1 to some float opcodes.
4857
4858 2008-03-07  Rodrigo Kumpera  <rkumpera@novell.com>
4859
4860         * mini.h: Added MiniVerifierMode enumeration.
4861
4862         * mini.c: Added mini_verifier_set_mode to control
4863         the usage of the new verifier.
4864
4865         * mini.c (mono_method): Integrated the new verifier.
4866
4867         * driver.c: Extended --security option with validil and
4868         verifiable options to activate the new verifier.
4869
4870 2008-03-07  Zoltan Varga  <vargaz@gmail.com>
4871
4872         * mini.c jit-icalls.h jit-icalls.c: Generalize the exception creation 
4873         optimization to ctors taking 0 or 2 arguments too.
4874
4875         * mini.c (mono_method_to_ir): Optimalize the size of the exception throwing code
4876         a bit.
4877
4878         * jit-icalls.h (mono_create_corlib_exception): New JIT icall.
4879
4880         * mini-amd64.c (mono_arch_emit_prolog): Improve the first_bb optimization a bit.
4881
4882 2008-03-06  Zoltan Varga  <vargaz@gmail.com>
4883
4884         * mini.c (mono_method_to_ir): Apply one of the ldstr optimizations in the
4885         non-aot case as well.
4886
4887         * cpu-amd64.md: Reduce the max size of some frequently used opcodes.
4888
4889         * aot-runtime.c (decode_patch_info): Update this after the ldfld/stfld wrapper
4890         changes.
4891
4892         * aot-compiler.c (encode_patch): Ditto.
4893
4894         * mini.h (G_MININT32): Fix the definition of this.
4895
4896 2008-03-05  Zoltan Varga  <vargaz@gmail.com>
4897
4898         * mini.h: Define G_MININT32/G_MAXINT32 if using an older glib version.
4899
4900         * cfold.c: Remove definition of G_MININT32 which is now in mini.h.
4901
4902 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4903
4904         * mini-amd64.c (mono_arch_compute_omit_fp): Don't disable fp elimination for 
4905         methods returning vtypes in registers.
4906         (mono_arch_allocate_vars): Ditto.
4907
4908         * mini-amd64.c (mono_arch_get_this_arg_reg): New arch specific helper function.
4909
4910         * tramp-amd64.c (mono_arch_get_unbox_trampoline): Use mono_arch_get_this_arg_reg ().    
4911
4912         * generics.cs: Add a test from the linear IR branch.
4913
4914         * mini-amd64.c (emit_load_volatile_arguments): Handle vtypes passed in regs too.
4915
4916         * mini.c (inline_method): Cache failed inline attempts.
4917
4918 2008-03-04  Mark Probst  <mark.probst@gmail.com>
4919
4920         * mini.c: For shared methods of generic classes put the location
4921         of "this" into the MonoGenericJitInfo.
4922
4923         * mini-x86.c, mini-amd64.c, mini.h: Added function for fetching a
4924         register out of a MonoContext by register number.  Add the generic
4925         sharing context as an argument to mono_arch_find_this_argument().
4926
4927         * mini-alpha.c, mini-arm.c, mini-hppa.c, mini-ia64.c, mini-mips.c,
4928         mini-ppc.c, mini-s390.c, mini-s390x.c, mini-sparc.c: Added stub
4929         for new arch function.
4930
4931         * mini-exception.c: Handle open exception clauses in shared
4932         generic code.
4933
4934         * mini-trampolines.c: Supply additional argument to
4935         mono_arch_find_this_argument().
4936
4937 2008-03-04  Zoltan Varga  <vargaz@gmail.com>
4938
4939         * Makefile.am (regtests): Run the bench.exe tests last.
4940
4941 2008-03-03  Zoltan Varga  <vargaz@gmail.com>
4942
4943         * mini-amd64.c (mono_arch_emit_prolog): Improve the first bblock optimization
4944         a bit.
4945
4946 2008-03-02  Zoltan Varga  <vargaz@gmail.com>
4947
4948         * mini.c (mono_method_to_ir): Allow callvirt on static methods for compatibility
4949         with MS.
4950
4951         * mini-amd64.c (mono_arch_emit_prolog): Fix tracing after the last change.
4952         
4953         * mini-amd64.c (mono_arch_emit_prolog): Avoid saving dead arguments.
4954
4955         * mini.c (mono_method_check_inlining): Avoid disabling inlining for methods
4956         whose class has no cctor.
4957
4958         * liveness.c (mono_analyze_liveness): Mark dead arguments with MONO_INST_IS_DEAD.
4959
4960 2008-03-01  Zoltan Varga  <vargaz@gmail.com>
4961
4962         * mini.c (mono_method_to_ir): Report calling a static method using callvirt as
4963         unverified.
4964
4965 2008-02-29  Zoltan Varga  <vargaz@gmail.com>
4966
4967         * mini-ops.h: Remove OP_SPARC_INARG_VT, add a new OP_VTARG_ADDR opcode instead
4968         to be in sync with the code on the linear IR branch.
4969
4970         * mini-sparc.c inssel-sparc.brg: Use OP_VTARG_ADDR.
4971
4972         * inssel-s390.brg (OP_SETRET (freg)): Set dreg correctly.
4973
4974 2008-02-27  Zoltan Varga  <vargaz@gmail.com>
4975
4976         * mini-mips.c: Use cfg->vret_addr instead of cfg->ret.
4977
4978         * mini-s390x.c: Use cfg->vret_addr instead of cfg->ret.
4979
4980         * mini-s390.c: Use cfg->vret_addr instead of cfg->ret.
4981
4982         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_VARS define.
4983
4984         * mini-<ARCH>.c (mono_arch_create_vars): Define this for all architectures.
4985         
4986         * mini.c (mono_method_to_ir): Avoid invalid memory reads for methods without a
4987         body.
4988
4989 2007-11-14  Yoichi NAKAYAMA  <nakayama@pixela.co.jp>
4990
4991         * inssel-mips.brg (OP_OUTARG_MEMBASE (CEE_LDIND_R4 (base))): Add missing
4992         OP_LOADR4_MEMBASE emission.
4993
4994         * mini-codegen.c (mono_spillvar_offset_int): Remove assertion.
4995         (mono_spillvar_offset_float): Ditto.
4996
4997         * mini-mips.c (mono_arch_emit_prolog): Ditto.
4998
4999         * inssel-long32-mips.brg: Fix wrong branching, reduce redundant code
5000         emission.
5001
5002         * basic-long.cs: Add regression tests for them.
5003
5004         * mini-mips.c (add_float32_arg): Respect o32 calling convention in gr
5005         use.
5006         (mono_arch_allocate_vars): Fix representation of single-precision float
5007         argument.
5008         (mono_arch_output_basic_block): Ditto.
5009
5010         * inssel-mips.brg: Ditto, remove duplicate items.
5011
5012         * mini-mips.c (emit_load_volatile_arguments): New function to handle
5013         arguments of tail calls as on other platforms.
5014         (mono_arch_output_basic_block): Handle tail calls.
5015
5016         * inssel-mips.brg (OP_OUTARG_VT (CEE_LDOBJ (base))): Correct destination
5017         register.
5018
5019         * objects.cs (test_5_pass_static_struct): Add test for it.
5020
5021         Contributed under MIT/X11 license.
5022
5023 2008-02-26  Zoltan Varga  <vargaz@gmail.com>
5024
5025         * Makefile.am: Use gmcs for compiling the regression tests.
5026
5027         * *.2.cs *.2.il: Rename to *.cs and *.il.
5028
5029 2008-02-24  Zoltan Varga  <vargaz@gmail.com>
5030
5031         * regalloc.h: Make the vassign array smaller.
5032
5033         * mini.c (mini_method_compile): Remove an unused field in cfg.
5034
5035         * mini-codegen.c: Add a bunch of micro optimizations.
5036
5037 2008-02-23  Zoltan Varga  <vargaz@gmail.com>
5038
5039         * regalloc.h: Remove some unused fields.
5040
5041 2008-02-22  Zoltan Varga  <vargaz@gmail.com>
5042
5043         * mini-amd64.c (mono_arch_patch_code): Fix a warning.
5044
5045         * ssa.c (mono_ssa_remove): Avoid declaring volatile variables dead.
5046
5047 2008-02-22  Mark Probst  <mark.probst@gmail.com>
5048
5049         * mini.h: New trampoline type (RGCTX_LAZY_FETCH).
5050
5051         * mini-trampolines.c, tramp-amd64.c, tramp-x86.c: RGCTX lazy fetch
5052         trampoline: Fetch an entry from the runtime generic context.  If
5053         it's NULL, jump to the actual trampoline to fill the runtime
5054         generic context.  Otherwise, return it.
5055
5056         * mini.c: Call the lazy fetch trampoline to get entries out of the
5057         runtime generic context.
5058
5059         * tramp-ia64.c, tramp-arm.c, tramp-alpha.c, tramp-s390.c,
5060         tramp-s390x.c, tramp-ppc.c, tramp-hppa.c, tramp-mips.c,
5061         tramp-sparc.c: Stubs for the lazy fetch trampoline.
5062
5063 2008-02-21  Mark Probst  <mark.probst@gmail.com>
5064
5065         * mini.c: Fetch data out of the extensible part of the runtime
5066         generic context instead of calling a helper function.
5067
5068         * generic-sharing.c: Some functions moved into
5069         metadata/generic-sharing.c.  Helper function for fetching other
5070         types now checks and asserts against extensible rgctx (just for
5071         debugging purposes - the helper function isn't called anymore
5072         unless for debugging).
5073
5074 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
5075
5076         * mini-arm.c (mono_arch_output_basic_block): Implement proper argument passing
5077         for tail calls up to the point that the tests in iltests.exe run. Also add a
5078         dummy CKFINITE implementation.
5079         (mono_arch_emit_prolog): Avoid saving the method in the LMF since it is only
5080         needed for trampoline LMF frames.
5081
5082         * exceptions-arm.c (mono_arch_find_jit_info): Only read lmf->method for 
5083         trampoline LMF frames.
5084
5085 2008-02-21  Rodrigo Kumpera  <rkumpera@novell.com>
5086
5087         * mini.c (inline_method): clean any pending loader error when inlining fail.
5088         Otherwise loader errors in mono_method_to_ir leaks and cause spurious errors.
5089
5090 2008-02-21  Zoltan Varga  <vargaz@gmail.com>
5091
5092         * aot-compiler.c (encode_patch): Handle ICALL_ADDR patch type.
5093
5094         * aot-runtime.c (decode_patch_info): Ditto.
5095
5096         * mini.c (mono_resolve_patch_target): Ditto.
5097         
5098         * aot-compiler.c (compile_method): Add some experimental code for AOT compiling
5099         icall wrappers.
5100
5101         * patch-info.h (PATCH_INFO): Add 'ICALL_ADDR' patch type.
5102         
5103         * mini.c (mono_method_to_ir): Convert a CEE_MONO_LDPTR opcode to an AOT constant
5104         if it references an icall address.
5105
5106 2008-02-20  Zoltan Varga  <vargaz@gmail.com>
5107
5108         * cpu-s390x.md: Remove some more unused opcodes.
5109         
5110         * cpu-s390x.md: Remove some unused opcodes.
5111
5112         * mini-ia64.c (mono_arch_lowering_pass): Add some more opcodes. Use
5113         mono_op_imm_to_op ().
5114
5115         * mini-sparc.c (opcode_to_sparc_cond): Use the mono_opcode_to_cond () functions
5116         instead of a switch statement.
5117         
5118         * mini-sparc.c (mono_arch_allocate_vars): Allocate a stack slot for use by
5119         the int<->float conversion opcodes instead of using mono_spillvar_offset_float ().
5120
5121         * mini-codegen.c: Eliminate rassign macro which is no longer needed.
5122         
5123         * mini-codegen.c: Remove unused mono_regstate2_... functions.
5124
5125         * mini-codegen.c (mono_print_ins_index): Avoid printing an index when it is
5126         -1.
5127
5128 2008-02-19  Zoltan Varga  <vargaz@gmail.com>
5129
5130         * driver.c (mono_main): Improve error reporting when an assembly cannot be
5131         opened. Fixes #362607.
5132
5133         * cpu-ia64.md cpu-s390x.md: Remove some unused opcodes.
5134
5135         * iltests.il.in: Add a test for static methods in interfaces.
5136
5137 2008-02-18  Zoltan Varga  <vargaz@gmail.com>
5138
5139         * genmdesc.c (build_table): Fix a crash on older glib versions.
5140
5141         * cpu-sparc.md: Remove some unused opcodes.
5142         
5143         * genmdesc.c: Error out if the .md contains CEE_ opcodes if 
5144         MONO_ARCH_ENABLE_NORMALIZE_OPCODES is defined.
5145
5146         * cpu-amd64.md: Remove some unused opcodes.
5147
5148         * mini.h mini-ops.h mini.c: Define the OP_Ccc opcodes in mini-ops.h normally
5149         like the other opcodes.
5150
5151 2008-02-17  Zoltan Varga  <vargaz@gmail.com>
5152
5153         * mini-ia64.c: Use cfg->vret_addr instead of cfg->ret.
5154
5155         * mini-arm.h mini-arm.c: Use cfg->vret_addr instead of cfg->ret.
5156
5157         * mini-sparc.c: Use cfg->vret_addr instead of cfg->ret. Name the MonoCompile
5158         variables 'cfg' instead of 'm' for consistency.
5159
5160         * mini-x86.c: Use cfg->vret_addr instead of cfg->ret.
5161
5162         * mini.h (MonoCompile): Add new 'vret_addr' field which represents the hidden
5163         argument holding the vtype return address, to avoid the ambigious use of
5164         cfg->ret for this purpose.
5165
5166         * mini.c (NEW_RETLOADA): Use vret_addr if set.
5167
5168         * mini-amd64.c: Use cfg->vret_addr instead of cfg->ret.
5169         
5170         * mini-codegen.c (mono_print_ins): Rename to mono_print_ins_index (), Add a
5171         new mono_print_ins () function which only takes one argument.
5172
5173 2008-02-15  Zoltan Varga  <vargaz@gmail.com>
5174
5175         * mini-s390.h (MONO_OUTPUT_VTR): Use cfg instead of s, avoid assignments to
5176         macro arguments.
5177
5178 2008-02-14  Zoltan Varga  <vargaz@gmail.com>
5179
5180         * mini-ops.h: Get rid of OP_SPARC_LOCALLOC_IMM.
5181
5182         * mini-sparc.c inssel-sparc.brg: Use OP_LOCALLOC_IMM instead of OP_SPARC_LOCALLOC_IMM.
5183
5184         * mini-x86.c: Sync with the version on the linear IR branch by adding new 
5185         opcodes and other small changes.
5186
5187         * mini-ops.h: Add some new opcodes from the linear IR branch.
5188
5189         * mini-ops.h: Get rid of the OP_X86_..._MEMBASE opcodes.
5190
5191         * mini-x86.c inssel-x86.brg cpu-x86.md: Get rid of the confusing _MEMBASE
5192         opcodes, use the REG_MEMBASE opcodes instead.
5193         
5194         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Get rid of the confusing _MEMBASE
5195         opcodes, use the REG_MEMBASE opcodes instead.
5196         
5197         * mini-amd64.c (mono_arch_output_basic_block): Sync with the version on the
5198         linear IR branch.
5199
5200         * mini.c (mono_op_imm_to_op): New helper function.
5201
5202         * mini-ops.h: Add some opcodes from linear IR branch.
5203
5204 2008-02-13  Zoltan Varga  <vargaz@gmail.com>
5205
5206         * mini-alpha.h mini-alpha.c tramp-alpha.c: Alpha port updates from Sergey Tikhonov 
5207         <tsv@solvo.ru>.
5208
5209 2008-02-12  Zoltan Varga  <vargaz@gmail.com>
5210
5211         * mini.c (mono_normalize_opcodes): Always convert CEE_CONV_R4/R8 to 
5212         OP_ICONV_TO_R4/R8.
5213
5214         * mini-ia64.c cpu-ia64.md: Add OP_ICONV_TO_R4/R8.
5215
5216 2008-02-09  Zoltan Varga  <vargaz@gmail.com>
5217
5218         * aot-compiler.c (emit_method_code): Add an assert.
5219
5220         * mini-arm.h mini-arm.c exceptions-arm.c: Modify the exception throwing code and
5221         the IMT code so it is AOT friendly. Enable AOT for methods which call interface
5222         methods.
5223
5224 2008-02-08  Zoltan Varga  <vargaz@gmail.com>
5225
5226         * mini-arm.c (mono_arch_output_basic_block): Fix the ordering of arguments for 
5227         some load/store opcodes so they are consistent. 
5228         (mono_arch_emit_prolog): Simplify some code.
5229
5230         * aot-runtime.c (mono_aot_get_plt_entry): Fix a warning.
5231
5232         * objects.cs: Add tests for large argument offsets on ARM.
5233
5234         * mini-arm.c (mono_arch_emit_prolog): Fix handling of arguments with large 
5235         stack offsets. Fixes #359651.
5236
5237         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R4/R8 properly.
5238
5239         * cpu-s390x.md: Add OP_LCONV_TO_R4/R8.
5240
5241         * cpu-ia64.md mini-ia64.h mini-ia64.c: Get rid of CEE_ opcodes.
5242
5243         * mini-ops.h: Add OP_ICONV_TO_R_UN opcode.
5244
5245         * mini.c (mono_normalize_opcodes): Remap CEE_CONV_R_UN too.
5246
5247         * cpu-s390x.md cpu-s390.md mini-s390x.c mini-arm.c cpu-arm.md mini-s390.c: Get
5248         rid of CEE_CONV_R_UN.
5249
5250         * mini-s390x.c mini-s390x.h cpu-s390x.md inssel-s390x.brg: Get rid of CEE_ opcodes.
5251
5252 2008-02-07  Zoltan Varga  <vargaz@gmail.com>
5253
5254         * mini-s390.c mini-s390.h cpu-s390.md: Get rid of CEE_ opcodes.
5255
5256         * mini.c (mono_normalize_opcodes): Add some more opcodes.
5257
5258         * mini-arm.c mini-arm.h cpu-arm.md: Get rid of CEE_ opcodes.
5259
5260         * cpu-amd64.md: Remove some unused opcodes.
5261
5262         * mini-sparc.c mini-sparc.h cpu-sparc.md: Get rid of CEE_ opcodes.
5263
5264         * mini-x86.c mini-x86.h cpu-x86.md: Get rid of CEE_ opcodes.
5265
5266         * mini.c mini-<ARCH>.c: Remove mono_arch_local_regalloc (), instead make 
5267         arch specific functions for its parts. Call the peephole pass after local
5268         regalloc so the prolog can compute a more accurate max_offset.
5269         
5270         * mini.c (mono_normalize_opcodes): New mini pass to convert CEE_ opcodes to
5271         the corresponding OP_I/OP_L opcodes.
5272
5273         * mini-amd64.c mini-amd64.h cpu-amd64.md: Get rid of CEE_ opcodes.
5274
5275         * mini-sparc.c (mono_arch_output_basic_block): Fix the sparc build.
5276
5277 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
5278
5279         * mini-s390.c (mono_arch_get_inst_for_method): Remove the Interlocked cases
5280         as they are handled in mini.c.
5281
5282         * mini-s390x.c (mono_arch_get_inst_for_method): Ditto.
5283         
5284         * mini-<ARCH>.c (mono_arch_get_inst_for_method): Remove the MemoryBarrier
5285         case since it is handled in mini.c.
5286
5287         * cpu-sparc.md (sparc_setfreg_float): Fix the sparc build.
5288
5289         * mini-ops.h: Add new opcodes OP_CALL/OP_CALLVIRT.
5290
5291         * *.c: Use the new opcodes in the IR and back end code.
5292
5293         * mini-ops.h cpu-<ARCH>.md: Correct the name of the bgt_un opcodes.
5294
5295         * mini-amd64.c (emit_call_body): Use a far-call for calling dynamic methods.
5296
5297 2008-02-06  Mark Probst  <mark.probst@gmail.com>
5298
5299         * mini-trampolines.c (mono_generic_class_init_trampoline): Removed
5300         an assert because it has a race condition.
5301
5302 2008-02-06  Zoltan Varga  <vargaz@gmail.com>
5303
5304         * tramp-amd64.c (mono_arch_patch_callsite): Add more diagnostics.
5305
5306         * inssel.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused CEE_RET opcode.
5307
5308         * mini-<ARCH>.c cpu-<ARCH>.md: Get rid of unused LDIND/STIND opcodes.
5309
5310         * *.brg mini-<ARCH>.c cpu-<ARCH>.md: Get rid of OP_SETREG/OP_SETFREG/OP_SETREGIMM,
5311         use OP_MOVE/OP_FMOVE/OP_ICONST instead.
5312
5313 2008-02-05  Zoltan Varga  <vargaz@gmail.com>
5314
5315         * cpu-amd64.md (move): Correct the maximum size of move.
5316
5317 2008-02-05  Mark Probst  <mark.probst@gmail.com>
5318
5319         * tramp-amd64.c, tramp-x86.c, mini-trampolines.c: Added a check in
5320         the generic class init trampoline to return quickly if the class
5321         is already inited.
5322
5323 2008-02-04  Zoltan Varga  <vargaz@gmail.com>
5324
5325         * tramp-amd64.c (mono_arch_patch_callsite): Add some diagnostics to help debug
5326         issues where an 32 bit callsite cannot be patched by a 64 bit address.
5327
5328 2008-02-03  Zoltan Varga  <vargaz@gmail.com>
5329
5330         * generics.2.cs generics-variant-types.2.il: Merge some tests from the linear IR
5331         branch.
5332
5333 2008-01-31  Zoltan Varga  <vargaz@gmail.com>
5334
5335         * objects.cs: Add some soft-float tests.
5336
5337         * mini.c: Fix a couple more soft-float issues.
5338
5339         * helpers.c (mono_disassemble_code): Fix disassembly on ARM.
5340
5341         * mini-amd64.c (peephole_pass): Use IXOR instead of LXOR for zeroing a register to
5342         avoid a REX prefix.
5343
5344 2008-01-30  Zoltan Varga  <vargaz@gmail.com>
5345
5346         * exceptions-x86.c (mono_arch_find_jit_info): Fix stack unwinding when an
5347         exception happens while compiling a virtual method.
5348
5349 2008-01-29  Zoltan Varga  <vargaz@gmail.com>
5350
5351         * mini-sparc.c (mono_arch_emit_epilog): Fix folding of negative return values.
5352         
5353         * mini-sparc.c: Fix build.
5354
5355         * mini-sparc.c (get_call_info): Add support for generic sharing.
5356
5357         * mini-exceptions.c: Add a FIXME.
5358
5359 2008-01-27  Zoltan Varga  <vargaz@gmail.com>
5360
5361         * mini-exceptions.c (mono_handle_exception_internal): Remove the old style
5362         altstack handling code.
5363
5364         * mini-s390.c (mono_arch_emit_exceptions): Really fix a warning.
5365         
5366         * mini-s390.c (mono_arch_emit_exceptions): Fix a warning.
5367
5368         * mini-s390.c: Add support for generic sharing.
5369
5370         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5371         Fix CAS on s390.
5372         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5373
5374         * mini-s390x.c (mono_arch_emit_exceptions): Fix a warning.
5375
5376         * mini-s390x.c: Add support for generic sharing.
5377         
5378         * mini-exceptions.c (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): 
5379         Fix CAS on ia64.
5380         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Ditto.
5381
5382         * mini-s390x.c: Use is_imm16 instead of is_uimm16 when checking whenever s390_aghi
5383         can be used since it takes a 16 bit signed immediate.
5384
5385         * inssel-s390x.brg: Fix OP_SETRET.
5386
5387         * mini-s390x.c (mono_arch_output_basic_block): Fix OP_BREAK.
5388
5389         * mini-codegen.c (mono_opcode_to_cond): Fix a warning.
5390
5391         * mini-s390x.c cpu-s390x.md: Implement sext.i4 properly by sign extension.
5392
5393         * mini.c (mono_create_delegate_trampoline): Don't use mono_create_ftpntr here.
5394
5395         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_addr_from_ftnptr
5396         in one place.
5397
5398         * mini-ia64.h mini-ia64.c: Add minimal support for the delegate trampoline 
5399         stuff.
5400
5401         * mini.h inssel-x86.brg inssel-amd64.brg tramp-alpha.c tramp-ia64.c: Get rid
5402         of the unused mono_arch_patch_delegate_trampoline stuff.
5403
5404 2008-01-26  Zoltan Varga  <vargaz@gmail.com>
5405
5406         * basic-long.cs: Move the fp related tests to basic-float.cs.
5407
5408         * mini-ops.h (OP_OUTARG_FREG_R4): New opcode.
5409
5410         * mini-ia64.c inssel-ia64.brg: Implement proper R4 argument passing.
5411
5412         * basic-calls.cs: Add a test for proper float argument passing.
5413
5414         * mini-ia64.h (mono_ia64_context_get_ip): Do not substract 1 from the ip
5415         if the context corresponds to an exception received through a signal.
5416
5417         * exceptions.cs: Add a test for nullref handling at the start of a try
5418         clause.
5419
5420         * mini-ia64.c (mono_arch_call_opcode): Fix ia64 argument passing.
5421
5422         * jit-icalls.c (mono_break): New JIT icall.
5423
5424         * mini-<ARCH>.c: Use mono_break instead of mono_arch_break.
5425
5426         * mini-arm.c (arm_patch): Add support for patching the blx calling sequence.
5427
5428 2008-01-25  Zoltan Varga  <vargaz@gmail.com>
5429
5430         * cpu-*.md: Get rid of unused opcodes.
5431
5432         * cpu-g4.md: Rename this to cpu-ppc.md for consistency with other archs.
5433
5434         * Makefile.am: Move mini-trampolines.c to $(common_sources) since it is now used
5435         by all platforms.
5436
5437         * mini-<ARCH>.h mini.c: Get rid of the MONO_ARCH_HAVE_CREATE_SPECIFIC_TRAMPOLINE
5438         define.
5439
5440         * mini-s390x.h tramp-s390x.c Makefile.am: Rework the s390x trampoline code to use
5441         the arch independent trampoline code in mini-trampolines.c.
5442
5443         * aot-runtime.c (mono_aot_init_vtable): Fix a warning.
5444
5445         * mini.c (get_runtime_generic_context_ptr): Fix a warning.
5446
5447         * mini-s390.h: Remove an unused define.
5448         
5449         * mini-s390.h tramp-s390.c Makefile.am: Rework the s390 trampoline code to use
5450         the arch independent trampoline code in mini-trampolines.c.
5451
5452         * mini-arm.c (mono_arch_emit_prolog): Fix build.
5453
5454 2008-01-24  Zoltan Varga  <vargaz@gmail.com>
5455
5456         * mini-sparc.c (mono_arch_output_basic_block): Remove some unecessary code.
5457
5458         * mini-s390.c (mono_arch_emit_prolog): Fix build.
5459
5460         * mini-s390x.c (mono_arch_emit_prolog): Fix build.
5461
5462         * mini-ppc.c (mono_arch_emit_prolog): Fix build.
5463
5464         * cpu-amd64.md: Use smaller sizes for int opcodes.
5465
5466         * *.c: Get rid of the NOT_IMPLEMENTED define which is now in mini.h.
5467
5468         * *.cs: Add some tests from the linear-ir branch. Move structs tests to 
5469         objects.cs.
5470
5471         * driver.c (mono_main): Add a --break-at-bb command line argument for JIT
5472         debugging.
5473
5474         * mini.h *.c: Change cfg->vars to contain the MonoMethodVar entries directly
5475         instead of though a pointer to save an indirection when accessing elements of
5476         the array.
5477
5478         * mini.h (MONO_IS_COND_BRANCH_OP): Move these macros here from mini.c. Fix
5479         some typos.
5480         (NOT_IMPLEMENTED): New helper macro.
5481         (MONO_BB_FOR_EACH_INS): New helper macro to iterate through the instructions
5482         of a bb.
5483
5484         * *.c: Use the new helper macro.
5485
5486 2008-01-21  Zoltan Varga  <vargaz@gmail.com>
5487
5488         * mini-x86.h (MONO_ARCH_AOT_SUPPORTED): Disable AOT for apple x86.
5489
5490 2008-01-20  Zoltan Varga  <vargaz@gmail.com>
5491
5492         * mini-amd64.c (mono_arch_emit_prolog): Optimize the omit fp case to save two
5493         stack slots.
5494
5495 2008-01-18  Zoltan Varga  <vargaz@gmail.com>
5496
5497         * mini-amd64.c (mono_arch_emit_prolog): Disable the new optimization if
5498         profiling is enabled.
5499         
5500         * mini-amd64.c (mono_arch_call_opcode): Emit the save_sp_to_lmf instruction at
5501         the end.
5502         (mono_arch_emit_prolog): Add more first bblock optimizations.
5503
5504         * mini-amd64.c (mono_arch_call_opcode): Keep assignments to the arg registers
5505         in order if possible.
5506         (mono_arch_emit_prolog): Optimize assignments to arg registers in the first
5507         bblock, since the arguments are still in their original registers.
5508
5509         * mini.c (type_from_op): Calling add.ovf on floats is not valid IL code.
5510
5511 2008-01-17  Zoltan Varga  <vargaz@gmail.com>
5512
5513         * mini.c (mono_method_to_ir): Use the no-spilling optimization for CEE_CALLI
5514         as well.
5515
5516         * mini-amd64.c (mono_arch_emit_prolog): Save an instruction if the LMF is at
5517         offset 0.
5518
5519         * mini-amd64.h (MONO_ARCH_HAVE_NOTIFY_PENDING_EXC): Turn on this for amd64.
5520
5521         * exceptions-amd64.c (mono_arch_notify_pending_exc): New function to 
5522         process async exceptions received while in unmanaged code.
5523
5524         * mini.c (mini_init): Install a callback with the runtime which will be called
5525         when a thread receives an async exception while in unmanaged code.
5526
5527         * mini.c driver.c: Update after mono_get_native_wrapper () signature change.
5528
5529         * mini-s390x.c (mono_arch_output_basic_block): Fix s390x build.
5530
5531 2008-01-16  Wade Berrier  <wberrier@novell.com>
5532
5533         * cpu-g4.md:
5534         * cpu-arm.md:
5535         * cpu-s390x.md:
5536         fix build
5537
5538 2008-01-16  Zoltan Varga  <vargaz@gmail.com>
5539
5540         * mini-x86.c (mono_arch_output_basic_block): Remove some gccism which prevents
5541         compilation with sun cc.
5542
5543         * cpu-*.md: Fix the build.
5544
5545         * cpu-x86.md: Fix the length of some load membase opcodes. Fixes #354241.
5546
5547         * mini-amd64.h: Add some comments to the MonoLMF structure.
5548
5549         * mini-ops.h cpu-amd64.c: Add a OP_AMD64_SAVE_SP_TO_LMF opcode.
5550         
5551         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Avoid setting the rip field
5552         in the LMF structure if possible. This saves two instructions in the
5553         managed->native wrappers.
5554
5555         * mini-ops.h *.md: Make some opcodes names uniform by removing the op_ prefix.
5556
5557 2008-01-16  Mark Probst  <mark.probst@gmail.com>
5558
5559         * generic-sharing.c: New type argument lookup code which uses the
5560         runtime generic context template.
5561
5562 2008-01-15  Zoltan Varga  <vargaz@gmail.com>
5563
5564         * mini.c (mono_method_to_ir): Avoid emitting a write barrier when storing NULL.
5565
5566         * mini-arm.c (add_general): Fix arm eabi parameter passing.
5567         (mono_arch_output_basic_block): Fix localloc implementation.
5568
5569         * mini-amd64.c (peephole_pass): Sync store+load optimizations with the x86 version.
5570
5571         * mini-ia64.c (peephole_pass): Fix ia64 build.
5572
5573         * mini-amd64.c (peephole_pass): Fix a warning.
5574         
5575         * mini-amd64.c (mono_arch_allocate_vars): Make sure the LMF is always stored
5576         at a constant offset from sp/fp.
5577
5578         * exceptions-amd64.c (mono_arch_find_jit_info): Compute the LMF address from fp/sp
5579         instead of obtaining it from *lmf in the managed method case.
5580
5581 2008-01-14  Zoltan Varga  <vargaz@gmail.com>
5582
5583         * exceptions-amd64.c (mono_arch_find_jit_info): Remove some duplicate code.
5584
5585 Mon Jan 14 12:33:06 CET 2008  David S. Miller  <davem@davemloft.net>
5586
5587         * mini.h (MonoInstList): New type.
5588         (MONO_INST_LIST_INIT, MONO_INST_LIST_EMPTY,
5589         __MONO_INST_LIST_ADD, MONO_INST_LIST_ADD,
5590         MONO_INST_LIST_ADD_TAIL, __MONO_INST_LIST_DEL,
5591         __MONO_INST_LIST_SPLICE, MONO_INST_LIST_SPLICE,
5592         MONO_INST_LIST_SPLICE_TAIL, MONO_INST_LIST_SPLICE_INIST,
5593         MONO_INST_LIST_SPLICE_TAIL_INIT, mono_container_of,
5594         MONO_INST_LIST_ENTRY, MONO_INST_LIST_FIRST_ENTRY,
5595         MONO_INST_LIST_LAST_ENTRY, MONO_INST_LIST_FOR_EACH,
5596         MONO_INST_LIST_FOR_EACH_PREV, MONO_INST_LIST_FOR_EACH_SAFE,
5597         MONO_INST_LIST_FOR_EACH_PREV_SAFE,
5598         MONO_INST_LIST_FOR_EACH_ENTRY,
5599         MONO_INST_LIST_FOR_EACH_ENTRY_REVERSE,
5600         MONO_INST_LIST_FOR_EACH_ENTRY_SAFE,
5601         mono_inst_list_first, mono_inst_list_last,
5602         mono_inst_list_next, mono_inst_list_prev): New instruction
5603         list handling interfaces.
5604         (MonoBasicBlock): Remove 'last_ins' and 'code', replace with
5605         list head 'ins_list'.
5606         (MonoInst): Replace next pointer with list head 'node'.
5607         (MonoCallInst): Make 'out_args' a MonoInstList.
5608         (MONO_INST_NEW_CALL): Explicitly init ->out_args.
5609         (MonoCompile): Delete reverse_inst_list and
5610         reverse_inst_list_len.
5611         * mini-hppa.c (mono_arch_call_opcode, NEW_INS,
5612         mono_arch_lowering_pass, mono_arch_local_regalloc,
5613         mono_arch_output_basic_block, mono_arch_emit_prolog):
5614         Convert to new instruction lists.
5615         (insert_after_ins): Delete.
5616         * inssel.brg (MONO_EMIT_NEW_BRANCH_BLOCK): Convert to new
5617         instruction lists.
5618         * mini-hppa.h (MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Likewise.
5619         * mini.c (NEW_BBLOCK, ADD_BBLOCK, CHECK_BBLOCK,
5620         split_bblock, mono_add_ins_to_end, mono_emit_call_args,
5621         mono_emulate_opcode, mono_emit_load_got_addr,
5622         inline_method, mono_method_to_ir, mono_print_bb_code,
5623         print_dfn, decompose_pass, nullify_basic_block,
5624         replace_out_block_in_code, remove_block_if_useless,
5625         merge_basic_blocks, move_basic_block_to_end,
5626         try_unsigned_compare, optimize_branches, mono_print_code,
5627         mini_select_instructions, remove_critical_edges): Likewise.
5628         * mini-amd64.c (emit_sig_cookie, mono_arch_call_opcode,
5629         peephole_pass_1, peephole_pass, mono_arch_lowering_pass,
5630         mono_arch_output_basic_block, mono_arch_emit_prolog):
5631         Likewise.
5632         * mini-mips.c (mono_arch_call_opcode, peephole_pass,
5633         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5634         mono_arch_output_basic_block): Likewise.
5635         (inst_list_prepend, insert_after_ins): Delete.
5636         * mini-mips.h (MONO_EMIT_NEW_BRANCH_NONZERO_LABEL,
5637         MONO_EMIT_NEW_COMPARE_BRANCH_BLOCK): Convert to new
5638         instruction lists.
5639         * mini-x86.c (emit_sig_cookie, mono_arch_call_opcode,
5640         peephole_pass_1, peephole_pass, mono_arch_output_basic_block,
5641         mono_arch_emit_prolog): Likewise.
5642         * cfold.c (mono_constant_fold): Likewise.
5643         * liveness.c (visit_bb, mono_analyze_liveness,
5644         optimize_initlocals): Likewise.
5645         * ssapre.c (dump_code, process_bb, code_motion): Likewise.
5646         * graph.c (mono_draw_code_cfg): Likewise.
5647         * ssa.c (mono_ssa_rename_vars, mono_ssa_compute,
5648         mono_ssa_remove, mono_ssa_avoid_copies, mono_ssa_create_def_use,
5649         mono_ssa_cprop): Likewise.
5650         * abcremoval (get_relations_from_previous_bb, process_block):
5651         Likewise.
5652         * local-propagation (mono_cprop_invalidate_values,
5653         mono_local_cprop_bb): Likewise.
5654         * mini-s390x.c (mono_arch_call_opcode, emit_sig_cookie,
5655         peephole_pass, mono_arch_output_basic_block,
5656         mono_arch_emit_prolog): Likewise.
5657         * mini-arm.c (mono_arch_call_opcode, peephole_pass,
5658         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5659         mono_arch_emit_prolog): Likewise.
5660         (insert_after_ins): Delete.
5661         * aliasing.c (print_code_with_aliasing_information,
5662         mono_build_aliasing_information, mono_aliasing_deadce):
5663         Convert to new instruction lists.
5664         * mini-ia64.c (emit_sig_cookie, mono_arch_call_opcode,
5665         peephole_pass, NEW_INS, mono_arch_lowering_pass,
5666         mono_arch_local_regalloc, mono_arch_output_basic_block):
5667         Likewise.
5668         (insert_after_ins): Delete.
5669         * mini-sparc.c (emit_sig_cookie, mono_arch_call_opcode,
5670         peephole_pass, mono_arch_output_basic_block): Convert to
5671         new instruction lists.
5672         * mini-codegen (InstList, inst_list_prepend,
5673         insert_after_ins): Delete.
5674         (insert_before_ins, get_register_force_spilling,
5675         get_register_spilling, free_up_ireg, free_up_reg,
5676         create_copy_ins, create_spilled_store, alloc_int_reg,
5677         alloc_float_reg, alloc_reg, mono_local_regalloc): Convert
5678         to new instruction lists.
5679         * mini-ppc.c (mono_arch_call_opcode, peephole_pass,
5680         NEW_INS, mono_arch_lowering_pass, mono_arch_local_regalloc,
5681         mono_arch_output_basic_block, mono_arch_emit_prolog): Likewise.
5682         (insert_after_ins): Delete.
5683         * mini-alpha.c (NEW_INS, peephole_pass, mono_arch_lowering_pass,
5684         mono_arch_local_regalloc, mono_arch_output_basic_block,
5685         mono_arch_call_opcode): Convert to new instruction lists.
5686         (insert_after_ins): Delete.
5687         * mini-s390.c (mono_arch_call_opcode, emit_sig_cookie,
5688         peephole_pass, mono_arch_output_basic_block,
5689         mono_arch_emit_prolog): Convert to new instruction lists.
5690
5691 2008-01-11  Zoltan Varga  <vargaz@gmail.com>
5692
5693         * mini-amd64.c (mono_arch_output_basic_block): Use a 4 byte load in OP_CHECK_THIS.
5694
5695         * mini-sparc.c (mono_arch_output_basic_block): Use a byte load in CHECK_THIS.
5696         Fixes #353182.
5697
5698         * Makefile.am (version.h): Make this work with non-bash shells.
5699
5700 2008-01-10  Zoltan Varga  <vargaz@gmail.com>
5701
5702         * mini.c (handle_delegate_ctor): Optimize away setting of NULL target.
5703
5704 2008-01-08  Zoltan Varga  <vargaz@gmail.com>
5705
5706         * mini.c (mono_method_to_ir): Fix possible reading of invalid memory in 
5707         the InitializeArray optimization.
5708
5709 2008-01-06  Zoltan Varga  <vargaz@gmail.com>
5710
5711         * mini.c driver.c: Don't include os/gc_wrapper.h.
5712
5713 2008-01-05  Zoltan Varga  <vargaz@gmail.com>
5714
5715         * mini.c (print_jit_stats): Print GC statistics if available.
5716
5717 2008-01-04  Zoltan Varga  <vargaz@gmail.com>
5718
5719         * mini-amd64.c (mono_arch_allocate_vars): Align argument storage offsets to 8.
5720
5721 2007-12-29  Zoltan Varga  <vargaz@gmail.com>
5722
5723         * mini-ppc.c (mono_arch_get_delegate_invoke_impl): Fix flushing of icache.
5724
5725 2007-12-26  Zoltan Varga  <vargaz@gmail.com>
5726
5727         * mini.c (mini_init): Move the setting of GC_stackbottom to mono_gc_base_init ().
5728         
5729         * mini.c (mini_init): Call mono_gc_base_init () instead of MONO_GC_PRE_INIT ().
5730
5731         * driver.c (mono_main): Ditto.
5732
5733 2007-12-23  Zoltan Varga  <vargaz@gmail.com>
5734
5735         * mini-trampolines.c (mono_delegate_trampoline): Use mono_get_delegate_invoke ().
5736
5737         * aot-compiler.c (emit_klass_info): Avoid emitting info if one of the methods
5738         in the vtable can't be encoded.
5739         (compile_method): Ditto.
5740
5741 2007-12-21  Zoltan Varga  <vargaz@gmail.com>
5742
5743         * mini.c (setup_jit_tls_data): Use the MONO_ARCH_INIT_TOP_LMF_ENTRY macro if
5744         defined.
5745
5746         * mini-amd64.h mini-amd64.c exceptions-amd64.c tramp-amd64.c: Rename lmf->ebp to 
5747         lmf->rbp.
5748
5749         * exceptions-amd64.c (mono_arch_find_jit_info): Fix the detection of whenever
5750         the top LMF entry belongs to the current method.
5751
5752         * mini.c: Update after renaming of mono_thread_get_pending_exception ().
5753
5754 2007-12-20  Zoltan Varga  <vargaz@gmail.com>
5755
5756         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix a warning.
5757         
5758         * tramp-ia64.c (mono_arch_create_trampoline_code): Ditto.
5759
5760         * tramp-sparc.c (mono_arch_create_trampoline_code): Check for thread interruption.
5761
5762         * tramp-amd64.c (mono_arch_create_trampoline_code): Ditto.
5763
5764         * tramp-x86.c (mono_arch_create_trampoline_code): Check for thread interruption.
5765
5766         * cpu-amd64.md mini-amd64.h mini-amd64.c inssel-amd64.brg: Add ulong->double 
5767         implementation.
5768
5769         * basic-float.cs: Add an ulong->double cast test.
5770
5771 2007-12-15  Zoltan Varga  <vargaz@gmail.com>
5772
5773         * mini.c (mono_method_to_ir): Fix a warning.
5774
5775 2007-12-14  Zoltan Varga  <vargaz@gmail.com>
5776
5777         * mini-ops.h: Add OP_SWITCH.
5778
5779         * mini.c graph.c ssa.c aliasing.c mini-<ARCH>.c inssel-<ARCH>.brg: Avoid using
5780         CEE_SWITCH in back-end code, use OP_SWITCH instead.
5781
5782 2007-12-11  Geoff Norton  <gnorton@novell.com>
5783
5784         * mini-s390x.c: Minor change to the MAX() define to allow
5785         it to compile with other gcc versions.
5786
5787 2007-12-11  Geoff Norton  <gnorton@novell.com>
5788
5789         * cpu-s390x.md:
5790         * mini-s390x.c: Implement sext_i4 to fix the build on s390x
5791
5792 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5793
5794         exceptions-arm.c (mono_arch_get_restore_context): Restore
5795         the frame pointer.
5796
5797         exceptions-arm.c (throw_exception): Save the frame pointer.
5798         This is a partial fix for #323747. Only the client side is
5799         fixed.
5800
5801 2007-12-11  Rodrigo Kumpera  <rkumpera@novell.com>
5802
5803         * mini.c (mono_method_to_ir): Verbose message in CEE_NEWOBJ
5804         was using an unrelated variable to log the class which
5805         needed the cctor to be called. This was crashing on arm.
5806
5807 2007-12-09  Robert Jordan  <robertj@gmx.net>
5808
5809         * mini-x86.c (mono_arch_emit_epilog):
5810         Consider all kinds of 64-bit types. Fixes #323114.
5811
5812 2007-12-08  Zoltan Varga  <vargaz@gmail.com>
5813
5814         * tramp-amd64.c (mono_arch_create_trampoline_code): Clean up the code a bit.
5815
5816 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5817
5818         * mini-amd64.c (peephole_pass): Add a missing instruction check.
5819
5820 Fri Dec 7 22:08:23 CET 2007 Paolo Molaro <lupus@ximian.com>
5821
5822         * mini.c: run type ctor before allocating an object, not only
5823         when running it's constructor method (fixes at least part of bug #342507).
5824
5825 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5826         
5827         * mini-trampolines.c (mono_delegate_trampoline): Fix a warning.
5828         
5829         * mini-trampolines.c (mono_generic_class_init_trampoline): Remove a debug printf.
5830         * mini.h mini-amd64.c mini-x86.c: Get rid of the mono_arch_find_vtable () 
5831         function.
5832
5833         * tramp-x86.c tramp-amd64.c mini-trampolines.c: Pass the vtable argument to
5834         mono_generic_class_init_trampoline () the same as it is done with the other
5835         trampolines.
5836
5837         * mini-arm.h mini-arm.c tramp-arm.c inssel-arm.brg cpu-arm.md 
5838         aot-runtime.c aot-compiler.c: Implement AOT support.    
5839
5840 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5841
5842         * mini-trampolines.c (mono_generic_class_init_trampoline): Fixed
5843         build for archs which don't have the vtable trampoline defined
5844         yet.
5845
5846 2007-12-07  Zoltan Varga  <vargaz@gmail.com>
5847
5848         * tramp-x86.c (mono_arch_create_trampoline_code): Fix the build.
5849
5850         * tramp-ppc.c (mono_arch_create_trampoline_code): Use the new helper function.
5851
5852         * mini-trampolines.c (mono_get_trampoline_func): New helper function.
5853
5854         * tramp-<ARCH>.c: Use the new helper function.
5855
5856 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5857
5858         * inssel.brg: Added a pattern for the OP_TRAMPCALL_VTABLE
5859         trampoline call, which takes a vtable argument.
5860
5861         * graph.c, mini-ops.h, local-propagation.c, aliasing.c: Treat
5862         OP_TRAMPCALL_VTABLEs like other calls.
5863
5864         * mini-amd64.c, mini-amd64.h, mini-x86.c, mini-x86.h: Designated a
5865         register to hold the vtable argument to the OP_TRAMPCALL_VTABLE
5866         call.  Implemented a support function which fetches the vtable
5867         from a register set.
5868
5869         * mini.c, mini.h, tramp-amd64.c, tramp-x86.c, mini-trampolines.c:
5870         Implemented a generic class init trampoline, using the
5871         OP_TRAMPCALL_VTABLE opcode.
5872
5873         * mini.c: Implemented static field access when sharing generic
5874         code.  This implies initing the class using the new
5875         OP_TRAMPCALL_VTABLE call.
5876
5877 2007-12-07  Mark Probst  <mark.probst@gmail.com>
5878
5879         * mini.c: Don't compile methods with sharing enabled if their
5880         classes are disabled for sharing.
5881
5882 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5883
5884         * inssel.brg: Add a missing sign extension to the GETCHR and array access
5885         opcodes. Fixes #346563.
5886
5887         * objects.cs: Add a new test.
5888
5889         * aot-compiler.c (emit_method_code): Put back an #ifdef which is needed.
5890
5891         * mini-<ARCH>.h mini.c aot-compiler.c aot-runtime.c: Get rid of the
5892         HAVE_PIC_AOT define and use AOT_SUPPORTED instead.
5893
5894 2007-12-06  Zoltan Varga  <vargaz@gmail.com>
5895
5896         * mini-arm.h mini-arm.c: Add support for the common vtable trampoline.
5897
5898 2007-12-03  Zoltan Varga  <vargaz@gmail.com>
5899
5900         * mini-arm.c (mono_arch_emit_exceptions): Avoid uninitialized memory in the
5901         code stream.
5902
5903 2007-12-02  Zoltan Varga  <vargaz@gmail.com>
5904
5905         * patch-info.h (PATCH_INFO): Add DELEGATE_TRAMPOLINE.
5906
5907         * mini.c aot-compiler.c aot-runtime.c: Implement the delegate creation 
5908         optimization in the AOT case.
5909         
5910 2007-11-30  Zoltan Varga  <vargaz@gmail.com>
5911
5912         * aot-runtime (mono_aot_get_method_from_vt_slot): Add support for multi-byte method ref encodings.
5913         
5914         * aot-runtime.c (decode_klass_ref): Implement decoding of generic instances.
5915
5916         * aot-compiler.c (encode_klass_ref): Implement proper encoding of generic instances.
5917
5918         * mini.c (mono_method_to_ir): Optimize the common ldftn+create delegate combination.
5919
5920         * mini-trampolines.c (mono_delegate_trampoline): Add some code to handle the case when the delegate
5921         is created by the inlined delegate ctor.
5922
5923         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.  
5924
5925         * mini.c (mono_jit_compile_method_inner): Replace calls to delegate invoke with the trampoline here too.
5926
5927 2007-11-29  Zoltan Varga  <vargaz@gmail.com>
5928
5929         * cpu-x86.md: Fix the length of ckfinite.
5930
5931 2007-11-28  Zoltan Varga  <vargaz@gmail.com>
5932
5933         * mini-x86.c (mono_arch_output_basic_block): Unify div/rem code and handle the case when sreg2 is EDX.
5934         
5935         * mini-x86.c (mono_arch_output_basic_block): Clean up the fp stack properly in CKFINITE.
5936         (mono_arch_output_basic_block): Get rid of unused last_ins and last_offset.
5937
5938         * mini-x86.c (mono_arch_output_basic_block): Add some micro optimizations.
5939
5940         * mini-x86.c inssel-x86.brg cpu-x86.md: Move the implementation of the 
5941         OP_START_HANDLER/OP_ENDFINALLY/OP_ENDFILTER opcodes to mini-x86.c.
5942
5943 2007-11-28  Martin Baulig  <martin@ximian.com>
5944
5945         * mini-x86.c
5946         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline()
5947         after creating the trampoline.
5948
5949 2007-11-27  Zoltan Varga  <vargaz@gmail.com>
5950
5951         * aot-runtime.c (load_aot_module): Check runtime version if needed.
5952
5953         * aot-compiler.c: Add bind-to-runtime-version for producing AOT files which only load into a runtime with
5954         the same version.
5955
5956         * generic-sharing.c (mono_helper_get_rgctx_other_ptr): Change the signature to take the calling class
5957         instead of the calling method to help AOT.
5958
5959         * mini.c (get_runtime_generic_context_other_ptr): Update after the change.
5960
5961 2007-11-26  Zoltan Varga  <vargaz@gmail.com>
5962
5963         * aot-runtime.c (mono_aot_init_vtable): Simplify this if MONO_ARCH_COMMON_VTABLE_TRAMPOLINE
5964         is defined.
5965
5966 2007-11-23  Zoltan Varga  <vargaz@gmail.com>
5967
5968         * aot-compiler.c (emit_class_name_table): Properly encode generic class names.
5969         
5970         * aot-compiler.c (compile_method): Correct check for generic method definitions.
5971         (encode_method_ref): No need to handle generic method definitions specially.
5972
5973         * mini.h (MONO_AOT_FILE_VERSION): Bump this.
5974
5975         * aot-runtime.c (decode_klass_ref): Clean this up and rename from 
5976         decode_klass_info.
5977
5978         * aot-compiler.c (encode_klass_ref): Clean this up and rename from
5979         encode_klass_info.
5980         (compile_method): Enable generic sharing.
5981
5982 2007-11-22  Zoltan Varga  <vargaz@gmail.com>
5983
5984         * mini.c (get_runtime_generic_context_other_ptr): Disable AOT here.
5985         (mini_method_compile): Add preliminary support for AOTing shared generic code.
5986
5987         * aot-compiler.c (compile_method): Add preliminary support for AOTing shared
5988         generic code.
5989
5990         * mini-trampolines.c: Fix a warning.
5991
5992         * mini.c (get_runtime_generic_context_other_ptr): Use NEW_METHODCONST instead of
5993         NEW_PCONST.
5994         (mono_method_to_ir): Use NEW_DOMAINCONST in one place.
5995         (generic_class_is_reference_type): Remove unused function.
5996
5997         * mini-trampolines.c (mono_magic_trampoline): Avoid loading metadata if possible
5998         in the generic vtable trampoline case.
5999
6000         * aot-runtime.c (mono_aot_init_vtable): Use the generic vtable trampoline.
6001         
6002         * aot-runtime.c (mono_aot_get_method_from_vt_slot): New helper function to
6003         return an AOT method based on a vtable slot.
6004
6005         * aot-compiler.c (compile_method): Avoid AOTing synchronized methods for now.
6006
6007         * mini.c (mini_get_vtable_trampoline): Export this.
6008
6009 2007-11-22  Martin Baulig  <martin@ximian.com>
6010
6011         * debug-debugger.h
6012         (MonoDebuggerInfo): Move `debugger_version' up.
6013
6014 2007-11-22  Martin Baulig  <martin@ximian.com>
6015
6016         * mini-amd64.c
6017         (mono_arch_get_delegate_invoke_impl): Call mono_debug_add_delegate_trampoline().
6018
6019         * mini-trampolines.c
6020         (mono_delegate_trampoline): Call mono_debugger_trampoline_compiled()
6021         after compiling the method.
6022
6023 2007-11-20  Martin Baulig  <martin@ximian.com>
6024
6025         * debug-mini.c
6026         (mono_debugger_insert_method_breakpoint): Moved into mono-debug-debugger.c.
6027         (mono_debugger_remove_breakpoint): Likewise.
6028         (mono_debugger_check_breakpoints): Likewise.
6029
6030         * debug-debugger.c: Implement the new breakpoint interface here.
6031
6032 2007-11-18  Zoltan Varga  <vargaz@gmail.com>
6033
6034         * mini-amd64.c (mono_arch_output_basic_block): Unify the implementation of
6035         CEE_CONV_I1/SEXT_I1 and I2 since they are the same.
6036
6037         * mini-x86.c (mono_arch_output_basic_block): Ditto.     
6038
6039 2007-11-17  Zoltan Varga  <vargaz@gmail.com>
6040
6041         * mini-amd64.c (mono_arch_output_basic_block): Fix a typo.
6042
6043         * mini-x86.c (mono_arch_get_inst_for_method): Remove code which is now in
6044         mini.c.
6045
6046         * mini-ia64.c (mono_arch_get_inst_for_method): Remove code which is now in
6047         mini.c.
6048
6049         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for methods
6050         returning a vtype in a register.
6051
6052         * mini.c (mini_get_inst_for_method): Move the handling of the atomic operations
6053         here from the arch specific code.
6054
6055         * mini-amd64.c (mono_arch_get_inst_for_method): Remove code which is now in
6056         mini.c.
6057
6058         * mini-amd64.c (mono_arch_output_basic_block): Add some micro optimizations.
6059         (mono_arch_emit_prolog): Increment maximum prolog size.
6060
6061         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Move the implementation of the
6062         START_HANDLER/ENDFINALLY/ENDFILTER opcodes to mini-amd64.c.
6063
6064         * mini-x86.c (get_call_info): Receive a MonoCompile instead of a 
6065         MonoGenericSharingContext.
6066
6067         * mini-ia64.c (get_call_info): Receive a MonoCompile instead of a 
6068         MonoGenericSharingContext. Allocate memory from the cfg mempool.
6069
6070 2007-11-15  Mark Probst  <mark.probst@gmail.com>
6071
6072         * mini.c, mini.h, generic-sharing.c: Functions for producing code
6073         which extract fields out of the runtime generic context.  Full
6074         sharing of the NEWARR opcode.
6075
6076 Thu Nov 15 14:20:21 CET 2007 Paolo Molaro <lupus@ximian.com>
6077
6078         * abcremoval.c, mini.c, ssa.c, ssapre.c: updated to implement
6079         --enable-minimal=ssa.
6080
6081 2007-11-13  Zoltan Varga  <vargaz@gmail.com>
6082
6083         * mini-trampolines.c (mono_delegate_trampoline): Update after 
6084         mono_marshal_get_delegate_invoke () signature change.
6085
6086 2007-11-13  Mark Probst  <mark.probst@gmail.com>
6087
6088         * mini.c: Removed the shared context in favor of the generic
6089         sharing context.  Allocate the MonoJitInfo structure with room for
6090         the generic sharing context if it's needed.
6091
6092         * mini.h: Remove MonoGenericSharingContext declaration.  It's in
6093         domain-internals.h now.
6094
6095         * mini-x86.c: Pass the generic sharing context to get_call_info ().
6096
6097         * generic-sharing.c: Several changes for working without a shared
6098         context and instead operating on open types instead.
6099
6100 2007-11-12  David S. Miller  <davem@davemloft.net>
6101
6102        * inssel-sparc.brg: Fix double instruction emit.
6103
6104 2007-11-12  Zoltan Varga  <vargaz@gmail.com>
6105
6106         * mini.c (mono_jit_runtime_invoke): Avoid trying to compile the Array 
6107         Get/Set/Address methods.
6108         
6109         * mini.c debug-debugger.c mini-trampolines.c: Update after 
6110         mono_marshal_get_delegate_invoke signature change.
6111
6112 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
6113
6114         * cpu-arm.md: Increase the max size of OP_THROW to 24 bytes.
6115         This can happens with dynamic methods. Fixes the other bug in #322722.
6116
6117 2007-11-12  Rodrigo Kumpera  <rkumpera@novell.com>
6118
6119         * tramp-arm.c (mono_arch_patch_callsite): Support patching
6120         BX call sequence.
6121
6122         * mini-arm.c (arm_patch): Implement patching of BX call
6123         sequence. Fixes one of the bugs in #322722.
6124
6125 2007-11-03  David S. Miller  <davem@huronp11.davemloft.net>
6126
6127        * mini-sparc.c (mono_arch_flush_icache): Make more efficient
6128        under Linux.  We only need to flush every 32-byte cache line.    
6129
6130 2007-11-07  Massimiliano Mantione  <massi@ximian.com>
6131
6132         * mini.c:
6133         move_basic_block_to_end: Add branches when needed, eventually creating
6134         a new BB.
6135         optimize_branches: added a parameter that tells if it's ok to create
6136         new BBs (doing is "df_visit" has been called is (IMHO) a nightmare),
6137         and avoid calling move_basic_block_to_end when it's not ok.
6138         Fixes bug 318677.
6139
6140 2007-11-07  Mark Probst  <mark.probst@gmail.com>
6141
6142         * mini.c: Abort inlining call to InitializeArray if something
6143         looks wrong.  Let the icall handle it, which now has proper safety
6144         checks.
6145
6146 2007-11-05  Rodrigo Kumpera  <rkumpera@novell.com>
6147
6148         * mini.c (mono_spill_call): add support for soft-float.
6149
6150         * mini.c (mono_method_to_ir): add support for soft-float
6151         to inlined functions that return float.
6152
6153         * mini.c (mono_method_to_ir): add support for soft-float
6154         to cee_stsfld opcode on float fields.
6155
6156 2007-11-05  Geoff Norton  <gnorton@novell.com>
6157
6158         * mini-x86.h: Fix the structure access for X86 Leopard.
6159
6160
6161 2007-11-05  Martin Baulig  <martin@ximian.com>
6162
6163         * mini-trampolines.c
6164         (mono_magic_trampoline): Call mono_debugger_trampoline_compiled()
6165         after compiling the method to notify the debugger.
6166
6167 2007-11-05  Martin Baulig  <martin@ximian.com>
6168
6169         * debug-debugger.h (MonoDebuggerInfo): Use the new breakpoint tables.
6170
6171 2007-11-02  Zoltan Varga  <vargaz@gmail.com>
6172
6173         * mini-sparc.c (EMIT_COND_SYSTEM_EXCEPTION_GENERAL): Applied patch from
6174         David Miller <davem@davemloft.net>. Allow larger offsets in branches.
6175
6176 2007-11-01  Zoltan Varga  <vargaz@gmail.com>
6177
6178         * mini-amd64.c (mono_arch_emit_prolog): Check the domain as well for
6179         native-to-managed wrappers.
6180         
6181 2007-11-01  Geoff Norton  <gnorton@novell.com>
6182
6183         * mini-ppc.h, mini-x86.h:  Handle Leopards renaming of some structure 
6184         members.
6185
6186 Wed Oct 31 20:23:14 CET 2007 Paolo Molaro <lupus@ximian.com>
6187
6188         * mini.c, mini-x86.c: when getting back from unmanaged code
6189         to managed via a marshaled delegate we also need to set the
6190         right domain.
6191
6192 Wed Oct 31 19:53:33 CET 2007 Paolo Molaro <lupus@ximian.com>
6193
6194         * mini-amd64.c, mini-amd64.h, tramp-amd64.c: breakpoint table support
6195         for amd64.
6196
6197 Wed Oct 31 19:29:30 CET 2007 Paolo Molaro <lupus@ximian.com>
6198
6199         * mini.c, mini.h, mini-x86, tramp-x86.c, mini-x86.h: added API to
6200         let the debugger or other external agents to tell the JIT when
6201         a sw breakpoint has been inserted in the code that the JIT needs
6202         to be able to inspect.
6203
6204 2007-10-31  Martin Baulig  <martin@ximian.com>
6205
6206         * debug-debugger.h
6207         (MonoDebuggerInfo): Remove `runtime_class_init'.
6208
6209 2007-10-30  Martin Baulig  <martin@ximian.com>
6210
6211         * debug-mini.h
6212         (mono_debugger_thread_created): Added `MonoThread *' argument.
6213         (mono_debugger_extended_notification): New public method.
6214         (mono_debugger_trampoline_compiled): New public method.
6215
6216         * debug-mini.c
6217         (MonoDebuggerThreadInfo): Added `thread' and
6218         `extended_notifications' fields.
6219
6220         * debug-debugger.c
6221         (debugger_executable_code_buffer): New static variable.
6222
6223         * debug-debugger.h
6224         (MonoDebuggerInfo): Added `executable_code_buffer',
6225         `executable_code_buffer_size', `breakpoint_info_area',
6226         `breakpoint_table' and `breakpoint_table_size'.
6227
6228 2007-10-26  Rodrigo Kumpera  <rkumpera@novell.com>
6229
6230         * mini-arm.c (mono_arch_build_imt_thunk): Take the advantage
6231         that IP  either is an unused value or the vtable pointer. IMT 
6232         calls use vtable + offset now. Reduced by almost half the size
6233         of IMT entries.
6234
6235 2007-10-26  Jonathan Chambers <joncham@gmail.com>
6236
6237         * mini-amd64.c: Begin Win64 port. Use AMD64_ARG_REG#
6238         defines to access param registers. Replace long usage with
6239         gsize as sizeof(long) != sizeof(void*) on Win64.
6240
6241         * mini-amd64.h: Add %rdi and %rsi to MonoLMF structure
6242         on Win64. Fix intrinsic, use _AddressOfReturnAddress
6243         instead of non-existant _GetAddressOfReturnAddress.
6244
6245         * tramp-amd64.c: Use AMD64_ARG_REG#     defines to access 
6246         param registers. Save/restore %rdi and %rsi in MonoLMF.
6247
6248         * exceptions-amd64.c: Use AMD64_ARG_REG# defines to access 
6249         param registers. Modify (throw_exception) signature to take 
6250         %rdi and %rsi on Win64. 
6251
6252         Code is contributed under MIT/X11 license.
6253
6254 Thu Oct 25 23:06:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
6255
6256         * helpers.c: unlink debugging output files.
6257
6258 2007-10-25  Zoltan Varga  <vargaz@gmail.com>
6259
6260         * mini.c: Move mono_create_ftnptr () to object.c.
6261
6262 2007-10-24  Rodrigo Kumpera  <rkumpera@novell.com>
6263
6264         * helpers.c (mono_disassemble_code): MonoCompile parameter is now
6265         optional. This function can now be used to disassemble code generated
6266         outside the JIT such as trampolines and IMT thunks.
6267
6268         * mini-arm.h: defined MONO_ARCH_HAVE_IMT.
6269
6270         * mini-arm.c (decode_vcall_slot_from_ldr): added, extract the
6271         vtable pointer from a ldr instruction.
6272
6273         * mini-arm.c (mono_arch_get_vcall_slot_addr): support the
6274         new IMT call sequence.
6275
6276         * mini-arm.c (mono_arch_output_basic_block): emit the IMT
6277         call sequence for interface invocations.
6278
6279         * mini-arm.c (mono_arch_emit_imt_argument): added, required
6280         for imt support. This function is empty since IMT on ARM requires no
6281         special handling on the IR side.
6282
6283         * mini-arm.c (mono_arch_find_imt_method): added, required for
6284         imt support.
6285
6286         * mini-arm.c (mono_arch_find_this_argument): added, required
6287         for imt support.
6288
6289         * mini-arm.c (arm_emit_value_and_patch_ldr): added, patches
6290         a ldr instruction to load a value stored in the code stream.
6291
6292         * mini-arm.c (mono_arch_build_imt_thunk):added, required
6293         for imt support.
6294
6295
6296 2007-10-23  Zoltan Varga  <vargaz@gmail.com>
6297
6298         * mini.c (mini_init): Install the jump trampoline callback.
6299
6300 Tue Oct 23 17:07:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6301
6302         * mini-trampolines.c: handle synchronized methods with the common
6303         vtable trampoline (bug #335601).
6304
6305 2007-10-17  Zoltan Varga  <vargaz@gmail.com>
6306
6307         * mini-ia64.h mini-amd64.c: Add support for the common vtable trampoline.
6308
6309         * inssel.brg (mini_emit_virtual_call): Fix the computation of ins->inst_offset on
6310         64 bit platforms.
6311
6312         * mini-ia64.h mini-ia64.c: Add support for IMT.
6313
6314         * mini-x86.c (mono_arch_emit_prolog): Increase the size allocated for the
6315         prolog. Fixes #331958.
6316
6317 2007-10-15  Zoltan Varga  <vargaz@gmail.com>
6318
6319         * mini-sparc.h mini-sparc.c: Add support for the common vtable trampoline.
6320
6321 Mon Oct 15 11:18:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6322
6323         * mini-ppc.c, mini-ppc.h: ppc support for the common vtable
6324         trampoline.
6325
6326 Mon Oct 15 10:41:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6327
6328         * mini-amd64.c, mini-amd64.h: amd64 support for the common vtable
6329         trampoline.
6330
6331 Mon Oct 15 10:39:26 CEST 2007 Paolo Molaro <lupus@ximian.com>
6332
6333         * mini-x86.c, mini-x86.h: x86 support for the common vtable
6334         trampoline.
6335
6336 Mon Oct 15 10:37:15 CEST 2007 Paolo Molaro <lupus@ximian.com>
6337
6338         * mini-trampolines.c: changed the magic rampoline to understand
6339         the common vtable trampoline method: the method to invoke is
6340         determined by the vtable displacement of the call.
6341
6342 Mon Oct 15 10:35:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6343
6344         * mini.c, mini.h: register the common vtable trampoline if the
6345         architecture supports it.
6346
6347 Mon Oct 15 09:50:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
6348
6349         * cpu-amd64.md: use the correct max length for tls_get.
6350
6351 2007-10-14  Zoltan Varga  <vargaz@gmail.com>
6352
6353         * mini.c (mono_method_to_ir): Use mini_get_class in CEE_LDELEM_ANY and
6354         CEE_STELEM_ANY. Fixes #333696.
6355
6356 Thu Oct 11 18:04:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6357
6358         * exceptions-x86.c: provide more graceful handling of the case where
6359         we followed a bogus function pointer from managed code (bug #332866).
6360
6361 2007-10-11  Mark Probst  <mark.probst@gmail.com>
6362
6363         * mini.h, mini.c: Introduced the MonoGenericSharingContext, which
6364         replaces the generic_shared flag and will carry more information
6365         in the future.
6366
6367         * generic-sharing.c: Added mini_type_stack_size() which allows
6368         allows open types if given a generic sharing context.
6369         mini_get_basic_type_from_generic() takes a
6370         MonoGenericSharingContext* instead of a MonoCompile* now.
6371
6372         * mini-alpha.c, mini-amd64.c, mini-arm.c, mini-hppa.c,
6373         mini-ia64.c, mini-mips.c, mini-ppc.c, mini-s390.c, mini-s390x.c,
6374         mini-sparc.c, mini-x86.c: Trivial changes required by the two
6375         changes above.  Just passing arguments through to the right
6376         places.
6377
6378 Wed Oct 10 19:44:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6379
6380         * mini-arm.c: unify the call emission to emit_code_seq().
6381
6382 Wed Oct 10 13:05:46 CEST 2007 Paolo Molaro <lupus@ximian.com>
6383
6384         * tramp-arm.c: reduced the trampoline size.
6385
6386 2007-10-10  Mark Probst  <mark.probst@gmail.com>
6387
6388         * generic-sharing.c, mini.h, mini-amd64.c, mini-x86.c: Moved type
6389         variable handling out of arch-specific code.
6390
6391 Wed Oct 10 10:49:28 CEST 2007 Paolo Molaro <lupus@ximian.com>
6392
6393         * mini-arm.c: implemented fast delegate dispatch.
6394
6395 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6396
6397         * mini-amd64.c (mono_arch_compute_omit_fp): Add more checks to ensure
6398         that fp elimination is turned off if the space required by locals is too
6399         big. Fixes #331958.
6400
6401 Tue Oct 9 21:01:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
6402
6403         * Makefile.am, mini-arm.c, mini-arm.h, tramp-arm.c: ported
6404         ARM to the new style trampoline.
6405
6406 2007-10-09  Zoltan Varga  <vargaz@gmail.com>
6407
6408         * tramp-amd64.c: Rework the specific trampoline code to make it smaller.
6409
6410         * mini-amd64.h mini-amd64.c: Export amd64_patch as mono_amd64_patch.
6411
6412 2007-10-09  Martin Baulig  <martin@ximian.com>
6413
6414         * debug-debugger.h
6415         (MonoDebuggerMetadataInfo): Added `field_info_type_offset' and
6416         `field_info_offset_offset'.     
6417
6418 Tue Oct 9 09:47:51 CEST 2007 Paolo Molaro <lupus@ximian.com>
6419
6420         * mini-ppc.c, mini-ppc.h, mini-ops.h, inssel-ppc.brg, cpu-g4.md:
6421         removed more internal usage of the r11 register and made it available
6422         to the register allocator.
6423
6424 2007-10-08  Mark Probst  <mark.probst@gmail.com>
6425
6426         * mini.c, mini-amd64.c, mini-x86.c: Allow open generic contexts
6427         when sharing generics and treat type variables as references.
6428
6429 Mon Oct 8 10:55:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6430
6431         * mini-ppc.c: started removing the internal uses of register r11
6432         to eventually allow the register allocator to manage it as an
6433         additional available register.
6434
6435 Mon Oct 8 14:25:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
6436
6437         * tramp-amd64.c: fixed memory corruption in the trampoline generation.
6438
6439 Mon Oct 8 12:06:33 CEST 2007 Paolo Molaro <lupus@ximian.com>
6440
6441         * tramp-ppc.c, tramp-x86.c: reduce the alignment requirements for
6442         specific trampolines as they are not performance critical as a jump
6443         target (maybe align as before only for AOT code?). This saves about
6444         200 KB of native code on x86 for monodevelop startup.
6445
6446 Mon Oct 8 10:04:40 CEST 2007 Paolo Molaro <lupus@ximian.com>
6447
6448         * tramp-ppc.c: reduce the size of the trampolines, saves 160KB on
6449         monodevelop startup.
6450
6451 2007-10-06  Zoltan Varga  <vargaz@gmail.com>
6452
6453         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Allow signed displacements.
6454
6455         * mini-sparc.h mini-sparc.c: Implement IMT support.
6456
6457         * tramp-sparc.c (mono_arch_create_trampoline_code): Rework the trampoline code so
6458         its smaller and doesn't clobber sparc_g1.
6459
6460         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Update after trampoline changes.
6461
6462 Fri Oct 5 18:28:11 CEST 2007 Paolo Molaro <lupus@ximian.com>
6463
6464         * mini-ppc.c: optimized the size of the IMT thunks a bit.
6465
6466 Fri Oct 5 18:08:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
6467
6468         * mini-ppc.c: implemented fast delegate invocation.
6469
6470 Fri Oct 5 00:01:05 CEST 2007 Paolo Molaro <lupus@ximian.com>
6471
6472         * mini-ppc.h, mini-ppc.c: IMT support for the PPC architecture.
6473
6474 Thu Oct 4 22:04:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6475
6476         * mini-ppc.c, mini-ppc.h, tramp-ppc.c, Makefile.am: port the PPC
6477         code to the new style trampoline in preparation for IMT support.
6478
6479 Thu Oct 4 19:01:59 CEST 2007 Paolo Molaro <lupus@ximian.com>
6480
6481         * mini-ppc.c, tramp-ppc.c: don't use r13 as it's used by the PPC EABI
6482         systems already. This also reduces the specific trampiline sizes and
6483         prepares for the use of r12 as the IMT identifier register.
6484
6485 Thu Oct 4 16:38:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6486
6487         * mini-mips.h: endianess fix (simplified from a patch by
6488         Thomas Kunze <thommy@tabao.de>, bug #323737).
6489
6490 Thu Oct 4 14:43:49 CEST 2007 Paolo Molaro <lupus@ximian.com>
6491
6492         * exceptions-ppc.c, mini-ppc.h: refactor to use macros
6493         to access ucontext fields and enable netbsd support
6494         (partially from Magnus Henoch <mange@freemail.hu>).
6495
6496 Thu Oct 4 12:35:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6497
6498         * genmdesc.pl: patch from Henryk Plötz <henryk@openmoko.org> to
6499         use the preprocessor from the CPP env var if it is set.
6500
6501 Wed Oct 3 17:11:38 CEST 2007 Paolo Molaro <lupus@ximian.com>
6502
6503         * mini-trampolines.c: fixed an assertion and moved it earlier in the
6504         code, before interface_offset gets used.
6505
6506 2007-10-02  Zoltan Varga  <vargaz@gmail.com>
6507
6508         * mini-trampolines.c (mono_convert_imt_slot_to_vtable_slot): Call 
6509         mono_class_setup_vtable () before accessing klass->vtable.
6510
6511 2007-10-01  Zoltan Varga  <vargaz@gmail.com>
6512
6513         * aot-compiler.c (get_plt_index): Rework the handling of wrappers to be not so
6514         hackish.
6515
6516 Mon Oct 1 15:00:27 CEST 2007 Paolo Molaro <lupus@ximian.com>
6517
6518         * mini.c, mini-trampolines.c, mini.h: enable the lazy filling of the
6519         IMT slots (this saves hundreds of KB of memory in programs like
6520         IronPython and Monodevelop).
6521
6522 Mon Oct 1 14:44:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6523
6524         * mini.c: print the delegate counter.
6525
6526 Mon Oct 1 14:36:50 CEST 2007 Paolo Molaro <lupus@ximian.com>
6527
6528         * mini-x86.c: make it easier to enable the debugging code for IMT
6529         slots.
6530
6531 2007-09-28  Martin Baulig  <martin@ximian.com>
6532
6533         * debug-debugger.h
6534         (MonoDebuggerMetadataInfo): Add `klass_image_offset',
6535         `mono_method_klass_offset' and `mono_method_token_offset'.
6536
6537 2007-09-20  Mark Probst  <mark.probst@gmail.com>
6538
6539         * mini.c: First generics sharing implementation.  Can only share
6540         in very simple cases.  If sharing doesn't work it falls back to
6541         dedicated compilation.
6542
6543         * mini.h: Flag in MonoCompile to specify whether generic
6544         compilation is shared.  Flags enum for marking which generic inst
6545         of a context is used.  Prototypes for helper functions.
6546
6547         * generic-sharing.c: Helper functions for generic method sharing.
6548
6549         * optflags-def.h: Optimization flag (gshared) for enabling generic
6550         method sharing added.
6551
6552         * Makefile.am: generic-sharing.c added.
6553
6554 2007-09-19 Daniel Nauck <dna@mono-project.de>
6555
6556         * mini.c (mono_thread_abort): fixed typo in r86014. It should be '==' instead of '!='.
6557
6558 2007-09-19  Massimiliano Mantione  <massi@ximian.com>
6559         * mini.c (mono_thread_abort): Correctly handle ThreadAbortException,
6560         fixes bug 325507.
6561
6562 2007-09-19  Martin Baulig  <martin@ximian.com>
6563
6564         * mini.c (mini_cleanup): Only call mono_debugger_cleanup() here;
6565         mono_debug_cleanup() is now part of mono_cleanup().
6566
6567 2007-09-18  Zoltan Varga  <vargaz@gmail.com>
6568
6569         * driver.c (mono_main): Fix a warning.
6570
6571 2007-09-17  Zoltan Varga  <vargaz@gmail.com>
6572
6573         * aot-compiler.c: Optimize various parts when processing large assemblies.
6574         Fixes ##325568.
6575
6576         * mini.c (mono_patch_info_hash): Improve hash function.
6577
6578 2007-09-14  Jonathan Chambers <joncham@gmail.com>
6579
6580         * mini-exceptions.c: Add HAVE_UNISTD_H check around include.
6581         
6582         Code is contributed under MIT/X11 license.
6583
6584 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6585
6586         * mini.c (mini_init): Fix a leak.
6587
6588         * debug-mini.c (mono_debug_free_method_jit_info): Fix a leak.
6589
6590 Fri Sep 14 12:53:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6591
6592         * mini.c: redirect string.InternalAllocStr() to the managed allocator.
6593
6594 2007-09-14  Zoltan Varga  <vargaz@gmail.com>
6595
6596         * mini-amd64.c (mono_arch_find_imt_method): Add support for AOT code.
6597
6598 2007-09-13  Zoltan Varga  <vargaz@gmail.com>
6599
6600         * Makefile.am generics-variant-types.2.il generics.cs: Add some generics
6601         variance tests.
6602
6603         * inssel.brg: Reorganize the isinst/castclass code to reduce code duplication.
6604
6605         * mini.c (handle_alloc): Enable managed allocators in AOT code.
6606
6607         * aot-compiler.c (encode_patch): Add support for MONO_WRAPPER_ALLOC.
6608
6609         * aot-runtime.c (decode_patch_info): Ditto.
6610
6611 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6612
6613         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement
6614         static case. Cache delegates in architecture specific code, 
6615         based on number of parameters.
6616         
6617         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): Cache delegates
6618         in architecture specific code, based on number of parameters.
6619         
6620         * mini-trampolines.c (mono_delegate_trampoline): Architecture specific 
6621         caching happen in architecture specific code now.
6622         
6623         Code is contributed under MIT/X11 license.
6624
6625 2007-09-12  Jonathan Chambers <joncham@gmail.com>
6626
6627         * mini.h, mini.c, mini-x86.c, mini-amd64.c, mini-hppa.c, mini-mips.c,
6628         mini-s390x.c, mini-arm.c, mini-ia64.c, mini-sparc.c, mini-ppc.c, mini-alpha.c,
6629         mini-s390.c: Add mono_arch_init and mono_arch_cleanup methods.
6630
6631         Code is contributed under MIT/X11 license.
6632
6633 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
6634         * mini.c: (mono_thread_abort) Fixed bug #82416.
6635
6636 Tue Sep 11 16:15:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6637
6638         * mini.: hook the new managed GC allocation feature into the JIT.
6639
6640 Tue Sep 11 16:14:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
6641
6642         * mini.c: implementation for the new runtime tls opcode.
6643
6644 2007-09-11  Martin Baulig  <martin@ximian.com>
6645
6646         * debug-debugger.h
6647         (MonoDebuggerMetadataInfo): Add `mono_method_flags_offset' and
6648         `mono_method_inflated_offset'.
6649
6650 2007-09-07  Zoltan Varga  <vargaz@gmail.com>
6651
6652         * driver.c mini.h mini.c: Add a new devel command line option for injecting
6653         async exceptions into a method.
6654
6655         * mini-amd64.h mini-amd64.c: Implement injecting of async exceptions for the
6656         purpose of testing whenever the unwinder works at every instruction.
6657
6658 Thu Sep 6 12:42:14 CEST 2007 Paolo Molaro <lupus@ximian.com>
6659
6660         * mini.c: check accessibility of method used in ldftn (fixes
6661         bug #82635).
6662
6663 2007-09-04  Zoltan Varga  <vargaz@gmail.com>
6664
6665         * mini-amd64.c (mono_arch_output_basic_block): Fix a warning.
6666
6667         * inssel.brg: Fix a warning.
6668
6669 2007-09-03  Martin Baulig  <martin@ximian.com>
6670
6671         * debug-debugger.c: `MONO_DEBUGGER_EVENT_INITIALIZE_MANAGED_CODE'
6672         now takes the `main_method' as argument.
6673
6674 2007-09-02  Zoltan Varga  <vargaz@gmail.com>
6675
6676         * cpu-sparc.md (endfilter): Add missing src1:i argument.
6677
6678 2007-08-30  Jonathan Chambers <joncham@gmail.com>
6679
6680         * driver.c: include the cil-coff.h header on Windows.
6681         
6682         Code is contributed under MIT/X11 license.
6683
6684 Thu Aug 30 16:17:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
6685
6686         * mini.c, driver.c: don't include the cil-coff.h header.
6687
6688 Thu Aug 30 14:50:53 CEST 2007 Paolo Molaro <lupus@ximian.com>
6689
6690         * mini.c: flag places that needs fixes fo soft-float support.
6691
6692 Wed Aug 29 18:26:20 CEST 2007 Paolo Molaro <lupus@ximian.com>
6693
6694         * mini.h, inssel-float.brg: fix soft-float constant loads on big
6695         endian systems (partially from Dean Jenkins, bug #81924).
6696
6697 2007-08-28  Mark Probst  <mark.probst@gmail.com>
6698
6699         * mini.c (check_linkdemand): Remove embedded reference object in
6700         call to LinkDemandSecurityException.
6701         (mono_jit_compile_method_inner): Call LinkDemandSecurityException
6702         with an IntPtr instead of a reference object.
6703
6704 2007-08-28  Zoltan Varga  <vargaz@gmail.com>
6705
6706         * mini.c (handle_initobj): Handle alignment properly.
6707
6708         * inssel.brg (mini_emit_memset): Ditto. 
6709
6710         * inssel.brg (mini_emit_memcpy): Ditto. 
6711
6712         * inssel-sparc.brg: Ditto.              
6713
6714         * mini.h mini.c inssel-*.brg: Pass alignment information to OP_MEMCPY/MEMSET.
6715
6716 2007-08-26  Zoltan Varga  <vargaz@gmail.com>
6717
6718         * mini-exceptions.c (mono_handle_exception_internal): Skip the first frame for
6719         exceptions raised in unmanaged code. Fixes part of #82594.
6720
6721 2007-08-24  Mark Probst  <mark.probst@gmail.com>
6722
6723         * mini.c (mono_method_to_ir), declsec.c
6724         (mono_declsec_linkdemand_aptc): Fixed custom attr leaks.
6725
6726 2007-08-22  Martin Baulig  <martin@ximian.com>
6727
6728         * debug-mini.h
6729         (MonoDebuggerThreadInfo): New typedef.
6730         (mono_debugger_thread_table): New global variable.
6731         (mono_debugger_thread_created): New public function.
6732         (mono_debugger_thread_cleanup): New public function.
6733
6734         * debug-debugger.h
6735         (MonoDebuggerInfo):
6736         - removed `get_current_thread' and `lookup_assembly'.
6737         - removed `data_table'.
6738         - added `thread_table'.
6739
6740         * mini.c
6741         (mono_thread_start_cb): Call mono_debugger_thread_created().
6742         (mono_thread_attach_cb): Likewise.
6743         (mini_thread_cleanup): Call mono_debugger_thread_cleanup().
6744         (mini_cleanup): Move mono_debug_cleanup() down, after free'ing the
6745         initial domain.
6746
6747         * driver.c (mono_main): Move mono_debug_init() up, before calling
6748         mini_init(); mono_debug_init_1() and mono_debug_init_2() are gone.
6749
6750 Tue Aug 21 16:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
6751
6752         * mini-x86.c, inssel-x86.brg: group multiple stack adjustments
6753         together when passing several arguments of type double (gives a small
6754         speedup and saves a few bytes of generated code).
6755
6756 2007-08-20  Jb Evain  <jbevain@novell.com>
6757
6758         * mini.c (mono_method_to_ir): fix leak on InvalidProgramException.
6759
6760 2007-08-20  Jb Evain  <jbevain@novell.com>
6761
6762         * mini.c (mono_method_to_ir): throw MethodAccessException
6763         and FieldAccessException instead of InvalidProgramException.
6764
6765 2007-08-20  Mark Probst  <mark.probst@gmail.com>
6766
6767         * mini.c: CoreCLR security checks.
6768
6769         * mini.h: Removed MonoSecurityMode (moved to
6770         metadata/security-manager.h) and mono_security_mode global var
6771         (replaced by set/get functions in security-manager.h).
6772
6773         * driver.c: Added "core-clr-test" security mode for testing.  Used
6774         set-function for setting security mode.
6775
6776 2007-08-17  Mark Probst  <mark.probst@gmail.com>
6777
6778         * mini.c: MonoJitInfo's are freed hazardously now.  Statistics for
6779         the new jit_info_table.
6780
6781         * driver.c: Test code for the new jit_info_table (enabled by the
6782         define MONO_JIT_INFO_TABLE_TEST).
6783
6784 2007-08-14  Zoltan Varga  <vargaz@gmail.com>
6785
6786         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
6787         detection of call <REG> instruction sequence. Fixes build on freebsd.
6788
6789 2007-08-13  Zoltan Varga  <vargaz@gmail.com>
6790
6791         * mini-exceptions.c: Fix a warning.
6792
6793 2007-08-11  Zoltan Varga  <vargaz@gmail.com>
6794
6795         * exceptions-amd64.c (mono_arch_handle_altstack_exception): Enable the new
6796         stack overflow handling code on amd64 too.
6797
6798         * mini-exceptions.c (mono_setup_altstack): Make this use 
6799         mono_thread_get_stack_bounds ().
6800
6801         * mini-x86.h: Disable sigaltstack on solaris x86.
6802
6803 2007-08-10  Zoltan Varga  <vargaz@gmail.com>
6804
6805         * mini-exceptions.c (mono_setup_altstack): Enable this to work on solaris x86.
6806
6807 2007-08-10  Geoff Norton  <gnorton@customerdna.com>
6808
6809         * tramp-x86.c: Remove some unneeded alignment changes on Apple.  Fixes #82387.
6810
6811 2007-08-08  Zoltan Varga  <vargaz@gmail.com>
6812
6813         * mini-exceptions.c (mono_print_thread_dump): Enable this on amd64 too.
6814
6815         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Fix a warning.
6816
6817 2007-08-03  Neale Ferguson <neale@sinenomine.net>
6818
6819         * mini-s390.c (add_general): Adjust offset calculation to take into account of rounding up
6820         due to alignment.
6821
6822 Thu Aug 2 17:36:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6823
6824         * mini-ppc.c: avoid an invalid encoding of unsigned right shift by 0
6825         to be emitted (bug #82281).
6826
6827 2007-08-01  Martin Baulig  <martin@ximian.com>
6828
6829         Merged the `debugger-dublin' branch.
6830
6831         * debug-debugger.h (MonoDebuggerInfo):
6832         Removed the `old_*' compatibility entries.
6833         Added `debugger_version' and `data_table'.
6834         Renamed `get_method_addr_or_bpt' -> `insert_breakpoint'.
6835         Renamed `remove_method_breakpoint' -> `remove_breakpoint'.
6836
6837         * debug-mini.c
6838         (MiniDebugMethodBreakpointInfo): Add `address_list'.
6839         (mono_debugger_check_breakpoints): Take a `MonoDebugMethodAddress *'
6840         instead of a `gconstpointer'.
6841         (mono_debugger_insert_method_breakpoint): Return a
6842         `MonoDebugMethodAddressList *'.
6843
6844 2007-06-28  Martin Baulig  <martin@ximian.com>
6845
6846         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
6847
6848 2007-08-01  Zoltan Varga  <vargaz@gmail.com>
6849
6850         * mini-amd64.h (MONO_INIT_CONTEXT_FROM_FUNC): Avoid using 
6851         __builtin_frame_address () since it is broken on older gcc versions.
6852
6853 Tue Jul 31 17:34:42 CEST 2007 Paolo Molaro <lupus@ximian.com>
6854
6855         * mini.c, mini.h, mini-exceptions.c: added a bit of documentation
6856         on the stack overflow handling and made the managed stack overflows
6857         catchable in most cases using soft guard pages.
6858         * exceptions-x86.c: added code to restore the protection in the soft
6859         guard pages at the end of exception handling.
6860
6861 2007-07-31  Zoltan Varga  <vargaz@gmail.com>
6862
6863         * mini.c (SIG_HANDLER_SIGNATURE): Fix a warning.
6864
6865 Mon Jul 30 17:43:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6866
6867         * exceptions-ppc.c, mini-ppc.h: arch-specific stack overflow
6868         exception handling.
6869
6870 Mon Jul 30 17:38:13 CEST 2007 Paolo Molaro <lupus@ximian.com>
6871
6872         * mini-alpha.h, mini-ia64.h, mini-sparc.h: disable the altstack
6873         signal handling support until it has been ported to the new mechanism.
6874         * mini.c: fixed stack overflow detection and use the new
6875         architecture code  to handle signals on the altstack.
6876
6877 Mon Jul 30 17:33:02 CEST 2007 Paolo Molaro <lupus@ximian.com>
6878
6879         * exceptions-amd64.c, mini-amd64.h: amd64 code to handle
6880         stack overflows on the alt stack.
6881
6882 Mon Jul 30 17:29:56 CEST 2007 Paolo Molaro <lupus@ximian.com>
6883
6884         * exceptions-x86.c, mini-x86.h, mini.h: new code to handle
6885         stack overflows on the alt stack.
6886
6887 Mon Jul 30 11:50:06 CEST 2007 Paolo Molaro <lupus@ximian.com>
6888
6889         * exceptions-ppc.c: cleanup preparing for altstack support.
6890
6891 Mon Jul 30 11:31:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
6892
6893         * exceptions-arm.c: cleanup preparing for altstack support.
6894
6895 2007-07-27  Mark Probst  <mark.probst@gmail.com>
6896
6897         * mini.c (print_jit_stats): Output hazard pointer stats.
6898
6899 2007-07-26  Mark Probst  <mark.probst@gmail.com>
6900
6901         * driver.c, mini.c: Replaced security mode flags with a single
6902         enum variable.
6903
6904 Thu Jul 26 20:12:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
6905
6906         * mini.c, mini-exceptions.c: cleanup the sigaltstack code.
6907
6908 2007-07-25  Mark Probst  <mark.probst@gmail.com>
6909
6910         * mini.c, mini.h, driver.c (mono_main): Added command-line flag
6911         (which doesn't do anything yet) for activating Core CLR
6912         (Silverlight) security.
6913
6914 Tue Jul 24 21:16:17 CEST 2007 Paolo Molaro <lupus@ximian.com>
6915
6916         * mini-codegen.c: work around a possible gcc bug on arm.
6917
6918 Tue Jul 24 17:20:19 CEST 2007 Paolo Molaro <lupus@ximian.com>
6919
6920         * driver.c, mini-x86.h, mini-amd64.h: print a nice error
6921         message for platforms that don't support AOT compilation.
6922
6923 Mon Jul 23 10:29:29 CEST 2007 Paolo Molaro <lupus@ximian.com>
6924
6925         * mini.h, mini.c, driver.c: temporary smcs hack.
6926
6927 Mon Jul 23 09:29:34 CEST 2007 Paolo Molaro <lupus@ximian.com>
6928
6929         * mini-arm.h, mini-arm.c: arm EABI fixes.
6930
6931 2007-07-22  Zoltan Varga  <vargaz@gmail.com>
6932
6933         * exceptions-x86.c (mono_arch_find_jit_info): Handle the lmf->method == NULL
6934         case.
6935
6936         * tramp-x86.c (mono_arch_create_trampoline_code): Only set lmf->method for
6937         trampolines taking a method argument.
6938
6939         * mini-x86.h (MonoLMF): Add an 'esp' field plus comments.
6940
6941         * mini-x86.c (mono_arch_emit_prolog): Update after changes to the LMF structure.
6942         * tramp-x86.c (mono_arch_create_trampoline_code): Ditto.
6943
6944         * exceptions-x86.c (mono_arch_get_jit_info): Properly clean up the stack after
6945         JIT compilation throws an exception. Fixes #82050.
6946
6947 2007-07-19  Mark Probst  <mark.probst@gmail.com>
6948
6949         * mini.c: Removed the MonoLoaderErrorKind enum and replaced it
6950         with the MONO_EXCEPTION_ defines.
6951
6952 2007-07-17  Zoltan Varga  <vargaz@gmail.com>
6953
6954         * mini-amd64.c (mono_arch_find_imt_method): Handle mov reg,IMM64 case. Fixes
6955         #82117.
6956         
6957         * mini-amd64.c (mono_arch_find_imt_method): Add some debug code to help find out
6958         the cause of an assertion.
6959
6960 Mon Jul 16 19:31:21 CEST 2007 Paolo Molaro <lupus@ximian.com>
6961
6962         * mini.c, jit-icalls.c: mono_get_inflated_method() is obsolete,
6963         removed.
6964
6965 2007-07-15  Zoltan Varga  <vargaz@gmail.com>
6966
6967         * mini-amd64.c (mono_arch_build_imt_thunk): Remove the non-32bit MonoMethod
6968         assert. Should fix #82103.
6969
6970 2007-07-14  Zoltan Varga  <vargaz@gmail.com>
6971
6972         * mini-exceptions.c (mono_jit_walk_stack_from_ctx): Use MONO_CONTEXT_GET_SP ()
6973         here too. Fixes #82095.
6974
6975         * mini-amd64.c (mono_arch_build_imt_thunk): Add support for non-32bit MonoMethod
6976         addresses.
6977
6978         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a couple asserts.
6979
6980         * mini-amd64.h: Enable IMT for amd64.
6981         
6982         * mini-amd64.c (mono_arch_build_imt_thunk): Optimize IMT thunk size.
6983
6984 2007-07-12  Zoltan Varga  <vargaz@gmail.com>
6985
6986         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for IMT call sequences.
6987
6988 2007-07-12  Mark Probst  <mark.probst@gmail.com>
6989
6990         * mini.c (check_linkdemand, mono_method_to_ir): Abort compilation
6991         as soon as check_linkdemand sets an exception_type.
6992
6993 Thu Jul 12 12:18:22 CEST 2007 Paolo Molaro <lupus@ximian.com>
6994
6995         * mini-x86.c: fixed offsets for IMT call sequence.
6996         * mini-x86.h: enable IMT again.
6997
6998 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
6999
7000         * trace.c (mono_trace_enter_method): Decode MonoType too.
7001
7002         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Handle signed displacements too.
7003
7004         * mini.h mini-x86.h mini-trampolines.c: Change the signature of mono_arch_find_imt_method () to pass the calling code address too.
7005
7006         * mini-amd64.c: Add preliminary IMT implementation.
7007         
7008 Wed Jul 11 18:21:30 CEST 2007 Paolo Molaro <lupus@ximian.com>
7009
7010         * mini-x86.c: adjusted mono_arch_get_vcall_slot_addr () to
7011         understand the new IMT-base interface invocation (thanks to
7012         Daniel Nauck for the report and the remote debugging session).
7013
7014 Wed Jul 11 14:54:39 CEST 2007 Paolo Molaro <lupus@ximian.com>
7015
7016         * mini-x86.c: size and speed optimizations for the IMT bsearch.
7017
7018 2007-07-11  Zoltan Varga  <vargaz@gmail.com>
7019
7020         * Makefile.am (aotcheck): Make this actually use the AOTed code.
7021
7022 Wed Jul 11 12:41:32 CEST 2007 Paolo Molaro <lupus@ximian.com>
7023
7024         * mini-trampolines.c: implement AOT IMT support.
7025         * mini-x86.h: enable IMT support for wider testing.
7026
7027 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
7028
7029         * inssel.brg (emit_imt_argument): Add aot support here.
7030
7031         * aot-runtime.c (decode_patch_info): Fix reading of MONO_PATCH_INFO_METHOD.
7032
7033 Tue Jul 10 17:50:58 CEST 2007 Paolo Molaro <lupus@ximian.com>
7034
7035         * mini-x86.c, mini-x86.h, tramp-x86.c: x86 arch-specific changes
7036         of the IMT implementation, partially from massi, with my
7037         implementation of the bsearch sequence. Disabled by default until
7038         the AOT code is implemented.
7039
7040 2007-07-10  Zoltan Varga  <vargaz@gmail.com>
7041
7042         * cpu-x86.md: The source argument of sext_i1/i2 must by a byte reg.
7043
7044         * inssel-x86.brg: Add reg:ldind.i1(regvar) rules. Fixes #82056.
7045
7046 Tue Jul 10 17:33:12 CEST 2007 Paolo Molaro <lupus@ximian.com>
7047
7048         * inssel.brg, mini.c, mini.h, mini-trampolines.c:
7049         arch-independent IMT JIT code from Massimiliano
7050         Mantione (massi@ximian.com) with small cleanups from me.
7051
7052 Tue Jul 10 13:07:24 CEST 2007 Paolo Molaro <lupus@ximian.com>
7053
7054         * Makefile.am: fix svn invocation to get the svn revision to be
7055         independent of the local language (build fix).
7056
7057 2007-07-09  Mark Probst  <mark.probst@gmail.com>
7058
7059         * mini.c (inline_method): Reset cfg->exception_type if the
7060         inlining is aborted.  Fixes: 82049.
7061
7062 Mon Jul 9 17:26:47 CEST 2007 Paolo Molaro <lupus@ximian.com>
7063
7064         * mini.c: remove assert from exception handling code when exception_ptr
7065         is not set.
7066
7067 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
7068
7069         * mini.c (mono_codegen): Add an assert.
7070
7071         * mini-x86.c (mono_arch_emit_prolog): Allocate space for the profiler method 
7072         enter and leave code.
7073         * mini-amd64.c (mono_arch_emit_prolog): Likewise.
7074
7075 Thu Jul 5 20:12:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7076
7077         * mini-ppc.c: fixed memory corruption for localloc(0)
7078         (bug #81852).
7079
7080 2007-07-05  Zoltan Varga  <vargaz@gmail.com>
7081         
7082         * mini.c: Fix warnings.
7083
7084 Wed Jul 4 15:30:36 CEST 2007 Paolo Molaro <lupus@ximian.com>
7085
7086         * optflags-def.h, mini-x86.c: added sse2 optimization flag and use it
7087         to emit better double->int conversions.
7088
7089 Tue Jul 3 19:42:16 CEST 2007 Paolo Molaro <lupus@ximian.com>
7090
7091         * mini.c: the provided Min/Max optimizations are valid for unisgned
7092         ints.
7093
7094 2007-07-03  Rodrigo Kumpera  <rkumpera@novell.com>
7095
7096         * 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
7097
7098 2007-06-28  Miguel de Icaza  <miguel@novell.com>
7099
7100         * mini.c (mono_running_on_valgrind): Add support for reporting the
7101         method and  its boundaries to valgrind.
7102
7103 2007-06-28  Martin Baulig  <martin@ximian.com>
7104
7105         * debug-debugger.h (MonoDebuggerInfo): Added `debugger_version'.
7106
7107 2007-06-25  Zoltan Varga  <vargaz@gmail.com>
7108
7109         * ssa.c (visit_inst): Add support for OP_BR. Fixes #81946.
7110
7111         * generic.2.cs: Add new test case.
7112
7113 2007-06-25  Martin Baulig  <martin@ximian.com>
7114
7115         Merged the `debugger-dublin' branch.
7116
7117         * debug-mini.c
7118         (mono_debugger_insert_method_breakpoint): New public method.
7119         (mono_debugger_remove_method_breakpoint): Likewise.
7120         (mono_debugger_check_breakpoints): New static method.
7121         (mono_debug_close_method): Call mono_debugger_check_breakpoints().
7122
7123         * debug-debugger.h (MonoDebuggerInfo):
7124         Renamed (to keep backward compatibility in the vtable):
7125         `insert_breakpoint' -> `old_insert_breakpoint'.
7126         `remove_breakpoint' -> `old_remove_breakpoint'.
7127         `create_string' -> `old_create_string'.
7128         `lookup_class' -> `old_lookup_class'.
7129         `lookup_type' -> removed; changed into a dummy field.
7130         `lookup_assembly' -> `old_lookup_assembly'.
7131         Added (same functionality, but different signature):
7132         `create_string', `lookup_class', `lookup_assembly'
7133         Added new:
7134         `get_method_addr_or_bpt', `remove_method_breakpoint',
7135         `runtime_class_init'.
7136
7137         * debug-debugger.c: Merged the `debugger-dublin' branch.
7138
7139 2007-06-23  Zoltan Varga  <vargaz@gmail.com>
7140
7141         * mini-amd64.c (peephole_pass_1): Optimize away moves at the beginning of the bb as
7142         well.
7143         (peephole_pass): Likewise.
7144
7145 Fri Jun 22 09:17:08 CEST 2007 Paolo Molaro <lupus@ximian.com>
7146
7147         * driver.c: hopefully make setaffinity work also for ancient
7148         versions of linux.
7149
7150 2007-06-22  Atsushi Enomoto  <atsushi@ximian.com>
7151
7152         * driver.c : win32 build fix.
7153
7154 Thu Jun 21 19:24:03 CEST 2007 Paolo Molaro <lupus@ximian.com>
7155
7156         * driver.c: check for the MONO_NO_SMP env var and bind to a single
7157         processor if it is set.
7158
7159 2007-06-21  Martin Baulig  <martin@ximian.com>
7160
7161         * debug-mini.h: New file.
7162
7163         * debug-mini.c
7164         (mono_debugger_insert_breakpoint_full): Moved here from
7165         ../metadata/mono-debug-debugger.c.
7166         (mono_debugger_remove_breakpoint): Likewise.
7167         (mono_debugger_breakpoint_callback): Likewise.
7168
7169 2007-06-15  Raja R Harinath  <rharinath@novell.com>
7170
7171         * jit-icalls.c (mono_helper_compile_generic_method): Update to
7172         changes in MonoGenericClass.
7173
7174 2007-06-14  Zoltan Varga  <vargaz@gmail.com>
7175
7176         * mini-codegen.c (mono_opcode_to_type): Fix ia64 build.
7177
7178 2007-06-14  Raja R Harinath  <rharinath@novell.com>
7179
7180         * jit-icalls.c (mono_helper_compile_generic_method): Update to
7181         removal of MonoGenericMethod.
7182
7183 Thu Jun 14 12:42:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7184
7185         * mini-exceptions.c: hooks for the exception events profiling API.
7186
7187 2007-06-14  Randolph Chung  <tausq@debian.org>
7188
7189         * Makefile.ma: Add hppa target.
7190         * mini-arch.h: Include mini-hppa.h
7191         * cpu-hppa.md, exceptions-hppa.c, inssel-hppa.brg, mini-hppa.c,
7192         mini-hppa.h, tramp-hppa.c: New files for 32-bit HPPA port.
7193         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7194
7195 2007-06-14  Randolph Chung  <tausq@debian.org>
7196
7197         * inssel.brg: Add rules for "chained" compare-branch operations so that
7198         a single compare op can affect multiple branches.  Adjust cost for
7199         OP_CEQ/OP_CGT/OP_CGT_UN/OP_CLT/OP_CLT_UN.
7200         * inssel-long32.brg: Update rules to use compare-branch macros.  Adjust
7201         cost for some rules so that they can more easily be overridden by
7202         per-arch rules (with fixes from lupus).
7203         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7204
7205 2007-06-13  Randolph Chung  <tausq@debian.org>
7206
7207         * mini-ops.h: Reorder branch ops so that they match the order of the
7208         corresponding CEE_* ops.  The code expects them this way.
7209         Add new ops for HPPA target.
7210         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7211
7212 2007-06-13  Randolph Chung  <tausq@debian.org>
7213
7214         * mini-exceptions.c: Handle cases where the stack grows towards
7215         larger addresses.
7216         Contributed under the X11 license (http://bugzilla.ximian.com/show_bug.cgi?id=81866).
7217
7218 Wed Jun 13 19:13:23 CEST 2007 Paolo Molaro <lupus@ximian.com>
7219
7220         * jit-icalls.c, mini.h, mini.c: added virtual generic invoke
7221         counter.
7222         * driver.c: explain where a non-matching corlib is found.
7223
7224 2007-06-13  Mark Probst  <mark.probst@gmail.com>
7225
7226         * mini.c (print_jit_stats): Output dynamic code allocation stats.
7227
7228 2007-06-10  Sanghyeon Seo <sanxiyn@gmail.com>
7229
7230         * mini-exceptions.c: Generate a method profile leave event during
7231         an exception to ensure that the profiler gets notified.
7232
7233 2007-06-07  Zoltan Varga  <vargaz@gmail.com>
7234
7235         * mini-amd64.c (peephole_pass): Merge some small changes from the linear-ir 
7236         branch.
7237
7238         * cpu-amd64.md: Add long_and/or/xor opcodes.
7239
7240 2007-06-06  Wade Berrier  <wberrier@novell.com>
7241
7242         * cpu-s390x.md (shr_imm): Correct the length of shr_imm instruction.
7243         (./class/lib/monolite/mcs.exe:25498): WARNING **: wrong maximal instruction 
7244         length of instruction shr_imm (expected 8, got 10)
7245
7246 2007-06-06  Zoltan Varga  <vargaz@gmail.com>
7247
7248         * mini-ia64.c (mono_arch_output_basic_block): Really fix the build.
7249
7250 2007-06-06  Mark Probst  <mark.probst@gmail.com>
7251
7252         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
7253         MonoInternalHashTable again (fixed bug in the internal hash table
7254         code).
7255
7256 2007-06-06  Mark Probst  <mark.probst@gmail.com>
7257
7258         * mini.c, driver.c: Reverted the MonoInternalHashTable changes.
7259         Have to figure out what makes it crash the SWF regression.
7260
7261 2007-06-05  Zoltan Varga  <vargaz@gmail.com>
7262
7263         * mini-ia64.c (mono_arch_lowering_pass): Fix ia64 build.
7264
7265 Tue Jun 5 17:40:04 CEST 2007 Paolo Molaro <lupus@ximian.com>
7266
7267         * mini.c: optimize out the type check when storing null in a
7268         reference array.
7269
7270 2007-06-04  Mark Probst  <mark.probst@gmail.com>
7271
7272         * mini.c, driver.c: Changed MonoDomain.jit_code_hash to a
7273         MonoInternalHashTable.
7274
7275 Mon Jun 4 11:29:43 CEST 2007 Paolo Molaro <lupus@ximian.com>
7276
7277         * inssel.brg, mini.c, mini-ops.h: optimized Math.Mini/Max
7278         signed integer methods.
7279
7280 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
7281
7282         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case 
7283         permanently since the current approach doesn't work.
7284
7285 2007-06-02  Zoltan Varga  <vargaz@gmail.com>
7286
7287         * inssel.brg (stmt): Only call delegate->invoke_impl if 
7288         MONO_ARCH_HAVE_CREATE_DELEGATE_TRAMPOLINE is defined.
7289
7290 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
7291
7292         * mini-amd64.c (mono_arch_output_basic_block): Unify div/rem opcodes and handle
7293         the sreg2==rdx case.
7294         
7295         * mini-amd64.c cpu-amd64.md: Correct length of r4const instruction and take into
7296         account if it contains a rex prefix.
7297         (peephole_pass): Handle OP_FMOVE as well.
7298
7299 2007-06-01  Zoltan Varga  <vargaz@gmail.com>
7300
7301         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Disable the static case for now
7302         as it causes regressions.
7303
7304 2007-05-31  Zoltan Varga  <vargaz@gmail.com>
7305
7306         * mini-x86.c (mono_arch_get_delegate_invoke_impl): Implement support for the
7307         static case as well.
7308
7309         * tramp-ia64.c (mono_arch_create_trampoline_code): Fix ia64 build.
7310
7311         * mini-x86.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7312         (mono_arch_get_this_arg_from_call): Ditto.
7313
7314         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Removed.
7315
7316         * inssel.brg (mini_emit_virtual_call): Call delegate->Invoke through the delegate's
7317         invoke_impl field.
7318
7319         * mini-amd64.c (mono_arch_get_delegate_invoke_impl): New arch dependent function.
7320         (mono_arch_get_this_arg_from_call): Ditto.
7321
7322         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Removed.
7323         
7324         * mini-trampolines.c (mono_delegate_trampoline): Complete rewrite. On first call,
7325         try to create optimized invoke code and use that for further invocations. 
7326         Otherwise, use the original mono_marshal_get_delegate_invoke () implementation.
7327
7328         * mini-x86.h mini-ia64.h: Remove MONO_ARCH_HAS_CREATE_DELEGATE_TRAMPOLINE for now.
7329
7330 2007-05-29  Rodrigo Kumpera  <kumpera@gmail.com>
7331
7332         * inssel.brg (mini_emit_virtual_call): Statically dispatch virtual calls to
7333         sealed classes or methods.
7334         *devirtualization.cs: tests for the new optimization
7335
7336 2007-05-29  Zoltan Varga  <vargaz@gmail.com>
7337
7338         * liveness.c (update_gen_kill_set): No need to set VOLATILE flags here, it is done
7339         by the update_volatile () function.
7340
7341 2007-05-27  Zoltan Varga  <vargaz@gmail.com>
7342
7343         * driver.c (mono_main): Call g_thread_init () early since newer glib versions
7344         require it.
7345
7346         * abcremoval.c (mono_perform_abc_removal): Avoid using alloca.
7347
7348 2007-05-24  Jonathan Chambers  <joncham@gmail.com>
7349
7350         * mini.c: Add configure checks for header files.
7351         * mini-x86.c: Add configure checks for header files.
7352         * trace.c: Add configure checks for header files.
7353         * aot-runtime.c: Add configure checks for header files.
7354         * aot-compiler.c: Add configure checks for header files.
7355         * driver.c: Add configure checks for header files.
7356         * mini-codegen.c: Add configure checks for header files.
7357         
7358         Code is contributed under MIT/X11 license.
7359
7360 2007-05-22  Zoltan Varga  <vargaz@gmail.com>
7361
7362         * mini-ia64.c (mono_arch_lowering_pass): Fix the handling of
7363         icompare_imm -128 + op_iclt. Fixes #81703.
7364
7365 2007-05-19  Zoltan Varga  <vargaz@gmail.com>
7366
7367         * mini-codegen.c (mono_local_regalloc): Fix long-shift-regalloc on amd64.
7368
7369 2007-05-15  Massimiliano Mantione  <massi@ximian.com>
7370
7371         * inssel.brg: added "mini_emit_load_intf_bit_reg_vtable", and used it
7372         inside "mini_emit_isninst_iface_cast" and "mini_emit_castclass_iface"
7373         so that all isinst checks now use "interface_bitmap".
7374
7375 2007-05-15  Zoltan Varga  <vargaz@gmail.com>
7376
7377         * cpu-amd64.md (jmp): Fix a warning.
7378
7379         * inssel.brg (CEE_SWITCH): Hopefully fix #80738.
7380
7381         * basic.cs: Add new regression test.
7382
7383         * basic.cs: Remove test which is now in basic-long.cs.
7384
7385         * mini-ia64.c (mono_arch_output_basic_block): Sign extend in CEE_CONV_I8/CEE_CONV_I.
7386
7387         * basic-long.cs: Add new test.
7388         
7389 2007-05-13  Zoltan Varga  <vargaz@gmail.com>
7390
7391         * mini-sparc.c (mono_spillvar_offset_float): Fix sparc build.
7392
7393 2007-05-12  Zoltan Varga  <vargaz@gmail.com>
7394
7395         * cpu-x86.md minix-86.c: Add a peephole_pass_1 () as on amd64.
7396
7397         * mini-x86.c (mono_arch_output_basic_block): Use mono_opcode_to_cond () in a few
7398         places.
7399         
7400         * mini-x86.c (mono_arch_emit_exceptions): Decrease the size of the exception 
7401         throwing code a bit.
7402
7403         * exceptions-x86.c (mono_arch_get_throw_corlib_exception): Decrease the size of 
7404         the exception throwing code a bit.
7405
7406         * mini-x86.c (get_call_info): Allocate result from a mempool.
7407
7408 2007-05-11  Zoltan Varga  <vargaz@gmail.com>
7409
7410         * aot-compiler.c (find_typespec_for_class): Fix the assert.
7411
7412         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
7413
7414         * mini.h (MonoCompile): Add 'token_info_hash' field.
7415
7416         * mini.c: Save token->method associations during compilation so the AOT 
7417         compiler can use it.
7418         
7419         * aot-compiler.c aot-runtime.c: Add support for compiling non-generic methods
7420         which reference generic classes and methods.
7421
7422 2007-05-10  Zoltan Varga  <vargaz@gmail.com>
7423
7424         * mini.h mini-<ARCH>.h: Get rid of MONO_ARCH_HAS_XP_LOCAL_REGALLOC.
7425
7426         * aot-compiler.c (compile_method): Fix a typo in a comment.
7427
7428         * aot-runtime.c (decode_cached_class_info): Skip generic types.
7429
7430         * aot-compiler.c: Add minimal support for AOTing generic code by skipping 
7431         everything generic.
7432
7433         * mini.c (mono_method_to_ir): Disable AOT when calling helper_compile_generic_method.
7434
7435 2007-05-09  Zoltan Varga  <vargaz@gmail.com>
7436
7437         * mini.h (MonoCompile): Add 'args' field.
7438
7439         * mini.c (mono_compile_create_vars): Store variables representing the arguments
7440         into cfg->args.
7441
7442         * mini-<ARCH>.c: Use cfg->args for accessing the method arguments.
7443
7444 2007-05-08  Zoltan Varga  <vargaz@gmail.com>
7445
7446         * mini.c (mono_compile_get_interface_var): Remove this unused function.
7447
7448         * mini-ops.h inssel.brg mini-<ARCH>.c: Add a new opcode for ckfinite as well.
7449
7450         * mini-ops.h: Introduce new opcodes used in the IR instead of the original CEE_
7451         opcodes for some opcodes.
7452
7453         * mini.h *.brg *.c: Use the new opcodes.
7454
7455 2007-05-08  Massimiliano Mantione  <massi@ximian.com>
7456
7457         * mini.h: Bumped aot revision.
7458
7459         * inssel.brg: modified code generation of type checks for interfaces
7460         to use the new "MonoClass.interface_bitmap" instead of the old
7461         "MonoClass.interface_offsets".
7462
7463 2007-04-30  Zoltan Varga  <vargaz@gmail.com>
7464
7465         * cpu-amd64.md (jmp): Increase the maximum size of the jmp opcode to 128.
7466
7467 2007-04-29  Zoltan Varga  <vargaz@gmail.com>
7468
7469         * abcremoval.c (summarize_integer_value): Handle OP_LCONV_TO_I4 to fix abcrem on
7470         64 bit platforms.
7471
7472 2007-04-27  Neale Ferguson <neale@sinenomine.net>
7473
7474         * mini-s390x.c: Fix MONO_TYPE_VALUETYPE processing.
7475
7476 2007-04-27  Wade Berrier  <wberrier@novell.com>
7477
7478         * mini-s390x.c: Remove redeclaration of CompRelation and CompType (defined in 
7479         mini.h) to fix build.
7480
7481 2007-04-26  Zoltan Varga  <vargaz@gmail.com>
7482
7483         * mini-amd64.c (peephole_pass_1): Fix and reenable this pass.
7484         
7485         * mini-amd64.c (mono_arch_local_regalloc): Disable the new peephole_pass_1 as it
7486         causes the corlib unit tests to fail.
7487
7488 2007-04-25  Zoltan Varga  <vargaz@gmail.com>
7489
7490         * mini-codegen.c (mono_opcode_to_type): Fix a bug in the previous patch.
7491
7492         * mini-amd64.c (peephole_pass_1): New pass to perform before local regalloc.
7493
7494         * mini-codegen.c (mono_opcode_to_cond): New helper function to convert conditional 
7495         opcodes to the comparison relations.
7496
7497         * mini-codegen.c (mono_opcode_to_type): New helper function to convert conditional 
7498         opcodes to their types.
7499         
7500         * mini-ia64.c mini-amd64.c: Use mono_opcode_to_cond and mono_opcode_to_type.
7501
7502         * mini-amd64.c (get_call_info): Allocate the result from the cfg mempool and cache 
7503         it in cfg->arch.cinfo.
7504
7505         * local-propagation.c (mono_local_cprop_bb): Fix a warning.
7506
7507         * mini.h mini.c branch-opts.c: Change bbhash to be an array and store it in 
7508         cfg->cil_offset_to_bb.
7509
7510 2007-04-24  Zoltan Varga  <vargaz@gmail.com>
7511
7512         * liveness.c (optimize_initlocals): New mini-pass to optimize away dead assignments
7513         created becase of initlocals.
7514
7515 2007-04-23  Zoltan Varga  <vargaz@gmail.com>
7516
7517         * mini-alpha.c cpu-alpha.md: More alpha port work from 
7518         Sergey Tikhonov <tsv@solvo.ru>.
7519
7520 2007-04-21  Andreas Faerber  <andreas.faerber@web.de>
7521
7522         * Makefile.am (BUILT_SOURCES): Fix for automake 1.6.x. Fixes #81417.
7523
7524 2007-04-19  Zoltan Varga  <vargaz@gmail.com>
7525
7526         * cpu-s390.md (break): Correct the length of break instruction.
7527
7528 Thu Apr 19 16:28:52 CEST 2007 Paolo Molaro <lupus@ximian.com>
7529
7530         * mini.c: fix a couple of soft-float issues and comments.
7531
7532 2007-04-15  Miguel de Icaza  <miguel@novell.com>
7533
7534         * trace.c (is_filenamechar): - is also a filename char.
7535
7536 2007-04-15  Neale Ferguson <neale@sinenomine.net>
7537
7538         * mini-s390.c: Correct checking for enum type in return value processing.
7539
7540 2007-04-14  Raja R Harinath  <rharinath@novell.com>
7541
7542         * Makefile.am (BUILT_SOURCES): Add 'version.h'.
7543         (version.h): Makefile is in the build directory.
7544
7545 2007-04-06  Andreas Faerber  <andreas.faerber@web.de>
7546
7547         * mini-amd64.h: fix for assertion failure on Solaris/amd64
7548
7549 2007-04-11  Martin Baulig  <martin@ximian.com>
7550
7551         * mini.c (can_access_member): Fix handling of generic classes;
7552         fixes #81259.
7553
7554 2007-04-10  Zoltan Varga  <vargaz@gmail.com>
7555
7556         * aot-runtime.c (mono_aot_plt_resolve): Fix disabling of AOT. Fixes #81316.
7557
7558 2007-04-05  Zoltan Varga  <vargaz@gmail.com>
7559
7560         * aot-runtime.c: Fix disabling of AOT. Fixes #81316.
7561
7562 Fri Mar 23 20:25:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7563
7564         * mini-codegen.c: make sure the right spill amount is
7565         used for fp or integer registers (fixes the float_sub_spill() on ppc).
7566
7567 Fri Mar 23 19:43:35 CET 2007 Paolo Molaro <lupus@ximian.com>
7568
7569         * mini-ppc.c: fixes for the fp_branch_nan test.
7570
7571 2007-03-23  Zoltan Varga  <vargaz@gmail.com>
7572
7573         * basic.cs: Comment out new test which still fails on ia64.
7574
7575 Fri Mar 23 15:54:23 CET 2007 Paolo Molaro <lupus@ximian.com>
7576
7577         * mini.c: immediate shifted or fix (mono_metadata_user_string assert).
7578
7579 Fri Mar 23 12:53:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7580
7581         * mini-ppc.c, mini-ppc.h: struct passing ABI fix (bug #77968).
7582
7583 2007-03-22  Zoltan Varga  <vargaz@gmail.com>
7584
7585         * cfold.c (FOLD_BINOP): Cast the result to gint32 to prevent overflow problems
7586         on 64 bit machines. Fixes part of #80738.
7587
7588         * basic.cs: Add regression test.
7589
7590 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7591
7592         * inssel.brg basic.cs: Revert previous change to fix build.
7593
7594         * inssel.brg (SWITCH): Clean out the upper word of the switch value on 64 bit
7595         platforms.
7596         
7597         * inssel.brg (SWITCH): Use an integer comparison. Fixes #80738.
7598
7599         * basic.cs: Add new regression test.
7600
7601 2007-03-17  Zoltan Varga  <vargaz@gmail.com>
7602
7603         * mini-ia64.c (mono_arch_emit_prolog): Fix an assert when a function has too
7604         many arguments.
7605
7606 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7607
7608         * cpu-s390x.md: Correct length of break instruction.
7609
7610 2007-03-16  Neale Ferguson <neale@sinenomine.net>
7611
7612         * mini-s390x.c, cpu-s390x.md: Fix #80507 for s390x.
7613         * mini-s390.c, cpu-s390.md: Fix #80507 for s390.
7614
7615 2007-03-15  Jonathan Chambers  <joncham@gmail.com>
7616
7617         * *.c: Begin WIN64 port.
7618         * mini.c:  Use correct register in profiler.
7619         * mini-amd64.c: No inline assembly on Win64.
7620         * mini-amd64.h: Implement MONO_INIT_CONTEXT_FROM_FUNC for Win64.
7621         Only define MONO_ARCH_USE_SIGACTION on non-windows platforms.
7622         * exceptions-amd64.c: Only need gregs_from_ucontext if MONO_ARCH_USE_SIGACTION
7623         is defined. Implement mono_arch_sigctx_to_monoctx, mono_arch_monoctx_to_sigctx, and
7624         mono_arch_ip_from_context for Win64.
7625         
7626         Contributed under MIT/X11 license.
7627
7628 2007-03-15  Zoltan Varga  <vargaz@gmail.com>
7629
7630         * exceptions-amd64.c (seh_handler): Ditto.
7631
7632         * exceptions-x86.c (seh_handler): Fix a memory leak.
7633
7634 Thu Mar 15 13:47:59 CET 2007 Paolo Molaro <lupus@ximian.com>
7635
7636         * mini-arm.c, mini-mips.c, mini-ppc.c, mini-s390.c,
7637         mini-s390x.c: fixed peephole optimizations to deal
7638         correctly with 1 and 2 byte reload avoidance.
7639
7640 Thu Mar 15 10:17:54 CET 2007 Paolo Molaro <lupus@ximian.com>
7641
7642         * cpu-s390.md, cpu-s390x.md: update localloc length.
7643
7644 Wed Mar 14 21:00:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7645
7646         * cpu-g4.md: added missing descriptions.
7647
7648 2007-03-14  Miguel de Icaza  <miguel@novell.com>
7649
7650         *  Makefile.am: Add support so the tail tests are not executed on
7651         PowerPC as that is a known limitation of the PowerPC port.
7652
7653 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7654
7655         * runmdesc.bat:  Move to msvc directory.
7656         
7657 2007-03-13  Jonathan Chambers  <joncham@gmail.com>
7658
7659         * runmdesc.bat:  Run executable that was produced by the current
7660         target and sent via an argument.
7661         
7662 2007-03-11  Zoltan Varga  <vargaz@gmail.com>
7663
7664         * mini.c (mono_method_to_ir): Fix box+brtrue optimization. Fixes
7665         #81102.
7666
7667         * generics.2.cs: Add regression test.
7668
7669 2007-03-09  Wade berrier  <wberrier@novell.com>
7670
7671         * mini-ppc.h: Undo typo of MONO_CONTEXT_SET_SP (ppc doesn't define this symbol)
7672
7673 2007-03-09  Zoltan Varga  <vargaz@gmail.com>
7674
7675         * aot-runtime.c (load_aot_module): Load all dependent assemblies eagerly since all
7676         AOT code depends on this.
7677
7678 Thu Mar 8 19:36:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7679
7680         * mini.c: more precise tracking of types in the eval stack
7681         (part of fix for bug #81044).
7682
7683 2007-03-07  Zoltan Varga  <vargaz@gmail.com>
7684
7685         * aot-runtime.c (mono_aot_get_class_from_name): Add a cache.
7686
7687         * aot-compiler.c (encode_patch): Remove an obsolete comment.
7688
7689 2007-03-06  Zoltan Varga  <vargaz@gmail.com>
7690
7691         * mini-exceptions.c (mono_handle_native_sigsegv): Fix a warning.
7692
7693         * mini.c (mono_method_to_ir): Add a workaround for bug #80733.
7694
7695 2007-02-22  Zoltan Varga  <vargaz@gmail.com>
7696
7697         * mini.c (type_from_op): Convert CEE_CONV_U to OP_LCONV_TO_U when the argument is
7698         a pointer on 64 bit systems. Fixes #80190.
7699
7700         * iltests.il: Add new regression test.
7701
7702 Tue Feb 20 11:33:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7703
7704         * mini.c: inline a constant for Environment.IsRunningOnWindows.
7705
7706 2007-02-19  Geoff Norton  <gnorton@customerdna.com>
7707
7708         * trace.c: Remove an erroneous alignemnt check when tracing.
7709           Fixes --trace on OSX86.
7710
7711 Wed Feb 14 19:45:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7712
7713         * mini-$(arch).h: initialize SP in context for all the archs.
7714
7715 2007-02-14  Sebastien Pouliot  <sebastien@ximian.com>
7716
7717         * mini-x86.h: Initialize SP in MONO_INIT_CONTEXT_FROM_FUNC. Fix CAS
7718         regressions in the thread tests.
7719
7720 2007-02-14  Zoltan Varga  <vargaz@gmail.com>
7721
7722         * *-alpha.*: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>:
7723         - fixed implementation of LOCALLOC opcode
7724         - implemented non-un compare for floats
7725         - code cleanup
7726         - implementation of FDIV and CKFINITE opcodes
7727         - fixes for latest mono updates
7728         - additional arch opcodes
7729
7730 Mon Feb 12 11:54:16 CET 2007 Paolo Molaro <lupus@ximian.com>
7731
7732         * Makefile.am: simplify and merge rules for cross-compilation.
7733
7734 2007-02-07  Massimiliano Mantione  <massi@ximian.com>
7735
7736         * local-propagation.c: Actually *apply* the fix for bug 80591...
7737
7738 Tue Feb 6 19:03:19 CET 2007 Paolo Molaro <lupus@ximian.com>
7739
7740         * mini-exceptions.c: backuot part of the last change
7741         (fixes cas tests on amd64 related to GetExecutingAssembly ()).
7742
7743 2007-02-06  Massimiliano Mantione  <massi@ximian.com>
7744         * inssel.brg: Fix bug 59286.
7745
7746
7747 Tue Feb 6 12:23:50 CET 2007 Paolo Molaro <lupus@ximian.com>
7748
7749         * mini-exceptions.c: patch from Zoltan to correctly check for
7750         stack boundaries (using the stack register, not the frame register),
7751         fixes bugs #80724, #79717.
7752
7753 2007-02-03  Zoltan Varga  <vargaz@gmail.com>
7754
7755         * mini-ia64.c inssel-sparc.brg mini-sparc.c cpu-sparc.md: Get rid of OP_SETREG/
7756         OP_SETREGIMM, use OP_MOVE/OP_ICONST instead.
7757
7758         * mini-amd64.c (mono_arch_output_basic_block): Fix ATOMIC_EXCHANGE in the
7759         presence of frame pointer elimination.
7760
7761 2007-02-01  Geoff Norton  <gnorton@customerdna.com>
7762         
7763         * mini-x86.h: NetBSD UCONTEX_REG defines.
7764
7765 2007-02-01  Zoltan Varga  <vargaz@gmail.com>
7766
7767         * inssel-amd64.brg: Fix amd64 build.
7768
7769 Thu Feb 1 14:02:09 CET 2007 Paolo Molaro <lupus@ximian.com>
7770
7771         * mini.h: remove extern to workaround what looks likes gcc bug 26905
7772         on amd64.
7773
7774 2007-01-31  Zoltan Varga  <vargaz@gmail.com>
7775
7776         * mini-codegen.c (mono_is_regsize_var): New helper function usable by the back
7777         ends.
7778
7779         * mini-<ARCH>.c: Use mono_is_regsize_var ().
7780
7781 2007-01-30 Mark Mason <mason@broadcom.com>
7782
7783            * exceptions-mips.c: Lots of exception handling fixes, LMFs now work, some cleanups.
7784            * mini-mips.h: Add LMF magic numbers, and fix context set/get macros.
7785            * mini-mips.c: Cleanups, LMF handling now works, optimize store of zero, implement localloc
7786            beginning support for CEE_JMP [not quite working yet]
7787            * tramp-mips.c: LMF handling now works
7788         
7789 2007-01-30  Zoltan Varga  <vargaz@gmail.com>
7790
7791         * mini-amd64.c (peephole_pass): Optimize code common in initlocals blocks.
7792
7793         * mini.h (NULLIFY_INS): New macro.
7794
7795 Tue Jan 30 16:33:33 CET 2007 Paolo Molaro <lupus@ximian.com>
7796
7797         * mini.c: statistical profiler fix for windows, patch
7798         from Tor Lillqvist (tml@novell.com).
7799
7800 2007-01-30  Massimiliano Mantione  <massi@ximian.com>
7801         * local-propagation.c: Fix bug 80591.
7802
7803 Mon Jan 29 12:14:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7804
7805         * Makefile.am: put back the --export-dynamic option as with
7806         the previous gmodule flags (thanks to Robert Jordan).
7807
7808 2007-01-28  Zoltan Varga  <vargaz@gmail.com>
7809
7810         * mini-sparc.c (peephole_pass): Fix #80622 for sparc as well.
7811
7812         mini.h *.c: Allocate fp vregs from the same pool as the int vregs. Use this to
7813         simplify and speed up the local register allocator. Also rename some fields
7814         like iassign->vassign.
7815         
7816         * regalloc.c: Remove some functions which are no longer used since their
7817         inlined version is in mini-codegen.c.
7818         
7819         * mini-codegen.c: Rename mono_regstate2_ functions to mono_regstate_.
7820
7821         * basic.cs objects.cs iltests.il: Merge tests from the linear IL branch.
7822
7823 2007-01-27  Zoltan Varga  <vargaz@gmail.com>
7824
7825         * mini-amd64.c (peephole_pass): Remove optimizations which omit a 
7826         narrowing. Fixes #80622.
7827
7828         * iltests.il: Add new regresssion test. 
7829
7830 Fri Jan 26 18:31:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7831
7832         * mini.h, mini-trampolines.c, aliasing.c, mini-codegen.c,
7833         debug-debugger.c, debug-debugger.h: warning fixes.
7834         * driver.c: updated copyright year and made it fit in one line.
7835
7836 Fri Jan 26 12:48:39 CET 2007 Paolo Molaro <lupus@ximian.com>
7837
7838         * aot-runtime.c: updated to use mono-dl instead of gmodule.
7839
7840 2007-01-25  Zoltan Varga  <vargaz@gmail.com>
7841
7842         * mini-x86.c (mono_arch_output_basic_block): Fix #80507 for x86.
7843
7844         * mini-amd64.c (mono_arch_output_basic_block): Fix #80507 for amd64.
7845
7846         * iltests.il: Add new test for bug #80507.
7847
7848 Wed Jan 24 19:10:28 CET 2007 Paolo Molaro <lupus@ximian.com>
7849
7850         * mini-arm.h: use soft-float also on vfp for now.
7851
7852 Wed Jan 24 14:54:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7853
7854         * mini.c: fix some more soft-float issues.
7855
7856 2007-01-24  Zoltan Varga  <vargaz@gmail.com>
7857
7858         * mini-sparc.h (MONO_ARCH_FRAME_ALIGNMENT): Fix sparc build.
7859
7860 2007-01-24  Massimiliano Mantione  <massi@ximian.com>
7861         * mini-arch.h, , inssel-amd64.brg, mini-x86.c, inssel-x86.brg,
7862         mini-ia64.c, mini-sparc.c, mini-alpha.c: Introduced
7863         MONO_ARCH_LOCALLOC_ALIGNMEENT to fix bug 80498.
7864
7865 Wed Jan 24 12:04:39 GMT 2007 Paolo Molaro <lupus@ximian.com>
7866
7867         * mini-arm.c: typo fix.
7868
7869 2007-01-23  Neale Ferguson <neale@sinenomine.net>
7870
7871         * mini-s390x.c: Use lgb instructions for I1 type variables instead of lb.
7872
7873 2007-01-21  Zoltan Varga  <vargaz@gmail.com>
7874
7875         * mini.c (mono_allocate_stack_slots_full): Allocate memory from the cfg mempool.
7876         Share stack slots for scalar types. Avoid expensive g_list_free () calls.
7877
7878         * mini-x86.c (mono_arch_allocate_vars): Don't free the result of allocate_stack_slots_full.
7879
7880         * mini-amd64.c mini-ia64.c mini-alpha.c: Ditto. 
7881
7882         * mini.h (MonoJitStats): Add a new JIT statistics: locals_stack_size.
7883         
7884         * inssel.brg: Fix a warning.
7885
7886         * mini.h (MonoBasicBlock): Make bb->dominated a GSList.
7887
7888         * abcremoval.c ssa.c ssapre.c: Update after this change.
7889         
7890         * dominators.c (compute_dominators): Allocate bb->dominated from the cfg mempool.
7891
7892         * dominators.c (df_set): Use mono_bitset_union_fast.    
7893
7894 Sat Jan 20 16:59:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7895
7896         * mini.h, genmdesc.c, genmdesc.pl, mini-${arch}.c, cprop.c,
7897         mini-codegen.c: reduce relocations and memory usage for the cpu
7898         description.
7899
7900 2007-01-20  Zoltan Varga  <vargaz@gmail.com>
7901
7902         * mini-codegen.c (mono_regstate2_alloc_int): Optimize this using bsfq on amd64.
7903
7904         * genmdesc.c genmdesc.pl mini.h: Remove some unused fields from the mdesc tables
7905         to reduce their size.
7906
7907 2007-01-19 Mark Mason <mason@broadcom.com>
7908
7909         * exceptions-mips.c: fix mono_arch_ip_from_context(), increase exception debug support.
7910         * mini-mips.c: more configuration macros, support long conditional branches, additional
7911         asserts, fix epilog instrumentation.
7912         * mini-mips.h: use standard stack walk
7913         * cpu-mips.md: increase size of div, rem and conditional branches
7914         
7915 Fri Jan 19 17:23:32 CET 2007 Paolo Molaro <lupus@ximian.com>
7916
7917         * mini.h, mini-codegen.c, mini-$(arch).h: claenup references
7918         to cpu spec data.
7919
7920 2007-01-19  Zoltan Varga  <vargaz@gmail.com>
7921
7922         * aot-compiler.c (encode_klass_info): Allow classes of the form <Type>[][].
7923         (compile_method): Ditto.
7924
7925         * aot-runtime.c (decode_klass_info): Ditto.
7926
7927         * mini.c (mono_method_to_ir): Call mono_get_got_var () in a place where it is
7928         needed by the code generated by inssel.brg. Also fix a warning.
7929
7930 Thu Jan 18 17:55:22 CET 2007 Paolo Molaro <lupus@ximian.com>
7931
7932         * mini.c: deal with enums that become genericinsts by
7933         being nested in a generic class (bug #79956).
7934
7935 Thu Jan 18 16:52:56 CET 2007 Paolo Molaro <lupus@ximian.com>
7936
7937         * mini.c: match the generic definition to check for
7938         private access with generic types (bug #78431).
7939
7940 Thu Jan 18 11:50:13 CET 2007 Paolo Molaro <lupus@ximian.com>
7941
7942         * genmdesc.pl, Makefile.am: perl implementation of genmdesc,
7943         to make life easier for people cross-compiling that insist on not
7944         using scratchbox.
7945
7946 2007-01-17 Mark Mason <mason@broadcom.com>
7947
7948         * inssel-long.brg: patch to deal with mips missing flags
7949         * inssel-long32-mips.brg: implement overflow checks
7950         * insset-mips.brg: implement overflow checks
7951         * mini-mips.h: implement conditional exception handling
7952         * mini-mips.c: add mips_emit_exc_by_name(), implement conditional exception handling.
7953           Remove unused code, minor cleanups.
7954         * exceptions-mips.c: minor cleanups
7955         * mini-ops.h: add mips conditional exception ops
7956         * cpu-mips.md: add mips conditional exception ops
7957
7958         
7959 Wed Jan 17 19:22:34 CET 2007 Paolo Molaro <lupus@ximian.com>
7960
7961         * inssel.brg: patch from Mark Mason <mason@broadcom.com>
7962         to deal with mips missing of flags.
7963
7964 Tue Jan 16 20:01:01 CET 2007 Paolo Molaro <lupus@ximian.com>
7965
7966         * exceptions-ppc.c: execute fault handlers.
7967
7968 Tue Jan 16 19:54:44 CET 2007 Paolo Molaro <lupus@ximian.com>
7969
7970         * mini-ppc.c: handle missing call locationss with FORCE_INDIR_CALL.
7971
7972 Tue Jan 16 13:14:31 CET 2007 Paolo Molaro <lupus@ximian.com>
7973
7974         * mini.c: handle also floating point values in initialize_array.
7975
7976 Tue Jan 16 12:42:40 CET 2007 Paolo Molaro <lupus@ximian.com>
7977
7978         * mini.c, aot-runtime.c, aot-compiler.c: enable aot compilation of
7979         array initialization and make it conditional on the intrins option.
7980
7981 Tue Jan 16 11:28:45 CET 2007 Paolo Molaro <lupus@ximian.com>
7982
7983         * mini.h, patch-info.h, Makefile.am, aot-compiler.c: reduce
7984         relocations and put the patch info names close to the enum definition.
7985
7986 2007-01-15 Mark Mason <mason@broadcom.com>
7987
7988         * basic.cs, exceptions.cs: break up large tests to increase debugability.
7989
7990 Mon Jan 15 18:57:14 CET 2007 Paolo Molaro <lupus@ximian.com>
7991
7992         * mini.c: optimized RuntimeHelpers::InitializeArray () calls.
7993
7994 2007-01-12  Raja R Harinath  <rharinath@novell.com>
7995
7996         * mini.c (mono_method_to_ir): Use new MonoGenericContext accessor.
7997
7998 Thu Jan 11 11:16:42 CET 2007 Paolo Molaro <lupus@ximian.com>
7999
8000         * Makefile.am: distribute the mips sources.
8001
8002 Wed Jan 10 19:49:33 CET 2007 Paolo Molaro <lupus@ximian.com>
8003
8004         * mini-codegen.h: handle bug #80489 here, by excluding ecx
8005         directly.
8006
8007 Wed Jan 10 19:08:05 CET 2007 Paolo Molaro <lupus@ximian.com>
8008
8009         * cpu-x86.md: back out for now as this triggers other regressions.
8010
8011 Wed Jan 10 18:33:16 CET 2007 Paolo Molaro <lupus@ximian.com>
8012
8013         * cpu-x86.md: force src1 and dest regpair for long shift instructions
8014         to eax:edx, so ecx can't get allocated to them (bug #80489).
8015
8016 Tue Jan 9 12:36:11 CET 2007 Paolo Molaro <lupus@ximian.com>
8017
8018         * mini.c, mini-exceptions.c: enabled running fault handlers
8019         (bug #80469).
8020
8021 2007-01-03  Miguel de Icaza  <miguel@novell.com>
8022
8023         * driver.c: If nothing fail, do not use the string "failed",
8024         because it makes it very annoying to view test result logs on the
8025         web. 
8026
8027 2006-12-30  Miguel de Icaza  <miguel@novell.com>
8028
8029         * debug-debugger.c (mono_debugger_main): Rename "main" to
8030         "main_method" to prevent a warning.
8031
8032         Remove a warning for unused field.
8033
8034 2006-12-28  Martin Baulig  <martin@ximian.com>
8035
8036         * debug-debugger.c
8037         (MONO_DEBUGGER__debugger_info): Add `get_lmf_addr'.
8038
8039 2006-12-22  Martin Baulig  <martin@ximian.com>
8040
8041         * mdb-debug-info32.s, mdb-debug-info64.s: New files.
8042         Put a pointer to the `MONO_DEBUGGER__debugger_info' into a
8043         seperate `.mdb_debug_info' section, so we can access it from the
8044         debugger even if the binary is stripped.
8045
8046         * debug-debug.c: Reference the `MONO_DEBUGGER__debugger_info_ptr'
8047         from the `.mdb_debug_info' here to prevent the linker from
8048         removing that section.
8049
8050         * Makefile.am (mono_debugger_sources): Add mdb-debug-info32.s /
8051         mdb-debug-info64.s.
8052
8053 2006-12-19  Robert Jordan  <robertj@gmx.net>
8054
8055         * mini-x86: enable the code to return small structures in
8056         registers for FreeBSD as well. Fixes bug #80278.
8057         * aot-runtime.c: Include sys/wait.h for WEXITSTATUS/WIFEXITED.
8058
8059 Mon Dec 18 19:47:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8060
8061         * mini-x86.c: align the stack when calling the profiler
8062         function instrumenting the prolog (on OSX).
8063
8064 Thu Dec 14 15:22:43 CET 2006 Paolo Molaro <lupus@ximian.com>
8065
8066         * mini.c: emit a break opcode where Debugger.Break () is called.
8067
8068 2006-12-13  Miguel de Icaza  <miguel@novell.com>
8069
8070         * mini.c (mono_method_to_ir): Provide useful information on this
8071         assert, to prevent others from debugging like I did.
8072
8073 Tue Dec 12 17:01:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8074
8075         * mini.c: enable code which was incorrectly commented
8076         (bug #80235).
8077
8078 Tue Dec 12 16:28:15 CET 2006 Paolo Molaro <lupus@ximian.com>
8079
8080         * mini-x86.c: enable on OSX, too, the code to return small
8081         structures in registers.
8082
8083 Mon Dec 11 19:22:35 CET 2006 Paolo Molaro <lupus@ximian.com>
8084
8085         * mini-x86.c: remove the use of the dynamic code manager here, too.
8086
8087 Mon Dec 11 19:08:33 CET 2006 Paolo Molaro <lupus@ximian.com>
8088
8089         * mini.h, debug-debugger.c, tramp-*.c: fixed 
8090         mono_debugger_create_notification_function() to use
8091         mono_global_codeman_reserve () instead of a dynamic code manager.
8092
8093 Tue Dec 5 17:54:50 CET 2006 Paolo Molaro <lupus@ximian.com>
8094
8095         * mini.c, jit-icalls.h, jit-icalls.c: remove the 
8096         ves_array_element_address() jit icall and use a generated
8097         managed method instead (which is about 4 times faster for a rank 3
8098         array access).
8099
8100 2006-11-29  Mark Mason  <mason@broadcom.com>
8101
8102         * basic-calls.cs: additional tests for passing
8103         structures as function arguments.
8104
8105 2006-11-29  Mark Mason  <mason@broadcom.com>
8106
8107         * mini-mips.h: disable custom exception handling
8108         * mini-mips.c: throw/rethrow should use jalr to call
8109         exception stubs.  Fixed bug with passing structures
8110         by value. More support for tracing floating point
8111         functions.
8112
8113 Wed Nov 29 20:28:17 CET 2006 Paolo Molaro <lupus@ximian.com>
8114
8115         * mini.c: fixed typo in the soft-float ldind.r4 handling
8116         (bug #80086).
8117
8118 Wed Nov 29 11:33:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8119
8120         * mini.c, mini.h, driver.c: added --runtime command line
8121         option to select a different runtime than the autodetected one.
8122         * jit.h: added API for embedders to initialize with a specific
8123         runtime version.
8124
8125 Tue Nov 28 21:24:55 CET 2006 Paolo Molaro <lupus@ximian.com>
8126
8127         * mini.c: handle also boxing of r4 values (bug #80024).
8128
8129 Tue Nov 28 19:45:44 CET 2006 Paolo Molaro <lupus@ximian.com>
8130
8131         * mini-ppc.c: force indirect calls until we reserve
8132         enough address space for all the generated code.
8133
8134 Tue Nov 28 20:04:34 GMT 2006 Paolo Molaro <lupus@ximian.com>
8135
8136         * exceptions-arm.c: workaround bugs in the libc definition
8137         of struct ucontext.
8138
8139 Mon Nov 27 15:13:41 CET 2006 Paolo Molaro <lupus@ximian.com>
8140
8141         * inssel.brg: fixes from me and Mark Mason.
8142
8143 2006-11-23  Dick Porter  <dick@ximian.com>
8144
8145         * wapihandles.c (mini_wapi_seminfo): No need to adjust the counter
8146         semaphore display now we've fixed the initial value
8147
8148 Wed Nov 22 11:04:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8149
8150         * inssel.brg: partially revert the last change to fix the build.
8151
8152 2006-11-21  Mark Mason  <mason@broadcom.com>
8153
8154         * inssel.brg: Add and use compare-and-branch macros to support
8155         architectures that do not have condition code registers (ie. MIPS).
8156         * *-mips.{c,brg,md}: Fix copyright statements
8157
8158 2006-11-20  Mark Mason  <mason@broadcom.com>
8159
8160         * Makefile.am: remove mini-codegen.c from list of MIPS sources
8161         * mini.c: Allow GET_CONTEXT to be specified by the arch port
8162         * mini.h: Added declaration for mono_print_ins()
8163         * mini-codegen.c: added ins_spec initializer for MIPS
8164         * mini-codegen.c (mono_call_inst_add_outarg_reg): added asserts for
8165         vreg to be virtual and hreg to be non-virtual.
8166         * mini-codegen.c (mono_spillvar_offset): assert if MIPS - spilling
8167         is not yet working/implemented correctly.
8168         * mini-codegen.c (print_ins): rename to mono_print_ins(), make
8169         non-static, fixup calls to print_ins() from other parts in the file.
8170
8171 2006-11-20  Mark Mason  <mason@broadcom.com>
8172
8173         * basic-calls.cs: added tests for passing structures as arguments
8174         to calls.
8175
8176 Mon Nov 20 19:40:11 CET 2006 Paolo Molaro <lupus@ximian.com>
8177
8178         * inssel-long32.brg: optimize signed division by power of two.
8179
8180 Mon Nov 20 17:37:58 CET 2006 Paolo Molaro <lupus@ximian.com>
8181
8182         * mini-arm.c: added support for interworking with thumb code
8183         (mono must be still be built using the ARM instruction encoding).
8184
8185 2006-11-19  Miguel de Icaza  <miguel@novell.com>
8186
8187         * mini.c (type_from_op): Separate the conditions for OP_EQ as the
8188         verifier has different rules for it.   Fixes a few verifier issues
8189         in the test suite.
8190
8191         * mini-exceptions.c (mono_handle_native_sigsegv): Put the message
8192         at the end, so people know what happened.
8193
8194 Thu Nov 16 14:07:18 CET 2006 Paolo Molaro <lupus@ximian.com>
8195
8196         * brach-opts.c: in optimize_exception_target() make sure we
8197         are in a catch clause (fixes bug #79871).
8198
8199 Thu Nov 16 12:42:13 CET 2006 Paolo Molaro <lupus@ximian.com>
8200
8201         * jit-icalls.c, jit-icalls.h, mini-arm.c, mini.c:
8202         more soft-float support fixes.
8203
8204 Wed Nov 15 18:45:47 GMT 2006 Paolo Molaro <lupus@ximian.com>
8205
8206         * mini-arm.c, inssel-arm.brg: ABI fix for longs and doubles
8207         that are passed half on the stack and half in registers.
8208
8209 Wed Nov 15 17:00:27 CET 2006 Paolo Molaro <lupus@ximian.com>
8210
8211         * mini-ops.h, mini-arch.h, helpers.c, Makefile.am:
8212         more mips integration work from Mark E Mason 
8213         <mark.e.mason@broadcom.com>.
8214
8215 Wed Nov 15 16:34:03 CET 2006 Paolo Molaro <lupus@ximian.com>
8216
8217         * exceptions-mips.c, inssel-mips.brg, mini-mips.h,
8218         cpu-mips.md, inssel-long32-mips.brg, mini-mips.c,
8219         tramp-mips.c: added sources for the mips port, not
8220         integrated in the build yet. Contributed by
8221         Mark E Mason <mark.e.mason@broadcom.com>.
8222
8223 2006-11-14  Neale Ferguson <neale@sinenomine.net>
8224
8225         * mini-s390[x].c (is_regsize_var): Support PTR/FNPTR too.
8226
8227 Tue Nov 14 16:06:37 CET 2006 Paolo Molaro <lupus@ximian.com>
8228
8229         * Makefile.am, inssel-float.brg, inssel-softfloat.brg:
8230         put the soft-float rules in its own file since it seems to
8231         break s390 compilation.
8232
8233 Mon Nov 13 15:54:38 CET 2006 Paolo Molaro <lupus@ximian.com>
8234
8235         * mini-arm.c: fixed wrnings.
8236
8237 Fri Nov 10 19:18:32 CET 2006 Paolo Molaro <lupus@ximian.com>
8238
8239         * mini-arm.c, mini-arm.h, cpu-arm.md, inssel-float.brg,
8240         inssel-arm.brg: ARM support for soft-float.
8241
8242 Fri Nov 10 18:38:15 CET 2006 Paolo Molaro <lupus@ximian.com>
8243
8244         * mini.c, jit-icalls.c, jit-icalls.h: added first cut at handling
8245         loads and stores of 32 bit fp values.
8246
8247 2006-11-10  Zoltan Varga  <vargaz@gmail.com>
8248
8249         * mini-sparc.c (is_regsize_var): Support PTR/FNPTR too.
8250
8251         * tramp-sparc.c (mono_arch_patch_callsite): Fix this function so it actually
8252         works. Fixes #79852 and #79463.
8253
8254 Thu Nov 9 16:56:13 CET 2006 Paolo Molaro <lupus@ximian.com>
8255
8256         * mini.c, mini-codegen.c, jit-icalls.c, jit-icalls.h:
8257         more soft-float support WIP and fixes.
8258
8259 Wed Nov 8 16:40:02 CET 2006 Paolo Molaro <lupus@ximian.com>
8260
8261         * mini-arm.c: some VFP updates.
8262
8263 Tue Nov 7 19:45:51 CET 2006 Paolo Molaro <lupus@ximian.com>
8264
8265         * mini-exceptions.c: 0 is a valid local var offset in some
8266         architectures, don't assert (bug #78508).
8267
8268 Tue Nov 7 18:17:52 GMT 2006 Paolo Molaro <lupus@ximian.com>
8269
8270         * exceptions-arm.c: fixed off by one error in stack walk code.
8271
8272 Tue Nov 7 11:27:26 CET 2006 Paolo Molaro <lupus@ximian.com>
8273
8274         * mini.h, mini.c: more precise tracking of type load exceptions.
8275
8276 2006-11-03  Robert Jordan  <robertj@gmx.net>
8277
8278         * Makefile.am: [WIN32] Add monow.exe target.
8279         * driver.c: [WIN32] Don't detach the console when debugging.
8280         Fixes bug #79797.
8281         
8282 2006-10-30  Miguel de Icaza  <miguel@novell.com>
8283
8284         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Eliminate warning.
8285
8286 2006-10-23  Zoltan Varga  <vargaz@gmail.com>
8287
8288         * aot-compiler.c (emit_method_info): Add a case missed earlier.
8289
8290         * driver.c (mini_regression): Fix --regression with AOT.
8291
8292         * aot-compiler.c (emit_method_info): Fix AOT on amd64.
8293
8294 2006-10-17  Zoltan Varga  <vargaz@gmail.com>
8295
8296         * mini.c (GET_CONTEXT): Correct the definition of this for sparc/linux.
8297
8298         * mini-sparc.h: Don't use sigaction on sparc/linux.
8299
8300         * exceptions-sparc.c: Call mono_arch_flush_icache () in a couple of places.
8301
8302         * mini-sparc.c (mono_sparc_flushw): Call mono_arch_flush_icache ().
8303
8304         * mini-exceptions.c: Add proper include files for getpid ().
8305
8306 2006-10-16  Zoltan Varga  <vargaz@gmail.com>
8307
8308         * aot-runtime.c (mono_aot_get_method): Change this to return the native code
8309         address instead of a MonoJitInfo* to avoid decoding the exception info for the
8310         method.
8311
8312         * aot-runtime.c aot-compiler.c: Use uint16 instead of uint32 entries in the
8313         name cache to reduce its size.
8314
8315         * mini.h (MONO_AOT_FILE_VERSION): Bump aot file format version.
8316
8317 2006-10-15  Zoltan Varga  <vargaz@gmail.com>
8318
8319         * mini-x86.c: Save/restore the current LMF structure more efficiently using
8320         the mono_lmf TLS variable.
8321
8322         * exceptions-x86.c (mono_arch_find_jit_info): Only access lmf->method in 
8323         trampoline lmf frames.  
8324
8325         * mini-sparc.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Define this on sparc as well.
8326
8327 2006-10-14  Zoltan Varga  <vargaz@gmail.com>
8328
8329         * mini-amd64.c: Save/restore the current LMF structure more efficiently using
8330         the mono_lmf TLS variable.
8331
8332         * mini-exceptions.c: Access the LMF structure through accessors.
8333
8334         * mini.c: Allow the backends the option for storing the lmf in a dedicated TLS 
8335         variable instead of in jit_tls->lmf.
8336
8337         * mini-x86.c mini-amd64.c: Update after lmf->lmf_addr name change.
8338         
8339         * exceptions-amd64.c (mono_arch_find_jit_info): Only access lmf->method in 
8340         trampoline lmf frames.
8341
8342         * mini-amd64.c (mono_arch_emit_prolog): Do not set lmf->method as it is not needed.
8343
8344 2006-10-12  Zoltan Varga  <vargaz@gmail.com>
8345
8346        * mini.c trace.c mini-x86.c: Revert these too.
8347         
8348        * mini.c trace.c mini-x86.c: Remove warning workarounds after the mono_type_size ()
8349        signature change.
8350
8351 Tue Oct 10 11:35:20 CEST 2006 Paolo Molaro <lupus@ximian.com>
8352
8353         * genmdesc.c: removed now dead code.
8354
8355 2006-10-09  Robert Jordan <robertj@gmx.net>
8356
8357         * mini.c: Disable the CrashReporter on MacOS X; Fixes #74869
8358
8359 Mon Oct 9 17:06:41 CEST 2006 Paolo Molaro <lupus@ximian.com>
8360
8361         * mini.h: do not leave gaps in the opcode values.
8362
8363 Mon Oct 9 16:08:51 CEST 2006 Paolo Molaro <lupus@ximian.com>
8364
8365         * jit-icalls.h: flag functions as internal here, too.
8366
8367 Mon Oct 9 15:58:18 CEST 2006 Paolo Molaro <lupus@ximian.com>
8368
8369         * mini.h, aliasing.h, declsec.h, regalloc.h, trace.h: mark internal
8370         functions with the internal attribute.
8371
8372 Mon Oct 9 15:52:45 CEST 2006 Paolo Molaro <lupus@ximian.com>
8373
8374         * aot-compiler.c: fclose the file descriptor in the profile read loop.
8375
8376 Fri Oct 6 16:01:38 CEST 2006 Paolo Molaro <lupus@ximian.com>
8377
8378         * mini.c, jit-icalls.c, inssel-float.brg: beginnings of support
8379         for soft-float.
8380
8381 2006-10-05  Zoltan Varga  <vargaz@gmail.com>
8382
8383         * mini-x86.c (emit_load_volatile_arguments): New function to handle arguments of
8384         tail calls as on other platforms.
8385
8386         * mini.c (mono_method_to_ir): Fix a few tailcall problems. Fixes #79557.
8387
8388         * iltests.il: Add a few tailcall tests.
8389
8390 Tue Oct 3 16:33:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8391
8392         * driver.c: fix loop for old compilers (bug #79521).
8393
8394 2006-10-02  Zoltan Varga  <vargaz@gmail.com>
8395
8396         * mini-exceptions.c (ves_icall_get_trace): Remove debug printf.
8397
8398         * aot-runtime.c (mono_aot_get_class_from_name): Avoid a memory allocation.
8399
8400         * aot-compiler.c: Add a new option 'metadata-only' to only emit the cached
8401         metadata without any code.
8402
8403         * mini-exceptions.c (mono_handle_native_sigsegv): Add some code to print out
8404         more precise debugging information using gdb.
8405
8406 2006-09-30  Zoltan Varga  <vargaz@gmail.com>
8407
8408         * inssel-ia64.brg: Make the helper methods static.
8409
8410 Thu Sep 28 16:40:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8411
8412         * inssel-x86.brg: make the helper methods static.
8413
8414 Thu Sep 28 16:31:32 CEST 2006 Paolo Molaro <lupus@ximian.com>
8415
8416         * inssel-amd64.brg, mini-amd64.c: small cleanup, use inst_call.
8417
8418 Thu Sep 28 15:36:07 CEST 2006 Paolo Molaro <lupus@ximian.com>
8419
8420         * mini.c: updates for monoburg changes.
8421         * inssel.brg: make a few helper functions static as they should.
8422
8423 2006-09-27  Zoltan Varga  <vargaz@gmail.com>
8424
8425         * Makefile.am: Move mini-codegen.c to common_sources.
8426
8427 Wed Sep 27 15:07:08 CEST 2006 Paolo Molaro <lupus@ximian.com>
8428
8429         * mini.h: instroduce inst_call in MonoInst for use in OUTARG
8430         instructions.
8431         * Makefile.am, cpu-g4.md, inssel-ppc.brg, mini-codegen.c, mini-ppc.c,
8432         mini-ppc.h: port to use the common local register allocator.
8433
8434 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8435
8436         * mini.h: Remove the comment too then.
8437
8438 Tue Sep 26 14:02:58 CEST 2006 Paolo Molaro <lupus@ximian.com>
8439
8440         * mini.h: put back backend.data which is to be used shortly and
8441         doesn't increase the size of MonoInst. If any 64 bit arch aligned
8442         pointers on 4 byte boundaries it'd have much bigger issues running
8443         and you can ifdef it out anyway.
8444
8445 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8446
8447         * mini.h (MonoInst): Remove backend.data field since it is unused and increases
8448         MonoInst size by 4 bytes on 64 bit machines.
8449
8450 Tue Sep 26 11:57:26 CEST 2006 Paolo Molaro <lupus@ximian.com>
8451
8452         * *.{c,h,brg}: long due removal of the unused field in MonoInst and
8453         replacement with more meaningful field names. Arch maintainers, please
8454         check the assigned names are good enough for your arch.
8455
8456 2006-09-26  Zoltan Varga  <vargaz@gmail.com>
8457
8458         * cpu-ia64.md mini-ia64.c inssel-ia64.brg mini-ops.h: Get rid of the 
8459         OP_IA64_FETCHADD opcodes, use OP_ATOMIC_ADD_IMM_NEW opcodes instead.
8460
8461 Mon Sep 25 11:05:24 CEST 2006 Paolo Molaro <lupus@ximian.com>
8462
8463         * mini.h, driver.c, optflags-def.h, Makefile.am: reduce runtime
8464         relocations and memory requirements, put the optimization flags
8465         definitions in their own file.
8466
8467 2006-09-24  Zoltan Varga  <vargaz@gmail.com>
8468
8469         * jit-icalls.c (mono_helper_stelem_ref): Remove this unused helper function.
8470
8471         * mini.c (mini_init): Remove reference to mono_helper_stelem_ref.
8472
8473 2006-09-22  Zoltan Varga  <vargaz@gmail.com>
8474
8475         * mini-amd64.c (add_valuetype): Fix an uninitialized memory issue.
8476
8477 Thu Sep 21 19:06:09 CEST 2006 Paolo Molaro <lupus@ximian.com>
8478
8479         * inssel.brg: use the correct function to get the size of an item
8480         in an array, given an element class.
8481         * aot-compiler.c: do not access class->class_size directly.
8482
8483 Thu Sep 21 12:10:56 CEST 2006 Paolo Molaro <lupus@ximian.com>
8484
8485         * mini.h, debug-mini.c: added a debugging function to print
8486         info about local variables and arguments in a jitted method.
8487
8488 2006-09-20  Zoltan Varga  <vargaz@gmail.com>
8489
8490         * mini-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8491
8492         * exceptions-ia64.c: Fix some problems reported by Bill Seurer <seurer@us.ibm.com>.
8493
8494 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8495
8496         * mini-ia64.c (mono_arch_call_opcode): Avoid using the same loop index in the
8497         inner and outer loops when passing vtypes.
8498
8499 Tue Sep 19 17:53:40 CEST 2006 Paolo Molaro <lupus@ximian.com>
8500
8501         * mini-ppc.c: take into account the cpu errata for cache flushing
8502         which caused some random errors (bug #79381).
8503
8504 2006-09-19  Zoltan Varga  <vargaz@gmail.com>
8505
8506         * mini-amd64.c (mono_arch_emit_exceptions): Emit the call to 
8507         mono_arch_throw_corlib_exception using emit_call () too. Fixes #79271.
8508
8509 2006-09-17  Zoltan Varga  <vargaz@gmail.com>
8510
8511         * aot-runtime.c (load_aot_module): Return immeditely if the AOT module was already
8512         loaded.
8513
8514         * exceptions-amd64.c (gregs_from_ucontext): Apply another patch from the
8515         freebsd ports tree.
8516
8517         * mini-amd64.c (emit_call): Avoid near calls on freebsd.
8518         (mono_arch_patch_code): Remove the unused handling of MONO_PATCH_INFO_CLASS_INIT.
8519
8520         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix check for 32 bitness of
8521         displacement.
8522
8523 2006-09-13  Zoltan Varga  <vargaz@gmail.com>
8524
8525         * aot-runtime.c (load_aot_module_from_cache): Fix PPC build.
8526
8527 2006-09-12  Zoltan Varga  <vargaz@gmail.com>
8528
8529         * mini.c (UNVERIFIED): Add a 'break-on-unverified' MONO_DEBUG option so this 
8530         macro does not have to be changed during debugging.
8531
8532         * 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>.
8533
8534         * cpu-pentium.md: Rename this to cpu-x86.md for consistency with other platforms.
8535
8536         * Makefile.am mini-x86.c mini-codegen.c: Rename pentium_desc to x86_desc.
8537         
8538         * mini.c (mini_get_ldelema_ins): Allow ldelema2d optimization if 
8539         MONO_ARCH_NO_EMULATE_MUL is defined.
8540
8541         * mini-ia64.h (MONO_ARCH_CALLEE_FREGS): Reserve f33 for use by instructions.
8542
8543         * mini-ia64.h: Define MONO_ARCH_NO_EMULATE_MUL.
8544
8545         * mini-ia64.c: Implement CEE_MUL based on gcc emitted code.
8546
8547         * mini-ia64.c (mono_arch_lowering_pass): Optimize store_membase_imm with offset==0.
8548         
8549 2006-09-11  Zoltan Varga  <vargaz@gmail.com>
8550
8551         * mini-x86.h mini-amd64.h mini-exceptions.c: Move the bsd specific MAP_ANON
8552         stuff to mini-exceptions.c where it is used.
8553
8554         * mini-sparc.c (mono_arch_setup_jit_tls_data): Remove the duplicate altstack
8555         setup code, the real one is in mini-exceptions.c.
8556
8557         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Move all dependencies on the
8558         layout of ucontext_t to helper functions in exceptions-amd64.c, as on x86. Add
8559         some changes from the freebsd ports tree.
8560
8561         * mini-amd64.h exceptions-amd64.c: Fix the amd64 build. Get rid of the SC_
8562         constants.
8563         
8564         * mini-amd64.h: Freebsd has MAP_ANON instead of MAP_ANONYMOUS.
8565
8566 Mon Sep 11 13:18:55 CEST 2006 Paolo Molaro <lupus@ximian.com>
8567
8568         * mini.c: on Linux, check for /proc to be mounted
8569         (bug# 79351, novell bug#201204).
8570
8571 Mon Sep 11 13:10:12 CEST 2006 Paolo Molaro <lupus@ximian.com>
8572
8573         * mini.c: handle cases where pthread_attr_getstack() behaves
8574         incorrectly (bug #78096).
8575
8576 Mon Sep 11 11:31:10 BST 2006 Paolo Molaro <lupus@ximian.com>
8577
8578         * mini-arm.c: support larger stack frames (bug #79272).
8579
8580 2006-09-08  Zoltan Varga  <vargaz@gmail.com>
8581
8582         * aot-runtime.c (mono_aot_get_class_from_name): Remove a debug printf.
8583
8584         * aot-compiler.c: Add a hash table to the AOT file mapping class names to typedef 
8585         tokens.
8586
8587         * aot-runtime.c (mono_aot_get_class_from_name): New function used by 
8588         mono_class_from_name () to find a class from its name.
8589
8590         * mini.c (mini_init): Register mono_aot_get_class_from_name () with the runtime.
8591
8592 2006-09-07  Zoltan Varga  <vargaz@gmail.com>
8593
8594         * mini-amd64.c (emit_call): Avoid strstr () call if possible.
8595
8596 2006-09-05  Kornél Pál  <kornelpal@gmail.com>
8597
8598         * Makefile.am: Renamed mono-1.dll to mono.dll. (-avoid-version)
8599
8600 2006-09-04  Zoltan Varga  <vargaz@gmail.com>
8601
8602         * mini.c (mono_icall_get_wrapper): Fix a race condition on initializing
8603         callinfo->trampoline.
8604
8605         * mini-amd64.c (emit_call): Special case calls to the vararg array icalls. Hopefully
8606         fixes #79271.
8607         (mono_arch_patch_code): Add some debug code to help track down similar failures in the
8608         future.
8609
8610 2006-09-03  Zoltan Varga  <vargaz@gmail.com>
8611
8612         * aot-runtime.c (mono_aot_plt_resolve): Add an assert.
8613
8614 2006-09-02  Zoltan Varga  <vargaz@gmail.com>
8615
8616         * tramp-x86.c (mono_arch_create_specific_trampoline): Don't increase
8617         stats.method_trampolines, it is already done by the generic trampoline code.
8618
8619         * tramp-amd64.c (mono_arch_create_specific_trampoline): Ditto.
8620         
8621 2006-09-01  Zoltan Varga  <vargaz@gmail.com>
8622
8623         * mini.c: Remove some references to mono_compile_aot, and use cfg->compile_aot instead.
8624
8625         * aot-runtime.c: Add some tweaks to the MONO_AOT_CACHE functionality.
8626
8627         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix a FIXME.
8628
8629         * mini.c (print_jit_stats): Print mscorlib mempool size too.
8630         
8631         * mini.c (print_jit_stats): Print new stats.
8632
8633         * *-alpha.c: More alpha port work from Sergey Tikhonov <tsv@solvo.ru>.
8634
8635 2006-08-31  Zoltan Varga  <vargaz@gmail.com>
8636
8637         * mini.c (mini_get_ldelema_ins): Fix verifier error when calling
8638         Address on two dimensional arrays. Fixes #78729.
8639
8640         * mini.h (MonoCompile): Add a 'skip_visibility' field.
8641
8642         * mini.c (method_to_ir): Disable visibility checks if skip_visibility is set on
8643         a method.
8644
8645         * mini-amd64.c (mono_arch_emit_exceptions): Fix assertion introduced by the last change.
8646
8647         * mini.c (mono_runtime_cleanup_handlers): Clean up signal handlers on unix. Fixes
8648         #79130.
8649         
8650         * mini.c (handle_array_new): Applied patch from "briaeros007". Fix
8651         a race condition.
8652         (mini_get_ldelema_ins): Ditto.
8653
8654 2006-08-30  Zoltan Varga  <vargaz@gmail.com>
8655
8656         * mini-amd64.c (mono_arch_emit_exceptions): Align fp constants to 16 bytes.
8657         (mono_arch_output_basic_block): Avoid unaligned accesses in FNEG implementation. 
8658         Fixes #79213.
8659
8660 2006-08-29 Neale Ferguson <neale@sinenomine.net>
8661
8662         * mini-s390.c, mini-s390x.c: Fix VARARG case processing with 0 arguments. Add
8663         mono_arch_get_patch_offset as a dummy entry point to allow successful link. 
8664
8665         * exceptions-s390x.c: Cosmetic change.
8666
8667         * tramp-s390.c: Fix warning.
8668
8669         * cpu-s390.md: Correct length of mul_imm.
8670
8671 Wed Aug 23 19:24:00 CEST 2006 Paolo Molaro <lupus@ximian.com>
8672
8673         * aot-compiler.c: added binary writer with ELF backend
8674         implementation (only on Linux/x86 for now).
8675
8676 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8677
8678         * Makefile.am: Don't run net 2.0 AOT tests.
8679
8680         * aot-compiler.c (compile_method): Skip methods with tail calls as well.
8681         (mono_compile_assembly): Skip net 2.0 assemblies as well.
8682
8683         * aot-runtime.c (load_patch_info): Fix an uninitialized memory error.
8684
8685 Fri Aug 18 19:38:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
8686
8687         * aot-compiler.c: simplified and refactored the asm-writing code
8688         to allow different backends.
8689
8690 2006-08-18  Zoltan Varga  <vargaz@gmail.com>
8691
8692         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file format version.
8693
8694         * aot-compiler.c aot-runtime.c: Reorg the GOT slot allocation code a 
8695         little. Share patches of type TYPE_FROM_HANDLE as well.
8696
8697         * mini.c (mono_patch_info_equal): New helper function.
8698         (mono_patch_info_hash): Ditto.
8699
8700         * aot-compiler.c (emit_method_code): Fix s390 build.
8701
8702         * mini.c (mono_allocate_stack_slots_full): Fix yet another place where byref
8703         is not handled because it is stored as a flag and not as a type ctor. Fixes
8704         #79016.
8705
8706 2006-08-17  Zoltan Varga  <vargaz@gmail.com>
8707
8708         * aot-compiler.c: Fix computation of GOT slot statistics.
8709         
8710         * aot-compiler.c aot-runtime.c: Implement sharing of GOT slots for classes/fields.
8711         Also remove support for not PIC AOT.
8712
8713         * mini.h: Bump AOT file format version.
8714
8715         * objects.cs: Add a test for #78990.
8716
8717         * mini-x86.c (mono_arch_output_basic_block): Applied patch from Peter Dettman
8718         (peter.dettman@iinet.net.au). Fixes #79087.
8719
8720         * basic-long.cs: Add a test for the above.
8721
8722 2006-08-16  Zoltan Varga  <vargaz@gmail.com>
8723
8724         * aot-compiler.c (get_got_offset): Add a cache for GOT entries, not yet used.
8725         
8726         * aot-compiler.c (get_plt_index): Add a cache for wrappers too. Simplify the
8727         code somewhat.
8728
8729 2006-08-15  Zoltan Varga  <vargaz@gmail.com>
8730
8731         * mini.c (mini_init): Fix registration of idiv/imul opcodes which can throw
8732         exceptions.
8733
8734 2006-08-10  Jonathan Chambers  <joncham@gmail.com>
8735
8736         * mini.c: Don't verify COM proxy invoke calls
8737         
8738
8739 2006-08-10  Dick Porter  <dick@ximian.com>
8740
8741         * wapihandles.c (mini_wapi_seminfo): More info, to help track down
8742         which process is holding semaphores locked.
8743
8744 2006-08-08  Zoltan Varga  <vargaz@gmail.com>
8745
8746         * mini-ia64.c mini-amd64.c: Fix #79027.
8747
8748         * mini-sparc.c (mono_arch_call_opcode): Fix the previous patch.
8749
8750         * mini-sparc.c (mono_arch_call_opcode): Fix #79027.
8751
8752         * mini-x86.c (mono_arch_call_opcode): Handle the case where there are no
8753         implicit arguments in a vararg call. Fixes #79027.
8754
8755 2006-08-07  Zoltan Varga  <vargaz@freemail.hu>
8756
8757         * mini.c (mono_get_element_address_signature): Use CDECL calling convention on windows. Fixes #78969.
8758         (mono_get_array_new_va_signature): Ditto.
8759
8760 2006-08-05  Zoltan Varga  <vargaz@gmail.com>
8761
8762         * aot-runtime.c: Call init_plt lazily.
8763
8764         * inssel-long.brg: Fix unsigned long->int conversion.
8765
8766         * aot-runtime.c (init_plt): Remove a redundant make_writable () call.
8767
8768         * aot-compiler.c aot-runtime.c: Reorganize the file structure in the amd64 case so
8769         that most data is now in the .rss/.data section.
8770
8771 2006-08-04  Zoltan Varga  <vargaz@gmail.com>
8772
8773         * aot-compiler.c: Correct the computation of the 'direct-calls' statistic.      
8774
8775         * aot-compiler.c: Print the number of methods without GOT slots as a statistics.
8776
8777         * aot-compiler.c aot-runtime.c tramp-amd64.c: Resurrect amd64 AOT support.
8778
8779         * tramp-amd64.c (mono_arch_patch_callsite): Fix a warning.
8780
8781         * jit-icalls.c (mono_helper_compile_generic_method): Unbox vtypes since this is a
8782         virtual call. Fixes #79010.
8783
8784         * mini.c (mono_method_to_ir): Pass an additional out arg to compile_generic_method 
8785         and use the result as the this argument in the real call.
8786
8787         * generics.2.cs: Add a new test for #79010.
8788         
8789 2006-08-03  Zoltan Varga  <vargaz@gmail.com>
8790
8791         * mini-x86.c: Fix a warning.
8792
8793         * aot-compiler.c: Add a bunch of statistics.
8794
8795         * mini.c (inline_method): Disable inlining in out-of-line bblocks.
8796
8797 2006-08-02  Zoltan Varga  <vargaz@gmail.com>
8798
8799         * mini-arch.h Makefile.am mini-ops.h mini-codegen.c: More alpha updates.
8800
8801 2006-08-01  Zoltan Varga  <vargaz@gmail.com>
8802
8803         * 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>.
8804
8805 2006-07-13  Miguel de Icaza  <miguel@novell.com>
8806
8807         * mini.c (mono_method_to_ir): Obtain the original method in the
8808         CIL stream and use this to perform validation.
8809
8810         Fixed: #78816
8811
8812 2006-07-19  Zoltan Varga  <vargaz@gmail.com>
8813
8814         * mini-x86.c (mono_arch_get_argument_info): Fix a warning.
8815         (mono_arch_call_opcode): Ditto.
8816
8817         * mini.c (mono_method_to_ir): Clear ins_flag at the end of CEE_CALL. Fixes
8818         #78826.
8819
8820         * mini.c (mono_patch_info_dup_mp): New helper function.
8821         
8822         * aot-compiler.c (compile_method): Fix some of the memory allocated during
8823         compilation. Fixes #78827.
8824
8825 2006-07-18  Kornél Pál  <kornelpal@gmail.com>
8826
8827         * declsec.c: Use original security informations for
8828           MONO_WRAPPER_MANAGED_TO_MANAGED.
8829
8830 2006-07-15  Jonathan Chambers  <joncham@gmail.com>
8831
8832         * mini.c: Allow Com Interop methods/classes and
8833         don't verify COM wrapper calls
8834         
8835
8836 2006-07-13  Zoltan Varga  <vargaz@gmail.com>
8837
8838         * inssel-long32.brg: Fix long->i4 checked conversion.
8839
8840         * exceptions.cs: Add a test for the above.
8841
8842 2006-07-08  Zoltan Varga  <vargaz@gmail.com>
8843
8844         * mini-exceptions.c (mono_setup_altstack): Fix a memory leak.
8845
8846         * mini.c: Applied patch from Joachim Ante (joe@otee.dk). Fix some shutdown 
8847         leaks.
8848
8849         * helpers.c (mono_disassemble_code): Avoid using fixed temporary files. Fixes
8850         #78775.
8851
8852 2006-07-03  Zoltan Varga  <vargaz@gmail.com>
8853
8854         * mini.c: Fix solaris/x86 exception handling.
8855
8856         * Makefile.am: Get rid of $(ICU_LIBS).
8857
8858 2006-07-02  Zoltan Varga  <vargaz@gmail.com>
8859
8860         * mini-exceptions.c: Fix handling of unhandled SIGSEGV exceptions on ia64.
8861         (ves_icall_System_Security_SecurityFrame_GetSecurityStack): Use MONO_INIT_CONTEXT_FROM_CURRENT.
8862         (ves_icall_System_Security_SecurityFrame_GetSecurityFrame): Ditto.
8863
8864         * mini-ia64.h (MONO_CONTEXT_SET_FUNC): New macro.
8865
8866         * mini-exceptions.c (mono_handle_native_sigsegv): Prevent infinite loops if
8867         this function causes a SIGSEGV.
8868
8869 2006-06-22  Zoltan Varga  <vargaz@gmail.com>
8870
8871         * mini.c: Remove unused solaris/x86 includes.
8872
8873 2006-06-21  Zoltan Varga  <vargaz@gmail.com>
8874
8875         * jit.h: Add G_BEGIN_DECLS/G_END_DECLS.
8876
8877 2006-06-20  Jb Evain  <jbevain@gmail.com>
8878
8879         * cpu-g4.md: fix max length of start_handler instruction.
8880
8881 2006-06-20  Massimiliano Mantione  <massi@ximian.com>
8882         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78656.
8883
8884 2006-06-16  Massimiliano Mantione  <massi@ximian.com>
8885         * ssa.c: Fixed bug 78653 for SSA based deadce.
8886         * mini.h: added MONO_INST_DEFINITION_HAS_SIDE_EFFECTS flag go
8887         MonoInst.flags, used in SSA based deadce.
8888         * aliasing.c: Fixed bug 78653 for "fastpath" deadce.
8889         * simple-cee-ops.h, simple-mini-ops.h: Fixed bug 78653.
8890
8891 Thu Jun 15 16:52:46 CEST 2006 Paolo Molaro <lupus@ximian.com>
8892
8893         * tramp-ppc.c: don't use malloc () for trampoline code, sometimes
8894         it can end up using non executable memory on ppc64 systems
8895         running ppc32 userspace (fix from Johannes Berg).
8896
8897 2006-06-14  Dick Porter  <dick@ximian.com>
8898
8899         * wapihandles.c: Fix a bunch of signed/unsigned warnings from gcc
8900         4.1.1
8901
8902 2006-06-13  Massimiliano Mantione  <massi@ximian.com>
8903         * mini.c: Made so that inline is locally disabled if it would
8904         trigger a .cctor, because too many apps depend on this behavior
8905         (which seems to be also the one of the MS CLR).
8906
8907 2006-06-13  Zoltan Varga  <vargaz@gmail.com>
8908
8909         * mini-amd64.c (mono_emit_stack_alloc): Fix initialization of localloc'ed memory.
8910         No idea why this worked before.
8911
8912         * branch-opts.c (mono_branch_optimize_exception_target): Avoid branches
8913         which branch to outer exception clauses since they could skip the
8914         inner finally clauses. Fixes #78633.
8915
8916         * exceptions.cs: Add a test for the above.
8917
8918         * mini.c (merge_basic_blocks): Nullify the branch at the end of the first bb.
8919         Fixes #78629.
8920
8921         * iltests.il: Add a test for the above.
8922
8923 2006-06-12  Zoltan Varga  <vargaz@gmail.com>
8924
8925         * mini.c (remove_block_if_useless): Do not remove the bblock immediately
8926         after the end of a try bblock, to prevent asserts in mini_method_compile ().
8927
8928         * iltests.il: Add a test for the above.
8929
8930 2006-06-10  Zoltan Varga  <vargaz@gmail.com>
8931
8932         * mini-ia64.c (mono_arch_lowering_pass): Remove some code duplication.
8933         
8934         * mini-ia64.c inssel-ia64.brg: Implement the new net 2.0 Interlocked.Add
8935         methods as instrinsics.
8936
8937 2006-06-09  Wade Berrier <wberrier@novell.com>
8938
8939         * Makefile.am: Fix sources list for svn rename so that make dist succeeds
8940         (simple-cee-ops.h ssapre-mini-ops.h)
8941
8942 2006-06-09  Neale Ferguson <neale@sinenomine.net>
8943
8944         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on s390/s390x.
8945         * mini-s390x.c, mini-s390.c: Correct ATOMIC operations (incorrect register for CS
8946         instruction).
8947         * mini-s390x.h, mini-s390.h: Simplify MCONTEXT_GET_BP.
8948         * cpu-s390x.md: Fix max. length values for a couple of instructions.
8949
8950 2006-06-09  Jonathan Chambers  <jonathan.chambers@ansys.com>
8951
8952         * mini-exceptions.c: Minor fix for building mono in Visual Studio.
8953
8954 2006-06-08  Massimiliano Mantione  <massi@ximian.com>
8955
8956         * ssapre-cee-ops.h: Renamed as "simple-cee-ops.h"
8957         * simple-cee-ops.h: Was "ssapre-cee-ops.h" (renamed).
8958         * ssapre-mini-ops.h: Renamed as "simple-mini-ops.h"
8959         * simple-mini-ops.h: Was "ssapre-mini-ops.h" (renamed).
8960         * local-propagation.c: In mono_cprop_invalidate_values use a whitelist
8961         of opcodes, so that bug 78549 should not happen again.
8962         * ssapre.c: Updated to use the renamed files.
8963
8964 2006-06-08  Zoltan Varga  <vargaz@gmail.com>
8965
8966         * mini-amd64.c (mono_arch_output_basic_block): Fix a wrong reg-reg move 
8967         in OP_ATOMIC_EXCHANGE_I4.
8968
8969 2006-06-07  Wade Berrier <wberrier@novell.com>
8970
8971         * tramp-s390.c: Fix s390 build (add missing pointer declarations 
8972         in mono_debugger_create_notification_function)
8973
8974 2006-06-06  Zoltan Varga  <vargaz@gmail.com>
8975
8976         * mini.c (NEW_AOTCONST_TOKEN): Fix amd64 build.
8977         
8978         * mini.c (type_from_stack_type): Disable some changes which do not
8979         seem to work.
8980
8981         * driver.c: Reenable opts.
8982
8983         * mini.h (MonoStackSlot): New structure to keep track of the verification state
8984         of the evaluation stack.
8985         
8986         * mini.h (MonoBasicBlock): Add a 'stack_state' field to keep track of the
8987         evaluation stack trace at entry to the bblock.
8988
8989         * mini.c (merge_stacks): New function to perform verification of stack merges.
8990         Turned off by default.
8991
8992         * mini.c: Fill up ins->klass for instructions whose type is STACK_OBJ or
8993         STACK_MP.
8994         
8995 2006-06-06  Massimiliano Mantione  <massi@ximian.com>
8996
8997         * local-propagation.c: Fixed bug 78549.
8998
8999 2006-06-04  Zoltan Varga  <vargaz@gmail.com>
9000
9001         * mini-exceptions.c (ves_icall_get_frame_info): Fix this function on ia64.
9002
9003 2006-06-02  Miguel de Icaza  <miguel@novell.com>
9004
9005         * tramp-sparc.c, tramp-ppc.c, tramp-s390.c, tramp-s390x.c,
9006         tramp-arm.c, tramp-ia64.c
9007         (mono_debugger_create_notification_function): Update signature to
9008         new signature and use new protocol for creating the notification
9009         function.  
9010
9011         Should fix the build.
9012
9013 2006-06-02  Geoff Norton  <gnorton@customerdna.com>
9014
9015         * exceptions-ppc.c (mono_jit_walk_stack)
9016         (ves_icall_get_frame_info): Fix the build
9017
9018 2006-06-02  Zoltan Varga  <vargaz@gmail.com>
9019
9020         * mini.c (mono_set_defaults): Fix the handling of -O=-all.
9021
9022 2006-05-31  Raja R Harinath  <rharinath@novell.com>
9023
9024         * il2tests.2.il: New file for generics CIL tests.  Add test for
9025         #78019.
9026         * Makefile.am: Update.
9027
9028         Fix #78019
9029         * mini.c (mono_method_to_ir): Don't apply box+brtrue optimization
9030         to nullable types.
9031
9032 2006-05-30  Massimiliano Mantione  <massi@ximian.com>
9033
9034         * aliasing.c: Fixed bug 78311.
9035
9036 2006-05-29  Martin Baulig  <martin@ximian.com>
9037
9038         * mini-exceptions.c (mono_find_jit_info): When computing the
9039         native offset, check whether we're actually inside the method's
9040         code; call mono_debug_print_stack_frame() to format the frame.
9041         (ves_icall_System_Exception_get_trace): Call
9042         mono_debug_print_stack_frame() to format the stack frame.
9043         (ves_icall_get_trace): Update to the new debugging API.
9044         (mono_jit_walk_stack_from_ctx): Likewise.
9045         (ves_icall_get_frame_info): Likewise.
9046
9047         * mini.c (get_method_from_ip): Use the new debugging API.
9048         (mono_print_method_from_ip): Likewise.
9049
9050         * exceptions-ppc.c
9051         (mono_jit_walk_stack): Use the new debugging API.
9052         (ves_icall_get_frame_info): Likewise.   
9053
9054 2006-05-27  Zoltan Varga  <vargaz@gmail.com>
9055
9056         * mini-amd64.c (mono_arch_output_basic_block): Fix MONO_PROFILE_COVERAGE.
9057
9058 2006-05-25  Massimiliano Mantione  <massi@ximian.com>
9059
9060         * mini.c: Added "limitator" to inline for debugging.
9061
9062 2006-05-24  Martin Baulig  <martin@ximian.com>
9063
9064         * debug-debugger.c (mono_debugger_init): Create a private,
9065         malloc()-based code manager for the notification function and
9066         intentionally leak it on exit.  This fixes the crash-on-exit race
9067         condition.
9068
9069         * tramp-amd64.c
9070         (mono_debugger_create_notification_function): Added
9071         `MonoCodeManager *' argument.
9072
9073         * tramp-x86.c
9074         (mono_debugger_create_notification_function): Added
9075         `MonoCodeManager *' argument.
9076
9077 2006-05-23  Massimiliano Mantione  <massi@ximian.com>
9078
9079         * aliasing.c: Fixed 64 bit issue.
9080         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
9081         default since all known bugs are fixed (one more time!).
9082
9083 Tue May 23 13:47:28 CEST 2006 Paolo Molaro <lupus@ximian.com>
9084
9085         * mini.c: write barrier support.
9086
9087 2006-05-23  Martin Baulig  <martin@ximian.com>
9088
9089         * debug-debugger.c: Revert Paolo's change.  Add comment and #error
9090         check at the top of the file.
9091
9092 Sun May 21 12:22:29 CEST 2006 Paolo Molaro <lupus@ximian.com>
9093
9094         * debug-debugger.c: fix the build. Again. Hopefully Martin will stop
9095         reverting changes without reason and without changelog entries.
9096
9097 2006-05-18  Zoltan Varga  <vargaz@gmail.com>
9098
9099         * mini-sparc.c (mono_arch_output_basic_block): Add support for large stack offets
9100         to a few opcodes. Fixes #78439.
9101
9102         * mini-sparc.c: Rename mono_sparch_break () to mono_arch_break () to improve
9103         consistency with other archs.
9104
9105         * mini-ia64.c (mono_arch_emit_prolog): Remove debug stuff left in by mistake.
9106
9107 Wed May 17 18:07:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9108
9109         * debug-debugger.c: fix the build.
9110
9111 2006-05-17  Martin Baulig  <martin@ximian.com>
9112
9113         * debug-debugger.c
9114         (debugger_thread_vtable): Moved here from ../metadata/threads.c.
9115         (debugger_init_threads): Formerly known as mono_debugger_init_threads().
9116         (debugger_finalize_threads): Formaly known as mono_debugger_finalize_threads().
9117         (debugger_attach): Call GC_mono_debugger_add_all_threads().
9118
9119 2006-05-11  Zoltan Varga  <vargaz@gmail.com>
9120
9121         * mini.c (mini_init): Call pthread_attr_destroy () to fix a small memory leak.
9122
9123 2006-05-10  Zoltan Varga  <vargaz@gmail.com>
9124
9125         * mini-x86.c (mono_arch_instrument_epilog): Fix handling of 
9126         MONO_TYPE_GENERICINST.
9127         
9128         * mini-amd64.c (mono_arch_instrument_epilog): Fix handling of 
9129         MONO_TYPE_GENERICINST.
9130
9131 2006-05-09  Zoltan Varga  <vargaz@gmail.com>
9132
9133         * mini-x86.c (mono_arch_get_vcall_slot_addr): Add a missing call sequence. Fixes
9134         #78325.
9135
9136 2006-05-08  Zoltan Varga  <vargaz@gmail.com>
9137
9138         * mini.c (mono_create_jump_trampoline): Allocate MonoJitInfo from the domain
9139         mempool.
9140         (mono_jit_free_method): Remove the method from jump_trampoline_hash as well.
9141
9142 2006-05-06  Zoltan Varga  <vargaz@gmail.com>
9143
9144         * mini.c (mini_cleanup): Applied patch from Joachim Ante (joe@otee.dk). Call
9145         mono_trace_cleanup ().
9146
9147         * iltests.il: Fix problem with the newly added test.
9148
9149         * mini-codegen.c (mono_local_regalloc): When changing the dreg of an instruction
9150         due to register constraints, free up the previous hreg. Fixes #78314.
9151
9152         * iltests.il: Add new test for #78314.  
9153
9154         * mini-x86.c (mono_arch_get_inst_for_method): Use OP_ATOMIC_ADD_NEW_I4 for
9155         Interlocked.Add. Fixes #78312.
9156
9157         * mini-amd64.c (mono_arch_get_inst_for_method): Ditto.
9158         
9159 2006-05-05  Zoltan Varga  <vargaz@gmail.com>
9160
9161         * inssel.brg (mini_emit_virtual_call): Fix a warning.
9162
9163 2006-05-05  Martin Baulig  <martin@ximian.com>
9164
9165         * debug-mini.c (mono_debug_open_block): New method.
9166
9167         * mini-amd64.c
9168         (mono_arch_output_basic_block): Call mono_debug_open_block() at
9169         the beginning of each basic block.
9170
9171         * mini-x86.c
9172         (mono_arch_output_basic_block): Call mono_debug_open_block() at
9173         the beginning of each basic block.
9174
9175 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
9176
9177         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
9178         default until I understand why they break the build on amd64.
9179
9180 2006-05-04  Zoltan Varga  <vargaz@gmail.com>
9181
9182         * mini.c (mini_cleanup): Call mono_cleanup ().
9183
9184         * mini.c (UNVERIFIED): New macro to make it easier to track down verification
9185         errors.
9186
9187 2006-05-04  Massimiliano Mantione  <massi@ximian.com>
9188
9189         * aliasing.c: Fixed shameful cut&paste error that caused JIT crashes.
9190         * driver.c: Enabled inline,consprop,copyprop,treeprop,deadce by
9191         default since all known bugs are fixed, and I cannot reproduce bug
9192         77944... I'm asking Matt Hargett to test again after this commit.
9193
9194 2006-04-28  Massimiliano Mantione  <massi@ximian.com>
9195
9196         * mini-codegen.c: Fixed typo that thrashed inline.
9197
9198 2006-04-28  Zoltan Varga  <vargaz@gmail.com>
9199
9200         * dominators.c (compute_dominators): Avoid using a worklist since
9201         it is not correct in some cases. Instead, iterate over all bblocks as
9202         in the original paper. Fixes --compile-all -O=all System.Xml.dll.
9203
9204 2006-04-28  Miguel de Icaza  <miguel@novell.com>
9205
9206         * mini.c (mono_jit_compile_method_inner): Use
9207         mono_prepare_exception_from_error that resets the value
9208         internally.
9209
9210 2006-04-27  Miguel de Icaza  <miguel@novell.com>
9211
9212         * mini.c: Move the mini_loader_error_to_exception to metadata. 
9213         
9214 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
9215
9216         * aliasing.c: Fixed bug 78210.
9217
9218 2006-04-27  Massimiliano Mantione  <massi@ximian.com>
9219
9220         * driver.c: Disabled inline,consprop,copyprop,treeprop,deadce by
9221         default until all their problems (or the ones they trigger) are fixed.
9222
9223 2006-04-26  Zoltan Varga  <vargaz@gmail.com>
9224
9225         * aot-runtime.c (mono_aot_get_method_from_token_inner): Fix the previous patch.
9226         
9227         * aot-runtime.c (mono_aot_get_method_from_token_inner): Mark the method
9228         as loaded only after resolving patches since that could invoke the same method.
9229
9230         * aot-runtime.c (mono_aot_plt_resolve): Fix ppc etc. builds.
9231
9232         * aot-compiler.c: Refactor mono_aot_compile_aot () into a bunch of smaller
9233         functions.
9234
9235         * aot-runtime.c (init_plt): Use a normal trampoline to transfer code to the
9236         AOT loader.
9237
9238         * aot-compiler.c (emit_plt): Pass the plt offset in %eax instead of on the
9239         stack.
9240
9241         * mini-trampolines.c (mono_aot_plt_trampoline): New trampoline to handle calls
9242         made from AOT code through the PLT table.
9243
9244         * mini-x86.h mini-amd64.h: Define MONO_ARCH_AOT_PLT_OFFSET_REG to the register
9245         holding the plt offset when a call is made to the aot plt trampoline.
9246         
9247 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
9248
9249         * aot-runtime.c aot-compiler.c cpu-amd64.md mini-amd64.c: Update parts of the 
9250         amd64 AOT support.
9251
9252         * Makefile.am (common_sources): Fix build breakage.
9253
9254         * aot-runtime.c aot-compiler.c: Reorganize the AOT code yet again: Make all
9255         calls through a jump table similar to the ELF PLT table. Avoid indirect calls for
9256         intra-assembly calls if possible.
9257         
9258         * tramp-*.c: Add new functions for patching/nullifying PLT entries.
9259
9260         * mini-trampolines.c: Handle PLT entries.
9261
9262         * mini.c: Avoid creating a GOT var for calls.
9263
9264         * jit-icalls.c (helper_ldstr_mscorlib): New helper function for loading strings
9265         from mscorlib code.
9266
9267         * jit-icalls.c (helper_newobj_mscorlib): New helper function to create objects
9268         from mscorlib code.
9269
9270         * mini.c (mono_method_to_ir): Use the new helper functions in throw bblocks in
9271         AOT code.       
9272
9273         * mini.h: Bump AOT file format version.
9274         
9275         * mini.c (get_basic_blocks): Fix the calculation of bb->out_of_line so it
9276         covers more cases.
9277
9278 2006-04-25  Martin Baulig  <martin@ximian.com>
9279
9280         * driver.c: Disable copyprop, consprop and inline when running
9281         inside the debugger.
9282
9283 2006-04-25  Martin Baulig  <martin@ximian.com>
9284
9285         * debug-debugger.h (MonoDebuggerInfo): Replaced `get_thread_id'
9286         with `get_current_thread' and added `detach'.
9287         (MonoDebuggerMetadataInfo): Added `thread_size',
9288         `thread_tid_offset', `thread_stack_ptr_offset' and
9289         `thread_end_stack_offset'.
9290
9291 2006-04-25  Zoltan Varga  <vargaz@gmail.com>
9292
9293         * aot.c Makefile.am: Split aot.c into two new files aot-compiler.c and 
9294         aot-runtime.c.
9295
9296         * inssel.brg (mini_emit_load_intf_reg_vtable): Use a new kind of AOT constant
9297         ADJUSTED_IID to avoid the need for adjusting the IID at runtime.
9298
9299         * mini.h (MonoJumpInfoType): Add MONO_PATCH_INFO_ADJUSTED_IID.
9300
9301         * mini.c (mono_resolve_patch_target): Handle ADJUSTED_IID.
9302
9303         * aot.c: Add support for ADJUSTED_IID.  
9304
9305 2006-04-24  Zoltan Varga  <vargaz@gmail.com>
9306
9307         * aot.c (emit_method_order): Don't align method_order_end.
9308
9309         * inssel.brg (stmt): Fix interface calls in AOT code which got broken by
9310         the interface ID changes.
9311
9312 2006-04-21  Dick Porter  <dick@ximian.com>
9313
9314         * mini.c (mini_thread_cleanup): Clear the JIT TLS data when
9315         cleaning up a thread.  Fixes the new part of bug 77470.
9316
9317 2006-04-20  Geoff Norton  <gnorton@customerdna.com>
9318
9319         * mini-ppc.c: Call mono_jit_thread_attach when transitioning a native
9320         to managed wrapper.
9321                      
9322 2006-04-19  Zoltan Varga  <vargaz@gmail.com>
9323
9324         * mini.h mini.c: Remove mono_type_to_ldind/stind () which are now in marshal.c.
9325         
9326         * mini.c (mono_runtime_install_handlers): Handle SIGABRT similarly to
9327         SIGSEGV. Fixes #78072.
9328
9329         * mini-exceptions.c (mono_handle_native_sigsegv): Add a 'signal' argument,
9330         unregister our SIGABRT handler.
9331
9332 2006-04-19  Massimiliano Mantione  <massi@ximian.com>
9333
9334         * mini.c: Disabled inline where it can alter the call stack in a
9335         way visible from managed code.
9336         * driver.c: enabled inline,consprop,copyprop,treeprop,deadce by
9337         default.
9338
9339 2006-04-16  Zoltan Varga  <vargaz@gmail.com>
9340
9341         * mini-amd64.c (mono_arch_emit_prolog): Attach the thread to the runtime as it is done
9342         on other platforms. Fixes #78089.
9343
9344 2006-04-13  Martin Baulig  <martin@ximian.com>
9345
9346         * driver.c: Also check a `MONO_INSIDE_MDB' environment variable to
9347         determine whether we're inside the debugger.
9348
9349         * debug-debugger.h
9350         (MonoDebuggerMetadataInfo): Added all offsets from `MonoDefaults'.
9351
9352 2006-04-12  Zoltan Varga  <vargaz@gmail.com>
9353
9354         * mini.c (mono_method_to_ir): Handle multiple LEAVE statements inside a single
9355         handler clauses. Fixes #78024.
9356
9357         * mini-sparc.c (mono_arch_output_basic_block): Handle large offsets
9358         in the CALL_MEMBASE opcodes. Fixes #78088.
9359         (mono_arch_get_vcall_slot_addr): Ditto.
9360
9361 2006-04-10  Martin Baulig  <martin@ximian.com>
9362
9363         * debug-debugger.c: The thread handling code has now been moved
9364         into ../metadata/threads.c.
9365
9366 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9367
9368         * driver.c (mono_main): Fix --with-gc=none build.
9369
9370         * mini-codegen.c (mono_spillvar_offset): Improve alignment.
9371         (mono_spillvar_offset_float): Ditto.
9372         (mono_local_regalloc): Only do the OP_MOVE optimization if ins->dreg is a local
9373         hreg, not when its !global, since on ia64, there is a third category: stacked
9374         registers.      
9375
9376 Mon Apr 10 14:39:49 CEST 2006 Paolo Molaro <lupus@ximian.com>
9377
9378         * mini.c: set MonoInst->klass for load field address and a few other
9379         places.
9380
9381 2006-04-10  Zoltan Varga  <vargaz@gmail.com>
9382
9383         * helpers.c (mono_disassemble_code): Emit debug info on amd64 as well.
9384
9385 2006-04-07  Zoltan Varga  <vargaz@gmail.com>
9386
9387         * dominators.c (compute_dominators): Fix yet another bug which surfaced after
9388         the branch opt changes.
9389
9390 2006-04-06  Dick Porter  <dick@ximian.com>
9391
9392         * wapihandles.c (mini_wapi_semdel): Fix parameters in semctl () call.
9393         
9394         * wapihandles.c (mini_wapi_seminfo): 
9395         * driver.c (mono_main): Add semaphore info option
9396
9397 2006-04-05  Zoltan Varga  <vargaz@gmail.com>
9398
9399         * dominators.c (compute_dominators): Fix a bug which surfaced after the recent
9400         branch optimization changes. Fixes #78009.
9401
9402 Wed Apr 5 16:40:33 CEST 2006 Paolo Molaro <lupus@ximian.com>
9403
9404         * mini.c: ignore accessibility of methods in managed->native wrappers.
9405
9406 2006-04-04  Zoltan Varga  <vargaz@gmail.com>
9407
9408         * mini.c (mini_cleanup): Call print_jit_stats () earlier since it accesses metadata.
9409         
9410         * mini.c (mini_cleanup): Free 'emul_opcode_map' as well.
9411
9412 2006-04-03  Zoltan Varga  <vargaz@gmail.com>
9413
9414         * mini.c: Modify the branch optimizations to preserve the invariant that
9415         the entries inside the in_bb and out_bb arrays are unique.
9416         (mono_unlink_bblock): Avoid creation of new arrays.
9417
9418 2006-04-02  Zoltan Varga  <vargaz@gmail.com>
9419
9420         * mini.c (mono_unlink_bblock): Fix regression caused by previous
9421         change (#77992).
9422
9423 2006-04-01  Zoltan Varga  <vargaz@gmail.com>
9424
9425         * mini.c (optimize_branches): Remove the "optimizations" in
9426         the cbranch1/cbranch2 -> branch cases which were causing several
9427         problems in the past. Fixes #77986.
9428
9429 2006-03-31  Chris Toshok  <toshok@ximian.com>
9430
9431         * driver.c (DEFAULT_OPTIMIZATIONS): back out the new set of
9432         default optimizations :(
9433
9434 2006-03-31  Zoltan Varga  <vargaz@gmail.com>
9435
9436         * inssel-x86.brg mini-codegen.c mini.c: Merge some changes/fixes from linear-il
9437         branch.
9438
9439 2006-03-31  Massimiliano Mantione  <massi@ximian.com>
9440
9441         * local-propagation.c: Added comments to structs and removed
9442         "Mono" prefixes from local tree mover types.
9443
9444 2006-03-30  Zoltan Varga  <vargaz@gmail.com>
9445
9446         * Makefile.am (arch_sources): Define this for each architecture so 
9447         libmono_la_SOURCES is defined in one place.
9448
9449 Wed Mar 29 20:51:14 CEST 2006 Paolo Molaro <lupus@ximian.com>
9450
9451         * driver.c, wapihandles.c, Makefile.am: integrate the io-layer utils
9452         from handles/.
9453
9454 Wed Mar 29 17:16:57 CEST 2006 Paolo Molaro <lupus@ximian.com>
9455
9456         * driver.c: print the GC name supplied by configure.
9457
9458 2006-03-29  Massimiliano Mantione  <massi@ximian.com>
9459
9460         * local-propagation.c: Added tree mover, and moved here all the
9461         local propagation code from mini.c
9462         * mini.c: Added support for treeprop, and moved all the local
9463         propagation code to local-propagation.c
9464         * mini.h: Added support for treeprop
9465         * driver.c: Added support for treeprop, enabled consprop, copyprop,
9466         treeprop, inline and deadce by default
9467         * Makefile.am: Added local-propagation.c
9468
9469 2006-03-25  Zoltan Varga  <vargaz@gmail.com>
9470
9471         * exceptions-sparc.c: Applied patch from David S. Miller  <davem@sunset.davemloft.net>: Implement correct support for sparc/linux.
9472
9473 Fri Mar 24 20:07:19 CET 2006 Paolo Molaro <lupus@ximian.com>
9474
9475         * debug-debugger.c: make it compile without the Boehm GC.
9476
9477 Wed Mar 22 18:25:18 CET 2006 Paolo Molaro <lupus@ximian.com>
9478
9479         * mini.c: fixed issue with mismatch when an icall is registered
9480         with multiple names but same address.
9481
9482 Tue Mar 21 15:59:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9483
9484         * declsec.c, mini-exceptions.c: use write barrier to set reference
9485         fields of managed objects.
9486
9487 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9488
9489         * mini.c (mono_print_method_from_ip): Recognize JIT trampolines as well.
9490         (can_access_internals): Fix a warning.
9491
9492         * mini.c (print_method_from_ip): Rename this to 
9493         mono_print_method_from_ip so it gets exported.
9494
9495         * trace.c: Deal with strings inside StringBuilder's containing garbage
9496         and fix memory leaks. Fixes #77848.
9497
9498 2006-03-19  Zoltan Varga  <vargaz@gmail.com>
9499
9500         * mini.c (mini_init): Disable the setting of GC_stackbottom on ia64. Hopefully
9501         fixes #77787.
9502
9503 2006-03-16 Neale Ferguson <neale@sinenomine.net>
9504         
9505         * mini-s390.c: Remove OP_X86_TEST_NULL.
9506
9507 Thu Mar 16 17:19:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9508
9509         * mini.c: use the correct GetHashCode() for the moving collector.
9510
9511 2006-03-16  Massimiliano Mantione  <massi@ximian.com>
9512
9513         * liveness.c: Regalloc spill cost tuning.
9514
9515 2006-03-15 Neale Ferguson <neale@sinenomine.net>
9516         
9517         * mini-s390x.h: Correct S390_LONG macro.
9518
9519         * mini-s390x.c: Cleanup unused code.
9520
9521 2006-03-15  Zoltan Varga  <vargaz@gmail.com>
9522
9523         * jit-icalls.h: New file.
9524
9525         * Makefile.am mini.c jit-icalls.c: Use a proper include file for the jit
9526         icalls and include that instead of including jit-icalls.c.
9527
9528         * mini-ppc.c (mono_arch_output_basic_block): Remove references to
9529         OP_X86 opcodes.
9530
9531 Tue Mar 14 20:23:53 CET 2006 Paolo Molaro <lupus@ximian.com>
9532
9533         * mini.c: when checking for member accessibility, also check for
9534         friend assemblies and for explicit interface implementations.
9535
9536 2006-03-14  Zoltan Varga  <vargaz@gmail.com>
9537
9538         * mini-codegen.c (mono_local_regalloc): Remove incorrect g_free () calls.
9539
9540         * cpu-arm.md cpu-g4.md: Remove x86_ opcodes.
9541
9542         * mini-x86.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9543         common cases are done first.    
9544
9545         * mini-ops.h: Only define platform specific opcodes on the given platform.
9546
9547         * mini.h regalloc.h mini-codegen.c: Merge optimizations from the linear-il
9548         branch.
9549         
9550 2006-03-14  Martin Baulig  <martin@ximian.com>
9551
9552         Revert Paolo's change from r57348:
9553
9554         * mini.h: don't use gboolean for bitfields.
9555         * mini.c: verifier changes for fields and methods accessibility.
9556
9557 2006-03-13  Neale Ferguson <neale@sinenomine.net>
9558
9559         * mini-s390.h, mini-s390x.h: Fix calls to mono_call_inst_add_outarg_reg.
9560
9561         * mini-s390x.c: Fix conv_r_un.
9562
9563         * cpu-s390, cpu-s390x.md: Fix lengths.
9564
9565 Sun Mar 12 17:31:22 CET 2006 Paolo Molaro <lupus@ximian.com>
9566
9567         * mini.c: nested types have access to all the nesting
9568         levels, not just the enclosing types.
9569
9570 Sun Mar 12 16:23:11 CET 2006 Paolo Molaro <lupus@ximian.com>
9571
9572         * mini.c: added a few more verification checks.
9573
9574 2006-03-12  Zoltan Varga  <vargaz@gmail.com>
9575
9576         * liveness.c: Merge optimizations from the linear-il branch.
9577
9578 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9579
9580         * mini-ia64.c (emit_call): Add a comment.
9581
9582         * tramp-ia64.c (mono_arch_patch_callsite): Handle indirect calls as well.
9583
9584         * tramp-ia64.c: Fix some warnings.
9585
9586 Sat Mar 11 20:15:59 CET 2006 Paolo Molaro <lupus@ximian.com>
9587
9588         * mini.h: don't use gboolean for bitfields.
9589         * mini.c: verifier changes for fields and methods accessibility.
9590
9591 2006-03-11  Zoltan Varga  <vargaz@gmail.com>
9592
9593         * mini.c (mono_icall_get_wrapper): Fix an ia64 bug introduced by the
9594         lazy icall wrapper changes.
9595
9596         * dominators.c: Replace all the dominator algorithms with faster
9597         ones from the linear-il branch.
9598
9599         * inssel-*.brg: Allocate call->out_ireg_args and call->out_freg_args from
9600         the mempool.
9601
9602         * mini-amd64.h (MONO_ARCH_INST_FIXED_REG): Reorganize the comparisons so
9603         common cases are done first.
9604
9605         * mini-amd64.c: Fix some warnings.
9606
9607         * mini-codegen.c mini-*.c: Allocate call->out_ireg_args and call->out_freg_args
9608         from the mempool.
9609
9610         * mini.c (mono_jit_compile_method_with_opt): Fix a race in the newly
9611         added code.
9612
9613         * mini.h: Add a missing prototype.
9614
9615 2006-03-10  Zoltan Varga  <vargaz@gmail.com>
9616
9617         * mini.c: Compile icall wrappers lazily.
9618
9619         * mini-codegen.c: Use printf instead of g_print since its much faster.
9620
9621         * mini.h (mono_bitset_foreach_bit): Use the faster mono_bitset_find_start ()
9622         function.
9623
9624         * mini.c (optimize_branches): Cache the negative result from 
9625         remove_block_if_useless ().
9626
9627         * mini.c (optimize_branches): Avoid restarting the iteration after each change. 
9628         Also fix some bblock linking issues.
9629
9630         * helpers.c (mono_disassemble_code): Reduce the size of the temporary
9631         assembly files.
9632
9633         * mini.h: Define G_LIKELY/G_UNLIKELY macros for older glib versions.
9634
9635         * mini.h (MonoBasicBlock): Reorganize the fields, putting more frequently
9636         accessed fields first, for better cache behavior.
9637         
9638 Fri Mar 10 18:21:41 CET 2006 Paolo Molaro <lupus@ximian.com>
9639
9640         * mini.c: speedup IList<T> array accesses.
9641
9642 2006-03-09  Zoltan Varga  <vargaz@gmail.com>
9643
9644         * mini.c (mono_method_to_ir): Handle large methods overflowing the 
9645         inline_costs counter. Fixes #77190.
9646
9647 2006-03-06  Zoltan Varga  <vargaz@gmail.com>
9648
9649         * mini-exceptions.c: Call mono_trace_is_enabled () before printing
9650         trace messages. Fixes #77706.
9651
9652 2006-03-04  Martin Baulig  <martin@ximian.com>
9653
9654         * tramp-amd64.c, tramp-x86.c
9655         (mono_debugger_create_notification_function): Use
9656         mono_global_codeman_reserve() to allocate a buffer at runtime and
9657         return it.
9658
9659         * debug-debugger.h (MonoDebuggerInfo): Added `initialize'.
9660
9661         * debug-debugger.c (mono_debugger_init): Dynamically allocate the
9662         notification function at runtime and then call `initialize' in the
9663         `MONO_DEBUGGER__debugger_info' vtable.
9664
9665 2006-03-04  Zoltan Varga  <vargaz@gmail.com>
9666
9667         * iltests.il: Fix a visibility problem.
9668
9669 Wed Mar 1 15:55:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9670
9671         * driver.c, mini.c: add hooks for the counters API.
9672
9673 Wed Mar 1 12:28:04 CET 2006 Paolo Molaro <lupus@ximian.com>
9674
9675         * driver.c: show disabled options.
9676
9677 Wed Mar 1 12:18:51 CET 2006 Paolo Molaro <lupus@ximian.com>
9678
9679         * linear-scan.c: always use cost-driven selection.
9680
9681 2006-02-28  Raja R Harinath  <rharinath@novell.com>
9682
9683         * jit-icalls.c (helper_compile_generic_method): Revert change from
9684         2006-02-24.
9685
9686 Mon Feb 27 18:58:19 GMT 2006 Paolo Molaro <lupus@ximian.com>
9687
9688         * cpu-arm.md, mini-arm.c: implemented MemoryBarrier.
9689
9690 Sat Feb 25 17:39:21 CET 2006 Paolo Molaro <lupus@ximian.com>
9691
9692         * inssel.brg: style fixes, mostly to force the updated monoburg
9693         to run for people using svn.
9694
9695 Sat Feb 25 17:07:42 CET 2006 Paolo Molaro <lupus@ximian.com>
9696
9697         * mini.c: match monoburg changes.
9698
9699 Sat Feb 25 16:04:33 CET 2006 Paolo Molaro <lupus@ximian.com>
9700
9701         * mini.h, mini.c, abcremoval.c, aliasing.c, liveness.c,
9702         ssapre.c, graph.c, ssa.c: put the mono_burg_arity[]
9703         declaration in the header file.
9704
9705 Sat Feb 25 14:19:31 CET 2006 Paolo Molaro <lupus@ximian.com>
9706
9707         * helpers.c: reduce relocations and mem usage.
9708
9709 Sat Feb 25 11:58:16 CET 2006 Paolo Molaro <lupus@ximian.com>
9710
9711         * mini.h, mini-codegen.c: disable logging features if
9712         requested by configure.
9713
9714 Sat Feb 25 11:54:49 CET 2006 Paolo Molaro <lupus@ximian.com>
9715
9716         * mini.c: tiny verifier changes.
9717
9718 Fri Feb 24 18:17:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9719
9720         * mini-ops.h, inssel-x86.brg, tramp-x86.c, mini-x86.c,
9721         cpu-pentium.md: stack alignment changes for osx/x86,
9722         partially from Geoff Norton <gnorton@customerdna.com>.
9723
9724 2006-02-24  Raja R Harinath  <harinath@gmail.com>
9725
9726         * jit-icalls.c (helper_compile_generic_method): Update to changes
9727         in metadata/class.c.
9728
9729 2006-02-24  Zoltan Varga  <vargaz@gmail.com>
9730         
9731         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add a missing check.
9732         
9733         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Add support for
9734         interface calls with large offsets.
9735
9736 2006-02-23  Raja R Harinath  <rharinath@novell.com>
9737
9738         * jit-icalls.c (helper_compile_generic_method): Document the
9739         special-case we depend on so that we can inflate the method twice
9740         with the same context with no bad side-effects.
9741
9742 Thu Feb 23 13:45:46 CET 2006 Paolo Molaro <lupus@ximian.com>
9743
9744         * mini-x86.c, mini-amd64.c: fix for case when xen support
9745         is disabled.
9746
9747 Wed Feb 22 19:38:40 CET 2006 Paolo Molaro <lupus@ximian.com>
9748
9749         * mini-x86.c, mini-amd64.c: generate code to access tls items
9750         in a faster way for Xen systems.
9751
9752 Wed Feb 22 10:31:25 CET 2006 Paolo Molaro <lupus@ximian.com>
9753
9754         * exceptions-x86.c, mini-x86.h, driver.c, mini-codegen.c:
9755         updates and compilation fixes for the OSX/x86 port, mostly from
9756         Geoff Norton <gnorton@customerdna.com>.
9757
9758 Tue Feb 21 19:56:55 CET 2006 Paolo Molaro <lupus@ximian.com>
9759
9760         * inssel.brg: faster interface call implementation
9761         to sync with the interface_offsets MonoVTable changes.
9762
9763 Mon Feb 20 10:37:57 CET 2006 Paolo Molaro <lupus@ximian.com>
9764
9765         * mini.c: more verification checks.
9766
9767 Fri Feb 17 19:47:29 CET 2006 Paolo Molaro <lupus@ximian.com>
9768
9769         * mini.c: added a few more verification checks.
9770
9771 2006-02-17      Neale Ferguson <neale@sinenomine.net>
9772
9773         * mini-s390x.c, mini-s390x.h: Check for presence of long displacement
9774         facility on the processor and use it if available.
9775
9776 Fri Feb 17 16:12:52 CET 2006 Paolo Molaro <lupus@ximian.com>
9777
9778         * driver.c, aot.c, mini.c: throw exception if the IL code is
9779         invalid or unverifiable.
9780
9781 2006-02-17  Raja R Harinath  <rharinath@novell.com>
9782
9783         * generics.2.cs (test_0_ldfld_stfld_mro): Use m.struct_field, not
9784         m.StructField.
9785
9786 2006-02-16  Zoltan Varga  <vargaz@gmail.com>
9787
9788         * generics.2.cs: Add some tests for generics ldfld/stfld wrappers.
9789
9790 Wed Feb 15 16:23:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9791
9792         * mini-s390x.c, mini-s390.c, mini.c, mini-amd64.c, mini-arm.c,
9793         mini-ia64.c, mini-sparc.c, mini-x86.c, mini-ppc.c: fixed
9794         handling of instantiated generic valuetypes.
9795
9796 2006-02-11  Zoltan Varga  <vargaz@gmail.com>
9797
9798         * mini-exceptions.c mini-x86.h mini-x86.c: Get rid of 
9799         MONO_INIT_CONTEXT_FROM_CALLER, and use MONO_INIT_CONTEXT_FROM_FUNC
9800         instead.
9801
9802         * generics.2.cs: Revert the nullable reftypes tests.
9803
9804 2006-02-10  Zoltan Varga  <vargaz@gmail.com>
9805
9806         * mini-exceptions.c (MONO_INIT_CONTEXT_FROM_CALLER): Avoid
9807         using __builtin_frame_address (1) as it doesn't work in the presence
9808         of optimizations. Hopefully fixes #77273.
9809
9810         * Makefile.am generics.cs generics.2.cs: Revert the generics.2.cs
9811         -> generics.cs change as it doesn't work with some automake versions.
9812
9813 Thu Feb 9 16:24:44 CET 2006 Paolo Molaro <lupus@ximian.com>
9814
9815         * mini.c: handle systems that sue a different way to
9816         retrieve the stack address of the current thread.
9817
9818 2006-02-09  Zoltan Varga  <vargaz@gmail.com>
9819
9820         * Makefile.am generics.2.cs: Rename this to generics.cs and handle
9821         it specially in the makefile.
9822
9823         * generics.2.cs: Add tests for nullable reference types.
9824
9825 Wed Feb 8 19:33:17 CET 2006 Paolo Molaro <lupus@ximian.com>
9826
9827         * mini.c: always handle the case when mono_jit_init()
9828         is called in a thread different from the main thread,
9829         confusing libgc (bug #77309).
9830
9831 Mon Feb 6 09:01:24 EST 2006 Paolo Molaro <lupus@ximian.com>
9832
9833         * mini-ppc.c: fix handling of exceptions in large methods (bug #74932).
9834
9835 Fri Feb 3 18:51:35 CET 2006 Paolo Molaro <lupus@ximian.com>
9836
9837         * mini.c: change optimize_branches () to use a single loop
9838         and introduce a new optimization to simplify some range checks.
9839
9840 2006-02-03  Martin Baulig  <martin@ximian.com>
9841
9842         * debug-debugger.c (debugger_thread_manager_thread_created): Removed
9843         and merged with debugger_thread_manager_add_thread().
9844         (mono_debugger_main): Call debugger_thread_manager_add_thread() to
9845         inform the debugger about the main thread.
9846
9847 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9848
9849         * basic.cs: Add test for div.un/rem.un constant folding.
9850
9851 2006-02-03  Neale Ferguson <neale@sinenomine.net>
9852
9853         * cpu-s390x.md: correct int_xor_imm length
9854
9855 2006-02-03  Zoltan Varga  <vargaz@gmail.com>
9856
9857         * generics.2.cs: New test for #77442.
9858
9859         * jit-icalls.c (helper_compile_generic_method): Check for null. Fixes
9860         #77442.
9861
9862 2006-02-02  Martin Baulig  <martin@ximian.com>
9863
9864         * tramp-x86.c, tramp-amd64.c: It's now safe to #include
9865         <mono/metadata/mono-debug-debugger.h>   
9866
9867         * debug-mini.c: Don't #define _IN_THE_MONO_DEBUGGER.
9868
9869 2006-02-02  Martin Baulig  <martin@ximian.com>
9870
9871         * debug-debugger.h: New header file for debug-debugger.c.
9872
9873         * debug-debugger.c: Big API cleanup; don't run the managed Main()
9874         function is a separate thread anymore; add support for attaching.
9875
9876 2006-02-01  Zoltan Varga  <vargaz@gmail.com>
9877
9878         * tramp-x86.c: Fix a warning.
9879
9880 2006-01-31  Zoltan Varga  <vargaz@gmail.com>
9881
9882         * mini-amd64.c (mono_arch_compute_omit_fp): Avoid hitting an assertion
9883         on very large methods.
9884
9885         * aot.c (load_patch_info): Fix a warning.
9886
9887 Mon Jan 30 12:51:10 CET 2006 Paolo Molaro <lupus@ximian.com>
9888
9889         * cpu-pentium.md, mini-x86.c, inssel.brg, inssel-x86.brg,
9890         mini-ops.h: alu membase optimizations.
9891
9892 Fri Jan 27 21:11:08 CET 2006 Paolo Molaro <lupus@ximian.com>
9893
9894         * mini-ops.h, mini.c, inssel.brg, inssel-x86.brg: opcode
9895         to speedup StringBuilder.
9896
9897 2006-01-27  Zoltan Varga  <vargaz@gmail.com>
9898
9899         * dominators.c (mono_compute_natural_loops): Fix detection of
9900         loop body start blocks.
9901
9902         * mini-exceptions.c (mono_print_thread_dump): Fix non x86 builds.
9903
9904 2006-01-26  Zoltan Varga  <vargaz@gmail.com>
9905
9906         * mini.h mini.c mini-exceptions.c: Add thread dump support. Fixes
9907         #75145.
9908
9909 2006-01-25  Massimiliano Mantione  <massi@ximian.com>
9910
9911         * aliasing.c: Fixed aliasing issue on 64 bit archs.
9912
9913 2006-01-25  Martin Baulig  <martin@ximian.com>
9914
9915         * debug-debugger.c: Moved the `MonoDebuggerManager' and
9916         `MonoDebuggerThread' typedefs here from mono-debug-debugger.h and
9917         started to cleanup this file a little bit.
9918
9919 Tue Jan 24 18:20:48 CET 2006 Paolo Molaro <lupus@ximian.com>
9920
9921         * mini.c: optimize a codepath frequently happening in generics code.
9922
9923 2006-01-23  Martin Baulig  <martin@ximian.com>
9924
9925         * Makefile.am: Only compile debug-debugger.c on supported platforms.
9926
9927         * debug-debugger.c: Kill the IO_LAYER() hack and use the io-layer
9928         functions directly.
9929
9930         * driver.c: debug-debugger.c is only available if
9931         `MONO_DEBUGGER_SUPPORTED' is defined.   
9932
9933 2006-01-23  Martin Baulig  <martin@ximian.com>
9934
9935         * debug-debugger.c: Only enable this on platforms where the Mono
9936         Debugger is working (x86 and x86_64).
9937
9938 2006-01-21  Martin Baulig  <martin@ximian.com>
9939
9940         The Mono Debugger is now using the normal `mono' instead of the
9941         `mono-debugger-mini-wrapper' when executing managed code.
9942
9943         * debug-debugger.c: New file; previously known as
9944         debugger/wrapper/wrapper.c.
9945
9946         * debug-mini.c (mono_init_debugger): Removed.
9947
9948         * driver.c (mono_main): Added new `--inside-mdb' command line
9949         argument which is used when running inside the debugger.
9950
9951 2006-01-20  Zoltan Varga  <vargaz@gmail.com>
9952
9953         * liveness.c (mono_analyze_liveness): Remove some unused data
9954         structures.
9955
9956 2006-01-17  Zoltan Varga  <vargaz@gmail.com>
9957
9958         * mini.h: Move mono_bitset_test_fast macro to monobitset.h where it belongs.
9959
9960 2006-01-16  Zoltan Varga  <vargaz@gmail.com>
9961
9962         * mini.h (mono_bitset_test_fast): Disable the 'fast' implementation which
9963         depends on implementation details of monobitset.
9964
9965         * mini.c (mini_get_ldelema_ins): Fix handling of 1 dimensional arrays.
9966         Fixes #77271.
9967
9968 2006-01-15  Zoltan Varga  <vargaz@gmail.com>
9969
9970         * liveness.c: Update after monobitset changes.
9971
9972 2006-01-14  Zoltan Varga  <vargaz@gmail.com>
9973
9974         * mini-amd64.c (mono_arch_compute_omit_fp): Fix a leak.
9975
9976 2006-01-11 Neale Ferguson <neale@sinenomine.net>
9977
9978         * inssel-s390x.brg: Fix reg: OP_LDADDR(OP_S390_LOADARG) register setting.
9979
9980         * mini-s390x.c: Remove warning messages.
9981
9982 2006-01-11  Ben Maurer  <bmaurer@andrew.cmu.edu>
9983
9984         * mini.c: pass the jitinfo to mono_profiler_method_end_jit.
9985
9986 2006-01-10  Zoltan Varga  <vargaz@gmail.com>
9987
9988         * generics.2.cs: Add ldelem/stelem_any test.
9989
9990 2006-01-10 Neale Ferguson <neale@sinenomine.net>
9991
9992         * mini-s390.c: Fix ATOMIC_ADD_I4 operation.
9993
9994 2006-01-07  Zoltan Varga  <vargaz@gmail.com>
9995
9996         * inssel-long.brg: Fix int->long ovf conversion rules. Fixes #77172.
9997         
9998 2006-01-06  Zoltan Varga  <vargaz@gmail.com>
9999
10000         * generics.2.cs: Reenable vtype tests.
10001
10002         * inssel-x86.brg: Remove an icorrect valuetype rule.
10003
10004 2006-01-06 Neale Ferguson <neale@sinenomine.net>
10005
10006         * mini-s390x.c, inssel-s390x.brg, cpu-s390x.md: Fix ATOMIC_I8 operations. Provide
10007         initial support for OP_ABS.
10008
10009 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10010
10011         * mini-s390x.c (emit_float_to_int): Correct r8 to unsigned int algorithm.
10012
10013 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10014
10015         * mini-s390.c, mini-s390.h, inssel-s390.brg, cpu-s390.md: Fix r8 to unsigned int 
10016         conversion and implement LADD/LSUB.
10017
10018         * exceptions-s390.c: Standardize mono_arch_find_jit_info to match other
10019         architectures.
10020
10021 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10022
10023         * mini-s390x.c, mini-s390x.h: Fix r8 to unsigned int conversion.
10024
10025         * exceptions-s390x.c: Standardize mono_arch_find_jit_info to match other
10026         architectures.
10027
10028 2006-01-05 Neale Ferguson <neale@sinenomine.net>
10029
10030         * mini-s390x.c, mini-s390x.h, mini-s390.c, mini-s390.h: Fix lmf handling when 
10031         localloc is encountered.  Fixes crash in test-183.cs when using gmcs 
10032         (stack walk problem).
10033
10034 2006-01-04  Zoltan Varga  <vargaz@gmail.com>
10035
10036         * aot.c (mono_aot_load_method): Fix a warning.
10037
10038 2006-01-03  Neale Ferguson <neale@sinenomine.net>
10039
10040         * mini-s390x.h, exceptions-s390x.c, inssel-s390x.brg: Fix compiler warnings
10041
10042 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
10043
10044         * iltests.il: Add test for #77148.
10045
10046         * mini.c (mini_get_ldelema_ins): Handle arrays with rank 1 too. Fixes
10047         #77148.
10048
10049 2006-01-03  Neale Ferguson <neale@sinenomine.net>
10050
10051         * mini-s390x.c, inssel-s390x.brg: Remove debug statements
10052
10053 2006-01-03  Neale Ferguson <neale@sinenomine.net>
10054
10055         * mini-s390x.c, mini-s390x.h, exceptions-s390x.c, tramp-s390x.c, inssel-s390x.brg,
10056         cpu-s390x.md, mini-codegen.c, Makefile.am: add 64-bit s390 support to JIT.
10057
10058         * basic-long.cs: Add lconv-to-r4/r8 tests.
10059
10060 2006-01-03  Zoltan Varga  <vargaz@gmail.com>
10061
10062         * mini.c (mono_method_to_ir): Fix DynamicMethod support in some opcodes.
10063
10064         * mini-sparc.c (mono_arch_call_opcode): Use mono_class_value_size ()
10065         here as on other archs.
10066
10067 2005-12-29 Neale Ferguson <neale@sinenomine.net>
10068
10069         * mini-s390.c (mono_arch_get_inst_for_method): Add memory_barrier support.
10070
10071 2005-12-29 Neale Ferguson <neale@sinenomine.net>
10072
10073         * inssel-s390.brg: Correct register assignment; Rework L[ADD|SUB]_OVF[_UN] for s390.
10074         
10075         * cpu-s390.md: Fix lengths of a couple of long instructions; Add memory_barrier.
10076
10077         * mini-s390.c: Fix long add/sub overflow instructions; Fix displacement handling in
10078         instrument_prolog; Add memory_barrier instruction.
10079
10080 2005-12-26  Zoltan Varga  <vargaz@gmail.com>
10081
10082         * exceptions-x86.c mini-x86.h: Fix solaris/x86 exception handling.
10083
10084 2005-12-23  Zoltan Varga  <vargaz@gmail.com>
10085
10086         * tramp-ia64.c (mono_arch_get_unbox_trampoline): Flush icache.
10087
10088         * aliasing.c inssel.brg: Fix warnings.
10089
10090         * inssel-ia64.brg (OP_MEMSET): Fix an optimization which previously
10091         could skip initialization of some parts of memory.
10092
10093         * mini.c mini-ia64.c: Fix warnings.
10094
10095         * inssel-sparc.brg: Add an implementation of lneg which actually works.
10096
10097 2005-12-22  Zoltan Varga  <vargaz@gmail.com>
10098
10099         * aliasing.c (mono_build_aliasing_information): Add a workaround for
10100         a crash seen on sparc.
10101
10102         * mini-sparc.c: Add implementation of Thread.MemoryBarrier.
10103         
10104         * cpu-sparc.md: Add memory_barrier opcode. Remove unused opcodes.
10105
10106 2005-12-21 Neale Ferguson <neale@sinenomine.net>
10107
10108         * mini-ops.h: Add s390_backchain instruction
10109
10110         * inssel-s390.brg: Use backchaining instruction for LOADARG/STKARG operations.
10111
10112         * cpu-s390.md: Add s390_backchain instruction
10113
10114         * mini-s390.c: Significant ABI changes
10115
10116         * mini-s390.h: Cater for zero length structures
10117
10118 2005-12-20 Neale Ferguson <neale@sinenomine.net>
10119
10120         * mini-s390.c: ABI fixes
10121
10122         * inssel-s390.brg: Remove debug statements
10123
10124         * cpu-s390.md: Fix length of ATOMIC_xx operations
10125
10126 2005-12-19  Zoltan Varga  <vargaz@gmail.com>
10127
10128         * basic-float.cs: Add float<->long conversion tests.
10129
10130 2005-12-16 Neale Ferguson <neale@sinenomine.net>
10131
10132         * mini-s390.c: Fix LOCALLOC processing.
10133
10134         * tramp-s390.c (s390_magic_trampoline): Fix base calculation.
10135
10136 2005-12-15  Zoltan Varga  <vargaz@gmail.com>
10137
10138         * iltests.il: Add tests for some opcodes not covered by the other
10139         tests.
10140
10141 2005-12-15 Neale Ferguson <neale@sinenomine.net>
10142
10143         * mini-s390.c: Fix ADDCC/SBB bug revealed by test_0_ulong_regress; Correct 
10144         register loading for Tail processing; Correct trace output.
10145
10146         * inssel-s390.brg: Reimplement LSUB_OVF due to s390 implementation of signed math.
10147
10148         * cpu-s390.md: Correct size of jmp instruction. 
10149
10150 2005-12-13 Neale Ferguson <neale@sinenomine.net>
10151
10152         * mini-s390.c (mono_arch_emit_prolog): Remove some debugging bits.
10153
10154 2005-12-13 Neale Ferguson <neale@sinenomine.net>
10155
10156         * inssel-s390.brg tramp-s390.c cpu-s390.md mini-s390.c mini-s390.h:
10157           Bring s390 up to current level.
10158
10159 2005-12-12  Zltan Varga  <vargaz@gmail.com>
10160
10161         * generics.2.cs: Disable the newly added tests as they do not work yet.
10162         
10163         * generics.2.cs: Add valuetype tests.
10164
10165 2005-12-09  Zoltan Varga  <vargaz@gmail.com>
10166
10167         * basic-long.cs: Add i4->u8 test.
10168
10169         * objects.cs: Add tests for JIT intrinsic.
10170
10171         * mini.c (mini_get_inst_for_method): Resurrect the array Rank/Length
10172         optimizations lost by a mistake.
10173
10174 2005-12-07  Zoltan Varga  <vargaz@gmail.com>
10175
10176         * basic-long.cs: Remove a test moved to objects.cs.
10177
10178         * arrays.cs: Add more array tests.
10179
10180 2005-12-06  Zoltan Varga  <vargaz@gmail.com>
10181
10182         * arrays.cs: Add new tests for multi-dimensional arrays.
10183
10184 2005-12-06  Raja R Harinath  <rharinath@novell.com>
10185
10186         * Makefile.am (test_sources2): Add generics.2.cs.
10187         (EXTRA_DIST): Add test_sources2.
10188
10189 2005-12-05  Ben Maurer  <bmaurer@ximian.com>
10190
10191         Support for boxing and unboxing nullable types as well as the
10192         isinst operation on nullables, per the CLI ammendment.
10193
10194         * inssel.brg (CEE_ISINST): Special case for nullable
10195
10196         * mini.c (handle_unbox_nullable): new method
10197         (handle_box): Special case for nullable types
10198         (mono_method_to_ir): Call handle_unbox_nullable in correct
10199         places.
10200
10201         * generics.2.cs: New test suite
10202
10203         * Makefile.am: Support for regression tests with generics.
10204
10205 2005-12-03  Zoltan Varga  <vargaz@gmail.com>
10206
10207         * mini-amd64.c (emit_load_volatile_arguments): Add loading of arguments
10208         allocated to registers. Fixes #76800.
10209
10210 Thu Dec 1 12:59:40 EST 2005 Paolo Molaro <lupus@ximian.com>
10211
10212         * mini-ppc.c, inssel-ppc.brg: fix ABI issue (pinvoke3.cs).
10213
10214 2005-11-30  Zoltan Varga  <vargaz@gmail.com>
10215
10216         * exceptions.cs: Disable test_0_long_cast () test, since it fails on a lot 
10217         of platforms.
10218
10219 2005-11-29  Zoltan Varga  <vargaz@gmail.com>
10220
10221         * objects.cs basic-calls.cs: Move a test depending on valuetypes to
10222         objects.cs.
10223
10224         * inssel-long32.brg (CEE_CONV_I8): Remove unused labels.
10225         
10226         * inssel-long32.brg (CEE_CONV_I8): Convert this to a branchless version.
10227 Tue Nov 29 05:41:34 EST 2005 Paolo Molaro <lupus@ximian.com>
10228
10229         * mini-ppc.c, cpu-g4.md: ensure a fp register is converted to
10230         single precision before storing to a single precision location.
10231
10232 2005-11-28  Raja R Harinath  <rharinath@novell.com>
10233
10234         * Makefile.am (ILASM): Use profile-dependent location of ilasm.
10235
10236 2005-11-27  Zoltan Varga  <vargaz@gmail.com>
10237
10238         * basic-long.cs basic-calls.cs objects.cs: Move some tests to the
10239         correct files.
10240
10241         * basic.cs: Remove test_0_byte_compares test which was moved to
10242         objects.cs a long time ago.
10243
10244 2005-11-22  Massimiliano Mantione  <massi@ximian.com>
10245
10246         * aliasing.c: Fixed aliasing issue on 64 bit archs.
10247
10248 2005-11-20  Zoltan Varga  <vargaz@gmail.com>
10249
10250         * mini-ia64.c exceptions-ia64.c: Simplify the way filters/finally
10251         handlers are called.
10252
10253         * mini-ia64.c (mono_arch_emit_exceptions): Optimize size of exception
10254         throwing code.
10255
10256          * mini-ia64.c: Add support for the throw->branch exception 
10257         optimization.   
10258
10259         * driver.c (DEFAULT_OPTIMIZATIONS): Add MONO_OPT_EXCEPTION.
10260
10261 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
10262
10263         * mini.c: Enabled "fastpath" deadce :-)
10264         
10265 2005-11-18  Massimiliano Mantione  <massi@ximian.com>
10266
10267         * mini.c: Added "fastpath" deadce (deadce without SSA), and a simple
10268         alias analysis pass to support it.
10269         * mini.h: Likewise.
10270         * ssa.c: Likewise.
10271         * liveness.c: Likewise (liveness computation can use aliasing
10272         information to be more accurate).
10273         * driver.c: Added an "ssa" option go tell the JIT to use SSA, and
10274         moreover made so that "--compile-all" uses the given optimization
10275         flags and not the default ones.
10276         * aliasing.c: Alias analysis (new file).
10277         * aliasing.h: Likewise.
10278         * Makefile.am: added "aliasing.c" and "aliasing.h".
10279         
10280 2005-11-17  Zoltan Varga  <vargaz@gmail.com>
10281
10282         * mini-ops.h: Add missing OP_I opcodes so it is in synch with the
10283         OP_L opcodes.
10284
10285 2005-11-13  Zoltan Varga  <vargaz@gmail.com>
10286
10287         * mini-exceptions.c (mono_handle_exception_internal): Remove the 
10288         fp >= end_of_stack exit condition, as it is not needed, and it might
10289         become true for fp eliminated frames.
10290
10291 2005-11-11  Zoltan Varga  <vargaz@gmail.com>
10292
10293         * mini-x86.c (mono_arch_emit_epilog): Use G_STRUCT_OFFSET instead of hard
10294         coded offsets.
10295
10296 Tue Nov 8 11:28:20 GMT 2005 Paolo Molaro <lupus@ximian.com>
10297
10298         * mini-arm.c: fixed alignment of doubles/longs to match
10299         the C ABI (bug #76635).
10300
10301 Mon Nov 7 16:13:21 CET 2005 Paolo Molaro <lupus@ximian.com>
10302
10303         * aot.c: fix compilation with --enable-minimal=aot.
10304
10305 Fri Nov 4 12:34:15 GMT 2005 Paolo Molaro <lupus@ximian.com>
10306
10307         * mini-arm.c: fixed compatibility with the new
10308         floating point emulator package for compares.
10309
10310 2005-11-03  Atsushi Enomoto  <atsushi@ximian.com?
10311
10312         * mini.c : reverted sig->pinvoke changes (r51396-51397).
10313
10314 2005-11-01  Zoltan Varga  <vargaz@freemail.hu>
10315
10316         * mini-exceptions.c (print_stack_frame): Output to stderr.
10317         (mono_handle_native_sigsegv): Ditto.
10318
10319 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10320
10321         * mini-amd64.c (mono_arch_output_basic_block): Remove unused
10322         OP_LCONV_TO_OVF_I implementation.
10323
10324         * mini-amd64.c: Add support for the throw->branch exception 
10325         optimization.
10326
10327         * branch-opts.c (mono_branch_optimize_exception_target): Allow the case
10328         when the catch clause catches a more general exception, i.e. Object.
10329
10330 2005-10-30  Zoltan Varga  <vargaz@gmail.com>
10331
10332         * cpu-ia64.md: Remove unused opcodes.
10333
10334         * mini.c (GET_CONTEXT): Simplify this somewhat by removing arch
10335         specific defines for architectures defining USE_SIGACTION.
10336
10337         * mini-ia64.c: Fix some warnings.
10338
10339         * exceptions-ia64.c (mono_arch_ip_from_context): Fix this, the previous
10340         version seemed to skip a frame.
10341
10342 2005-10-30  Zoltan Varga  <vargaz@freemail.hu>
10343
10344         * mini.c: Clean up the usage of sig->pinvoke flag. Now
10345         only calls which are made to native code use this flag.
10346
10347 2005-10-29  Zoltan Varga  <vargaz@freemail.hu>
10348
10349         * mini-amd64.c (mono_arch_compute_omit_fp): Disable fp elimination for
10350         varargs methods as well.
10351         
10352         * mini-amd64.c exceptions-amd64.c: Allow fp elimination in methods
10353         which have save_lmf set. Reorganize methods prologs a bit.
10354
10355         * mini-amd64.c (mono_arch_compute_omit_fp): Move the check for the
10356         debugger to the proper place.
10357
10358 2005-10-29  Martin Baulig  <martin@ximian.com>
10359
10360         * mini-amd64.c (debug_omit_fp): Temporarily disable fp elimination
10361         when running inside the debugger until the debugger has support
10362         for it.
10363
10364 2005-10-26  Zoltan Varga  <vargaz@gmail.com>
10365
10366         * mini.h: Fix a warning.
10367
10368 2005-10-24  Miguel de Icaza  <miguel@novell.com>
10369
10370         * mini.c (mono_pmip): Just a wrapper for get_method_from_ip which
10371         we expose publicly, this returns the string.
10372
10373 2005-10-22  Zoltan Varga  <vargaz@freemail.hu>
10374
10375         * exceptions-amd64.c (mono_arch_find_jit_info): Fix some corner cases
10376         with fp elimination.
10377
10378 2005-10-21  Zoltan Varga  <vargaz@gmail.com>
10379
10380         * mini-exceptions.c (mono_handle_native_sigsegv): Try to print a
10381         native stacktrace using the glibc 'backtrace' function if available.
10382
10383 2005-10-20  Zoltan Varga  <vargaz@gmail.com>
10384
10385         * mini.h (MonoDebugOptions): Remove 'abort_on_sigsegv' option.
10386
10387         * mini-exceptions.c (mono_handle_native_sigsegv): New function to 
10388         handle SIGSEGVs received while in native code.
10389
10390         * mini.c (sigsegv_signal_handler): If the SIGSEGV happened in native
10391         code, call mono_handle_native_sigsegv which will abort the runtime
10392         after printing some diagnostics, instead of converting it into a
10393         confusing NullReferenceException.
10394
10395 2005-10-18  Zoltan Varga  <vargaz@gmail.com>
10396
10397         * cpu-pentium.md: Remove unused opcodes.
10398
10399 2005-10-18  Zoltan Varga  <vargaz@freemail.hu>
10400
10401         * mini-amd64.h (MonoLMF): Add rsp field.
10402
10403         * mini-amd64.c exceptions-amd64.c tramp-amd64.c: Save the sp reg into
10404         the lmf too.
10405
10406 2005-10-17  Zoltan Varga  <vargaz@gmail.com>
10407
10408         * mini-codegen.c (get_register_spilling): Fix some warnings.
10409
10410 2005-10-16  Zoltan Varga  <vargaz@freemail.hu>
10411
10412         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Add support for fp
10413         elimination during exception handling. Enable fp elimination by
10414         default.
10415
10416         * mini-amd64.h mini-amd64.c: Add preliminary support for frame pointer
10417         elimination.
10418
10419 2005-10-16  Martin Baulig  <martin@ximian.com>
10420
10421         * mini-exceptions.c
10422         (mono_debugger_run_finally): New public method for the debugger.
10423
10424 2005-10-10  Zoltan Varga  <vargaz@gmail.com>
10425
10426         * debug-mini.c (mono_debug_init_method): Fix warning.
10427
10428         * mini.h branch-opts.c (mono_branch_optimize_exception_target): Make
10429         the 'exname' parameter const to fix some warnings.
10430
10431 2005-10-09  Zoltan Varga  <vargaz@freemail.hu>
10432
10433         * mini-exceptions.c (mono_handle_exception_internal): Fix another bug
10434         introduced by the previous patch.
10435
10436 2005-10-08  Zoltan Varga  <vargaz@gmail.com>
10437
10438         * basic-float.cs: Add test for precision of float arithmetic.
10439
10440         * mini-ia64.c (mono_arch_output_basic_block): Convert to/from doubles
10441         when loading/storing single values from/to memory.
10442
10443         * mini.c (mono_jit_compile_method_with_opt): Create the function
10444         pointers in the correct domain.
10445
10446 2005-10-08  Zoltan Varga  <vargaz@freemail.hu>
10447
10448         * mini-exceptions.c (mono_handle_exception_internal): Fix bug 
10449         introduced by previous patch.
10450         
10451         * mini-exceptions.c (mono_handle_exception_internal): Handle the case
10452         when out_filter_idx is NULL.
10453
10454         * mini-exceptions.c: Don't run filter clauses twice during exception
10455         handling. Fixes #75755.
10456
10457 2005-10-07  Zoltan Varga  <vargaz@gmail.com>
10458
10459         * aot.c: Add support for ldflda wrappers.
10460
10461         * mini.c (mono_method_to_ir): Use ldflda wrappers for CEE_LDFLDA. Fixes
10462         #75902.
10463
10464 Tue Oct 4 20:23:25 CEST 2005 Paolo Molaro <lupus@ximian.com>
10465
10466         * mini.c, mini.h: do not consider exception handlers blocks when
10467         setting up interface variables.
10468
10469 2005-10-04  Zoltan Varga  <vargaz@freemail.hu>
10470
10471         * aot.c (emit_section_change): Fix emitting of sections on win32. Fixes #76322.
10472
10473 2005-10-03  Zoltan Varga  <vargaz@gmail.com>
10474
10475         * liveness.c (mono_analyze_liveness): Revert parts of r51051 since it
10476         causes a regression.
10477
10478         * mini.c (mini_thread_cleanup): Fix reading of freed memory.
10479
10480 2005-10-02  Zoltan Varga  <vargaz@freemail.hu>
10481
10482         * mini.h (OP_PCONST): Move the definition of OP_PCONST into the rest
10483         of the OP_P definitions.
10484
10485         * TODO: Add a proposal for dealing with the CEE/OP mess.
10486
10487         * mini-amd64.c (mono_arch_output_basic_block): Merge mul_imm 
10488         optimizations from the x86 port.
10489
10490         * cpu-amd64.md: Ditto.
10491
10492         * basic.cs basic-long.cs: Add tests.
10493
10494 Fri Sep 30 20:07:20 CEST 2005 Paolo Molaro <lupus@ximian.com>
10495
10496         * Makefile.am, driver.c, mini-x86.c, mini.c, mini.h, branch-opts.c:
10497         Patrik Torstensson's implementation of my exception-handling
10498         optimization idea, when the exception object is not used
10499         (bug #62150).
10500
10501 Fri Sep 30 19:10:29 CEST 2005 Paolo Molaro <lupus@ximian.com>
10502
10503         * mini-x86.c, cpu-pentium.md: Patrik Torstensson's port
10504         of the mul_imm optimizations from the old jit.
10505
10506 Fri Sep 30 11:37:51 EDT 2005 Paolo Molaro <lupus@ximian.com>
10507
10508         * mini.c, liveness.c: patch by Patrik Torstensson and
10509         Zoltan Varga to improve performance in methods with
10510         exception clauses.
10511
10512 2005-09-30  Zoltan Varga  <vargaz@gmail.com>
10513
10514         * driver.c: Remove 'Globalization' entry from --version.
10515
10516 2005-09-28  Zoltan Varga  <vargaz@gmail.com>
10517
10518         * mini.c (mono_jit_compile_method_inner): Do not load AOT code when
10519         there is a profiler interested in JIT events.
10520
10521         * aot.c: Load profile files produced by the AOT profiling module, and
10522         reorder methods based on the profiling info. Add a 'method_order' table
10523         to the AOT file to make mono_aot_find_jit_info work with the reordered
10524         methods.
10525
10526         * mini.h: Bump AOT file version info.
10527
10528 Wed Sep 28 17:12:48 CEST 2005 Paolo Molaro <lupus@ximian.com>
10529
10530         * mini-arm.h: work around what looks like a gcc bug when optimizations
10531         are enabled.
10532
10533 2005-09-28  Raja R Harinath  <rharinath@novell.com>
10534
10535         * Makefile.am (AM_CFLAGS): Don't use += to append inside
10536         conditionals.  Use ...
10537         (PLATFORM_CFLAGS, ARCH_CFLAGS): ... these.
10538
10539 2005-09-27  Zoltan Varga  <vargaz@freemail.hu>
10540
10541         * mini-amd64.c (mono_arch_call_opcode): Use mono_class_value_size ()
10542         to determine the amount of memory to copy when passing valuetypes.
10543
10544         * inssel-amd64.brg: Remove PUSH(LDIND4) rules since they convert an
10545         4 byte load into a 8 byte load. Fix aligning of size in OP_OUTARG_VT.
10546
10547 2005-09-27  Zoltan Varga  <vargaz@gmail.com>
10548
10549         * mini.h mini.c aot.c: Add infrastructure to collect pagefault 
10550         information about aot.
10551
10552 2005-09-27  Ben Maurer  <bmaurer@ximian.com>
10553
10554         * *.c: Replace the use of {Enter,Leave}CriticalSection with
10555         macros. This will allow a deadlock debugger to easily be plugged
10556         in.
10557
10558 Tue Sep 27 09:32:11 EDT 2005 Paolo Molaro <lupus@ximian.com>
10559
10560         * mini-ppc.c, cpu-g4.md: added memory barrier instruction.
10561
10562 2005-09-27  Raja R Harinath  <rharinath@novell.com>
10563
10564         * Makefile.am (AM_CFLAGS): Rename from INCLUDES.
10565         (AM_CFLAGS) [PLATFORM_WIN32): Append to it, don't set it.
10566         (AM_CFLAGS) [ARM]: Add arch/arm directory from the build tree.
10567         ($(arch_built)) [CROSS_COMPILING]: Error out.
10568
10569 2005-09-26  Zoltan Varga  <vargaz@gmail.com>
10570
10571         * aot.c: Add support for the no_special_static flag for classes.
10572
10573 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10574
10575         * Reapply reverted patches.
10576
10577         * *: Revert r50174 as well.
10578
10579         * mini-amd64.c cpu-amd64.md inssel-amd64.brg: Revert r50170 as well.
10580
10581 2005-09-24  Zoltan Varga  <vargaz@freemail.hu>
10582
10583         * mini-amd64.c: Revert r50342 to see if this fixed buildbot.
10584
10585 2005-09-23  Miguel de Icaza  <miguel@novell.com>
10586
10587         * mini.c (SIG_HANDLER_SIGNATURE): Only dereference info if it is
10588         part of the SIG_HANDLER_SIGNATURE.  
10589
10590 2005-09-23  Zoltan Varga  <vargaz@gmail.com>
10591
10592         * mini.h mini.c: Add a new MONO_DEBUG option to collect metadata pagefault
10593         statistics.
10594
10595         * mini-x86.c (mono_arch_call_opcode): Fix vararg calling convention 
10596         introduced by previous patch.
10597
10598 2005-09-21  Zoltan Varga  <vargaz@gmail.com>
10599
10600         * tramp-x86.c (mono_arch_create_trampoline_code): Restore caller
10601         saved registers too.
10602
10603         * mini-x86.c (mono_arch_allocate_vars): Rewrite this so it works based 
10604         upon the information returned by get_call_info ().
10605         
10606         * mini-x86.c (add_float): Fix stack size calculation.
10607         (mono_arch_call_opcode): Rewrite this so it works based up the
10608         information returned by get_call_info ().
10609         (mono_arch_get_this_vret_args): Ditto.
10610
10611 2005-09-21  Zoltan Varga  <vargaz@freemail.hu>
10612
10613         * mini-amd64.c (mono_arch_emit_this_vret_args): Use the information
10614         in cinfo to determine the registers which need to be used.
10615
10616 2005-09-20  Miguel de Icaza  <miguel@novell.com>
10617
10618         * driver.c (mono_main): Add --server and --desktop flags. 
10619
10620 2005-09-16  Zoltan Varga  <vargaz@gmail.com>
10621
10622         * mini-ia64.h: Make register masks 64 bit. Don't treat argument
10623         registers as global registers.
10624
10625         * inssel-ia64.brg (stmt): Remove OP_OUTARG_REG () rules which are no 
10626         longer needed with the new register allocator.
10627
10628         * mini-ia64.c: Use OP_MOVE instead of OP_SETREG for reg-reg moves.
10629
10630         * cpu-ia64.md: Remove unused opcodes.
10631         
10632         * regalloc.c mini-codegen.c: Make register masks 64 bit on ia64.
10633         
10634 2005-09-16  Zoltan Varga  <vargaz@freemail.hu>
10635
10636         * cpu-amd64.md: Remove unused opcodes.
10637
10638         * inssel-amd64.brg: Remove OP_OUTARG_REG () rules which are no longer
10639         needed with the new register allocator.
10640
10641         * inssel-amd64.brg mini-amd64.c: Use OP_MOVE instead of OP_SETREG for
10642         reg-reg moves.
10643
10644 2005-09-16  Raja R Harinath  <rharinath@novell.com>
10645
10646         * Makefile.am (check-local): Don't invoke semdel-wrapper.
10647
10648 2005-09-16  Martin Baulig  <martin@ximian.com>
10649
10650         * exceptions-amd64.c
10651         (throw_exception): Don't call mono_debugger_throw_exception() if
10652         we're a rethrow - see the FIXME in the code.
10653
10654 2005-09-15  Geoff Norton  <gnorton@customerdna.com>
10655
10656         * mini.c (mono_init_exceptions): This only works on some architectures.
10657         
10658 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10659
10660         * mini.c (mono_method_to_ir): Add OP_LMUL imm -> OP_LMUL_IMM conversion
10661         on ia64.
10662
10663         * inssel-long.brg mini-ia64.c: Add OP_LMUL_IMM rules.
10664
10665         * mini-ia64.h mini-ia64.c: Remove the altstack support code which is
10666         now in mini-exceptions.c.
10667
10668 2005-09-15  Zoltan Varga  <vargaz@freemail.hu>
10669
10670         * mini-amd64.h mini-am64.c: Remove the altstack support code which is
10671         now in mini-exceptions.c.
10672
10673 2005-09-15  Zoltan Varga  <vargaz@gmail.com>
10674
10675         * exceptions-x86.c: Applied patch from Patrik Torstensson 
10676         <patrik.torstensson@gmail.com>. Add stack overflow handling support for win32.
10677
10678         * mini-exceptions.c mini-x86.c mini.c: Move the altstack setup/teardown
10679         code into mini-exceptions.c. Add some assertions to it.
10680
10681 2005-09-12  Zoltan Varga  <vargaz@gmail.com>
10682
10683         * aot.c (emit_section_change): Applied patch from "The Software Team" 
10684         (<software@solmersa.com>). Fix as errors on windows.
10685
10686 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10687
10688         * tramp-amd64.c (mono_arch_create_trampoline_code): Fix saving of
10689         method info into the LMF.
10690
10691 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10692         
10693         * mini-ia64.c: Add proper unwind info for method epilogs.
10694
10695         * exceptions-ia64.c: Add some code to help debugging.
10696         
10697         * mini-ia64.c mini-ia64.h: Add sigaltstack support.
10698
10699         * mini-exceptions.c: Fix warning.
10700
10701 2005-09-11  Zoltan Varga  <vargaz@freemail.hu>
10702
10703         * mini.c: Really fix build.
10704
10705         * mini-x86.c mini-amd64.c: Fix build.
10706
10707 2005-09-11  Zoltan Varga  <vargaz@gmail.com>
10708
10709         * mini-ia64.c inssel-ia64.brg: Add InterlockedExchange instrinsics.
10710
10711         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Implement
10712         some Interlocked methods as intrinsics.
10713
10714         * mini.c (mini_get_inst_for_method): Call arch_get_inst_for_method
10715         for Thread methods as well.
10716
10717         * mini-ops.h: Add OP_MEMORY_BARRIER opcode.
10718
10719         * inssel.brg: Add rule for OP_MEMORY_BARRIER.
10720
10721         * mini-ia64.c mini-x86.c mini-amd64.c 
10722         cpu-ia64.md cpu-pentium.md cpu-amd64.md: Add implementation of 
10723         OP_MEMORY_BARRIER.
10724         
10725         * mini.c (mono_init_exceptions): Fix build breakage.
10726
10727 2005-09-10  Zoltan Varga  <vargaz@gmail.com>
10728
10729         * mini-ia64.c exceptions-ia64.c tramp-ia64.c: Remove 'manual' emitting
10730         of instructions. Use the new ia64_unw_op macros for emitting unwind
10731         info.
10732
10733         * mini.c (mono_init_exceptions): Initialize exception handling
10734         related trampolines at startup.
10735
10736 Fri Sep 9 19:30:37 BST 2005 Paolo Molaro <lupus@ximian.com>
10737
10738         * cpu-arm.md, mini-arm.c: fix for dynamic code (Gtk# apps).
10739
10740 2005-09-09  Zoltan Varga  <vargaz@gmail.com>
10741
10742         * mini.c: Handle type loading errors gracefully during compilation and
10743         throw the appropriate exception.
10744
10745 Fri Sep 9 09:49:14 CEST 2005 Paolo Molaro <lupus@ximian.com>
10746
10747         * ldscript.mono, Makefile.am: use anonymous versions in the ldscript
10748         for the mono binary.
10749
10750 2005-09-09  Martin Baulig  <martin@ximian.com>
10751
10752         * mini.c (mono_method_to_ir): Comment out the G_BREAKPOINT()'s for
10753         the release.
10754
10755 Thu Sep 8 14:53:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10756
10757         * mini-arm.h: use emulation for conv.r.un for the release.
10758
10759 Thu Sep 8 11:28:45 BST 2005 Paolo Molaro <lupus@ximian.com>
10760
10761         * mini-arm.c, objects.cs: more fixes and tests for them.
10762
10763 Wed Sep 7 17:14:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10764
10765         * mini-arm.c: align structures to at least 4 bytes to be able
10766         to keep our current optimized memcpy.
10767
10768 Tue Sep 6 22:51:08 BST 2005 Paolo Molaro <lupus@ximian.com>
10769
10770         * mini-arm.c, cpu-arm.md, inssel-arm.brg: bugfixes.
10771
10772 2005-09-05 Gonzalo Paniagua Javier <gonzalo@ximian.com>
10773
10774         * mini.c: ignore SIGPIPE.
10775
10776 2005-09-04  Zoltan Varga  <vargaz@gmail.com>
10777
10778         * mini-ia64.c (mono_arch_lowering_pass): Convert 'and_imm 255' to zext1.
10779
10780         * mini-ia64.h mini-ia64.c: Add some minor optimizations.
10781
10782 2005-09-02  Zoltan Varga  <vargaz@gmail.com>
10783
10784         * mini.h: Add prototype for mono_allocate_stack_slots_full.
10785
10786 Thu Sep 1 21:05:26 BST 2005 Paolo Molaro <lupus@ximian.com>
10787
10788         * exceptions-arm.c, mini.c, mini-arm.c, mini-arm.h:
10789         exception handling support.
10790         * mini-arm.c, mini-arm.h: bigendian fixes (partially from a
10791         patch by Brian Koropoff <briank@marakicorp.com>).
10792
10793 Thu Sep 1 10:22:44 EDT 2005 Paolo Molaro <lupus@ximian.com>
10794
10795         * mini.c: revert another 'optimization' which breaks when
10796         items on the eval stack need to be saved at a basic block end
10797         (bug #75940).
10798
10799 Wed Aug 31 17:29:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
10800
10801         * jit-icalls.c: for arrays, ensure we always provide
10802         lower bounds.
10803
10804 2005-08-30  Zoltan Varga  <vargaz@gmail.com>
10805
10806         * mini.c (mono_allocate_stack_slots_full): Fix ia64 build.
10807         
10808         * mini.c (mini_get_inst_for_method): Special case Object:.ctor as well.
10809
10810 2005-08-29  Zoltan Varga  <vargaz@gmail.com>
10811
10812         * mini-ia64.h mini-ia64.c: Implement frame pointer elimination. Keep
10813         arguments in their original register.
10814
10815 2005-08-28  Zoltan Varga  <vargaz@gmail.com>
10816
10817         * mini-ops.h cpu-ia64.md inssel-ia64.brg mini-ia64.c: Optimize
10818         memset/memcpy.
10819
10820         * mini.c (mono_method_to_ir): Disable the MUL->MUL_IMM optimization
10821         when ssapre is enabled.
10822
10823         * inssel-long.brg: Fix bug in previous patch.
10824
10825         * mini-ia64.c mini-ia64.h mini.c inssel-long.brg: Optimize 
10826         multiplication by a constant.
10827
10828 2005-08-27  Zoltan Varga  <vargaz@gmail.com>
10829
10830         * mini-ia64.c (mono_arch_setup_jit_tls_data): Add support for intel
10831         icc.
10832
10833         * tramp-ia64.c (mono_arch_create_trampoline_code): Use st8.spill for
10834         saving registers.
10835
10836 Fri Aug 26 11:09:28 BST 2005 Paolo Molaro <lupus@ximian.com>
10837
10838         * inssel-arm.brg: apply changes tested by Brian Koropoff
10839         <briank@marakicorp.com>.
10840
10841 2005-08-25  Zoltan Varga  <vargaz@gmail.com>
10842
10843         * mini-x86.c (mono_arch_emit_prolog): Fix calling of mono_jit_thread_attach () under windows.
10844         
10845 2005-08-24  Zoltan Varga  <vargaz@gmail.com>
10846
10847         * mini-codegen.c (mono_local_regalloc): Avoid allocating dreg and sreg1/2
10848         to the same register if dreg is just a base register.
10849         (print_ins): Improve printing of membase opcodes.
10850
10851         * inssel-x86.brg: Add optimized ldind(reg) rules.
10852
10853         * mini-x86.c cpu-pentium.md: Changes required to support the new rules.
10854
10855 Wed Aug 24 19:39:36 CEST 2005 Paolo Molaro <lupus@ximian.com>
10856
10857         * mini.c: when running under valgrind, set the stack bottom for
10858         the GC at the actual approximate stack for the app (fixes running
10859         mono with valgrind).
10860
10861 Tue Aug 23 21:38:50 CEST 2005 Paolo Molaro <lupus@ximian.com>
10862
10863         * mini.c: do no break at the first valuetype to init found
10864         (fixes bug #75791).
10865
10866 Tue Aug 23 16:53:21 BST 2005 Paolo Molaro <lupus@ximian.com>
10867
10868         * cpu-arm.md, mini-arm.c: more fixes and LMF support.
10869
10870 Tue Aug 23 15:11:44 CEST 2005 Paolo Molaro <lupus@ximian.com>
10871
10872         * cpu-g4.md: fixed instruction length exposed by the nemerle compiler.
10873
10874 2005-08-23  Zoltan Varga  <vargaz@freemail.hu>
10875
10876         * inssel-amd64.brg inssel-x86.brg: Fix the fcall rules.
10877
10878 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10879
10880         * inssel-x86.brg: Fix assert in patch_delegate_trampoline.
10881
10882         * tramp-x86.c (mono_arch_patch_delegate_trampoline): Add some debug
10883         code.
10884
10885         * tramp-amd64.c (mono_arch_patch_delegate_trampoline): Add some debug
10886         code.
10887
10888         * mini.c (optimize_branches): Don't quit after 1000 iterations on large
10889         methods.
10890
10891 Mon Aug 22 19:16:29 BST 2005 Paolo Molaro <lupus@ximian.com>
10892
10893         * tramp-arm.c: allocate less memory for the trampoline and fix typo.
10894
10895 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10896
10897         * mini.c (mono_method_to_ir): Remove instructions inserted after a branch
10898         in the tail recursion optimization.
10899
10900         * mini.h helpers.c (mono_disassemble_code): Emit starts of basic blocks as 
10901         debug info into the assembly file.
10902
10903         * iltests.il: Add test for filter regions.
10904
10905         * mini.c (mono_method_to_ir): Fix handling of nested FILTER clauses. Fix
10906         initial stack of filter regions. Fixes #75755.
10907
10908 Mon Aug 22 17:49:16 BST 2005 Paolo Molaro <lupus@ximian.com>
10909
10910         * mini-arm.c, cpu-arm.c: fixes and support for methods with bigger
10911         stack requirements.
10912
10913 2005-08-22  Zoltan Varga  <vargaz@freemail.hu>
10914
10915         * mini.c (mono_create_delegate_trampoline): Fix memory leak. Put back
10916         the check for an already compiled method on non-ia64 platforms.
10917         (mono_create_jump_trampoline): Store the MonoJitInfo structure into the
10918         proper domain.
10919
10920         * mini-x86.h tramp-x86.c: Add support for delegate trampolines.
10921
10922         * inssel-x86.brg: Add some optimized call rules.
10923
10924 2005-08-21  Zoltan Varga  <vargaz@freemail.hu>
10925
10926         * mini.c (mono_create_delegate_trampoline): Do not return an already compiled
10927         method here.
10928
10929         * mini.h mini-trampolines.c: Pass the trampoline argument to 
10930         mono_arch_patch_delegate_trampoline.
10931
10932         * mini-ia64.h mini-ia64.c tramp-ia64.c: Add support for delegate trampolines.
10933
10934         * mini-trampolines.c: Fix build.
10935
10936         * mini-amd64.h: Add delegate trampolines.
10937
10938         * mini.h mini.c mini-trampolines.c tramp-amd64.c: Add delegate trampolines.
10939
10940         * inssel-amd64.brg: Add optimized call rules.
10941         
10942         * mini-ia64.c tramp-ia64.c: Improve instruction scheduling.
10943
10944         * inssel-ia64.brg: Add optimized ldind(reg) rules.
10945
10946 2005-08-20  Zoltan Varga  <vargaz@freemail.hu>
10947
10948         * mini.c (mono_create_class_init_trampoline): Fix bug caused by last
10949         change.
10950
10951         * mini-ia64.c: Remove LMF fixmes.
10952
10953         * mini-ia64.h: Remove most fields from LMF.
10954
10955         * inssel-ia64.brg (stmt): Fix unaligned access errors.
10956
10957         * mini-trampolines.c: Add support for IA64 function descriptors.
10958
10959         * mini.h mini.c jit-icalls.c exceptions-ia64.cdriver.c: Add support
10960         for IA64 function descriptors.
10961
10962 Sat Aug 20 16:51:44 BST 2005 Paolo Molaro <lupus@ximian.com>
10963
10964         * tramp-arm.c: patch the vtable for virtual calls. Added
10965         support code to register/unregister the LMF.
10966         * mini-arm.c, mini-arm.h: warning fixes, fixes, speedups,
10967         more LMF work.
10968
10969 2005-08-19  Dick Porter  <dick@ximian.com>
10970
10971         * mini.c: Use a gsize to store the thread ID, so it can hold a 64
10972         bit value if needed.
10973
10974 2005-08-19  Zoltan Varga  <vargaz@freemail.hu>
10975
10976         * mini.c (mini_get_method): Move handling of wrapper data here.
10977
10978         * mini.c (mono_method_to_ir): Add support for dynamic methods.
10979
10980         * mini.c (mono_method_to_ir): Convert nonvirtual calls to abstract methods into
10981         virtual.
10982
10983         * mini.c (mono_method_to_ir): Emit IR for CEE_NOP as well, so 
10984         bblock->code does not remain empty.
10985
10986 2005-08-17  Zoltan Varga  <vargaz@freemail.hu>
10987
10988         * arrays.cs: Add regression test for #75832.
10989
10990         * inssel-amd64.brg cpu-amd64.md mini-amd64.c: Fix LDELEMA optimization
10991         rules. Fixes #75832.
10992
10993         * mini-ia64.c tramp-ia64.c exceptions-ia64.c: Implement improved
10994         instruction scheduling.
10995
10996 2005-08-12  Zoltan Varga  <vargaz@freemail.hu>
10997
10998         * mini-exceptions.c (ves_icall_get_frame_info): Fix IA64 build.
10999
11000 2005-08-11  Zoltan Varga  <vargaz@freemail.hu>
11001
11002         * mini-exceptions.c mini-x86.h: Move VC stuff into macros in mini-x86.h.
11003
11004         * mini-codegen.c: Fix VC build.
11005
11006         * cpu-pentium.md: Increase length of atomic_exhange_i4.
11007
11008 2005-08-09 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11009
11010         * mini.h: fix signature for mono_register_opcode_emulation.
11011
11012 2005-08-09  Zoltan Varga  <vargaz@freemail.hu>
11013
11014         * mini.c: Get rid of most of the helper_sig_... constants using
11015         mono_create_icall_signature ().
11016
11017 2005-08-08  Zoltan Varga  <vargaz@freemail.hu>
11018
11019         * jit-icalls.c (helper_ldstr): New helper function.
11020
11021         * mini.c (get_basic_blocks): Set out_of_line for bblocks containing a throw.
11022
11023         * mini.c (mono_method_to_ir): If an LDSTR instruction is in a bblock with a
11024         throw, load the string using a helper call instead of creating a string object.
11025
11026         * aot.c: Update after LDSTR changes.
11027
11028         * mini.h: Bump AOT file version.
11029         
11030         * aot.c: Save class size info into the AOT file. Print more statistics during
11031         compilation.
11032
11033         * mini.h: Bump AOT file version.
11034
11035         * tramp-amd64.c (mono_arch_nullify_class_init_trampoline): Fix
11036         ordering of disasm cases. Fixes #74957.
11037
11038 Thu Aug 4 19:47:24 BST 2005 Paolo Molaro <lupus@ximian.com>
11039
11040         * mini-ops.h, mini-arch.h, inssel.brg, mini.c, mini.h,
11041         jit-icalls.c, mini-codegen.c, Makefile.am: changes in
11042         the generic code needed for the ARM port.
11043
11044 Thu Aug 4 19:42:54 BST 2005 Paolo Molaro <lupus@ximian.com>
11045
11046         * exceptions-arm.c, tramp-arm.c, mini-arm.c, mini-arm.h, cpu-arm.md,
11047         inssel-arm.brg: more ARM features and fixes.
11048
11049 Mon Aug 1 18:37:38 BST 2005 Paolo Molaro <lupus@ximian.com>
11050
11051         * tramp-arm.c, mini-arm.c, cpu-arm.md, inssel-arm.brg: more
11052         ARM port work in progress.
11053
11054 2005-07-30  Zoltan Varga  <vargaz@freemail.hu>
11055
11056         * mini-ia64.c (mono_arch_call_opcode): Ongoing IA64 work.
11057
11058         * mini-exceptions.c mini-ia64.h: Ongoing IA64 work.
11059
11060         * mini-ia64.c (ia64_emit_bundle): Ongoing IA64 work.
11061
11062         * inssel.brg (mini_emit_memset): Add support for unaligned access.
11063
11064         * *-ia64.*: Ongoing IA64 work.
11065         
11066         * mini-ia64.c exceptions-ia64.c: Ongoing IA64 work.
11067
11068 2005-07-28  Zoltan Varga  <vargaz@freemail.hu>
11069
11070         * TODO: Remove out-of-data todo stuff.
11071
11072         * mini.h mini.c (mono_create_jit_trampoline_from_token): Remove some
11073         dead code.
11074
11075         * aot.c: Save/load MonoCachedClassInfo->has_nested_classes.
11076
11077         * mini.h: Bump corlib version.
11078
11079 2005-07-27  Martin Baulig  <martin@ximian.com>
11080
11081         * mini-codegen.c
11082         (create_copy_ins): Added `const unsigned char *ip' argument; set
11083         `copy->cil_code' from it.
11084
11085 2005-07-27  Martin Baulig  <martin@ximian.com>
11086
11087         * mini-exceptions.c (mono_handle_exception): Don't call
11088         mono_debugger_handle_exception() for filters.
11089
11090 2005-07-27  Zoltan Varga  <vargaz@freemail.hu>
11091
11092         * mini-trampolines.c (mono_aot_trampoline): Handle AppDomain:InvokeInDomain
11093         as well.
11094
11095 2005-07-26  Martin Baulig  <martin@ximian.com>
11096
11097         Committing a patch from Michal Moskal <michal.moskal@gmail.com>.
11098
11099         * mini.c (mono_method_to_ir): In `CEE_CALLI', only use
11100         helper_compile_generic_method() if the method is actually virtual
11101         and non-final.
11102
11103 2005-07-26  Martin Baulig  <martin@ximian.com>
11104
11105         * mini.c
11106         (trampoline_code): Renamed to `mono_trampoline_code' and made it
11107         public; this is now accessed directly by the debugger.
11108         (mono_generic_trampoline_code): Removed.
11109
11110         * debug-mini.c
11111         (mono_debug_init_method): Also add interncalls and wrappers.
11112
11113 2005-07-23  Zoltan Varga  <vargaz@freemail.hu>
11114
11115         * mini-ia64.c mini-ia64.h: Add support for tracing/profiling.
11116
11117 2005-07-22  Zoltan Varga  <vargaz@freemail.hu>
11118
11119         * aot.c (mono_aot_get_method_from_token): Fix a potential crash here.
11120
11121 2005-07-21  Zoltan Varga  <vargaz@freemail.hu>
11122
11123         * aot.c (load_patch_info): Fix handling of stfld_remote wrapper.
11124
11125 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
11126
11127         * mini-amd64.c (mono_arch_setup_jit_tls_data): Use the nice way of
11128         getting TLS offsets on AMD64 too.
11129
11130 2005-07-20  Kornél Pál <kornelpal@hotmail.com>
11131
11132         * driver.c: Detach console when executing IMAGE_SUBSYSTEM_WINDOWS_GUI on win32
11133
11134 Wed Jul 20 18:05:19 BST 2005 Paolo Molaro <lupus@ximian.com>
11135
11136         * exceptions-arm.c, mini-arm.c, tramp-arm.c, cpu-arm.md,
11137         inssel-arm.brg, mini-arm.h: ARM port work in progress.
11138
11139 2005-07-20  Zoltan Varga  <vargaz@freemail.hu>
11140
11141         * tramp-amd64.c (mono_arch_create_specific_trampoline): Fix build.
11142
11143         * mini.h mini.c mini-*.h tramp-*.c: Move more cross platform trampoline code
11144         to mini.c.
11145
11146         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Call 
11147         mono_sparc_is_virtual_call ().
11148         
11149         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix warning.
11150
11151         * tramp-sparc.c (mono_arch_create_trampoline_code): Fix order of
11152         trampoline parameters.
11153
11154         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Fix signature.
11155         
11156         * mini-sparc.c (mono_arch_get_vcall_slot_addr): Rename this
11157         to mono_arch_get_vcall_slot_addr.
11158
11159         * Makefile.am tramp-sparc.c: Update the sparc port to use the generic
11160         trampoline code.
11161
11162         * *-sparc.*: Merge the mini-xp-regalloc branch for sparc.
11163
11164 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
11165
11166         * mini-ia64.h mini-ia64.c: Finish pinvoke support.
11167
11168 2005-07-19  Martin Baulig  <martin@ximian.com>
11169
11170         * exceptions-amd64.c (throw_exception): Call
11171         mono_debugger_throw_exception() here like we're doing it on i386.
11172
11173 2005-07-19  Zoltan Varga  <vargaz@freemail.hu>
11174
11175         * mini-ia64.c: Add optimized TLS access support.
11176
11177 2005-07-18  Zoltan Varga  <vargaz@freemail.hu>
11178
11179         * mini-exceptions.c: Ongoing IA64 work.
11180
11181         * mini-ia64.c inssel-long.brg: Ongoing IA64 work.
11182
11183         * mini.c: Use the default optimization set when embedding. Fixes
11184         #75194.
11185
11186 2005-07-11  Zoltan Varga  <vargaz@freemail.hu>
11187
11188         * tramp-amd64.c tramp-ia64.c Makefile.am: Move arch independent parts 
11189         of trampolines to a separate file.
11190
11191         * mini-trampolines.c: New file.
11192
11193         * mini.h tramp-x86.c: Move arch independent parts of trampolines to a 
11194         separate file.
11195         
11196         * tramp-x86.c: Reorganize the trampoline code to be similar to the 
11197         amd64/ia64 code.
11198
11199         * mini-codegen.c: Fix cygwin build.
11200
11201 2005-07-10  Zoltan Varga  <vargaz@freemail.hu>
11202
11203         * mini.c: Add some minor changes needed by the IA64 port.
11204
11205         * *-ia64.*: Ongoing IA64 work.
11206
11207 2005-07-09  Zoltan Varga  <vargaz@freemail.hu>
11208
11209         * tramp-amd64.c mini-amd64.c: Update after latest AOT changes. Split 
11210         trampolines into arch-independent and arch-dependent parts.
11211
11212         * mini-amd64.c (mono_arch_lowering_pass): Fix store_membase_imm -> store_membase_reg rule.
11213
11214 2005-07-08  Zoltan Varga  <vargaz@freemail.hu>
11215
11216         * cpu-amd64.md: Merge the xp-regalloc-branch for amd64.
11217
11218         * mini-ops.h mini-amd64.h mini-amd64.c inssel-amd64.brg Makefile.am: Merge
11219         the xp-regalloc-branch for amd64.
11220
11221         * mini-x86.h mini-x86.c cpu-pentium.md Makefile.am: Merge the
11222         xp-regalloc-branch for x86.
11223
11224 2005-07-07  Zoltan Varga  <vargaz@freemail.hu>
11225
11226         * inssel.brg (OP_THROW_OR_NULL): Allways rethrow the abort exception.
11227
11228 2005-07-06  Martin Baulig  <martin@ximian.com>
11229
11230         * mini.c
11231         (mono_jit_compile_method_inner): Call mono_get_inflated_method().
11232         (mono_jit_runtime_invoke): Likewise.
11233
11234 2005-07-05  Zoltan Varga  <vargaz@freemail.hu>
11235
11236         * aot.c (mono_compile_assembly): Allocate the GOT in the .bss segment
11237         on x86 too.
11238         
11239         * aot.c: Add new mono_aot_get_method_from_token () function to load AOT methods
11240         without loading their metadata. Reorganize the file format so exception handling+
11241         debug info is kept separate from normal method info. Create MonoJitInfo 
11242         structures for methods lazily.
11243
11244         * tramp-x86.c (x86_aot_trampoline): Use the new from_token method to avoid
11245         loading metadata.
11246         (x86_class_init_trampoline): Patch AOT class init trampolines too.
11247
11248         * mini.c (mini_init): Install the new mono_aot_find_jit_info hook.
11249
11250         * mini.c (mono_method_to_ir): Reduce the number of class init trampoline calls
11251         in AOT code.
11252
11253         * mini.h: Bump AOT file version.
11254
11255 2005-07-04  Zoltan Varga  <vargaz@freemail.hu>
11256
11257         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
11258
11259 2005-07-01  Raja R Harinath  <rharinath@novell.com>
11260
11261         * Makefile.am (check-local): Call semdel-wrapper.
11262
11263 2005-06-29  Zoltan Varga  <vargaz@freemail.hu>
11264
11265         * mini-x86.c: Revert the last change as it seems to break the build..
11266
11267 2005-06-28  Zoltan Varga  <vargaz@freemail.hu>
11268
11269         * mini-x86.c (peephole_pass): Fix the loadi1/loadi2 rules.
11270         
11271         * mini-x86.c (mono_arch_cpu_init): Fix setting of fp precision in the VC build.
11272
11273 2005-06-27  Ben Maurer  <bmaurer@ximian.com>
11274
11275         * mini.c (NEW_AOTCONST): make sure to call mono_get_got_var
11276         outside of the macro, so strange stuff doesn't happen with gcc4
11277         (NEW_AOTCONST_TOKEN): Likewise.
11278
11279 2005-06-28  Martin Baulig  <martin@ximian.com>
11280
11281         * mini.c (mini_class_is_system_array): New static method; use this
11282         instead of `klass->parent == mono_defaults.array_class' everywhere
11283         since this also works for the new generic array class.
11284
11285 2005-06-26  Ben Maurer  <bmaurer@ximian.com>
11286
11287         * inssel.brg: Remove warnings.
11288
11289 2005-06-24  Zoltan Varga  <vargaz@freemail.hu>
11290
11291         * mini-ia64.c: Ongoing IA64 work.
11292
11293         * basic-float.cs: Add float->i1 conversion test.
11294
11295         * iltests.il: Add conv.u4 test.
11296
11297 2005-06-23  Zoltan Varga  <vargaz@freemail.hu>
11298
11299         * inssel-long.brg: Fix bug caused by last change.
11300
11301 2005-06-23  Geoff Norton  <gnorton@customerdna.com>
11302
11303         * mini-x86.h: Add __APPLE__ to the SC_* redefines with the other 
11304         BSDs.  Allows the x86 JIT to work on OSX86
11305
11306 2005-06-22  Zoltan Varga  <vargaz@freemail.hu>
11307
11308         * inssel-long.brg: Use OP_LSHR_UN_IMM instead of OP_SHR_UN_IMM in
11309         u4->i8 conversion.
11310
11311         * mini-ia64.c: Ongoing IA64 work.
11312
11313 2005-06-19  Zoltan Varga  <vargaz@freemail.hu>
11314
11315         * mini-ia64.c: Ongoing IA64 work.
11316
11317         * driver.c: Clean up jit_code_hash as well when using --regression.
11318
11319         * inssel-long.brg: Fix long->i4/u4 conversion rules.
11320
11321         * basic-long.cs: Add tests for long->u4 conversion.
11322
11323 2005-06-18  Ben Maurer  <bmaurer@ximian.com>
11324
11325         * mini.c: Take mono_get_domainvar out of macros. This makes sure
11326         that we do not depend on undefined C behavior: the order stuff
11327         gets evaluated within an expression. Fixes mono when compiled on
11328         GCC 4.
11329
11330 2005-06-18  Zoltan Varga  <vargaz@freemail.hu>
11331
11332         * *-ia64.*: Ongoing IA64 work.
11333
11334         * aot.c: Lower memory usage while loading AOT methods.
11335
11336         * tramp-x86.c: Avoid allocating+freeing MonoJitInfo structures.
11337
11338         * mini.h: Bump AOT file format version.
11339
11340 2005-06-17  Zoltan Varga  <vargaz@freemail.hu>
11341
11342         * mini.c (mono_method_to_ir): Allow STACK_PTR as input to SWITCH.
11343
11344 2005-06-16  Sebastien Pouliot  <sebastien@ximian.com>
11345
11346         * declsec.c: Fixed APTC to check for FullTrust on caller assembly (and
11347         not on callee assembly). Fixed some comments.
11348
11349 2005-06-16  Zoltan Varga  <vargaz@freemail.hu>
11350
11351         * aot.c (mono_compile_assembly): Mark the "methods" symbol as a function so
11352         it gets proper disassembly.
11353         (emit_method_info): Remove some dead code.
11354
11355         * mini.c (mini_method_compile): Allways allocate the GOT var in
11356         mono_method_to_ir for emulating opcodes.
11357
11358 2005-06-13  Zoltan Varga  <vargaz@freemail.hu>
11359
11360         * mini.c (mono_jit_free_method): Remove the method from the JitInfo table
11361         before freeing the code memory. Fixes #74990.
11362
11363         * objects.cs: Add regression test for #74992.
11364
11365         * liveness.c: Extend live ranges of arguments to the beginning of the
11366         method. Fixes #74992.
11367
11368         * exceptions-ia64.c mini-ia64.h: Modify ip during exception handling
11369         so it points into the faulting instruction.
11370
11371 2005-06-12  Zoltan Varga  <vargaz@freemail.hu>
11372
11373         * jit-icalls.c (mono_imul_ovf): Add exception handling.
11374
11375         * *-ia64.*: Ongoing IA64 work.
11376
11377         * mini.c (mini_init): Fix signature of mono_delegate_ctor.
11378
11379 2005-06-11  Zoltan Varga  <vargaz@freemail.hu>
11380
11381         * mini-ia64.h exceptions-ia64.c: Ongoing IA64 work.
11382
11383         * *-ia64.*: Ongoing IA64 work.
11384
11385 2005-06-10  Zoltan Varga  <vargaz@freemail.hu>
11386
11387         * basic-long.cs: Add tests for add/sub.ovf.
11388
11389         * basic.cs: Add tests for sub.ovf.
11390
11391         * *-ia64.*: Ongoing IA64 work.
11392
11393 2005-06-09  Zoltan Varga  <vargaz@freemail.hu>
11394
11395         * *-ia64.*: Ongoing IA64 work.
11396
11397         * basic.cs: Add conv.ovf.i4.un test.
11398
11399 2005-06-09  Massimiliano Mantione  <massi@ximian.com>
11400
11401         * mini.c: (remove_block_if_useless) Fixed bug 75061.
11402         
11403 2005-06-08 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11404
11405         * mini.c: no SIGUSR2 on windows. Remove it for PLATFORM_WIN32.
11406
11407 2005-06-07  Zoltan Varga  <vargaz@freemail.hu>
11408
11409         * *-ia64.*: Ongoing IA64 work.
11410
11411 2005-06-07 Gonzalo Paniagua Javier <gonzalo@ximian.com>
11412
11413         * trace.[ch]:
11414         * mini.c: added the ability to toggle trace on/off using SIGUSR2.
11415
11416 2005-06-04  Zoltan Varga  <vargaz@freemail.hu>
11417
11418         * mini-ia64.c mini-ia64.h: Fix cleanup of memory stack.
11419
11420 2005-06-03  Zoltan Varga  <vargaz@freemail.hu>
11421
11422         * mini-amd64.c (emit_call): Fix yet another bug in the near call optimization.
11423
11424         * mini-amd64.c (amd64_patch): Add an assert to check that the destination
11425         of a call is callable by a near call.
11426
11427 2005-05-31  Zoltan Varga  <vargaz@freemail.hu>
11428
11429         * mini-ia64.c: Ongoing IA64 work.
11430
11431 2005-05-29  Zoltan Varga  <vargaz@freemail.hu>
11432
11433         * genmdesc.c: Make the generated array non-static.
11434
11435         * inssel-long.brg: Fix LSHR_IMM rule.
11436
11437         * *-ia64.*: Ongoing IA64 work.
11438
11439         * *-ia64.*: Ongoing IA64 work.
11440
11441 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11442
11443         * *-ia64.*: Ongoing IA64 work.
11444
11445         * *-ia64.*: Ongoing IA64 work.
11446         
11447         * mini-ia64.c: Ongoing IA64 work.
11448
11449         * *-ia64.* jit-icalls.c mini-codegen.c: Ongoing IA64 work.
11450
11451 2005-05-28  Zoltan Varga  <vargaz@freemail.hu>
11452
11453         * objects.cs basic-calls.cs: Move some tests to objects.cs.
11454         
11455         * objects.cs basic-long.cs: Move some tests to objects.cs.
11456
11457 2005-05-26  Zoltan Varga  <vargaz@freemail.hu>
11458
11459         * *-ia64.*: Ongoing IA64 work.
11460
11461         * iltests.il: Add a new test.
11462
11463         * mini.c (mono_method_to_ir): Initialize valuetypes when created using
11464         newobj. Fixes #75042.
11465
11466 2005-05-22  Zoltan Varga  <vargaz@freemail.hu>
11467
11468         * *-ia64.*: Ongoing IA64 work.
11469         
11470         * *-ia64.*: Ongoing IA64 work.
11471         
11472         * *-ia64.*: Ongoing IA64 work.
11473
11474         * basic.cs objects.cs: Move tests accessing static variables as well.
11475
11476         * basic.cs objects.cs: Move test_0_pin_string to objects.cs.
11477
11478 2005-05-21  Zoltan Varga  <vargaz@freemail.hu>
11479
11480         * mini.c (SIG_HANDLER_SIGNATURE): Fix warning.
11481
11482         * driver.c: Always print failed tests.
11483
11484         * mini-codegen.c: Use cfg->frame_reg instead of a macro for the
11485         frame pointer.
11486
11487         * *ia64*: Ongoing IA64 work.
11488
11489 2005-05-20  Zoltan Varga  <vargaz@freemail.hu>
11490
11491         * basic.cs: Add tests for add.ovf. Fix warnings.
11492
11493 2005-05-18  Miguel de Icaza  <miguel@novell.com>
11494
11495         * driver.c (mono_main): Avoid crash if no argument is passed to
11496         --break;  Do not use g_error, but f_printf.   And fix all other
11497         ocurrences of the same crash.
11498
11499 2005-05-17  Zoltan Varga  <vargaz@freemail.hu>
11500
11501         * mini.h mini.c: Generalize the existing uses of the MONO_DEBUG env variable
11502         and add a new one: aborting when a SIGSEGV is raised while in unmanaged code.
11503         Fixes #74742.
11504
11505 2005-05-14  Zoltan Varga  <vargaz@freemail.hu>
11506
11507         * *-ia64.*: Add beginnings of IA64 backend.
11508
11509         * Makefile.am mini-arch.h mini-codegen.c: Add IA64 support.     
11510
11511 2005-05-13  Zoltan Varga  <vargaz@freemail.hu>
11512
11513         * inssel-long.brg: Add missing ulong->{i1, i2} checked conversions.
11514         Fixes #74925.
11515
11516         * basic-long.cs exceptions.cs: Add new tests. Fix some warnings.
11517
11518         * mini-amd64.c: Fix a warning.
11519
11520 2005-05-10  Zoltan Varga  <vargaz@freemail.hu>
11521
11522         * mini-amd64.c (mono_arch_output_basic_block): Fix stack space leakage
11523         in float_neg. Fixes #74897.
11524
11525         * mini-amd64.c (emit_call): Fix another near call bug.
11526
11527 2005-05-06  Sebastien Pouliot  <sebastien@ximian.com>
11528
11529         * declsec.c: Keep the appdomain information in the structure. Added a 
11530         missing "return FALSE" for Unmanaged if FullTrust is set (or else the
11531         value gets overwritten).
11532         * declsec.h: Set the default MonoArray for the the stack to 6. Added
11533         an MonoAppDomain member to MonoSecurityFrame.
11534         * mini-exceptions.c: Do not use a glist to keep GC allocated objects
11535         used in the stack walk. Now use a MonoArray which grow (double) when
11536         it gets full.
11537
11538 2005-05-05  Lluis Sanchez Gual  <lluis@novell.com>
11539
11540         * mini.c: Re-enabled runtime cleanup, since running threads should
11541         now properly stop when exiting.
11542
11543 2005-05-05  Zoltan Varga  <vargaz@freemail.hu>
11544
11545         * mini-codegen.c: New file contaning the arch-independent local
11546         register allocator. Not used by any architectures yet.
11547
11548         * mini.h linear-scan.c: Merge some changes from the 
11549         mini-xp-local-regalloc branch.
11550
11551 2005-04-28  Zoltan Varga  <vargaz@freemail.hu>
11552
11553         * mini-amd64.c (emit_call): Fix calls to native functions when the
11554         runtime is compiled as a shared library. Fixes #74756.
11555
11556         * mini.c (mono_method_to_ir): Assert if ldsfld and friends are used
11557         on a literal field. Fixes #74751.
11558
11559 2005-04-25  Raja R Harinath  <rharinath@novell.com>
11560
11561         * Makefile.am (RUNTIME): Add MONO_CFG_DIR.
11562
11563 2005-04-23  Zoltan Varga  <vargaz@freemail.hu>
11564
11565         * objects.cs: Add missing null casting test.
11566
11567 2005-04-22  Zoltan Varga  <vargaz@freemail.hu>
11568
11569         * mini-exceptions.c (mono_find_jit_info): Fix native offset calculation
11570         in wrapper methods. Also rename 'address' variable to 'offset'.
11571
11572 2005-04-20  Zoltan Varga  <vargaz@freemail.hu>
11573
11574         * mini.c debug-mini.c aot.c tramp-x86.c driver.c: Fix some gcc 4.0
11575         warnings.
11576         
11577         * Makefile.am (MCS): Use -unsafe instead of --unsafe.
11578
11579         * aot.c: Applied patch from "The Software Team" <software@solmersa.com>. Make AOT compilation
11580         work on windows.
11581
11582 Mon Apr 18 16:20:32 CEST 2005 Paolo Molaro <lupus@ximian.com>
11583
11584         * exceptions-ppc.c: update code to handle stack traces (fixes bug #74452).
11585
11586 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11587
11588         * mini-x86.c (mono_emit_stack_alloc): Initialize the whole allocated area not
11589         just the last bytes.
11590
11591 2005-04-17  Zoltan Varga  <vargaz@freemail.hu>
11592
11593         * aot.c (mono_compile_assembly): Fix warning.
11594
11595         * mini-exceptions.c (ves_icall_get_frame_info): Fix bug introduced
11596         by the _MSC_VER stuff.
11597
11598 2005-04-16  Zoltan Varga  <vargaz@freemail.hu>
11599
11600         * inssel-long.brg: Fix #74588.
11601
11602         * cpu-amd64.md: Fix #74591.
11603
11604         * iltests.il: Add new regression tests.
11605
11606 2005-04-13  Zoltan Varga  <vargaz@freemail.hu>
11607
11608         * trace.c (mono_trace_enter_method): Print enums as an int, not as a
11609         valuetype.
11610
11611 2005-04-11  Zoltan Varga  <vargaz@freemail.hu>
11612
11613         * mini-x86.c (setup_stack): Unconditionally call pthread_attr_init ().
11614
11615         * exceptions-x86.c mini-x86.h mini-x86.c: Applied some freebsd patches 
11616         from Bill Middleton <flashdict@gmail.com>.
11617
11618 2005-04-10  Zoltan Varga  <vargaz@freemail.hu>
11619
11620         * arrays.cs: Add new regression test. Fix warnings.
11621
11622 2005-04-09  Zoltan Varga  <vargaz@freemail.hu>
11623
11624         * mini-amd64.c (mono_arch_output_basic_block): Fix stack alignment
11625         and leakage in CKFINITE.
11626
11627         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Change
11628         this to a null op since it is called on amd64 too.
11629
11630         * exceptions-amd64.c (get_throw_trampoline): Align stack.
11631
11632         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Remove
11633         body since this is not used on amd64.
11634         
11635         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Remove duplicate define.
11636
11637         * mini-amd64.c: Remove obsolete fixmes.
11638
11639         * mini.c (print_method_from_ip): Fix debugging support.
11640
11641 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
11642
11643         * ssapre.c: Fix a subtle bug about availability, and limit SSAPRE
11644         so that expressions that don't give much gain are not reduced.
11645         * ssapre.h: Likewise.
11646
11647 2005-04-04  Zoltan Varga  <vargaz@freemail.hu>
11648
11649         * exceptions-x86.c (mono_arch_find_jit_info): Remove last SC_EBP reference.
11650
11651         * mini-x86.c (mono_emit_stack_alloc): Fix localloc under windows.
11652
11653         * mini-x86.h exceptions-x86.c: Hopefully fix compilation on *BSD.
11654
11655 2005-04-01  Zoltan Varga  <vargaz@freemail.hu>
11656
11657         * mini-sparc.c mini-sparc.h: Add asserts when running with sigaltstack.
11658
11659         * exceptions-x86.c (mono_arch_monoctx_to_sigctx): Fix cygwin build.
11660
11661 2005-03-31  Zoltan Varga  <vargaz@freemail.hu>
11662
11663         * mini-x86.c: If sigaltstack support is enabled, perform win32 style
11664         stack touching.
11665
11666         * mini.h (mono_arch_sigctx_to_monoctx): New arch-specific function.
11667
11668         * mini.h (mono_arch_monoctx_to_sigctx): New arch-specific function.
11669
11670         * mini.c: sigaltstack support requires MONO_ARCH_USE_SIGACTION.
11671
11672         * mini-x86.h mini-x86.c exceptions-x86.c: Add support for 
11673         MONO_ARCH_USE_SIGACTION. Fixes #74252.
11674
11675         * mini-x86.h: Enable MONO_ARCH_USE_SIGACTION on linux.
11676
11677         * mini-x86.c: Fix up stack overflow handling.   
11678
11679         * exceptions.cs: Add new regression test.
11680
11681 2005-03-30  Zoltan Varga  <vargaz@freemail.hu>
11682
11683         * mini-x86.c (mono_arch_emit_prolog): Adjust stack after calls to
11684         mono_jit_thread_attach.
11685
11686         * mini.c (mono_method_to_ir): Verify called method is not abstract.
11687
11688 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11689
11690         * mini.c (mono_method_to_ir): Applied Ben's patch from bug #61441 to
11691         avoid calling constructors using callvirt.
11692
11693         * inssel.brg: Fix #74073.
11694
11695 2005-03-29  Sebastien Pouliot  <sebastien@ximian.com>
11696
11697         * aot.c, mini.h: Added mono-compiler.h header to allow/ease 
11698         compilation with non-GCC compilers.
11699         * mini-exceptions.c, mini-x86.c|h: Patches to make compilation of mono
11700         possible using VS.NET. Adapted from the work of J Lothian (for VC6).
11701
11702 Tue Mar 29 11:43:01 CEST 2005 Paolo Molaro <lupus@ximian.com>
11703
11704         * inssel.brg, arrays.cs: fix long standing 64 bit issue in access to
11705         klass->interface_offsets (will likely fix bug#74073).
11706
11707 2005-03-29  Zoltan Varga  <vargaz@freemail.hu>
11708
11709         * mini-amd64.c (mono_arch_is_int_overflow): Fix rex handling.
11710
11711 2005-03-28  Zoltan Varga  <vargaz@freemail.hu>
11712
11713         * mini-amd64.c (mono_arch_output_basic_block): Fix order of parameters
11714         to amd64_div_reg_size ().
11715         
11716         * mini-amd64.c (mono_arch_emit_exceptions): Emit a near call here too.
11717
11718 2005-03-27  Zoltan Varga  <vargaz@freemail.hu>
11719
11720         * cpu-amd64.md (store_membase_reg): Fix length of storer8 opcodes.
11721
11722 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11723
11724         * driver.c: Turn off automatic command line globbing under windows. Fixes #73763.
11725
11726 2005-03-24  Zoltan Varga  <vargaz@freemail.hu>
11727
11728         * mini.c (mono_method_to_ir): Remove debugging stuff left in by mistake.
11729         
11730         * mini.c (mono_precompile_assembly): Load and precompile referenced
11731         assemblies as well. Fixes #74015.
11732
11733 2005-03-23  Zoltan Varga  <vargaz@freemail.hu>
11734
11735         * cpu-amd64.md (sin): Fix up maximum lengths of some opcodes.
11736
11737 2005-03-23  Sebastien Pouliot  <sebastien@ximian.com>
11738
11739         * declsec.c: Skip linkdemand checks for intra-corlib calls. This skips
11740         a lot of checks and (anyway) permissions cannot work until corlib is 
11741         loaded.
11742
11743 Wed Mar 23 14:29:49 CET 2005 Paolo Molaro <lupus@ximian.com>
11744
11745         * mini-ppc.c: fixed ABI issue on sysv/ppc.
11746
11747 Tue Mar 22 19:03:17 CET 2005 Paolo Molaro <lupus@ximian.com>
11748
11749         * tramp-ppc.c, exceptions-ppc.c: added missing icache flush
11750         calls (fixes bug#72824).
11751
11752 Tue Mar 22 16:28:48 CET 2005 Paolo Molaro <lupus@ximian.com>
11753
11754         * mini.c: fix tail recursion elimination (see test in bug#73936).
11755
11756 2005-03-21  Zoltan Varga  <vargaz@freemail.hu>
11757
11758         * mini-amd64.c (mono_arch_output_basic_block): Add inline versions of
11759         some fp functions in sse2 mode.
11760
11761 2005-03-20  Zoltan Varga  <vargaz@freemail.hu>
11762
11763         * mini-x86.c (emit_tls_get): Move tls handling into a separate helper function.
11764
11765 2005-03-19  Zoltan Varga  <vargaz@freemail.hu>
11766
11767         * mini.h mini.c: Add mono_get_jit_tls_key ().
11768
11769         * mini-x86.c: Enable fast TLS support on windows.
11770
11771 2005-03-17  Sebastien Pouliot  <sebastien@ximian.com>
11772
11773         * declsec.c: Renamed aptc to allowpartiallytrustedcallers.
11774         * mini.c: Check for p/invoke method when generating code. If a
11775         p/invoke method, or it's class, isn't decorated with [Suppress
11776         UnmanagedCodeSecurity] then generate code to call System.Security.
11777         UnmanagedDemand (only if the security manager is active).
11778
11779 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11780
11781         * tramp-amd64.c (create_specific_trampoline): Revert parts of the 
11782         last change as it seems to cause strange crashes.
11783         
11784 Wed Mar 16 16:24:11 CET 2005 Paolo Molaro <lupus@ximian.com>
11785
11786         * *.c: handle unsafe function pointers where needed.
11787
11788 2005-03-16  Zoltan Varga  <vargaz@freemail.hu>
11789
11790         * mini.c (mono_jit_free_method): Remove the fixme too.
11791
11792 2005-03-15  Miguel de Icaza  <miguel@novell.com>
11793
11794         * mini.c: As discussed, make the code actually free the delegate
11795         thunk now, to enable the debugging of delegate problems, use
11796         MONO_DEBUG=1 when running Mono. 
11797
11798         This takes also care of parts of the leaks as seen by Joe.
11799
11800 2005-03-15  Zoltan Varga  <vargaz@freemail.hu>
11801
11802         * mini-amd64.c (mono_arch_setup_jit_tls_data): Enable 
11803         thread_tls_offset calculation.
11804
11805 2005-03-14  Sebastien Pouliot  <sebastien@ximian.com>
11806
11807         * declsec.c: Reworked linkdemand checks for icall. The previous code
11808         was using the declaration code (untrusted) and didn't work as expected
11809         with the CLR 2.0. We're now more compatible with 2.0 than 1.x for this
11810         specific case.
11811
11812 2005-03-13  Zoltan Varga  <vargaz@freemail.hu>
11813
11814         * iltests.il: Add new localloc test.
11815
11816         * mini-amd64.c: Handle large stack allocations the same way as on
11817         windows if stack overflow handling is working.
11818         
11819         * mini-amd64.c: Allocate the signal stack using mmap.
11820
11821         * mini.c (sigsegv_signal_handler): Fix reading of context.
11822
11823         * mini-exceptions.c: Fix up stack overflow handling.
11824
11825         * mini-amd64.h mini-amd64.c: Fix up stack overflow handling.
11826
11827         * tramp-amd64.c (create_specific_trampoline): Optimize trampoline size.
11828
11829         * exceptions-amd64.c (mono_amd64_exceptions_init): Remove this.
11830
11831         * mini.h mini.c tramp-*.c: Move common trampoline code to mini.c.
11832
11833         * mini-x86.h mini-x86.c mini-amd64.h mini-amd64.c: Get rid of the
11834         tramp_init functions as they are no longer needed.
11835
11836 2005-03-12  Zoltan Varga  <vargaz@freemail.hu>
11837
11838         * tramp-amd64.c (mono_amd64_tramp_init): Fix typo.
11839         
11840         * tramp-amd64.c (mono_amd64_tramp_init): Init AOT trampoline as well.
11841
11842         * mini-amd64.h mini-amd64.c (mono_amd64_exceptions_init): Remove this.
11843         
11844         * mini.c mini-*.h: Remove OUT_OF_LINE_BBLOCK defines since all arches
11845         support that now.
11846
11847         * mini-ops.h: Add OP_LMUL_IMM.
11848
11849         * mini.c jit-icalls.cmini-amd64.h mini-amd64.c cpu-amd64.md: Implement
11850         long mul/div opcodes as intrinsic.
11851
11852         * mini-amd64.c (emit_call): Handle the case when the callee might be
11853         an AOT method.
11854
11855 2005-03-11  Zoltan Varga  <vargaz@freemail.hu>
11856
11857         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Reorder cases to be
11858         extra safe.
11859         
11860         * mini-amd64.c (mono_arch_get_vcall_slot_addr): Fix ordering of cases.
11861
11862         * aot.c (mono_aot_load_method): Get rid of bogus make_writable call.
11863
11864 2005-03-09  Ben Maurer  <bmaurer@ximian.com>
11865
11866         * mini.c (mono_codegen): Don't leak here, to help people running
11867         monogrind.
11868
11869 2005-03-08  Zoltan Varga  <vargaz@freemail.hu>
11870
11871         * mini-amd64.c (mono_arch_output_basic_block): Fix int->float 
11872         conversions in sse2 mode.
11873
11874         * basic-float.cs: Add regression test.
11875         
11876         * mini-amd64.c: Reenable sse2.
11877
11878 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11879
11880         * mini-amd64.c: Disable sse2 until some regressions are fixed.
11881
11882 2005-03-07      Joerg Rosenkranz <joergr@voelcker.com>
11883
11884         * driver.c: Copyright text should include 2005.
11885         
11886 2005-03-07  Zoltan Varga  <vargaz@freemail.hu>
11887
11888         * cpu-amd64.md (load_membase): Fix more max lengths.
11889
11890 2005-03-06  Zoltan Varga  <vargaz@freemail.hu>
11891
11892         * cpu-amd64.md (load_membase): Fix max length.
11893
11894         * mini-ops.h: Add OP_F<xx>_MEMBASE opcodes.
11895
11896         * inssel.brg: Add MONO_EMIT_BIALU_MEMBASE macro.
11897
11898         * cpu-amd64.md inssel-amd64.brg mini-amd64.h mini-amd64.brg: Finish SSE2
11899         support and enable it by default. Also add OP_F<xxx>_MEMBASE opcodes.
11900
11901         * basic-float.cs: Add rounding regression test.
11902
11903         * mini-amd64.c (INST_IGNORES_CFLAGS): Add more instructions.
11904
11905 2005-03-04  Neale Ferguson <NealeFerguson@earthlink.net>
11906
11907         * inssel-s390.brg, mini-s390.c: Add support for passing/returning small
11908         structures in registers for pinvoke wrappers.
11909
11910 2005-03-04  Zoltan Varga  <vargaz@freemail.hu>
11911
11912         * mini-exceptions.c (ves_icall_get_trace): Return wrapper info as well.
11913
11914 2005-03-03  Zoltan Varga  <vargaz@freemail.hu>
11915
11916         * mini.h mini.c mini-x86.c: Pass the domain of the native->managed
11917         wrapper to mono_jit_thread_attach.
11918
11919         * mini.c (mini_jit_thread_attach): New jit icall.
11920
11921         * mini-x86.c (mono_arch_emit_prolog): Attach to the VM in 
11922         native->managed wrappers.
11923
11924         * exceptions.cs: Add new regression test.
11925
11926         * mini.c (optimize_branches): Check regions in the cbranch to throw
11927         block case as well. Fixes #73242.
11928
11929 Tue Mar 1 18:35:27 CET 2005 Paolo Molaro <lupus@ximian.com>
11930
11931         * mini.c: thread safety fixes.
11932
11933 2005-02-27  Zoltan Varga  <vargaz@freemail.hu>
11934
11935         * tramp-amd64.c (amd64_magic_trampoline): Disable the method_ptr
11936         patching stuff, since delegates use jump trampolines so there is
11937         no caller.
11938
11939         * tramp-amd64.c (create_trampoline_code): Pass NULL as 'code' in 
11940         jump trampolines.
11941         
11942         * tramp-amd64.c: Fix build.
11943
11944         * mini-x86.c tramp-x86.c: Moved get_vtable_slot_addr into mini-x86.c and rename
11945         it to mono_arch_.... Add get_delegate_method_ptr implementation for x86.
11946
11947         * mini-amd64.h mini.h mini-amd64.c tramp-amd64.c (mono_amd64_get_vcall_slot_addr):
11948         Rename this to mono_arch....
11949         (mono_amd64_get_delegate_method_ptr_addr): Ditto.
11950
11951         * mini-amd64.c (mono_amd64_get_delegate_method_ptr_addr): New helper function.
11952
11953         * mini-amd64.c (emit_call): If both the caller and the callee is
11954         guaranteed to have 32 bit addresses, emit a normal call.
11955
11956         * tramp-amd64.c: Adapt to changes in mini-amd64.c.
11957
11958         * tramp-amd64.c (amd64_magic_trampoline): Remove patching of trampolines. 
11959         * tramp-amd64.c (amd64_magic_trampoline): Add support for patching the
11960         method_ptr inside delegates.
11961
11962 2005-02-26  Zoltan Varga  <vargaz@freemail.hu>
11963
11964         * mini.c (mono_jit_free_method): Free the method info even if the native code is
11965         invalidated. Fixes #73001.
11966
11967         * mini.c: Add a proper icall wrapper for mono_delegate_ctor.
11968
11969         * mini-x86.c: Only use stdcall for pinvokes on windows.
11970
11971 Thu Feb 24 15:22:30 CET 2005 Paolo Molaro <lupus@ximian.com>
11972
11973         * mini.c, mini.h: make mono_lmf_addr a fast-access thread var.
11974         * mini-x86.c: remove unreliable __thread var offset detection,
11975         use the correct accessors and enable by default.
11976
11977 2005-02-23  Zoltan Varga  <vargaz@freemail.hu>
11978
11979         * mini.c (mono_jit_free_method): Fix memory leak.
11980
11981 2005-02-22  Zoltan Varga  <vargaz@freemail.hu>
11982
11983         * mini.c (mono_method_to_ir): Allocate a GOT var for THROW and RETHROW. 
11984
11985 2005-02-21  Zoltan Varga  <vargaz@freemail.hu>
11986
11987         * cpu-amd64.md: Fix lengths of atomic opcodes.
11988
11989 Mon Feb 21 16:52:20 CET 2005 Paolo Molaro <lupus@ximian.com>
11990
11991         * driver.c: try to not imply using ICU is any good.
11992
11993 2005-02-20  Zoltan Varga  <vargaz@freemail.hu>
11994
11995         * mini-amd64.c (mono_arch_get_inst_for_method): Implement more 
11996         functions as inline ops.
11997
11998         * mini-ops.h inssel-amd64.brg cpu-amd64.md mini-amd64.c: Implement
11999         some Interlocked functions as inline ops.
12000
12001         * mini.c (move_basic_block_to_end): Fix bug in last patch.
12002
12003         * mini.h (MonoBasicBlock): Reorganize fields a bit.
12004
12005         * mini-ops.h inssel.brg: Add OP_NOT_REACHED.
12006
12007         * mini.c: Add support for OP_NOT_TAKEN.
12008
12009         * mini-amd64.h mini-amd64.c: Add support for passing/returning small 
12010         structures in registers for pinvoke wrappers.
12011
12012         * mini-amd64.c: Fix warnings.
12013
12014 2005-02-19  Zoltan Varga  <vargaz@freemail.hu>
12015
12016         * mini.h (MonoCompile): Add 'ret_var_is_local' field.
12017
12018         * mini.h mini.c (mono_arch_create_vars): Add new arch specific hook.
12019
12020         * mini.c (NEW_RETLOADA): If the ret variable is a local, use its 
12021         address instead of loading the address from it.
12022
12023         * mini-x86.c: Add support for returning small structs in registers
12024         on Win32. Fixes part of #70864.
12025         
12026 2005-02-18  Zoltan Varga  <vargaz@freemail.hu>
12027
12028         * trace.c (get_token): Improve error checking.
12029
12030 2005-02-17  Zoltan Varga  <vargaz@freemail.hu>
12031
12032         * jit-icalls.c (mono_ldvirtfn): Explicitly check for a NULL obj here.
12033
12034 2005-02-17  Sebastien Pouliot  <sebastien@ximian.com> 
12035  
12036         * mini.h: Moved MONO_EXCEPTION_* enum to metadata/class-internals.h so
12037         it can be reused for MonoClass.
12038         * mini.c: Renamed MONO_EXCEPTION_SECURITY to MONO_EXCEPTION_SECURITY
12039         _LINKDEMAND.
12040
12041 2005-02-15  Sebastien Pouliot  <sebastien@ximian.com>
12042
12043         * mini.c: Fixed 2 cases where I sent a MonoMethod to managed code 
12044         instead of a MonoReflectionMethod. The method information wasn't used
12045         when displaying SecurityException details (but will be now).
12046
12047 2005-02-15  Atsushi Enomoto  <atsushi@ximian.com>
12048
12049         * Makefile.am : windows build fix.
12050
12051 2005-02-14  Zoltan Varga  <vargaz@freemail.hu>
12052
12053         * iltests.il: Add new regression test.
12054
12055         * mini.c (mono_method_to_ir): Allocate a GOT var in CEE_NEWOBJ. Fixes
12056         #72522.
12057
12058 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com> 
12059  
12060         * mini.c: Moved linkdemand check into helper function check_linkdemand
12061         to allow reuse for all intructions (CALL, CALLVIRT, NEWOBJ, JMP, 
12062         LDFTN, LDVIRTFTN).
12063
12064 2004-02-13  Sebastien Pouliot  <sebastien@ximian.com>
12065
12066         * declsec.c: Added statistics counter for different kinds of 
12067         LinkDemands.
12068         * mini.h: Added CAS statistic counters to MonoJitStats. Removed unused
12069         (and commented) declaration.
12070         * mini.c: Added statistics counter for security Demand code 
12071         generation. Added display of security statistics.
12072
12073 2005-02-13  Zoltan Varga  <vargaz@freemail.hu>
12074
12075         * declsec.c (mono_declsec_linkdemand_aptc): Applied patch from Robert Jordan (robertj@gmx.net).
12076         Fix compilation errors under gcc-2.95.
12077
12078 2005-02-12  Ben Maurer  <bmaurer@ximian.com>
12079
12080         * mini.c, driver.c: Use the new jit trampoline hashtable
12081
12082 Fri Feb 11 18:47:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12083
12084         * mini.c, jit-icalls.c: use the managed implementation of memcpy, too.
12085
12086 2005-02-11  Martin Baulig  <martin@ximian.com>
12087
12088         * debug-mini.c (mono_debug_close_method): Free the line number array.
12089
12090 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
12091
12092         * aot.c: Break up large methods into smaller ones. Share GOT slots for
12093         icalls.
12094
12095         * mini.h: Bump AOT file format version. 
12096
12097 2005-02-10  Sebastien Pouliot  <sebastien@ximian.com>
12098
12099         * declsec.c: Added LinkDemand support and it's special cases for ECMA,
12100         APTC and P/Invoke.
12101         * declsec.h: Added macros to get/set lazyly initialized security 
12102         informations about assemblies. Added new enum for different type of
12103         possible LinkDemand violation. Added function to check LinkDemands.
12104         * mini.h: Added a field to MonoCompile to hold any security violation
12105         detected when JITting a method (so it can be thrown later).
12106         * mini.c: Added LinkDemand checks in mono_method_to_ir for CEE_CALL 
12107         and CEE_CALLVIRT. Added code to throw exception at the end of
12108         mini_method_compile (note: the exception is unhandled right now).
12109
12110 Thu Feb 10 15:49:44 CET 2005 Paolo Molaro <lupus@ximian.com>
12111
12112         * mini.c, jit-icalls.c: use the managed implementation of
12113         memset for initobj and memset, to avoid managed <-> unmanaged
12114         transitions.
12115
12116 2005-02-10  Zoltan Varga  <vargaz@freemail.hu>
12117
12118         * inssel.brg (mini_emit_virtual_call): Disable the virtual->nonvirtual
12119         optimization if it would need a GOT var.
12120
12121         * basic.cs: Add tests for constant propagation and switch statements.
12122
12123         * ssa.c: Fix out-of-range constant propagation and switch statements.
12124
12125 2005-02-09    <vargaz@freemail.hu>
12126
12127         * inssel-x86.brg (reg): Align the allocation size in the localloc(imm) case too.
12128
12129 2005-02-08  Zoltan Varga  <vargaz@freemail.hu>
12130
12131         * cpu-amd64.md (load_membase): Fix max length of load_membase.
12132
12133 Tue Feb 8 18:21:11 CET 2005 Paolo Molaro <lupus@ximian.com>
12134
12135         * mini.c: update to new signature of mono_class_get_allocation_ftn().
12136
12137 2005-02-06  Neale Ferguson <NealeFerguson@earthlink.net>
12138
12139         * cpu-s390.md,  mini-s390.c: Correct bug with register usage on certain 
12140         arithmetic operations.
12141
12142 Sun Feb 6 07:10:12 EST 2005 Paolo Molaro <lupus@ximian.com>
12143
12144         * mini-ppc.c: add a workaround for broken user code that
12145         DllImports vararg functions with non-vararg signatures.
12146
12147 2005-02-05  Zoltan Varga  <vargaz@freemail.hu>
12148
12149         * mini.c (mono_jit_compile_method_inner): Add detection and a 
12150         meaningfull error message for assemblies written in Managed C++.
12151
12152         * tramp-amd64.c mini-amd64.h: Add support for 
12153         create_trampoline_from_token ().
12154
12155         * aot.c mini-x86.c abcremoval.c: Applied patch from
12156         Robert Jordan (robertj@gmx.net). Fix compilation errors under gcc-2.95.
12157
12158 2005-02-04  Zoltan Varga  <vargaz@freemail.hu>
12159
12160         * mini.h mini.c mini-x86.h tramp-x86.c: Add a new kind of trampoline 
12161         which takes a MonoImage/token as parameter instead of a MonoMethod.
12162
12163         * aot.c: Use the new trampoline for initializing vtables.
12164
12165         * aot.c: Add support for ldfld/stfld_remote wrappers.
12166
12167         * mini-ops.h cpu-pentium.md inssel-x86.brg mini-x86.c: Add optimized
12168         rules for compare <MEM>, IMM.
12169
12170         * mini.h (MONO_AOT_FILE_VERSION): Bump it.
12171
12172         * aot.c: Handle inherited finalizers correctly.
12173
12174 2005-02-03  Zoltan Varga  <vargaz@freemail.hu>
12175
12176         * inssel.brg (stmt): Add a missing _setup_... ().
12177
12178         * aot.c: Save some parts of the class state to the AOT file and use it
12179         to recompute that state when a class is initialized.
12180
12181         * mini.c: Install AOT hooks into the runtime.
12182
12183         * mini.h: Bump AOT file format version.
12184         
12185         * mini.c (mono_method_to_ir): Initialize pointer type locals correctly.
12186         Fixes #72148.
12187
12188         * iltests.il: Add new test.
12189
12190 Wed Feb 2 16:53:59 CET 2005 Paolo Molaro <lupus@ximian.com>
12191
12192         * mini.c: fix typo.
12193
12194 Wed Feb 2 16:37:13 CET 2005 Paolo Molaro <lupus@ximian.com>
12195
12196         * mini.c: setup the statistical profiler in the thread attach
12197         callback to cope with the new single thread code.
12198
12199 Wed Feb 2 15:43:58 CET 2005 Paolo Molaro <lupus@ximian.com>
12200
12201         * mini-ppc.c: ensure we have enough room for the profiler
12202         calls (fixed bug#72084).
12203
12204 2005-02-02  Zoltan Varga  <vargaz@freemail.hu>
12205
12206         * aot.c: Get rid of the MonoAotMethod structure and the hashtable holding 
12207         it.
12208
12209 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12210
12211         * driver.c: Re-enabled SSAPRE (two commits, I was just dumb).
12212
12213 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12214
12215         * ssapre.c: Fixed an issue with down safety (this allows IronPython
12216         to succesfully execute parrotbench).
12217         * ssapre.h: Likewise.
12218
12219 2005-2-1  Massimiliano Mantione  <massi@ximian.com>
12220
12221         * ssa.c: In mono_ssa_rename_vars, forced the creation of a new SSA
12222         variable for stores to method arguments (fixes a SSAPRE issue).
12223
12224 Tue Feb 1 15:52:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12225
12226         * mini.c: handle value types in dup, fixes gen-112.cs.
12227
12228 Tue Feb 1 11:45:19 CET 2005 Paolo Molaro <lupus@ximian.com>
12229
12230         * mini-ppc.c, cpu-g4.md, tramp-ppc.c: use a slower code
12231         sequence for calls in dynamic methods to avoid thunks.
12232
12233 Tue Feb 1 11:44:01 CET 2005 Paolo Molaro <lupus@ximian.com>
12234
12235         * mini.c: correctly remove dynamic methods from the hashtable.
12236
12237 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12238
12239         * driver.c: Disabled SSAPRE until fix the bug that appears
12240         in IronPython's parrotbench.
12241
12242 2005-01-31  Zoltan Varga  <vargaz@freemail.hu>
12243
12244         * aot.c (mono_compile_assembly): Get rid of Skip (other) messages.
12245
12246         * mini.c (mono_method_to_ir): Revert the previous change.
12247         
12248         * mini.c (mono_method_to_ir): Do not inline ldfld and stfld wrappers
12249         when AOT compiling.
12250
12251         * tramp-x86.c (x86_magic_trampoline): Avoid calls to 
12252         mono_jit_info_table_find () etc. when running under valgrind.
12253
12254         * inssel.brg: Fix warnings.
12255
12256         * mini-exceptions.c: Fix warnings.
12257
12258 2005-01-31  Martin Baulig  <martin@ximian.com>
12259
12260         * driver.c (compile_all_methods_thread_main): Don't try to compile
12261         generic methods or anything which has type parameters.
12262
12263 2005-01-30  Zoltan Varga  <vargaz@freemail.hu>
12264
12265         * aot.c: Avoid costly calls to mono_method_full_name in tracing code and fix memory leaks.
12266
12267         * TestDriver.cs: Add --verbose flags.
12268
12269         * graph.c ssa.c: Fix 64 bit warnings.
12270         
12271         * abcremoval.h ssapre.h abcremoval.c ssapre.c mini.c tramp-amd64.c 
12272         trace.c mini-exceptions.c linear-scan.c inssel-amd64.brg inssel.brg:
12273         Fix 64 bit warnings.
12274
12275         * mini-amd64.c (mono_arch_output_basic_block): Fix uninitialized
12276         variable not spotted by gcc.
12277         
12278         * mini-amd64.c inssel-amd64.brg: Applied patch from  
12279         Willibald Krenn <Willibald.Krenn@gmx.at>. Clean up usage of 
12280         X86_COMPARE_MEMBASE opcodes.
12281
12282         * exceptions-amd64.c (mono_arch_find_jit_info): Fix AMD64 build.
12283
12284 2005-01-29  Ben Maurer  <bmaurer@ximian.com>
12285
12286         * *: MonoMethod->signature might be NULL now. You *MUST* use
12287         mono_method_signature.
12288
12289 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
12290
12291         * driver.c (compile_all_methods_thread_main): Compile the methods
12292         without invoking cctors.
12293
12294 Fri Jan 28 18:28:26 CET 2005 Paolo Molaro <lupus@ximian.com>
12295
12296         * mini.c: remove ben's "optimizations" to dup+stloc (bug #71905).
12297         * basic-calls.cs: test for the above.
12298
12299 2005-01-28  Zoltan Varga  <vargaz@freemail.hu>
12300
12301         * mini.c mini-exceptions.c aot.c exceptions-*.c: Update after 
12302         MonoJitInfo changes.
12303
12304 2005-01-27  Zoltan Varga  <vargaz@freemail.hu>
12305
12306         * mini-exceptions.c (mono_handle_exception): Compute the stack trace
12307         eagerly if it contains dynamic methods.
12308         
12309         * mini-exceptions.c (ves_icall_System_Exception_get_trace): New icall.
12310
12311         * mini-exceptions.c (mono_handle_exception): Avoid computing the stack
12312         trace, it is now computed by an icall from trace_ips.
12313         
12314         * mini-exceptions.c: Fix a warning.
12315
12316 Thu Jan 27 13:38:34 CET 2005 Paolo Molaro <lupus@ximian.com>
12317
12318         * mini-exceptions.c: don't bother getting stack trace info if
12319         it's not going to be used.
12320
12321 2005-01-27  Raja R Harinath  <rharinath@novell.com>
12322
12323         * Makefile.am (common_sources): Add ssapre-cee-ops.h and
12324         ssapre-mini-ops.h.
12325
12326 2005-01-26  Zoltan Varga  <vargaz@freemail.hu>
12327
12328         * mini.c (remove_block_if_useless): Only print debug stuff with -v -v.
12329
12330         * aot.c: Avoid calling mono_method_get_header () if not needed.
12331
12332         * mini.h: Bump AOT file format version.
12333         
12334         * mini.c (mono_emit_native_call): Allocate a GOT var here.
12335
12336         * mini.c (mono_print_tree): Print more info for calls.
12337
12338 2005-01-26  Sebastien Pouliot  <sebastien@ximian.com>
12339
12340         * declsec.h: Remove warning by adding missing include for marshal.h
12341
12342 2005-01-26  Martin Baulig  <martin@ximian.com>
12343
12344         * mini.c (mono_method_to_ir): In CEE_UNBOX_ANY, don't increase
12345         `ip' twice.
12346
12347 2005-01-25  Zoltan Varga  <vargaz@freemail.hu>
12348
12349         * mini-amd64.c (mono_arch_call_opcode): Add missing MONO_SSA_LOAD/STORE
12350         flags.
12351
12352         * ssa.c (mono_ssa_compute): Fix crashes when using AOT.
12353
12354         * aot.c (mono_compile_assembly): Fix a warning.
12355
12356 2005-01-25  Sebastien Pouliot  <sebastien@ximian.com>
12357
12358         * declsec.c: Look for security attributes on the original MonoMethod 
12359         (and not the wrapped one). This fix permissions on icalls.
12360
12361 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12362
12363         * mini-amd64.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12364
12365         * mini.c (mono_allocate_stack_slots): Add a fixme.
12366
12367         * mini-x86.c (mono_arch_allocate_vars): Use mono_allocate_stack_slots ().
12368
12369 Sun Jan 23 16:16:48 CET 2005 Paolo Molaro <lupus@ximian.com>
12370
12371         * inssel.brg: optimize casts of sealed types (more
12372         optimizations waiting for fixes in remoting).
12373
12374 2005-01-23  Zoltan Varga  <vargaz@freemail.hu>
12375
12376         * inssel.brg (stmt): Add another dummy rule.
12377
12378         * driver.c: Fix warnings.
12379
12380         * driver.c (mono_main): If running under valgrind, instruct glib to use
12381         the system allocation functions so valgrind can track the memory
12382         allocated by the g_... functions.
12383
12384         * inssel.brg (stmt): Add DUMMY rule for OP_DUMMY_STORE.
12385
12386         * mini-ops.h: Add OP_DUMMY_STORE opcode.
12387
12388         * mini.h (MONO_BBLOCK_IS_IN_REGION): New helper macro.
12389
12390         * liveness.c: Handle OP_DUMMY_STORE. Enable register allocation for
12391         variables in try regions.
12392
12393         * mini.c (mini_method_compile): Don't disable optimizations on large
12394         methods when AOT compiling.
12395
12396         * mini.c (mono_allocate_stack_slots): New arch independent method to 
12397         allocate stack slots. Not yet used.
12398
12399 2005-01-22  Ben Maurer  <bmaurer@ximian.com>
12400
12401         * debug-mini.c (mono_debug_close_method): Plug some leaks.
12402
12403 Sat Jan 22 13:41:51 EST 2005 Paolo Molaro <lupus@ximian.com>
12404
12405         * mini-ppc.c: make the branch info relative as the code
12406         buffer can be reallocated.
12407
12408 2005-01-22  Sebastien Pouliot  <sebastien@ximian.com>
12409
12410         * aot.c: Allow decoding of the new  MONO_PATCH_INFO_DECLSEC.
12411         * driver.c: Removed the AOT/security restriction. Now initialize the
12412         security manager (in metadata) if --security is used.
12413         * mini.c|h: Add the MONO_PATCH_INFO_DECLSEC code to use the index,
12414         rather than the pointer to declarative security, when AOT is used.
12415
12416 Sat Jan 22 09:35:19 EST 2005 Paolo Molaro <lupus@ximian.com>
12417
12418         * mini.h, mini-ppc.h, mini-ppc.c: updated to use out of line
12419         basic blocks, reduced intrinsic exception throwing code size.
12420
12421 2005-01-22  Miguel de Icaza  <miguel@ximian.com>
12422
12423         * driver.c (mini_usage): Reorder the usage screen.
12424
12425 2005-01-21  Zoltan Varga  <vargaz@freemail.hu>
12426
12427         * mini.c (mono_resolve_patch_target): Fix warning.
12428
12429 2005-01-20  Zoltan Varga  <vargaz@freemail.hu>
12430
12431         * mini-x86.c (mono_arch_local_regalloc): Fix bug introduced by
12432         previous patch.
12433
12434         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12435
12436         * mini-amd64.c (mono_arch_local_regalloc): Revert last patch as it
12437         breaks the amd64 build.
12438
12439         * mini-x86.c (mono_arch_local_regalloc): Fix bug in div/rem 
12440         register allocation. Fixes #71454.
12441
12442         * mini-amd64.c (mono_arch_local_regalloc): Ditto.       
12443
12444         * arrays.cs: Add new regression test.   
12445
12446 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12447
12448         * ssapre.c: Turned usage of snprintf to GString.
12449         * ssapre.h: disabled MONO_APPLY_SSAPRE_TO_SINGLE_METHOD
12450         (I left it on by mistake in my previous commit).
12451
12452 Thu Jan 20 12:00:45 CET 2005 Paolo Molaro <lupus@ximian.com>
12453
12454         * mini.c, cfold.c, basic-calls.cs: preserve side effects
12455         on cond branch optimization (fixes bug# 71515).
12456
12457 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12458
12459         * abcremoval.c: Fixed bug 71062.
12460         * abcremoval.h: Likewise.
12461
12462 2005-1-20  Massimiliano Mantione  <massi@ximian.com>
12463
12464         * mini.c: Added a new functionality to optimize_branches, the removal
12465         of useless basic blocks, and fixed some problem in the removal of
12466         critical edges; some utility functions added for both purposes.
12467         * ssapre.c: Added complex expression support, and fixed bug 70637.
12468         * ssapre.h: Likewise.
12469         * ssapre-cee-ops.h: Added file with list of "CEE_*" opcodes
12470         enabled in SSAPRE.
12471         * ssapre-mini-ops.h: Likewise, but for "OP_*" opcodes.
12472         * driver.c: Re-enabled SSAPRE.
12473
12474 2005-01-19  Martin Baulig  <martin@ximian.com>
12475
12476         * mini.c (mono_method_to_ir): Call mono_get_inflated_method() on
12477         the result of mono_get_method_constrained().
12478
12479 2005-01-18  Neale Ferguson <NealeFerguson@earthlink.net>
12480
12481         * exceptions-s390.c tramp-s390.c: Allocate code using the global code
12482         manager.
12483
12484 2005-01-18  Geoff Norton  <gnorton@customerdna.com>
12485
12486         * jit-icalls.c (mono_llmult_ovf): Fix other overflow conditions to
12487         be detected.  Fixes #59296.
12488
12489 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12490
12491         * mini-amd64.c (mono_arch_output_basic_block): Remove some assertions
12492         which can happen. Fixes #71361.
12493
12494 2005-01-18  Zoltan Varga  <vargaz@freemail.hu>
12495
12496         * exceptions-sparc.c tramp-sparc.c: Allocate code using the global code
12497         manager.
12498
12499 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12500
12501         * mini.c (mono_create_jump_trampoline): Revert last change as it causes
12502         appdomain-unload.exe to fail.
12503         
12504         * mini.c: Fix some memory leaks.
12505
12506 Mon Jan 17 16:16:23 CET 2005 Paolo Molaro <lupus@ximian.com>
12507
12508         * inssel.brg: handle the new size of rank, idepth, max_interface_id.
12509         Fixed bug and sped up some codepaths.
12510
12511 2005-01-17  Zoltan Varga  <vargaz@freemail.hu>
12512
12513         * mini.c: Fix some memory leaks.
12514
12515         * exceptions.cs basic-long.cs: Add test for checked ulong->int 
12516         conversion.
12517
12518         * inssel-long.brg: Implement long_conv_to_ovf_i4_un. Fixes #71319.
12519
12520         * inssel-long.brg: Fix conv.ovf.i8 when run on an int32. Fixes
12521         #71320.
12522
12523         * iltests.il: Add regression test for #71320.
12524
12525 2005-01-16  Zoltan Varga  <vargaz@freemail.hu>
12526
12527         * mini.c (mono_codegen): Fix installation of profiler hooks.
12528
12529         * mini-sparc.c mini-amd64.c: Don't allocate stack space for dead vars.
12530
12531 Sun Jan 16 12:19:35 CET 2005 Paolo Molaro <lupus@ximian.com>
12532
12533         * mini.h, mini.c, cfold.c: optimize access to enum
12534         readonly fields, too. Eval conditional branches if possible
12535         to perform unreachable code removal in more cases.
12536
12537 2005-01-15  Zoltan Varga  <vargaz@freemail.hu>
12538
12539         * tramp-amd64.c exceptions-amd64.c: Use the new global code manager.
12540
12541         * mini.c (mono_global_codeman_reserve): New function to allocate code memory from a global
12542         code manager.
12543
12544         * tramp-x86.c mini-x86.c exceptions-x86.c: Allocate all code memory so mono works with
12545         WinXP DEP. Fixes #71244.
12546
12547 2005-01-14  Zoltan Varga  <vargaz@freemail.hu>
12548
12549         * inssel.brg: Allways convert CEE_CONV_OVF_I4 to a move on 64 bit platforms. Fixes #71236.
12550
12551 2005-01-13  Zoltan Varga  <vargaz@freemail.hu>
12552
12553         * mini-x86.c (mono_arch_output_basic_block): Fix OP_ATOMIC_ADD_NEW_I4.
12554
12555 2005-01-11  Zoltan Varga  <vargaz@freemail.hu>
12556
12557         * mini-exceptions.c exceptions-ppc.c aot.c: Cope with MonoJitInfo 
12558         changes.
12559
12560         * mini.h: Bump AOT version.
12561
12562         * mini.h (MonoCompile): Change exvar to a hash table.
12563
12564         * mini.c: Allocate a separate exvar for each handler block.
12565
12566         * mini.c: Get rid of the computation of filter_lengths, its not needed.
12567
12568         * mini.c inssel.brg: Change OP_THROW_OR_NULL to compare the current
12569         ex var with the pending exception and only throw if the two are equal.
12570         Fixes #68552.
12571         
12572         * exceptions.cs: Add tests for rethrow and nested catch clauses.
12573
12574         * mini-x86.c: Fix warnings.
12575
12576         * Makefile.am (common_sources): Move mini-exceptions.c here as it is
12577         used by all the ports now.
12578
12579         * aot.c: Add write-symbols and save-temps options.
12580
12581 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12582
12583         * mini-x86.c: Add support for returning structs in registers from pinvoke functions on WIN32.
12584
12585 Mon Jan 10 16:11:16 EST 2005 Neale Ferguson <nealeferguson@earthlink.net>
12586
12587         * mini-ops.h, inssel-s390.brg, cpu-s390.md: Support OP_ATOMIC__xxx 
12588         operations.
12589
12590         * tramp-s390.c: Check vtable slot belongs to the domain.
12591
12592         * mini-exceptions.c, exceptions-s390.c: Standardize exception handling
12593         as per other platforms.
12594
12595         * mini-s390.c, mini-s390.h: Enable out-of-line bblock support.
12596
12597 Mon Jan 10 18:53:05 CET 2005 Paolo Molaro <lupus@ximian.com>
12598
12599         * driver.c: we don't run the Main() code in a subthread anymore.
12600
12601 Mon Jan 10 17:54:16 CET 2005 Paolo Molaro <lupus@ximian.com>
12602
12603         * mini.c: added experimental rtc support in the statistical
12604         profiler: if the user has the permission, more accurate statistics
12605         are gathered. Run with: MONO_RTC=4096 mono --profiler=default:stat ....
12606         The MONO_RTC value must be restricted to what the linux rtc allows:
12607         power of two from 64 to 8192 Hz.
12608
12609 2005-01-10  Zoltan Varga  <vargaz@freemail.hu>
12610
12611         * mini-x86.c (mono_arch_emit_exceptions): Fix #71121.
12612
12613 Mon Jan 10 05:20:49 EST 2005 Paolo Molaro <lupus@ximian.com>
12614
12615         * mini-ppc.c: better icache flush for smp.
12616
12617 2005-01-09  Zoltan Varga  <vargaz@freemail.hu>
12618
12619         * mini-amd64.c (emit_move_return_value): Fix memory leak.
12620
12621         * mini-x86.c (get_call_info): Add the get_call_info () code from the
12622         amd64 port, not yet used.
12623
12624 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12625
12626         * mini.c (mono_method_to_ir): Disable inlining of ldfld wrappers with
12627         a struct type.
12628
12629 2005-01-07  Sebastien Pouliot  <sebastien@ximian.com>
12630
12631         * driver.c: Added --security option to activate the security manager.
12632         Right now this will allow code generation for declarative demands and
12633         is disabled when AOT is specified.
12634         * mini.c: Add code generation for declarative security demands.
12635         * mini.h: Add mono_use_security_manager as an extern gboolean.
12636
12637 2005-01-07  Zoltan Varga  <vargaz@freemail.hu>
12638
12639         * aot.c (mono_compile_assembly): Speed up compilation a bit by
12640         emitting more dense assembly code.
12641
12642         * mini-sparc.c mini-sparc.h exceptions-sparc.c: Enable optimized corlib
12643         exception throwing stuff.
12644
12645 2005-01-06  Zoltan Varga  <vargaz@freemail.hu>
12646
12647         * mini-sparc.c (mono_arch_emit_exceptions): Fix typo in previous patch. Remove
12648         dead code.
12649
12650         * mini-amd64.c (mono_arch_emit_exceptions): Remove duplicate epilog stuff
12651         left in by mistake.
12652
12653         * driver.c (EXCLUDED_FROM_ALL): Disable SSAPRE until bug #70637 is 
12654         fixed.
12655
12656         * mini-sparc.h mini-sparc.c: Enable out-of-line bblock support.
12657
12658         * tramp-*.c: Only patch vtable slots if the object is in the current
12659         domain. Fixes appdomain-unload.exe.
12660
12661         * mini-amd64.c mini-amd64.h: Enable out-of-line bblock support.
12662         
12663         * mini-amd64.c (mono_arch_local_regalloc): Port regalloc fix from
12664         x86 branch.
12665
12666 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12667
12668         * mini.c (reverse_branch_op): New helper function.
12669
12670         * mini.c (optimize_branches): Run the new optimization only on 
12671         platforms which support it. Also reverse all kinds of branches.
12672
12673         * mini.h (MonoBasicBlock): Add 'out_of_line' field.
12674
12675         * mini.c (mono_method_to_ir): Set 'out_of_line' for bblocks which have
12676         a throw statement.
12677
12678         * mini.c (optimize_branches): Reverse not-equals branches if the false
12679         bblock is a throw. This happens a lot of time with argument checking in
12680         corlib.
12681
12682         * mini.c (mono_codegen): Add support for placing basic blocks after
12683         the function epilogue.
12684
12685         * mini-x86.c mini-x86.h: Add support for placing basic blocks after the
12686         function epilogue.
12687         
12688 2005-01-05  Miguel de Icaza  <miguel@ximian.com>
12689
12690         * mini.c (setup_stat_profiler): Only set this up if the platform
12691         supports ITIMER_PROF.
12692
12693 2005-01-05  Zoltan Varga  <vargaz@freemail.hu>
12694
12695         * mini-x86.c (mono_arch_local_regalloc): Fix a bug introduced by the
12696         previous patch.
12697
12698         * inssel.brg: Fix a warning.
12699
12700 Wed Jan 5 16:40:18 CET 2005 Paolo Molaro <lupus@ximian.com>
12701
12702         * mini.c: added support for statistical profiler 
12703         (run with: --profile=default:stat).
12704
12705 2005-01-04  Zoltan Varga  <vargaz@freemail.hu>
12706
12707         * mini-x86.h (MONO_ARCH_ENABLE_EMIT_STATE_OPT): Enable this on x86.
12708
12709         * mini-x86.c cpu-pentium.md: More fixes for usage of global registers.
12710
12711         * mini-amd64.c (mono_arch_local_regalloc): Port some regalloc fixes 
12712         related to global registers from the amd64 port.
12713
12714 2005-01-03  Zoltan Varga  <vargaz@freemail.hu>
12715
12716         * mini.c (mono_method_to_ir): Handle MONO_CLASSCONST.
12717
12718         * mini-amd64.c (mono_arch_local_regalloc): Fix some regalloc problems
12719         with global registers.
12720         (mono_arch_output_basic_block): Fix SWITCH in the AOT case.
12721
12722         * aot.c (emit_method_code): Fix the 'method emitted as' messages.
12723
12724 2004-12-31  Zoltan Varga  <vargaz@freemail.hu>
12725
12726         * debug-mini.c (encode_value): Fix off-by-one.
12727
12728         * aot.c (encode_value): Likewise.
12729
12730         * mini.c (mono_method_to_ir): Disable AOT for methods containing LDPTR.
12731
12732 2004-12-30  Zoltan Varga  <vargaz@freemail.hu>
12733
12734         * mini.c linear-scan.c: Add a workaround for the mcs crash when using 
12735         AOT.
12736
12737         * aot.c (mono_aot_load_method): Free up patch info if no longer needed.
12738         
12739         * aot.c (emit_method_info): Increase size of temp buffer.
12740
12741         * mini-x86.c cpu-pentium.md mini.c: Load fp constants differently in 
12742         the AOT case.
12743
12744 2004-12-28  Zoltan Varga  <vargaz@freemail.hu>
12745
12746         * aot.c (emit_method_info): Fix build.
12747         
12748         * aot.c: Further rework of the AOT file format to reduce the size of
12749         the method info data.
12750
12751         * mini.h: Bump AOT file format version.
12752
12753 2004-12-27  Martin Baulig  <martin@ximian.com>
12754
12755         * mini.c (mini_get_method): New static method; call
12756         mono_get_method_full() and mono_get_inflated_method().
12757         (mono_method_to_ir): Use mini_get_method() instead of
12758         mono_get_method_full(). 
12759
12760 2004-12-26  Patrik Torstensson  <patrik.torstensson@gmail.com>
12761
12762         * mini-x86.c (atomic ops): fixed bug interlocked bug #70784. 
12763
12764 2004-12-25  Zoltan Varga  <vargaz@freemail.hu>
12765
12766         * inssel.brg (ldind_to_load_membase): Handle CEE_LDIND_I8.
12767
12768         * inssel-amd64.brg: Add some optimization rules.
12769
12770 2004-12-24  Ben Maurer  <bmaurer@ximian.com>
12771
12772         * aot.c: Remove the use of MonoGHashTable and other GC stuff. The
12773         standard not GC'd stuff is fine.
12774
12775 2004-12-24  Zoltan Varga  <vargaz@freemail.hu>
12776
12777         * aot.c: Rework the AOT file format to get rid of most of the global
12778         symbols. This reduces the size of the mscorlib.dll.so by 1MB.
12779
12780         * mini.h: Bump AOT file format version.
12781         
12782 2004-12-23  Zoltan Varga  <vargaz@freemail.hu>
12783
12784         * mini.h: Bump AOT file format version.
12785
12786         * aot.c (mono_aot_is_got_entry): New function to determine if an 
12787         address is inside a GOT.
12788
12789         * aot.c mini-x86.c tramp-x86.c: Make all patches use the GOT.
12790
12791         * cpu-pentium.md: Increase the maximum size of some instructions which
12792         might involve a got access.
12793         
12794         * mini.c (get_method_from_ip): Another debug helper function.
12795
12796         * mini.c: Call mono_get_got_var () in a couple places. Handle the case
12797         when got var accesses are created during the decompose phase.
12798
12799         * mini-sparc.c: Change mono_compile_aot to cfg->compile_aot.
12800
12801         * mini.h mini.c mini-x86.c aot.c mini-sparc.c: Add a 'compile_corlib'
12802         argument mini_compile_method and to MonoCompile, and use this to
12803         determine whenever a given method is compiled for AOT. This allows the
12804         other methods compiled during AOT compilation to be free of AOT stuff,
12805         so the backends does not need to add special support for them by
12806         creating a fake GOT etc.
12807
12808         * mini-x86.c (mono_arch_patch_code): Remove fake got stuff as it is no
12809         longer needed.
12810
12811 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12812
12813         * mini.c (mono_method_to_ir): It turns out that some of the
12814         x-appdomain wrappers are lax with types, so just ignore this for
12815         all wrappers.
12816
12817         * inssel.brg (OP_CHECK_ARRAY_TYPE): Optimize this by only looking
12818         at the vtable->klass. If it is non-shared code we can just use the
12819         vtable.
12820
12821 Tue Dec 21 17:43:06 CET 2004 Paolo Molaro <lupus@ximian.com>
12822
12823         * mini-ppc.c: access MonoDomain from tls, too.
12824
12825 2004-12-21  Sebastien Pouliot  <sebastien@ximian.com>
12826
12827         * declsec.c: Removed unused variable (and related warning ;-)
12828
12829 2004-12-21  Ben Maurer  <bmaurer@ximian.com>
12830
12831         * iltests.il: New test for LDELEMA on an array of ref types.
12832
12833         * mini.c (CEE_LDELEMA): We need to emit OP_CHECK_ARRAY_TYPE for
12834         all ldelema's on reftypes.
12835         (check_call_signature): Remove the OP_CHECK_ARRAY_TYPE from here,
12836         it was the wrong place to put it.
12837
12838         * mini-x86.c (mono_arch_output_basic_block): Just use ecx as the
12839         register to pop to make this cleaner, at the request of Paolo.
12840
12841 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12842
12843         * mini-ops.h (OP_GETHASHCODE): New op.
12844
12845         * inssel.brg (OP_GETHASHCODE): Emit code for the new opcode
12846
12847         * mini.c (mini_get_inst_for_method): Create the intrinsic hash
12848         operation.
12849
12850         For a microbenchmark, this reduces the cost of Hashtable.get_Item
12851         by 25%.
12852         
12853         * mini-x86.c (mono_arch_output_basic_block): Rather than
12854
12855         add ebp, 4
12856
12857         Emit
12858
12859         pop edx
12860
12861         The first is 3 bytes while the second is 1. This saves 36 kb on
12862         mscorlib, quite a big saving. When bootstraping mcs, I was able to
12863         see a small boost because of icache locality.
12864
12865         * cfold.c (FOLD_BINOPCOMM): Kill add foo, 0
12866
12867 Mon Dec 20 12:19:40 EST 2004 Paolo Molaro <lupus@ximian.com>
12868
12869         * Makefile.am, mini-ppc.h, mini-exceptions.c, exceptions-ppc.c:
12870         started code sharing with the generic code.
12871
12872 Mon Dec 20 11:08:06 EST 2004 Paolo Molaro <lupus@ximian.com>
12873
12874         * mini-ppc.c, cpu-g4.md: added code for direct access to
12875         tls data slots.
12876
12877 Mon Dec 20 10:58:28 EST 2004 Paolo Molaro <lupus@ximian.com>
12878
12879         * mini-ops.h, inssel-x86.brg, cpu-amd64.md, inssel.brg, inssel-amd64.brg,
12880          mini-amd64.c, mini-x86.c, cpu-pentium.md: renamed OP_X86_TLS_GET
12881         to OP_TLS_GET.
12882
12883 2004-12-20  Sebastien Pouliot  <sebastien@ximian.com>
12884
12885         * declsec.c|h: Added functions to cache the declarative stack modifiers
12886         in MonoJitInfo and to create a security frame from a MonoJitInfo 
12887         structure.
12888         * mini.c: Initialize jinfo->cas_inited to FALSE when MonoJitInfo is
12889         created. Register internal calls for System.Security.SecurityFrame::
12890         _GetSecurityFrame and _GetSecurityStack.
12891         * mini.h: Added definition for new icalls (in mini-exceptions.c) and
12892         the definitions for the new stack walk/callback mechanism.
12893         * mini-exceptions.c: Added internal call GetSecurityFrame (to get the 
12894         first security frame for LinkDemands and InheritanceDemands) and
12895         GetSecurityStack for Demands. Both use the new mono_walk_stack code
12896         from lupus.
12897         * mini-x86.h, mini-amd64.h, mini-sparc.h: Architecture specific stack
12898         walk initialization (lupus).
12899
12900 2004-12-20  Ben Maurer  <bmaurer@ximian.com>
12901
12902         * mini.c (mono_method_to_ir): In CEE_DUP, handle the dup / stloc
12903         idiom.
12904         (handle_loaded_temps): Do not create a temporary variable for
12905         things that we know are temps. They will never be modified.
12906         (mono_spill_call): Set MONO_INST_IS_TEMP
12907         (mono_emulate_opcode): ditto
12908         (emit_tree): ditto
12909         (mono_method_to_ir.CEE_DUP): ditto
12910
12911 2004-12-19  Ben Maurer  <bmaurer@ximian.com>
12912
12913         * mini.c (type_to_eval_stack_type): Make this handle the void type
12914         (mono_emit_call_args): set the call->type with type_to_eval_stack_type
12915         (emit_tree): use ip_in_bb to special case some common idioms
12916         Update all callers to pass in the IP.
12917         (mono_method_to_ir): Make CEE_CALL* do the above as well.
12918
12919         This gives us a nice 2% speedup in mcs bootstrap.
12920
12921         * mini-x86.c (peephole_pass): Peephole pass to make
12922         mov  [foo], eax
12923         push [foo]
12924
12925         into
12926
12927         mov [foo], eax
12928         push eax
12929
12930         * mini.c (ip_in_bb): new method.
12931         (mono_method_to_ir): use this method rather than doing the hash
12932         lookup ourselves.
12933
12934         * linear-scan.c (mono_linear_scan): When expiring actives, you
12935         don't need to keep around variables that expire on this
12936         instruction. This makes it so that:
12937              a = b + 1
12938         will turn into:
12939              store (ebx add (ebx, 1))
12940         which will become
12941              add ebx, 1
12942
12943 2004-12-19  Zoltan Varga  <vargaz@freemail.hu>
12944
12945         * mini.c (mono_method_to_ir): Optimize the common ldobj+stloc 
12946         combination to avoid doing two copies. Fix up problems with previous
12947         patch.
12948
12949         * mini.c: Fix 64 bit warnings.
12950
12951         * mini-x86.c (INST_IGNORES_CFLAGS): Add OP_STOREI4_MEMBASE_REG.
12952
12953 2004-12-17  Zoltan Varga  <vargaz@freemail.hu>
12954
12955         * mini-amd64.h mini-amd64.c exceptions-amd64.c: Port exception handling
12956         changes from the x86 code.
12957
12958         * mini.h: Add prototype for mono_arch_get_throw_corlib_exception ().
12959
12960 2004-12-16  Zoltan Varga  <vargaz@freemail.hu>
12961
12962         * mini-x86.c (mono_arch_emit_epilog): Optimize the corlib exception
12963         throwing code to reduce its size, unify the AOT and non-aot code and 
12964         get rid of relocations in the AOT case.
12965
12966         * mini-x86.h mini.c exceptions-x86.c 
12967         (mono_arch_get_throw_corlib_exception): New arch specific function to 
12968         raise corlib exceptions which doesn't require relocations in the 
12969         caller.
12970
12971         * aot.c (emit_method): Handle PATCH_INFO_NONE as well.
12972
12973 2004-12-15  Zoltan Varga  <vargaz@freemail.hu>
12974
12975         * mini.c (mono_emit_method_call): Only allocate the got var when it is
12976         needed.
12977
12978         * mini-x86.c (mono_arch_patch_code): Add missing PATCH_INFO_METHOD_REL
12979         in the AOT case.
12980
12981 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12982
12983         * mini-x86.c, cpu-pentium.md, inssel-x86.brg: Fixed bug
12984         with add function when used from Inc/dec atomic 
12985         functions. Re-enabled optimization on x86.
12986         * mini-ops.h: renamed atomic_add functions to
12987         allow _add to match the Interlocked::Add and
12988         _add_next to match Interlocked::Inc/Dec.
12989
12990 2004-12-15  Massimiliano Mantione  <massi@ximian.com>
12991
12992         * mini.c: Fixed a subtle bug in mono_method_to_ir, about the
12993         linking of BBs to the end BB, and enabled SSAPRE also with
12994         consprop and copyprop (which was prevented by that bug).
12995
12996 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
12997
12998         * mini-x86.c: disabling the Interlocked optimizing code. 
12999
13000 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
13001
13002         * aot.c (load_aot_module): Move reading of got_addr after the AOT
13003         file version check.
13004         
13005 2004-12-14  Patrik Torstensson  <patrik.torstensson@gmail.com>
13006
13007         * mini-x86.c, inssel-x86.brg, cpu-pentium.md: removed _imm 
13008         interlocked optimization due lack of support on x86, rewrote 
13009         exchange to take into account that base may be in eax.
13010         
13011         xsp works again; activated Interlocked optimizing code.
13012         
13013 2004-12-14  Zoltan Varga  <vargaz@freemail.hu>
13014
13015         * mini.h (MONO_AOT_FILE_VERSION): Bump AOT file version.
13016
13017 2004-12-13  Zoltan Varga  <vargaz@freemail.hu>
13018
13019         * mini-ops.h: Add new opcodes.
13020
13021         * mini.h: Add new patch types. Add got_var to MonoCompile.
13022
13023         * mini.h mini-x86.c mini-amd64.c aot.c: Rename 
13024         mono_arch_get_aot_patch_offset () to mono_arch_get_patch_offset () and
13025         make it work with all kinds of patchable code.
13026
13027         * inssel.brg inssel-x86.brg: Add new rules dealing with computing the
13028         address of the GOT, and referencing entries in the GOT.
13029
13030         * mini.c: Add code to load the GOT address if needed by an opcode.
13031
13032         * aot.c mini-x86.h mini-x86.c cpu-pentium.md: Add support for position 
13033         independent AOT code on the x86 using an elf-style Global Offset Table.
13034
13035 2004-12-14  Raja R Harinath  <rharinath@novell.com>
13036
13037         * Makefile.am (RUNTIME): Set MONO_SHARED_DIR.
13038
13039 2004-12-13 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13040
13041         * mini-x86.c: disabling the Interlocked optimizing code. It segfaults
13042         when running xsp.
13043
13044 2004-12-13  Patrik Torstensson  <patrik.torstensson@gmail.com>
13045
13046         * mini-x86.c,mini-ops.h,inssel-x86.brg,cpu-pentium.md: Implementation
13047         of Interlocked:Increment/Decrement/Add as inline ops.
13048         (mini-x86.c (mono_arch_get_inst_for_method and mono_arch_output_basic_block))
13049
13050 2004-12-12  Geoff Norton  <gnorton@customerdna.com>
13051
13052         * exceptions-ppc.c: Reorder code so gcc3.4 can compile it
13053         * mini-ppc.c: Unify mono_arch_patch_code with changes in r37636.
13054
13055 2004-12-12  Duncan Mak  <duncan@ximian.com>
13056
13057         * mini-ppc.c (mono_arch_patch_code): Hopefully made this build
13058         again. `patch_info->table_size' is no longer valid after Zoltan's
13059         commit #37636.
13060
13061 2004-12-12  Martin Baulig  <martin@ximian.com>
13062
13063         * mini.c (mono_method_to_ir): Only call mono_debug_init_method()
13064         if we are the "real" method, ie. not an inlined method inside it.
13065
13066 2004-12-11  Ben Maurer  <bmaurer@ximian.com>
13067
13068         * mini.c (CEE_LDSFLD): Make sure that the vtable has been init'd
13069         before we look in the special fields table. This fixes
13070         ../tests/thread-static-init.cs.
13071
13072 2004-12-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
13073
13074         * mini.c: return immediately after setting OP_ARRAY_RANK or CEE_LDLEN
13075         for Array get_Rank and get_Length. Fixes bug #70465.
13076
13077 2004-12-11  Zoltan Varga  <vargaz@freemail.hu>
13078
13079         * mini.h mini.c aot.c: Put the bblock table for a SWITCH patch into a
13080         separate structure to reduce the size of MonoJumpInfo.
13081
13082 Fri Dec 10 18:09:22 CET 2004 Paolo Molaro <lupus@ximian.com>
13083
13084         * mini.c, mini.h, aot.c, driver.c: allow disabling the aot code.
13085
13086 2004-12-10  Patrik Torstensson  <patrik.torstensson@gmail.com>
13087
13088         * mini.c (mini_get_inst_for_method): Changed to allow ports
13089         to return a MonoInst instead of opcode 
13090         (renamed mini_get_opcode_for_method to better reflect the new functionality)
13091         
13092         * mini-[x86|s390|s390x|ppc|sparc].c (mono_arch_get_inst_for_method): 
13093         Allow ports to return a created MonoInst instead of op-code, will enable
13094         new optimizations.
13095         (renamed mini_get_opcode_for_method to better reflected the functionality)
13096
13097 2004-12-09  Zoltan Varga  <vargaz@freemail.hu>
13098
13099         * mini.c (NEW_AOTCONST): Share some code between the different NEW_AOTCONST macros.
13100
13101 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
13102
13103         * mini.c jit-icalls.c: Pass generic_context to mono_ldtoken_wrapper.
13104         Fixes #69985.
13105
13106 2004-12-08  Martin Baulig  <martin@ximian.com>
13107
13108         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use `fsig->signature'
13109         if we're a CEE_CONSTRAINED call.  Fixes gen-118.cs.
13110
13111 2004-12-08  Zoltan Varga  <vargaz@freemail.hu>
13112
13113         * mini-sparc.c (mono_arch_output_basic_block): Implement OP_FCONV_TO_<X>
13114         correctly.
13115
13116         * exceptions.cs: Disable some tests which depend on properties of x86 fp
13117         arithmetic.
13118
13119 2004-12-08  Raja R Harinath  <rharinath@novell.com>
13120
13121         * Makefile.am (CLEANFILES): Add *.exe, *.dll.
13122
13123 2004-12-07  Zoltan Varga  <vargaz@freemail.hu>
13124
13125         * mini-sparc.c (mono_arch_output_basic_block): Fix LOCALLOC_IMM
13126         bug introduced by the previous patch.
13127
13128 Tue Dec 7 11:44:39 CET 2004 Paolo Molaro <lupus@ximian.com>
13129
13130         * mini-ppc.c, objectc.cs: handle large structs passed by value
13131         (fixes bug #69972).
13132
13133 Tue Dec 7 10:43:31 CET 2004 Paolo Molaro <lupus@ximian.com>
13134
13135         * mini-ppc.c: OP_ARGLIST implementation from
13136         Geoff Norton  <gnorton@customerdna.com>.
13137
13138 Tue Dec 7 10:14:25 CET 2004 Paolo Molaro <lupus@ximian.com>
13139
13140         * inssel-x86.brg, inssel-ppc.brg: fix reference to register
13141         in stmt: OP_OUTARG_VT (reg) (should fix bug #69785).
13142
13143 Tue Dec 7 10:06:39 CET 2004 Paolo Molaro <lupus@ximian.com>
13144
13145         * exceptions-ppc.c: avoid calling ppc_patch in exception trampolines.
13146
13147 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13148
13149         * inssel-s390.brgi, mini-ops.h, mini-s390.c : Add stubs for support of tls offset
13150         support.
13151
13152 2004-12-06  Zoltan Varga  <vargaz@freemail.hu>
13153
13154         * mini-sparc.c: Zero out localled-ed memory.
13155
13156         * iltests.il: Add tests for zeroing out localloc-ed memory.
13157
13158 2004-12-04  Martin Baulig  <martin@ximian.com>
13159
13160         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, use the new
13161         mono_method_get_signature_full().       
13162
13163 2004-12-03  Massimiliano Mantione  <massi@ximian.com>
13164
13165         * mini.c: Added removal of critical edges (prerequisite for SSAPRE),
13166         and some utility functions (always for SSAPRE), integrated SSAPRE.
13167         * mini.h: Likewise.
13168         * driver.c: Added ssapre option.
13169         * ssa.c: Small fix on OP_ARG handling.
13170         * ssapre.c, ssapre.h: Added files containing SSAPRE implementation.
13171         * Makefile.am: Likewise.
13172
13173 2004-12-02  Zoltan Varga  <vargaz@freemail.hu>
13174
13175         * tramp-x86.c (mono_arch_create_jit_trampoline): Remove code which is
13176         now in the xp code.
13177
13178         * mini.c (mini_init): Register mono_thread_force_interruption_checkpoint
13179         icall.
13180
13181 2004-12-01  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13182
13183         * inssel-s390.brg : Add OP_OUTARG_VT (OP_REFANYTYPE (reg)) rule.
13184         
13185         * cpu-s390.md : Increase instruction length of oparglist.
13186
13187         * mini-s390.c : Implement vararg and TYPEDEBYREF support.
13188
13189 2004-11-30  Martin Baulig  <martin@ximian.com>
13190
13191         * mini.c (mono_method_to_ir): In CEE_CALLVIRT, added support for
13192         virtual generic methods.  We call a special helper_compile_generic_method()
13193         icall to retrieve the method from the vtable, inflate and compile
13194         it and then do a CEE_CALLI.  Thanks a lot to Paolo for this idea.
13195
13196         * jit-icalls.c (helper_compile_generic_method): New JIT icall.
13197
13198 2004-11-30  Zoltan Varga  <vargaz@freemail.hu>
13199
13200         * mini-sparc.c: Fix up vararg corner cases. Fixes #70019.
13201
13202 2004-11-29  Zoltan Varga  <vargaz@freemail.hu>
13203
13204         * cpu-sparc.md mini-sparc.c (long_conv_to_ovf_i): Fill missing delay slot.
13205         Fixes #69929.
13206
13207 2004-11-27  Ben Maurer  <bmaurer@ximian.com>
13208
13209         * inssel.brg (CEE_SWITCH): The AOT stuff Zoltan added is only for
13210         platforms with PIC aot.
13211
13212 2004-11-28  Martin Baulig  <martin@ximian.com>
13213
13214         * mini.c (mono_method_to_ir): In CEE_DUP, added handle_stobj().
13215         Fixes gen-112.cs.
13216
13217 2004-11-28  Martin Baulig  <martin@ximian.com>
13218
13219         * mini-x86.c (mono_arch_call_opcode): Use the original type, not
13220         the result of mono_type_get_underlying_type() to check whether
13221         we're byref.
13222
13223 2004-11-26  Martin Baulig  <martin@ximian.com>
13224
13225         * mini.c
13226         (mono_method_to_ir): Use `!method->signature->has_type_parameters'
13227         in the g_assert().
13228
13229 2004-11-26  Zoltan Varga  <vargaz@freemail.hu>
13230
13231         * mini-amd64.c (mono_arch_emit_this_vret_args): Handle this and vret
13232         the same way as the other arguments so they won't get clobbered.
13233
13234         * mini-amd64.c (mono_arch_output_basic_block): Avoid doing virtual 
13235         calls through R11 since it is clobbered by the trampoline code.
13236
13237 2004-11-26  Raja R Harinath  <rharinath@novell.com>
13238
13239         * Makefile.am: Consistently use $(RUNTIME) rather than ./mono to
13240         pick up in-tree mscorlib.dll.
13241
13242 2004-11-25  Zoltan Varga  <vargaz@freemail.hu>
13243
13244         * aot.c: Rename MonoAOTModule->cleanup to out_of_date.
13245
13246         * mini-amd64.c aot.c: Switch to PIC relative AOT code. References to 
13247         runtime data/code are now stored in a table similar to the GOT in ELF. 
13248         This allows the code itself to be position independent.
13249
13250         * aot.c: Fix loading of referenced assemblies after the lazy assembly
13251         loading changes.
13252
13253         * aot.c: Attach ELF type (object/function) directives to all global
13254         symbols.
13255
13256         * tramp-amd64.c (amd64_magic_trampoline): Patch RIP relative calls too.
13257
13258         * inssel.brg (SWITCH): Emit an AOT_CONST in the aot case.
13259
13260         * mini-amd64.h: Turn on PIC AOT code.
13261
13262         * mini.h (mono_arch_get_aot_patch_offset): New arch specific function
13263         returning the offset within an OP_AOTCONST instruction where the GOT
13264         offset needs to be added.
13265
13266         * mini.h: Bump AOT file format version.
13267
13268 2004-11-25  Martin Baulig  <martin@ximian.com>
13269
13270         * mini.c (mono_method_to_ir): In CEE_CALL, don't allow calling any
13271         uninflated generic methods.
13272
13273 2004-11-25  Martin Baulig  <martin@ximian.com>
13274
13275         * mini.c (mono_method_to_ir): Don't allow any uninflated generic methods.
13276
13277 2004-11-24  Martin Baulig  <martin@ximian.com>
13278
13279         * minit.c (type_to_eval_stack_type): Set `inst->klass' to the
13280         original klass (this only applies for generic instances).
13281
13282 2004-11-24  Martin Baulig  <martin@ximian.com>
13283
13284         * mini.c (mono_method_to_ir): Use `STACK_OBJ' instead of
13285         `ldind_type [CEE_LDIND_REF]' (which would be beyond the end of
13286         that array).
13287
13288 2004-11-24  Zoltan Varga  <vargaz@freemail.hu>
13289
13290         * mini.c (mono_method_to_ir): Disable inlining for methods containing
13291         localloc. Fixes #69678.
13292
13293         * iltests.il (test_0_localloc_inline): Add regression test for #69678.
13294         
13295 2004-11-23  Zoltan Varga  <vargaz@freemail.hu>
13296
13297         * mini-amd64.c (mono_arch_output_basic_block): Set %al to the number of
13298         used SSE registers on pinvoke calls. Fixes #69774.
13299
13300 2004-11-23  Geoff Norton  <gnorton@customerdna.com>
13301
13302         * inssel-ppc.brg, mini-ppc.c: Use mono_class_from_mono_type instead of
13303         vt->inst_vtype->data.klass.  This fixes generic structs and bug #69766
13304
13305 2004-11-23  Raja R Harinath  <rharinath@novell.com>
13306
13307         * Makefile.am (MCS,ILASM): Don't refer to runtime/ directory.
13308         Refer directly to the mcs/ tree.
13309
13310 2004-11-19  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13311
13312         * mini-s390.c, tramp-s390.c, mini-s390.h: Add LMF processing for trampolines.
13313         Check if a trampoline for a synchronized method is required. 
13314
13315 Fri Nov 19 17:34:21 CET 2004 Paolo Molaro <lupus@ximian.com>
13316
13317         * mini-ppc.c, cpu-g4.md: set to zero the memory allocated
13318         with localloc if needed. Throe arithmetric exception in
13319         div an rem if needed. Implement ovf checks in OP_LCONV_TO_OVF_I.
13320         Adapted from a patch by Geoff Norton  <gnorton@customerdna.com>.
13321
13322 2004-11-19  Geoff Norton  <gnorton@customerdna.com>
13323
13324         * mini-ppc.c: Call mono_type_get_underlying_type to unwrap generic
13325         types before switching on type.  Fixes #69622.
13326
13327 2004-11-19  Raja R Harinath  <rharinath@novell.com>
13328
13329         * Makefile.am (check-local): New.  Integrate into 'make check'.
13330         (MCS,RUNTIME): Define using in-tree mono and mcs.
13331         (ILASM): New.
13332         (%.exe): Use $(ILASM).
13333
13334 Fri Nov 19 14:54:07 CET 2004 Paolo Molaro <lupus@ximian.com>
13335
13336         * mini-ppc.c: adjust initial prolog size (bug #69691).
13337
13338 2004-11-18  Zoltan Varga  <vargaz@freemail.hu>
13339
13340         * cpu-pentium.md (localloc): Increase max instruction len. Fixes
13341         #69664.
13342
13343 2004-11-17  Raja R Harinath  <rharinath@novell.com>
13344
13345         * Makefile.am (clean-local): Rename from 'clean'.
13346
13347 2004-11-15  Nelae Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13348
13349         * mini.c, mini-x86.c, mini-amd64.c, exceptions-s390.c: Add siginfo_t parameter
13350         to mono_arch_is_int_overflow. 
13351         * exceptions-s390.c: Add mono_arch_is_int_overflow routine to discern between
13352         SIGFPE events.
13353
13354 2004-11-15  Sebastien Pouliot  <sebastien@ximian.com>
13355
13356         * declsec.c|h: New files to support declarative security attributes.
13357         Added function to check if a method has (applicable) security.
13358         * mini.c|h: Add check for declarative security attributes in
13359         mono_method_check_inlining.
13360         * Makefile.am: Added declsec.c and declsec.h to the build.
13361
13362 Mon Nov 15 11:53:46 CET 2004 Paolo Molaro <lupus@ximian.com>
13363
13364         * mini.c, mini.h: update to keep dynamic code info per-domain.
13365
13366 2004-11-12  Zoltan Varga  <vargaz@freemail.hu>
13367
13368         * mini.c mini-*.h: Get rid of MONO_ARCH_HAVE_RETHROW since all architectures support it now.
13369         (mini_init): Get rid of it from here too.
13370
13371 Thu Nov 11 20:17:17 CET 2004 Paolo Molaro <lupus@ximian.com>
13372
13373         * mini-ppc.c, mini-ppc,h, cpu-g5.md, exceptions-ppc.c:
13374         implemented OP_RETHROW (patch by Geoff Norton
13375         <gnorton@customerdna.com>).
13376
13377 2004-11-10  Geoff Norton  <gnorton@customerdna.com>
13378
13379         * tramp-ppc.c (ppc_magic_trampoline): Don't trampoline methods
13380         between appdomains.  Fixes appdomain-unload on PPC.
13381
13382 2004-10-26  Lluis Sanchez Gual  <lluis@novell.com>
13383
13384         * exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13385         mini-exceptions.c: handle the new wrapper types.
13386         * mini.c: The CEE_ISINST and CEE_CASTCLASS opcodes now take the
13387         token value as a MonoClass* when compiling a wrapper.
13388         mono_jit_create_remoting_trampoline now takes an additional
13389         MonoRemotingTarget parameter.
13390         
13391 2004-11-10  Martin Baulig  <martin@localhost>
13392
13393         * mini.c (mono_method_to_ir): Use `generic_container->context'
13394         rather than creating a new one.
13395
13396 2004-11-09  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13397
13398         * exceptions-s390.c, mini-s390, cpu-s390.md: Add support for OP_RETHROW.
13399
13400         * inssel-390.md, mini-s390.c: Correct register allocation for globals.
13401
13402 2004-11-09  Zoltan Varga  <vargaz@freemail.hu>
13403
13404         * aot.c (mono_aot_init): Add MONO_AOT_CACHE env variable to turn on
13405         the experimental aot cache stuff.
13406
13407 Tue Nov 9 17:30:20 CET 2004 Paolo Molaro <lupus@ximian.com>
13408
13409         * aot.c, mini.c, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13410         mini-exceptions.c: update to exception clause structure changes.
13411
13412 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13413
13414         * exceptions-x86.c (throw_exception): Fix warnings.
13415
13416         * mini-x86.h mini-x86.c cpu-pentium.md exceptions-x86.c: Add support 
13417         for OP_RETHROW.
13418
13419 2004-11-08  Zoltan Varga  <vargaz@freemail.hu>
13420
13421         * exceptions-sparc.c (get_throw_exception): Really fix this.
13422
13423 2004-11-07  Ben Maurer  <bmaurer@ximian.com>
13424
13425         * tramp-*.c: we no longer support icalls without wrappers, so
13426         a bit of code can be removed here
13427
13428 2004-11-07  Zoltan Varga  <vargaz@freemail.hu>
13429
13430         * exceptions-sparc.c (get_throw_exception): Fix more bugs in previous
13431         patch.
13432
13433         * cpu-sparc.md: Add op_rethrow.
13434
13435         * exceptions-sparc.c (get_throw_exception): Fix bug in previous patch.
13436
13437         * mini-sparc.h mini-sparc.c exceptions-sparc.c: Add support for OP_RETHROW.
13438
13439         * mini.h: Add mono_arch_get_rethrow_exception () arch specific function.
13440         * mini-ops.h: Add OP_RETHROW.
13441
13442         * mini.c inssel.brg: Distinguish between THROW and RETHROW.
13443
13444         * cpu-amd64.c mini-amd64.c exceptions-amd64.c: Add support for OP_RETHROW.
13445
13446 2004-11-05  Geoff Norton  <gnorton@customerdna.com>
13447         
13448         * helpers.c: Change otool arguments from -V -v -t to -v -t on Darwin
13449         Makes the output much easier to read
13450
13451 2004-11-05  Ben Maurer  <bmaurer@ximian.com>
13452
13453         * ssa.c: allocate MonoMethodVar.uses from the mempool. First, this
13454         prevents another huge leak when compiling with ssa. Secondly, the
13455         performance of doing this rather than freeing the lists is much
13456         better. GList does a lock every time you allocate a list link,
13457         so that it can use a memory pool. So, it is better to just use
13458         a memory pool of our own.
13459         
13460         * ssa.c, linear-scan.c: replace g_list_remove_link with
13461         g_list_delete.  The remove one does not free the GList, so we were
13462         leaking memory. On -O=all --compile-all with corlib, this cut down
13463         3 MB of allocations.
13464
13465 2004-11-05  Zoltan Varga  <vargaz@freemail.hu>
13466
13467         * tramp-sparc.c (mono_arch_create_jit_trampoline): Fix sparc build.
13468
13469         * tramp-amd64.c (mono_arch_create_jit_trampoline): Fix amd64 build.
13470
13471         * mini.h mini.c tramp-*.c: Moved xp parts of JIT trampoline creation
13472         into a new function mono_create_jit_trampoline ().
13473
13474 2004-11-02  Zoltan Varga  <vargaz@freemail.hu>
13475
13476         * trace.c (get_spec): Allow tracing of classes without a namespace.
13477
13478 2004-11-02  Sebastien Pouliot  <sebastien@ximian.com>
13479
13480         * mini.c: Fix pointer overwrite in mini_method_compile.
13481
13482 2004-11-2  Geoff Norton  <gnorton@customerdna.com>
13483
13484         * inssel-ppc.brg (OP_OUTARG_VT (CEE_LDOBJ (base))):
13485         The darwin ABI needs some special handling for 1 and 2 byte structs
13486         Lets use lbz/lhz instead of lwz everywhere.
13487         * mini-ppc.c (calculate_sizes):  The Darwin ABI needs from special handling
13488         for 1 and 2 byte structs and struct which are size >= 3 || size % 4 != 0.
13489         Use stb/sth for the former, and put the latter always on stack instead of in
13490         argument registers.
13491
13492 2004-10-30  Zoltan Varga  <vargaz@freemail.hu>
13493
13494         * trace.c (is_filenamechar): Add '_'.
13495
13496 2004-10-29  Neale Ferguson  <Neale.Ferguson@SoftwareAG-usa.com>
13497
13498         * mini-s390.c: Fix prolog length to allow for large trace requirements.
13499
13500         * exceptions-s390.c: Remove dwarf unwinding stuff that was unused.
13501
13502 2004-10-29  Zoltan Varga  <vargaz@freemail.hu>
13503
13504         * Makefile.am (libgc_libs): Do some automake magic so libmono/mono
13505         depends on libmonogc. Fixes #68805.
13506
13507 2004-10-26  Miguel de Icaza  <miguel@ximian.com>
13508
13509         * mini.c (mono_jit_free_method): Provide extra information for
13510         this error.  Currently this leaks, but will be turned into a
13511         developer option in the future.
13512
13513 2004-10-26  Zoltan Varga  <vargaz@freemail.hu>
13514
13515         * driver.c (mono_main): Applied patch from Willibald Krenn <willibald.krenn@gmx.at>. Make --graph work for icalls and pinvoke methods.
13516
13517 2004-10-25  Zoltan Varga  <vargaz@freemail.hu>
13518
13519         * aot.c (mono_aot_load_method): Align PATCH_INFO_R8 on an 8 byte 
13520         boundary. Fixes reading of PATCH_INFO_R4 and R8.
13521         (mono_aot_load_method): Do not allocate MonoAotMethod in the GC heap.
13522
13523 2004-10-24  Zoltan Varga  <vargaz@freemail.hu>
13524
13525         * mini-amd64.c (mono_arch_patch_code): Fix patching of class init
13526         trampolines for AOT code.
13527
13528 2004-10-22    <vargaz@freemail.hu>
13529
13530         * aot.c (mono_compile_assembly): Disable AOT for methods containing calls to methods of
13531         constructed types. Fixes #68136.
13532
13533 2004-10-21  Martin Baulig  <martin@ximian.com>
13534
13535         * exceptions-x86.c (throw_exception): Call mono_debugger_throw_exception();
13536         if it returns true, unwind the stack to the call instruction.
13537
13538 2004-10-21    <vargaz@freemail.hu>
13539
13540         * aot.c: Reorganize the AOT file format to avoid relocations. Fix warnings.
13541
13542         * mini.h: Bump AOT version number.
13543
13544         * objects.cs: Add another test for unbox trampolines.
13545
13546         * tramp-amd64.c (amd64_magic_trampoline): Disable patching of trampolines for 
13547         valuetype methods.
13548
13549 2004-10-20    <vargaz@freemail.hu>
13550
13551         * driver.c: Add SHARED to the set of optimizations tested.
13552
13553         * tramp-amd64.c (amd64_magic_trampoline): Patch trampoline code as well.
13554
13555         * mini.c (mono_method_to_ir): Mark the domainvar as volatile when it is implicitly
13556         used by CEE_NEWARR.
13557
13558         * ssa.c (mono_ssa_deadce): Do not optimize away accesses to volatile variables.
13559
13560 2004-10-20  Martin Baulig  <martin@ximian.com>
13561
13562         * mini-exceptions.c (mono_handle_exception): Call
13563         mono_debugger_handle_exception() to tell the debugger about
13564         catch/finally clauses.
13565
13566 2004-10-18  Zoltan Varga  <vargaz@freemail.hu>
13567
13568         * exceptions-amd64.c (mono_arch_find_jit_info): Pop arguments of the stack.
13569
13570         * mini-amd64.c (mono_amd64_get_vcall_slot_addr): Handle extended registers. Fixes
13571         #68447.
13572
13573 2004-10-15  Geoff Norton  <gnorton@customerdna.com>
13574
13575         * mini-ppc.c (calculate_sizes): Marshal valuetypes for pinvoke
13576         methods as their native size, fixed bug #57543, #57545.
13577         * mini-ppc.c (mono_arch_output_basic_block): Use mulli for imm16 types
13578         This saves a temporary register and mullw call down into 1 (minor perf
13579         increase for cases like sum = sum * 5;  This use to translate into:
13580             li r11,5
13581             mullw r28,r28,r11
13582         It now translates to
13583             mulli r28,r28,5
13584
13585 2004-10-15  Zoltan Varga  <vargaz@freemail.hu>
13586
13587         * trace.c (mono_trace_eval): Use mono_method_desc_full_match. Fixes
13588         #68388.
13589
13590 2004-10-11  Martin Baulig  <martin@ximian.com>
13591
13592         * mini.c (mono_method_to_ir): If we're a generic method, get the
13593         MonoGenericContainer from our MonoMethodNormal and create a
13594         MonoGenericContext from it.
13595
13596 2004-10-08  Zoltan Varga  <vargaz@freemail.hu>
13597
13598         * inssel-long32.brg (OP_LCONV_TO_OVF_I2): Fix CONV_I1 -> CONV_I2.
13599
13600         * basic-long.cs: Add test for checked i8->i2 cast.
13601
13602 Wed Oct 6 12:40:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
13603
13604         * inssel-ppc.brg: added a couple of speedup rules.
13605
13606 2004-10-05  Zoltan Varga  <vargaz@freemail.hu>
13607
13608         * Makefile.am (genmdesc_LDADD): Don't link this against libmetadata
13609         to speed up rebuilds.
13610
13611 2004-10-04  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13612
13613         * mini-s390.c: Minor fix to OP_OR_IMM.
13614
13615 2004-10-03  Zoltan Varga  <vargaz@freemail.hu>
13616
13617         * tramp-sparc.c (sparc_magic_trampoline): Handle appdomain stuff
13618         better. Fixes appdomain-unload.exe on sparc.
13619
13620 2004-10-02  Massimiliano Mantione  <massi@ximian.com>
13621
13622         * ssa.c: Fixed casts to unsigned where the value was of 64 bits in
13623         simulate_long_compare, patch by will@exomi.com (Ville-Pertti Keinonen),
13624         see bug 67324.
13625
13626 2004-10-02  Zoltan Varga  <vargaz@freemail.hu>
13627
13628         * jit-icalls.c: Handle a nonexisting trunc function more correctly.
13629
13630 2004-09-30  Lluis Sanchez Gual  <lluis@novell.com>
13631
13632         * mini.c: Always generate a field read/write wrapper for members
13633         of the class MarshalByRefObject since the actual instance could
13634         be a CBO.
13635
13636 2004-09-28  Lluis Sanchez Gual  <lluis@novell.com>
13637
13638         * mini.c: Use mono_thread_exit() to stop threads, instead of ExitThread.
13639
13640 2004-09-28  Zoltan Varga  <vargaz@freemail.hu>
13641
13642         * driver.c mini.h trace.c: Move the setting of the main assembly into
13643         a separate function called mono_trace_set_assembly () and call it after
13644         actually loading the main assembly. Fixes #66872.
13645
13646 2004-09-25  Zoltan Varga  <vargaz@freemail.hu>
13647
13648         * mini-amd64.h mini-amd64.c tramp-amd64.c: Allocate trampoline memory
13649         using the code manager.
13650
13651 2004-09-24  Zoltan Varga  <vargaz@freemail.hu>
13652
13653         * tramp-amd64.c mini-amd64.h: Add support for MONO_ARCH_HAVE_INVALIDATE_METHOD.
13654
13655 2004-09-23  Zoltan Varga  <vargaz@freemail.hu>
13656
13657         * cpu-amd64.md: Fix bug in previous patch.
13658         
13659         * cpu-amd64.md: Fix instruction lengths of membase opcodes. Fixes
13660         #66650.
13661
13662 Wed Sep 22 19:03:20 CEST 2004 Paolo Molaro <lupus@ximian.com>
13663
13664         * mini.h, exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13665         mini-exceptions.c: updates for changed stack walk interface.
13666
13667 2004-09-21  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
13668
13669         * mini-s390.c, cpu-s390.md: Minor changes to OP_ARGLIST handling
13670
13671 2004-09-17  Zoltan Varga  <vargaz@freemail.hu>
13672
13673         * mini.c (mono_method_to_ir): Fix LDSTR in dynamic methods. Fixes #66132.
13674
13675 2004-09-13  Zoltan Varga  <vargaz@freemail.hu>
13676
13677         * driver.c (mini_regression_list): Do not call mono_assembly_close 
13678         since assemblies can't be unloaded.
13679         
13680 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13681
13682         * cpu-amd64.md: Fix more instruction lengths.
13683
13684         * cpu-amd64.md: Fix lengths of some instructions.
13685
13686 2004-09-11 Ben Maurer  <bmaurer@users.sourceforge.net>
13687
13688         * inssel.brg: Make the array ldelema check aot friendly.
13689
13690 2004-09-11  Zoltan Varga  <vargaz@freemail.hu>
13691
13692         * mini-amd64.c (mono_arch_get_argument_info): Fix stack_unwind test.
13693
13694         * cpu-amd64.md inssel-long.brg inssel-amd64.brg: Small optimizations.
13695
13696 2004-09-10  Zoltan Varga  <vargaz@freemail.hu>
13697
13698         * mini-x86.c: Fix build.
13699
13700         * mini-sparc.c mini-x86.c mini-amd64.c: Use the new 
13701         mono_type_get_underlying_type () helper function to simplify code.
13702         
13703 2004-09-09  Martin Baulig  <martin@ximian.com>
13704
13705         * mini-amd64.c: Don't access `type->data.klass' directly, call
13706         mono_class_from_mono_type() instead since the type may be a
13707         generic instance.
13708
13709 2004-09-09  Martin Baulig  <martin@ximian.com>
13710
13711         * mini-amd64.c (get_call_info): Fix support for generic instances.
13712         (add_valuetype): Use mono_class_from_mono_type() to get the class
13713         since we can be a generic instance.
13714
13715 Thu Sep 9 01:43:53 PDT 2004 Paolo Molaro <lupus@ximian.com>
13716
13717         * mini-ppc.c, mini.h, regalloc.c, regalloc.h: powerpc speedups.
13718
13719 2004-09-07 Ben Maurer  <bmaurer@users.sourceforge.net>
13720
13721         * liveness.c: reset spill costs on each scan: bug 62107
13722
13723 2004-09-07  Bernie Solomon  <bernard@ugsolutions.com>
13724
13725         * exceptions-sparc.c (mono_arch_find_jit_info): remove
13726         unnecessary line that doesn't compile
13727
13728 2004-09-07  Zoltan Varga  <vargaz@freemail.hu>
13729
13730         * mini.c mini.h mini-x86.h tramp-x86.c: Instead of freeing delegate
13731         trampolines, make them call an error function so people can fix their
13732         code.
13733
13734 2004-09-06  Martin Baulig  <martin@ximian.com>
13735
13736         * mini.c (mono_method_to_ir): When initializing locals, handle a
13737         generic instances like a valuetype if it's a valuetype and like a
13738         class if it's a class.
13739
13740 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13741
13742         * exceptions-x86.c (mono_arch_find_jit_info): Pop arguments off the
13743         stack. Fixes #64674.
13744
13745         * exceptions.cs: Add test for unwinding of call arguments.
13746
13747 Mon Sep 6 05:50:02 PDT 2004 Paolo Molaro <lupus@ximian.com>
13748
13749         * mini-*.c, mini-ops.h, inssel-long32.brg: introduced
13750         OP_ADDCC_IMM and OP_SUBCC_IMM (add/sub immediate that will
13751         set the carry/borrow flag). The sparc and s390 implementations
13752         can now use optimized versions (and simplify the code). ppc bugfixes.
13753
13754 2004-09-06  Zoltan Varga  <vargaz@freemail.hu>
13755
13756         * exceptions-ppc.c (mono_arch_find_jit_info): Fix memory leak.
13757
13758 2004-09-05  Zoltan Varga  <vargaz@freemail.hu>
13759
13760         * inssel-amd64.brg: Remove leftover 32 bit rule.
13761
13762         * mini-amd64.c (mono_arch_instrument_prolog): Fix tracing support.
13763
13764 2004-09-04  Zoltan Varga  <vargaz@freemail.hu>
13765
13766         * mini-exceptions.c (mono_find_jit_info): Refactor common code from
13767         mono_arch_find_jit_info functions into a new function. Fix a memory
13768         leak.
13769
13770         * exceptions-x86.c exceptions-amd64.c exceptions-sparc.c: Remove
13771         refactored code.
13772         
13773 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13774
13775         * exceptions.cs inssel-long32.brg: Handle the OP_LCONV_TO_OVF_I2 case
13776         as well.
13777         
13778         * exceptions.cs: Add array size tests.
13779
13780         * mini.c: Allocate a separate icall wrapper for each arity of 
13781         mono_array_new_va. Fixes #59509.
13782
13783         * exceptions.cs: Add testcase for 64578.
13784
13785         * inssel-long32.brg: Fix OP_LCONV_TO_OVF_I1 rule. Fixes #64578.
13786
13787         * trace.c (is_filenamechar): Allow 0..9 in strings. Fixes #65094.
13788         
13789 2004-09-02  Martin Baulig  <martin@ximian.com>
13790
13791         * mini.c (mono_method_to_ir): When initializing the locals, call
13792         handle_initobj() on the generic instance itself, not its
13793         underlying type.
13794
13795 2004-09-02  Zoltan Varga  <vargaz@freemail.hu>
13796
13797         * mini.h (MonoJitDynamicMethodInfo): New structure, extension of 
13798         MonoJitInfo for dynamic methods.
13799
13800         * mini.c: Rename trampoline_hash_mutex to jit_mutex.
13801
13802         * mini.c: Add support for freeing JIT data for dynamic methods.
13803         
13804 2004-09-01  Martin Baulig  <martin@ximian.com>
13805
13806         * mini-x86.c (is_regsize_var): Added support for generic
13807         instances.
13808         (mono_arch_emit_prolog): Make this compile again, use
13809         `x86_push_imm_template (code)'.
13810
13811 2004-08-30 Ben Maurer  <bmaurer@users.sourceforge.net>
13812
13813         * mini-x86.c: make all push_imm instructions that get
13814         patched always emit the long form
13815
13816 2004-08-30  Zoltan Varga  <vargaz@freemail.hu>
13817
13818         * mini.c (mono_create_jump_trampoline): Store the jump trampolines 
13819         in a per-domain hash.
13820
13821         * mini-amd64.c (merge_argument_class_from_type): Handle generic
13822         types.
13823
13824 2004-08-29  Zoltan Varga  <vargaz@freemail.hu>
13825
13826         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: Ongoing SSE
13827         work.
13828         
13829         * mini-amd64.c cpu-amd64.md inssel-amd64.brg mini-amd64.h: More SSE
13830         work.
13831
13832         * mini-amd64.c cpu-amd64.md: Implement checked int<->uint casts.
13833         Beginnings of SSE2 support.
13834
13835         * exceptions.cs: Add more tests for checked int<->uint casts.
13836
13837 2004-08-28  Martin Baulig  <martin@ximian.com>
13838
13839         * mini-x86.c (mono_arch_instrument_epilog): Added support for
13840         generic instances.
13841
13842         * mini.c
13843         (mono_type_to_ldind, mono_type_to_stind, type_to_eval_stack_type):
13844         Handle generic instances recursively.
13845
13846 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13847
13848         * iltests.il: test for conv.u8 on a constant
13849
13850 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13851
13852         * inssel-long32.brg: c&p rules for LCONV_x4 (membase) and
13853         LCONV_x4 (shrun_32 (membase)).
13854
13855 2004-08-27 Ben Maurer  <bmaurer@users.sourceforge.net>
13856
13857         * inssel-x86.brg: c&p rules for push/setret of long
13858
13859 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13860
13861         * inssel-x86.brg: c&p rules for compare (base, regvar) and
13862         compare (regvar, base)
13863
13864         * inssel-x86.brg: more burg love
13865
13866         * inssel.brg: more cleanup
13867
13868         * inssel-x86.brg, inssel-long32.brg: burg cleanup.
13869
13870 2004-08-26 Ben Maurer  <bmaurer@users.sourceforge.net>
13871
13872         * basic-long.cs, basic-calls.cs: new tests for optimization.
13873
13874 2004-08-26  Zoltan Varga  <vargaz@freemail.hu>
13875
13876         * mini-amd64.c (read_tls_offset_from_method): Fix typo in previous
13877         patch.
13878
13879 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13880
13881         * mini-amd64.c (read_tls_offset_from_method): Add another case.
13882         
13883 2004-08-25  Bernie Solomon  <bernard@ugsolutions.com>
13884
13885         * inssel.brg (mini_emit_memcpy): use 
13886         NO_UNALIGNED_ACCESS to disable memcpy optimization
13887
13888 2004-08-25  Zoltan Varga  <vargaz@freemail.hu>
13889
13890         * mini-amd64.c: Handle generic types in various places.
13891
13892         * mini.c (mono_method_to_ir): Handle generic types in init locals.
13893
13894 2004-08-24  Zoltan Varga  <vargaz@freemail.hu>
13895
13896         * mini.c (handle_box): Fix warning.
13897
13898         * mini-amd64.c (mono_arch_local_regalloc): Fix regalloc problem.
13899
13900         * mini-amd64.h: Enable the emit_state optimization.
13901
13902         * mini-ops.h cpu-amd64.md: Add new amd64_test_null opcode.
13903
13904         * mini-amd64.c: Add some new 64 bit peephole opts.
13905
13906         * inssel.brg (mini_emit_memcpy): Optimize for 64 bit architectures.
13907
13908         * cpu-amd64.md: sreg1 of div instructions must be %rax.
13909
13910         * mini-amd64.c: Register allocator fixes.
13911
13912         * mini.c: Add an optimization to emit_state to avoid allocation of new
13913         registers on some platforms.
13914
13915 2004-08-23  Zoltan Varga  <vargaz@freemail.hu>
13916
13917         * inssel-x86.brg inssel-amd64: Add yet another missing tree->dreg assignment.
13918
13919         * mini-x86.c (mono_arch_local_regalloc): Fix bug in long register
13920         allocation. Fixes #63085.
13921
13922         * basic-long.cs: Add new regression test.
13923
13924         * mini-amd64.c: Register allocator improvements.
13925
13926 2004-08-21  Zoltan Varga  <vargaz@freemail.hu>
13927
13928         * mini-amd64.c (read_tls_offset_from_method): Add another code
13929         sequence.
13930
13931         * tramp-amd64.c (amd64_class_init_trampoline): Use a more efficient
13932         instruction sequence for nullifying class init trampolines.
13933
13934         * objects.cs: Add new regalloc test.
13935
13936         * mini-amd64.c inssel-amd64.brg: Optimize parameter passing.
13937
13938 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13939
13940         * mini-amd64.c (mono_arch_call_opcode): Refactor this a little.
13941         
13942         * mini-amd64.c (mono_arch_regalloc_cost): Adjust regalloc costs for
13943         arguments.
13944
13945         * driver.c: Fix profiling after TLS changes.
13946         
13947         * driver.c (mono_main): Set mono_stats.enabled if needed.
13948
13949         * mini.c (handle_alloc): New helper function used by CEE_NEWOBJ and
13950         CEE_BOX.
13951
13952 2004-08-20 Ben Maurer  <bmaurer@users.sourceforge.net>
13953
13954         * mini-x86.c: use a 1 op rather than a 2 op tls access
13955         instruction -> faster.
13956
13957 2004-08-20  Zoltan Varga  <vargaz@freemail.hu>
13958
13959         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from
13960         x86 backend.
13961
13962 2004-08-19 Bernie Solomon <bernard@ugsolutions.com>
13963
13964         * exceptions-sparc.c (throw_exception): fix typo
13965
13966 2004-08-19 Ben Maurer  <bmaurer@users.sourceforge.net>
13967
13968         * mini-x86.c, cpu-pentium.md, inssel-x86.brg:
13969         set tree->dreg correctly with tls. Allow any
13970         register to be used.
13971
13972         * mini-x86.c (read_tls_offset_from_method): add new code
13973         generation pattern seen with GCC.
13974
13975
13976 Thu Aug 19 17:26:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
13977
13978         * mini-exceptions.c, exceptions-x86.c, exceptions-amd64.c,
13979         exceptions-ppc.c, exceptions-s390.c, exceptions-s390x.c,
13980         exceptions-sparc.c: fix some performance issues in exception
13981         handling and setting of the stack trace for exceptions that were
13982         already thrown.
13983
13984 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
13985
13986         * mini-amd64.c inssel-amd64.brg cpu-amd64.md: Merge changes from 
13987         x86 backend.
13988         
13989         * mini-amd64.c (mono_arch_is_int_overflow): Handle all possible 
13990         registers.
13991
13992 2004-08-18 Ben Maurer  <bmaurer@users.sourceforge.net>
13993
13994         This patch inlines tls access, when possible.
13995         
13996         * mini.h: new arch functions for TLS intrinsics.
13997         All platforms updated with a stub.
13998
13999         * mini.c: use the new intrinsics
14000
14001         * mini-x86.c, cpu-pentium.md, inssel-x86.brg, mini-ops.h:
14002         arch specific intrinsic for tls variables
14003
14004 2004-08-18  Zoltan Varga  <vargaz@freemail.hu>
14005
14006         * Makefile.am (libmono_la_LDFLAGS): Enable creating of libmono dll
14007         under windows.
14008
14009 2004-08-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14010
14011         * mini.c: thread local allocation
14012
14013 2004-08-16  Zoltan Varga  <vargaz@freemail.hu>
14014
14015         * mini-amd64.h (MONO_ARCH_NO_EMULATE_LONG_SHIFT_OPS): Enable.
14016
14017         * Makefile.am: Link against the static version of libmonogc.
14018         
14019         * Makefile.am: Link the static versions of the convenience libraries
14020         into the mono executable.
14021
14022         * mini-x86.h mini-x86.c: Throw the correct exception on integer overflow.
14023
14024 2004-08-15  Zoltan Varga  <vargaz@freemail.hu>
14025
14026         * mini.h mini.c mini-amd64.h mini-amd64.c: Throw the correct exception
14027         on integer overflow.
14028
14029         * mini-amd64.c: Reorganize function call code.
14030
14031         * mini-amd64.c (peephole_pass): Merge changes from mini-x86.c.
14032
14033 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
14034
14035         * inssel-x86.brg: use xor eax,eax.
14036         
14037         * basic.cs: new tests
14038
14039 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
14040
14041         * mini-amd64.c (mono_arch_emit_epilog): Use RIP relative addressing
14042         in exception throwing code.
14043         
14044 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
14045
14046         * inssel-x86.brg: use xor esi,esi.
14047
14048 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
14049
14050         * driver.c (mono_main): Call mono_trace_parse_options earlier so it
14051         can trace methods compiled during mini_init () too.
14052
14053         * cpu-amd64.md mini-amd64.c (mono_arch_output_basic_block): Handle 
14054         CEE_CONV_U4.
14055
14056 2004-08-14 Ben Maurer  <bmaurer@ximian.com>
14057
14058         * Makefile.am: static link on x86 (r=zoltan)
14059
14060 2004-08-14  Zoltan Varga  <vargaz@freemail.hu>
14061
14062         * tramp-amd64.c (amd64_magic_trampoline): Avoid patching the trampoline
14063         code since it causes some programs to fail.
14064
14065 2004-08-12  Zoltan Varga  <vargaz@freemail.hu>
14066
14067         * mini-amd64.c (bb_is_loop_start): Merge changes from mini-x86.c.
14068
14069 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
14070
14071         * mini.c: ovfops_op_map - add STACK_OBJ case for
14072         CONV_I 
14073         * basic.cs: add test_0_pin_string as test
14074         case for above.
14075
14076 2004-08-11  Bernie Solomon <bernard@ugsolutions.com>
14077
14078         * Makefile.am: build C# if srcdir != builddir
14079
14080 Tue Aug 10 19:23:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
14081
14082         * dominators.c, mini.h, mini-x86.c: fix loop alignment with
14083         fall-through blocks.
14084
14085 Tue Aug 10 16:18:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14086
14087         * driver.c: enable loop by default again and include abcrem in -O=all.
14088
14089 2004-08-08  Zoltan Varga  <vargaz@freemail.hu>
14090
14091         * iltests.il: Add some localloc tests.
14092
14093         * mini.c (mono_method_to_ir): Set stack type of LOCALLOC correctly.
14094
14095         * inssel-amd64.brg inssel-x86.brg: Set dreg of LOCALLOC correctly. 
14096         Fixes #62574.
14097
14098         * inssel-amd64.brg: Add some optimizations.
14099
14100         * mini-amd64.c (mono_arch_setup_jit_tls_data): Add tls offset detection
14101         for gcc-3.4.
14102
14103         * Makefile.am: Statically link mono against libmono on AMD64.
14104         
14105         * mini-amd64.c inssel-amd64.brg: Optimizations.
14106
14107 2004-08-07  Zoltan Varga  <vargaz@freemail.hu>
14108
14109         * mini-amd64.c (mono_arch_emit_prolog): Optimize lmf saving a bit.
14110
14111         * tramp-amd64.c: Patch calling code in trampolines.
14112
14113 2004-08-06  Zoltan Varga  <vargaz@freemail.hu>
14114
14115         * mini-amd64.c: pinvoke struct passing fixes.
14116
14117 2004-08-05  Bernie Solomon  <bernard@ugsolutions.com>
14118
14119         * mini-sparc.c: redo change, make mono_arch_cpu_init call
14120         mono_arch_cpu_optimizazions so sparcv9 is initialized when embedded
14121
14122 2004-08-05  Duncan Mak  <duncan@ximian.com>
14123
14124         * mini.c: Renamed CEE_STELEM to CEE_STELEM_ANY and CEE_LDELEM to
14125         CEE_LDELEM_ANY.
14126
14127 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
14128
14129         * mini-amd64.c (emit_move_return_value): Move return value for normal
14130         calls too.
14131
14132 2004-08-05  Martin Baulig  <martin@ximian.com>
14133
14134         * mini.c (ret_type_to_call_opcode): Don't use a `t' variable for
14135         `type->type'; just modify `type' itself when dealing with enums
14136         and generic instances.
14137         (check_call_signature): Make `simple_type' a `MonoType *'.
14138
14139 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
14140
14141         * mini.c: Use OP_PADD to add offsets to addresses.
14142
14143         * mini-amd64.h: Disable SIGSEGV_ON_ALTSTACK.
14144
14145 2004-08-04  Bernie Solomon  <bernard@ugsolutions.com>
14146
14147         * mini-sparc.c (mono_arch_emit_epilog): fix check
14148         for folding last op into restore instruction
14149
14150 2004-08-05  Zoltan Varga  <vargaz@freemail.hu>
14151
14152         * exceptions-amd64.c (mono_arch_get_throw_exception_by_name): Allocate
14153         helper methods using the code manager.
14154         
14155         * exceptions-amd64.c (mono_arch_get_throw_exception): Fix maximum length.
14156
14157         * mini-amd64.c (mono_arch_allocate_vars): Fix tls offset detection.
14158
14159 Tue Aug 3 23:50:00 EST 2004 Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14160         
14161         * mini-s390x.c mini-s390x.h tramp-s390x.c inssel-s390x.brg
14162           cpu-s390x.md exceptions-s390x.c Makefile.am: S/390 64-bit JIT
14163
14164         * mini-s390.c: fix tail processing
14165
14166 Tue Aug 3 01:35:44 PDT 2004 Paolo Molaro <lupus@ximian.com>
14167
14168         * mini-ppc.c: mul.ovf.un exception name fix.
14169
14170 2004-08-03  Martin Baulig  <martin@ximian.com>
14171
14172         * mini-x86.c (mono_arch_call_opcode): Correctly handle generic
14173         instances; before jumping to `handle_enum', also modify `ptype'.
14174
14175 2004-08-02  Bernie Solomon  <bernard@ugsolutions.com>
14176
14177         * cpu-sparc.md: fcall maximal length too small.
14178
14179 2004-08-02  Zoltan Varga  <vargaz@freemail.hu>
14180
14181         * mini-amd64.c mini.h: Add initial support for passing/returning 
14182         structures to/from pinvoked methods.
14183
14184 Mon Aug 2 11:59:35 PDT 2004 Paolo Molaro <lupus@ximian.com>
14185
14186         * mini-ppc.c: reg allocator fix.
14187
14188 2004-07-31  Zoltan Varga  <vargaz@freemail.hu>
14189
14190         * mini-amd64.c (mono_arch_output_basic_block): Fix OP_X86_PUSH_OBJ.
14191
14192         * inssel.brg: Optimize memset on 64 bit machines.
14193
14194         * mini-amd64.c: Fix some vararg cases.
14195
14196 2004-07-30  Neale Ferguson <Neale.Ferguson@SoftwareAG-usa.com>
14197
14198         * mini-s390.c: Corrected macro in emit_float_to_int
14199
14200         * s390-abi.cs: Tests to exercise the s390 ABI
14201
14202 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
14203
14204         * exceptions-amd64.c (mono_arch_find_jit_info): Fix restoring of
14205         caller saved regs.
14206
14207         * basic.cs: Add a test for add.ovf.un.
14208
14209 2004-07-30  Bernie Solomon  <bernard@ugsolutions.com>
14210
14211         * mini-sparc.c: add case for OP_IDIV_UN
14212
14213 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
14214
14215         * mini-amd64.c mini-amd64.h mini.c: Add support for vararg pinvoke calls.
14216         
14217         * mini-amd64.c cpu-amd64.md: Ongoing JIT work.
14218
14219 2004-07-30  Ben Maurer  <bmaurer@ximian.com>
14220
14221         * basic.cs: regression tests.
14222
14223         * inssel-x86.brg: Disable cmp BYTE PTR [eax], imm, it causes various
14224         regressions.
14225
14226 2004-07-30  Zoltan Varga  <vargaz@freemail.hu>
14227
14228         * basic.cs: Add a new test.
14229
14230         * mini-amd64.c aot.c cpu-amd64.md: Add support for tracing, profiling 
14231         and AOT. Various fixes and optimizations.
14232
14233         * inssel.brg (CALL_REG): Add 64 bit versions of call_reg rules.
14234
14235 Fri Jul 30 15:49:26 CEST 2004 Paolo Molaro <lupus@ximian.com>
14236
14237         * mini-ppc.c: make sure temp regs are not used for global reg
14238         allocation.
14239
14240 2004-07-29  Bernie Solomon  <bernard@ugsolutions.com>
14241
14242         * cpu-sparc.md: conv_i8 fix for 64bits
14243
14244         * mini-sparc.c: add cases for OP_IXXX codes for 64bits
14245
14246 2004-07-29  Ben Maurer  <bmaurer@ximian.com>
14247         
14248         * cpu-pentium.md, mini-x86.c, inssel-x86.brg, mini-ops.h:
14249         add opcode for cmp BYTE PTR [eax], imm.
14250
14251         * inssel.brg: Make memcpy and memset takes bases.
14252
14253 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
14254
14255         * *-amd64.*: More AMD64 work.
14256         
14257 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
14258
14259         * cpu-pentium.md, inssel-x86.brg, mini-ops.h, mini-x86.c:
14260         add a compare-not-equal opcode.
14261         
14262 2004-07-28  Lluis Sanchez Gual  <lluis@novell.com>
14263
14264         * mini.c: Use mono_init_from_assembly instead of mono_init.
14265         
14266 2004-07-28  Zoltan Varga  <vargaz@freemail.hu>
14267
14268         * mini.c: Fix opcode mapping for STACK_MP on 64 bit platforms.
14269
14270         * mini.c (CEE_NEWOBJ): Call mono_array_new_va using the correct signature.
14271
14272         * mini.c: Use MONO_ARCH_SIGACTION on AMD64 as well.
14273
14274         * inssel.brg: 64 bit fixes.
14275
14276         * mini.h (MonoCallInst): Add some AMD64 specific data.
14277
14278         * mini.h: Add some OP_P opcodes.
14279
14280 2004-07-28  Ben Maurer  <bmaurer@ximian.com>
14281
14282         * basic.cs: tests for 61797 and 61740
14283
14284 Tue Jul 27 16:05:19 CEST 2004 Paolo Molaro <lupus@ximian.com>
14285
14286         * mini-ppc.c, mini-sparc.c, mini-s390.c: keep track of line
14287         numbers in the debug info (spotted by Geoff Norton, <gnorton@customerdna.com>).
14288
14289 2004-07-24  Zoltan Varga  <vargaz@freemail.hu>
14290
14291         * mini-sparc.c (mono_arch_output_basic_block): Add CEE_CONV_U8/I8.
14292
14293         * *-amd64*.*: Ongoing AMD64 work.
14294
14295 2004-07-23 Zoltan Varga <vargaz@freemail.hu>
14296
14297         * inssel-long.brg: Implement CONV_I8/CONV_U8 in the backends.
14298
14299         * *-amd64*: Ongoing AMD64 work.
14300
14301         * mini-arch.h: Add AMD64 support.
14302
14303         * mini-sparc.c (mono_arch_is_inst_imm): New arch dependent function.
14304
14305         * mini.h: Add new arch dependent function mono_arch_is_inst_imm.
14306
14307         * mini-ops.h: Add new opcodes.
14308
14309         * Makefile.am: Add AMD64 support.
14310
14311         * inssel.brg inssel-long32.brg inssel-long.brg: Move mul/div and shift
14312         rules into the inssel-long*.brg files.
14313
14314         * *-amd64.*: Add beginnings of AMD64 backend.
14315
14316 2004-07-22  Ben Maurer  <bmaurer@ximian.com>
14317
14318         * mini.c (print_dfn): commenting out the code that prints
14319         the cil. With -O=deadce, this makes -v -v crash.
14320         
14321         * cpu-pentium.md: make checkthis have a length of 2
14322
14323 2004-04-21  Bernie Solomon  <bernard@ugsolutions.com>
14324
14325         * mini-sparc.h: fix implementations of __builtin
14326         functions for Sun compiler for V9.
14327
14328 2004-07-16  Ben Maurer  <bmaurer@ximain.com>
14329
14330         * mini.c: use the new stelem.ref wrapper
14331         * exceptions.cs, arrays.cs: new stelem.ref tests
14332
14333 Wed Jul 14 19:08:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
14334
14335         * mini-ppc.c, exceptions-ppc.c: cleanups and fixes (the
14336         new XSP should work with these changes).
14337
14338 2004-07-14  Ben Maurer  <bmaurer@ximain.com>
14339         
14340         * inssel-{long32,x86,}.brg: trivial optimizations.
14341         
14342 Mon Jul 12 20:25:57 CEST 2004 Paolo Molaro <lupus@ximian.com>
14343
14344         * mini.c: load value when emitting box operation in
14345         constrained calls.
14346
14347 2004-07-12  Ben Maurer  <bmaurer@ximian.com>
14348
14349         * mini-x86.c (OP_CHECK_THIS): cmp DWORD PTR [eax], eax
14350         is one byte shorter than cmp DWORD PTR [eax], 0.
14351
14352 Mon Jul 12 17:47:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14353
14354         * inssel-ppc.brg: arguments on the stack are always
14355         relative to the stack pointer (spotted by Neale Ferguson).
14356
14357 2004-07-11 Gonzalo Paniagua Javier <gonzalo@ximian.com>
14358
14359         * exceptions-x86.c: delay appending the method name to the trace until
14360         after mono_jit_info_table_find is called, as this gets the real
14361         MonoMethod.
14362
14363 2004-07-09  Ben Maurer  <bmaurer@ximian.com>
14364
14365         * aot.c: register roots
14366
14367 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14368
14369         * aot.c : I could just use PLATFORM_WIN32 flag.
14370
14371 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14372
14373         * aot.c : Reverting the previous fix. This time it broke linux build.
14374
14375 2004-07-09  Atsushi Enomoto  <atsushi@ximian.com>
14376
14377         * aot.c : quick cygwin build fix. mkdir() with two args does not exist.
14378
14379 2004-07-08  Zoltan Varga  <vargaz@freemail.hu>
14380
14381         * mini.c (handle_stack_args): Remove some more debugging code.
14382         
14383         * mini.c (handle_stack_args): Remove debug output left in by mistake.
14384
14385         * driver.c mini.h aot.c: Allow additional options to be specified with
14386         --aot and pass them to mono_compile_assembly.
14387
14388         * aot.c: Add experimental code to AOT compile all loaded assemblies
14389         on demand and save the code into a cache in the filesystem.
14390
14391         * aot.c: Add support for more wrapper methods.
14392         
14393         * mini.c (handle_stack_args): Handle some corner cases. Fixes 
14394         58863.
14395
14396         * cpu-*.md: Remove removed opcodes.
14397
14398         * mini.h mini.c: Move JIT icall handling to icall.c. Replace usage of
14399         CEE_MONO_PROC<x> with CEE_MONO_ICALL. Move registration of marshalling
14400         related icalls to marshal.c.
14401
14402 2004-07-06  Zoltan Varga  <vargaz@freemail.hu>
14403
14404         * mini-ops.h: Add OP_SAVE_LMF and OP_RESTORE_LMF.
14405
14406         * Makefile.am (EXTRA_DIST): Add inssel-long[32].brg.
14407
14408         * inssel.brg: Fix warning. Add rules for SAVE_LMF and RESTORE_LMF.
14409
14410 2004-07-06  Ben Maurer  <bmaurer@ximian.com>
14411         * liveness.c: If liveness is recomputated we need to reset the information
14412         for each variable. This way, if the liveness range has been narrowed
14413         by optimizations that happened after the last computation, we can return
14414         a smaller range.
14415         
14416         For example, if you have
14417         
14418         {
14419                 int i = 0;
14420                 
14421                 // Tons of code that does not affect i
14422                 
14423                 i = foo ();
14424                 ...
14425         }
14426         
14427         i = 0 is dead code and will be removed by SSA. However, when
14428         linear scan gets to the code, i will still appear to be live
14429         throughout the entire block. This prevents good register allocation.
14430
14431 2004-07-06  Martin Baulig  <martin@ximian.com>
14432
14433         * debug-mini.c (mono_debug_init_method): Allow
14434         MONO_WRAPPER_MANAGED_TO_NATIVE wrappers.
14435         (mono_debug_add_icall_wrapper): New method.
14436
14437         * mini.c (mono_icall_get_wrapper): Call mono_debug_add_icall_wrapper().
14438
14439 2004-07-05  Zoltan Varga  <vargaz@freemail.hu>
14440
14441         * mini.c (optimize_branches): Fix linking of bblocks in branch->branch
14442         optimization.
14443
14444 2004-07-03  Zoltan Varga  <vargaz@freemail.hu>
14445
14446         * aot.c (mono_aot_load_method): Fix loading of debug info.
14447
14448 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14449
14450         * aot.c: Add logging support.
14451
14452 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14453
14454         * mini.h: Add prototype for mono_print_method_from_ip.
14455
14456         * mini.c: 64 bit fixes. Use LCOMPARE for comparing longs.
14457
14458         * inssel.brg: 64 bit fixes.
14459
14460         * inssel.brg inssel-long32.brg: Move 32 bit arithmetic rules to 
14461         inssel-long32.brg.
14462
14463         * Makefile.am: Add SPARC64 support.
14464
14465 2004-07-02  Zoltan Varga  <vargaz@freemail.hu>
14466
14467         * aot.c: Fix alignment problems on 32 bit platforms.
14468
14469 2004-07-01  Zoltan Varga  <vargaz@freemail.hu>
14470
14471         * helpers.c (mono_disassemble_code): Pass -xarch=v9 to assembler on
14472         SPARC64.
14473
14474         * aot.c: Add SPARC64 support. Reorganize patch table to fix alignment
14475         problems.
14476
14477         * mini.h: Bump AOT file version. Some 64 bit fixes.
14478
14479 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14480
14481         * inssel-sparc.brg: Add new rule to avoid register moves.
14482
14483         * inssel.brg: Add ldind_to_load_membase helper function.
14484
14485 2004-06-30  Ben Maurer  <bmaurer@ximian.com>
14486
14487         * mini.c: OffsetToStringData intrinsic.
14488         
14489 2004-06-30  Zoltan Varga  <vargaz@freemail.hu>
14490
14491         * ssa.c: Handle OP_LCOMPARE the same as OP_COMPARE.
14492
14493         * objects.cs exceptions.cs basic.cs basic-long.cs basic-calls.cs: New
14494         regression tests.
14495
14496         * mini-ops.h cpu-sparc.md mini-sparc.h mini-sparc.c exceptions-sparc.c tramp-sparc.c inssel-long.brg: Add SPARC64 support.
14497 Mon Jun 28 18:05:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
14498
14499         * mini.c: reinstated mono_compile_get_interface_var()
14500         on x86, too, since the change breaks the Gtk# build there as well.
14501
14502 Fri Jun 25 17:36:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14503
14504         * driver.c: remove loop from the default optimizations: it seems to
14505         interact badly with some of the other options (see bug #60613).
14506
14507 2004-06-25  Zoltan Varga  <vargaz@freemail.hu>
14508
14509         * mini.c mini-x86.h mini-x86.c: Applied patch from Guenter Feldmann 
14510         (fld@informatik.uni-bremen.de): Add Solaris x86 support.
14511
14512 Tue Jun 22 21:29:11 CEST 2004 Paolo Molaro <lupus@ximian.com>
14513
14514         * mini-ppc.c, cpu-g4.md: small updates to be able to compile
14515         vararg-using methods.
14516
14517 2004-06-21  Martin Baulig  <martin@ximian.com>
14518
14519         * mini/mini-exceptions.c
14520         (mono_handle_exception): Added `gpointer original_ip' argument.
14521         After calling mono_unhandled_exception(), call
14522         mono_debugger_unhandled_exception() and if that returns true,
14523         restore the context and return.
14524
14525 Mon Jun 21 19:26:40 CEST 2004 Paolo Molaro <lupus@ximian.com>
14526
14527         * mini-ppc.c: prefer the use of relative branches so
14528         they won't need to be patched in aot code (patch from Patrick Beard).
14529
14530 Mon Jun 21 19:03:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14531
14532         * aot.c: patch from Patrick Beard to make the output assembly
14533         more correct for the MacOSX assembler. Small tweak to
14534         generate sane images on Linux/PPC, too.
14535
14536 Fri Jun 18 18:24:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14537
14538         * mini.c, mini.h, mini-ppc.c: handle varargs methods with a special
14539         case until bug #59509 is fixed (shows up in #60332).
14540
14541 Tue Jun 15 16:36:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14542
14543         * mini.c: make sure the needed wrappers are compiled, too, with
14544         precomp.
14545
14546 Mon Jun 14 18:36:08 CEST 2004 Paolo Molaro <lupus@ximian.com>
14547
14548         * driver.c: remove NPTL reference in --version output.
14549
14550 Sun Jun 13 17:25:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14551
14552         * aot.c: patch from Patrick Beard (pcbeard@mac.com) to
14553         generate valid assembly for the Mach-O assembler.
14554
14555 Sun Jun 13 15:59:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14556
14557         * driver.c: don't include abcrem in the all optimization specifier
14558         since it slows down jit compilation too much for now.
14559
14560 2004-06-12 Ben Maurer  <bmaurer@users.sourceforge.net>
14561
14562         * mini.c: use BIGMUL only if both operands have the same signage.
14563         * iltests.il: Test for bug 60056. (errors related to signage in
14564         BIGMUL).
14565
14566         r=lupus.
14567
14568 Thu Jun 10 16:06:42 CEST 2004 Paolo Molaro <lupus@ximian.com>
14569
14570         * mini.c, aot.c: memory leak fixes.
14571
14572 Tue Jun 8 16:37:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
14573
14574         * inssel-long32.brg: implemented a few missing ulong cast opcodes.
14575
14576 Tue Jun 8 15:36:30 CEST 2004 Paolo Molaro <lupus@ximian.com>
14577
14578         * Makefile.am: remove the -static hack completely, it links in
14579         statically glib as well.
14580
14581 Sat Jun 5 16:32:33 CEST 2004 Paolo Molaro <lupus@ximian.com>
14582
14583         * iltests.il, mini.c: fixed bug#59580 in branch optimization.
14584         * exceptions.cs: make it compile with new mcs/csc.
14585
14586 2004-06-03 Massimiliano Mantione <massi@ximian.com>
14587         * cpu-pentium.md basic-float.cs Fixed bug on fpu spills (see bug 54467),
14588         and added relevant test case.
14589
14590 Mon May 31 19:41:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14591
14592         * mini.c revert Zoltan's fix to bug#58863 on ppc, since it causes
14593         regressions in gtk-sharp.
14594
14595 2004-05-29  Zoltan Varga  <vargaz@freemail.hu>
14596
14597         * exceptions.cs: New regression tests.
14598
14599         * jit-icalls.c (mono_llmult_ovf): Fix some boundary conditions.
14600
14601 Sat May 29 10:45:58 CEST 2004 Paolo Molaro <lupus@ximian.com>
14602
14603         * mini.c: emit castclass/isinst in their own trees (bug #54209/59057).
14604
14605 2004-05-28  Zoltan Varga  <vargaz@freemail.hu>
14606
14607         * mini-sparc.h (MONO_ARCH_NEED_DIV_CHECK): Define this.
14608
14609         * cpu-sparc.md mini-sparc.c: Add overflow detection to div opcodes.
14610
14611 2004-05-28      Patrik Torstensson <totte@hiddenpeaks.com>
14612
14613         * mini.c (mono_jit_runtime_invoke): Init class in this
14614         method instead of trusting mono_jit_compile_method to
14615         do the work (because wrappers can be in object class)
14616
14617 2004-05-27  Zoltan Varga  <vargaz@freemail.hu>
14618
14619         * mini-sparc.c (mono_arch_output_basic_block): Fix sub.imm.
14620
14621         * basic-long.cs: New regression test.
14622
14623 Thu May 27 15:50:52 CEST 2004 Paolo Molaro <lupus@ximian.com>
14624
14625         * cpu-g4.md, mini-ppc.c: fixes to long add/sub ovf opcodes
14626         and div/rem checks.
14627
14628 Thu May 27 12:36:53 CEST 2004 Paolo Molaro <lupus@ximian.com>
14629
14630         * Makefile.am: fix miguel's change to build mono statically against
14631         libmono (track build dependencies).
14632
14633 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14634
14635         * cfold.c: Some glib versions do not have G_MININT32.
14636
14637 2004-05-26  Massimiliano Mantione  <massi@ximian.com>
14638
14639         * mini-x86.c cpu-pentium.md Makefile.am basic-math.cs: Fixed problem
14640         with precision of tan, atan, sin and cos, and implemented related
14641         regressions tests (fixes bug 54467, but one new problem appeared and
14642         is not fixed yet).
14643
14644 2004-05-26  Zoltan Varga  <vargaz@freemail.hu>
14645
14646         * cfold.c (FOLD_BINOPZ): Avoid division by zero.
14647
14648         * exceptions.cs: Add test for constant folding && division by zero.
14649
14650         * driver.c mini.h mini.c mini-x86.c: Revert most of the previous patch
14651         since driver.c is in libmono too, so the optimization was useless.
14652
14653         * driver.c mini.h mini.c mini-x86.c: Moved the mono_lmf_addr TLS 
14654         variable to driver.c so the compiler can emit more efficient code to
14655         access them.
14656
14657 2004-05-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14658
14659         * Makefile.am: don't distribute generated inssel.[ch] files.
14660
14661 2004-05-25  Zoltan Varga  <vargaz@freemail.hu>
14662
14663         * mini.c (mono_jit_compile_method_with_opt): Really emit icall wrappers
14664         into the default appdomain. Fixes #58707.
14665
14666         * jit-icalls.c: Remove the broken approximation for truncl, doing
14667         no conversion is better.
14668
14669         * mini.c (handle_stack_args): Avoid reusing variables for stack slots.
14670         Fixes #58863.
14671
14672 Tue May 25 14:33:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
14673
14674         * mini-ops.h, mini-ppc.c, cpu-g4.md, inssel-ppc.brg: eliminate the use
14675         of the mcrxr instruction which is not available on some processors
14676         even if it's documented to be. Implement add and sub overflow correctly
14677         (still not complete for long unsigned). Speed up icalls a bit.
14678
14679 2004-05-25 13:01 CET Patrik Torstenson <totte@hiddenpeaks.com>
14680
14681         * mini.c (mono_jit_compile_method_with_opt): Make sure that
14682         we run .cctor in the current domain instead of target_domain.
14683         
14684         Fixes bug #58558, .cctor not being called in -O=shared.
14685
14686 Tue May 25 12:46:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14687
14688         * mini-ppc.h, jit-icalls.c: added explicit checks for divide by zero.
14689
14690 2004-05-24 Ben Maurer  <bmaurer@users.sourceforge.net>
14691
14692         * mini-x86.c (EMIT_COND_BRANCH): If an OP_LABEL has an offset
14693         which can be done with an imm8, do it that way.
14694         (mono_arch_output_basic_block): ditto for a jmp
14695         (mono_arch_emit_prolog): Computate maximum offset of a label.
14696
14697 2004-05-24 18:18 CET Patrik Torstenson <totte@hiddenpeaks.com>
14698
14699         * mini-x86.c (mono_arch_local_regalloc): the reg allocator
14700         now tries to allocate prefered physical reg's for virtual
14701         regs. This reduces the number of emited spills/loads with
14702         20-30% on our core assemblies.
14703
14704 Mon May 24 18:21:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
14705
14706         * jit-icalls.c: truncl() is not needed and trunc() is
14707         the correct thing to do anyway (bug #58287).
14708
14709 2004-05-24  Zoltan Varga  <vargaz@freemail.hu>
14710
14711         * mini-sparc.c (mono_arch_flush_icache): Call sync_instruction_memory
14712         if available.
14713
14714 Mon May 24 12:49:45 CEST 2004 Paolo Molaro <lupus@ximian.com>
14715
14716         * driver.c: enable loop optimizations by default.
14717
14718 Mon May 24 11:13:46 CEST 2004 Paolo Molaro <lupus@ximian.com>
14719
14720         * mini-x86.c: fix calc of max loop size when aligning loops start.
14721
14722 2004-05-23  Zoltan Varga  <vargaz@freemail.hu>
14723
14724         * ssa.c (mono_ssa_cprop): Allocate carray dynamically instead of on
14725         the stack.
14726
14727 2004-05-22  Zoltan Varga  <vargaz@freemail.hu>
14728
14729         * mini-sparc.c (mono_arch_output_basic_block): ADD_IMM and SUB_IMM
14730         should set carry.
14731
14732         * basic-long.cs: Add tests for add/subtract of immediates with carry.
14733
14734         * mini.c exceptions-x86.c: Remove MONO_USE_EXC_TABLES stuff.
14735         
14736         * mini.c (inline_method): Allways inline some wrappers even if the cost
14737         is too large. Fixes #58785.
14738
14739         * mini.c: Add support for MARSHAL_CONV_FTN_DEL.
14740         
14741 2004-05-21  Zoltan Varga  <vargaz@freemail.hu>
14742
14743         * mini-sparc.c exceptions-sparc.c: Applied patch from Mark Crichton
14744         (crichton@gimp.org). Beginning of support for sparc/linux.
14745
14746         * mini-sparc.c: Optimize retrieval of LMF address.
14747
14748 Fri May 21 08:00:12 EDT 2004 Paolo Molaro <lupus@ximian.com>
14749
14750         * exceptions-ppc.c:  handle alloca in methods with clauses.
14751
14752 Fri May 21 07:35:30 EDT 2004 Paolo Molaro <lupus@ximian.com>
14753
14754         * mini-ppc.c: cleanups, off-by-one fixes, avoid recursive thunks.
14755
14756 2004-05-20  Lluis Sanchez Gual  <lluis@ximian.com>
14757
14758         * mini.c: Delegate most of the abort signal work to 
14759           mono_thread_request_interruption, which also handles Stop and Suspend
14760           states.
14761
14762 2004-05-20  Zoltan Varga  <vargaz@freemail.hu>
14763
14764         * mini.c mini.h: Allow inlining of icall wrappers if the backend 
14765         supports the save/restore lmf opcodes.
14766
14767 2004-05-19  Zoltan Varga  <vargaz@freemail.hu>
14768
14769         * mini-x86.c (mono_arch_setup_jit_tls_data): Handle code generated
14770         by gcc-3.4 as well.
14771
14772         * mini-x86.h mini-x86.c tramp-x86.c: Optimize lmf restoring code.
14773
14774 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14775
14776         * mini.h mini.c (mini_method_compile): Only run abc removal pass on 
14777         methods which contain array accesses.
14778
14779         * mini.c (CEE_LDTOKEN): Handle this instruction correctly on bb
14780         boundaries. Fixes #58537.
14781
14782         * iltests.il: Add regression test for #58537.
14783
14784 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14785
14786         * mini-x86.c (mono_arch_local_regalloc): Last part of
14787         fix for bug #58633 (releasing register to early).
14788
14789 2004-05-18  Miguel de Icaza  <miguel@ximian.com>
14790
14791         * basic-long.cs: Add new regression test.
14792
14793 2004-05-18  Patrik Torstensson <totte@hiddenpeaks.com>
14794
14795         * mini-x86.c (mono_arch_local_regalloc): Avoid releasing a
14796         register too early on the chain.
14797
14798 2004-05-18  Zoltan Varga  <vargaz@freemail.hu>
14799
14800         * mini.c (create_helper_signature): Use a helper function to reduce
14801         the code which needs to be written. Also set the calling convention of
14802         icalls on windows. Fixes #57840.
14803
14804 Tue May 18 11:05:18 CEST 2004 Paolo Molaro <lupus@ximian.com>
14805
14806         * mini.h, exceptions-x86.c, exceptions-sparc.c, exceptions-s390.c,
14807         exceptions-ppc.c: added helper function to get the instruction address
14808         from a signal handler context.
14809
14810 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14811
14812         * helpers.c: use g_get_tmp_dir. Invokes happyness 
14813         from gonzalo.
14814
14815 2004-05-17 Ben Maurer  <bmaurer@users.sourceforge.net>
14816
14817         * helpers.c: Add new env variable to pass args to objdump.
14818         Specifically for those of us who love -Mintel. r=miguel, gonzalo.
14819
14820 2004-05-17  Radek Doulik  <rodo@ximian.com>
14821
14822         * Makefile.am (common_sources): added abcremoval.h so it get
14823         disted and daily mono packages on go-mono.com will build again
14824
14825 2004-05-17  Massimiliano Mantione  <massi@ximian.com>
14826
14827         * abcremoval.c: Fixed coding style, added copyright header.
14828
14829         * abcremoval.h: Fixed style and moved prototype to mini.h, added copyright header.
14830
14831         * mini.h: Added prototype for abc removal main function.
14832
14833         * build_relations_propagation_table.pl: Added copyright header.
14834
14835 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14836
14837         * basic-long.cs: reg test for complex ceq_long bug.
14838
14839 2004-05-16      Patrik Torstensson <totte@hiddenpeaks.com>
14840
14841         * mini-x86.c (mono_arch_local_regalloc): Correctly free 
14842         reg in long and clob case (bug #58343). Fixed/added comments.
14843
14844 2004-05-14 Ben Maurer  <bmaurer@users.sourceforge.net>
14845
14846         * mini.c (mono_jit_runtime_invoke): Follow new convention
14847         of calling the invoke method with an function pointer.
14848
14849 2004-05-14  Zoltan Varga  <vargaz@freemail.hu>
14850
14851         * ChangeLog: Fix author of memory leak patch.
14852
14853 Fri May 14 15:13:06 CEST 2004 Paolo Molaro <lupus@ximian.com>
14854
14855         * Makefile.am: fix make dist as well...
14856
14857
14858 2004-05-14  Massimiliano Mantione  <massi@ximian.com>
14859
14860         * cfold.c: Made so that conversions from pointer to int4 are no-ops
14861         on archs where pointers are 4 bytes long.
14862
14863         * Makefile.am: Added abcremoval.c source file.
14864
14865         * abcremoval.c: Added abcremoval.c.
14866
14867         * abcremoval.h: Added abcremoval.h.
14868
14869         * build_relations_propagation_table.pl: Added build_relations_propagation_table.pl.
14870
14871         * inssel.brg: Enabled bounds check removal.
14872
14873         * mini.c: Added support for abcrem optimization.
14874
14875         * mini.h: Added abcrem optimization label.
14876
14877         * driver.c: Added support for abcrem optimization.
14878
14879         * propagated_relations_table.def: Added propagated_relations_table.def.
14880
14881 Fri May 14 14:30:13 CEST 2004 Paolo Molaro <lupus@ximian.com>
14882
14883         * mini.c, cfold.c: fix style.
14884
14885 Fri May 14 14:28:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
14886
14887         * mini.c: handle issue with the low-level implementation of
14888         some long opcodes (bug #54209).
14889
14890 2004-05-13 Ben Maurer  <bmaurer@users.sourceforge.net>
14891
14892         * basic.cs: test for my new cmov stuff.
14893
14894 2004-05-13      Patrik Torstensson
14895
14896         * mini-x86.c: added OP_X86_COMPARE_MEMBASE_IMM peephole
14897         opt and added peephole documentation.
14898
14899 Thu May 13 11:41:49 CEST 2004 Paolo Molaro <lupus@ximian.com>
14900
14901         * tramp-ppc.c: rewrote the generic trampoline code.
14902
14903 2004-05-11      Patrik Torstensson
14904
14905         * mini-x86.c: optimize long shl/shr asm code (one less branch)
14906
14907 2004-05-11  Zoltan Varga  <vargaz@freemail.hu>
14908
14909         * basic.cs basic-long.cs objects.cs: Make these compile under MS csc.
14910
14911         * mini.h mini.c dominators.c: Applied patch from Derek Woo
14912         (derek@eecg.toronto.edu): Fix memory leaks in loop optimizations.
14913
14914         * mini.c: Add new icalls for AsAny marshalling.
14915
14916 Tue May 11 16:00:38 CEST 2004 Paolo Molaro <lupus@ximian.com>
14917
14918         * tramp-ppc.c, mini-ppc.c: more cleanups.
14919
14920 2004-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
14921
14922         * mini.c: no warnings.
14923
14924 Tue May 11 13:59:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14925
14926         * mini-ppc.c, mini.c: use mono_resolve_patch_target ().
14927
14928 2004-05-11  Lluis Sanchez Gual  <lluis@ximian.com>
14929
14930         * mini.c: In the thread abort signal handler, if the thread is in the
14931         process of being stoped, don't throw the Abort exception, just stop the
14932         thread.
14933
14934 Tue May 11 12:15:24 CEST 2004 Paolo Molaro <lupus@ximian.com>
14935
14936         * tramp-ppc.c: removed old code.
14937
14938 Tue May 11 12:02:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
14939
14940         * mini.h, mini-ppc.c, cfold.c: export mono_is_power_of_two().
14941         do some simple speed optimizations on ppc.
14942
14943 Mon May 10 17:21:00 CEST 2004 Paolo Molaro <lupus@ximian.com>
14944
14945         * mini-ppc.c, cpu-g4.md: fixes to handle large stack frames
14946         and large offsets in load/store.
14947
14948 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14949
14950         * mini-x86.c (mono_arch_local_regalloc): Remove the previous fix, since
14951         it causes regressions.
14952
14953 2004-05-07  Zoltan Varga  <vargaz@freemail.hu>
14954
14955         * mini-sparc.c: Fix vararg support + add beginnings of sigaltstack
14956         support.
14957
14958 Fri May 7 13:25:50 CEST 2004 Paolo Molaro <lupus@ximian.com>
14959
14960         * jit-icalls.c: remove warnings.
14961         * inssel-x86.brg, inssel.brg, mini-x86.c, cfold.c: some simple
14962         speedups for unsafe code.
14963
14964 2004-05-07 Ben Maurer  <bmaurer@users.sourceforge.net>
14965
14966         * inssel.brg: Optimize Stind.[ui][12]. r=zoltan.
14967
14968 2004-05-06  Zoltan Varga  <vargaz@freemail.hu>
14969
14970         * basic-calls.cs: Add new regression test.
14971
14972         * mini.c (mono_runtime_install_handlers): Use SA_ONSTACK since it is
14973         more portable.
14974
14975         * mini.c (mono_method_to_ir): Handle opcode emulation for *_OVF opcodes.
14976
14977         * mini-x86.c (mono_arch_local_regalloc): Free new_dest register when it
14978         is no longer used.
14979
14980 2004-05-06      Patrik Torstensson
14981
14982         * mini-x86.[c|h], inssel-x86.brg, cpu-pentium.md, mini.c: enabled
14983         long reg allocation in any reg (not only eax:edx) and implemented 
14984         long shl/shr ops in asm instead of helpers.
14985
14986 2004-05-05  Zoltan Varga  <vargaz@freemail.hu>
14987
14988         * mini-sparc.h: Fix warnings.
14989
14990         * exceptions-sparc.c (mono_arch_find_jit_info): Pop unused lfm off the
14991         stack.
14992
14993         * mini-exceptions.c (mono_handle_exception): Call the filter in a
14994         separate statement for clarity.
14995
14996         * mini-sparc.c: Update status.
14997
14998 2004-05-04  Zoltan Varga  <vargaz@freemail.hu>
14999
15000         * mini-exceptions.c (ves_icall_get_frame_info): Flush register windows
15001         here.
15002
15003 Mon May 3 22:58:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15004
15005         * inssel-ppc.brg: another small pre-release workaround:
15006         we don't do overflow detection for long_sub_un.
15007
15008 Sun May 2 20:12:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15009
15010         * mini.c, mini-ops, inssel-long32.brg: speedup ulong >> 32
15011         (also works around a weird ppc bug: 57957).
15012
15013 Sat May 1 16:56:10 EDT 2004 Paolo Molaro <lupus@ximian.com>
15014
15015         * tramp-ppc.c: trampoline fixes.
15016
15017 Fri Apr 30 15:54:26 EDT 2004    Paolo Molaro <lupus@ximian.com>
15018
15019         * mini-ppc.c: fixed typos.
15020
15021 Thu Apr 29 20:15:41 CEST 2004 Paolo Molaro <lupus@ximian.com>
15022
15023         * mini-ppc.c, exceptions-ppc.c: more code saves registers
15024         at the top of the stack. Fixed typos. Use a frame registers
15025         for all the methods with exception clauses.
15026
15027 Thu Apr 29 18:52:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15028
15029         * exceptions-ppc.c: restore fp registers.
15030
15031 Thu Apr 29 18:26:56 CEST 2004 Paolo Molaro <lupus@ximian.com>
15032
15033         * mini-ppc.c, exceptions-ppc.c: save the registers in reverse
15034         order from the stack top (moved the stack room to save the
15035         return value for trace after the param area). Fixed corruption
15036         in restoring registers on unwind.
15037
15038 Thu Apr 29 16:47:15 CEST 2004 Paolo Molaro <lupus@ximian.com>
15039
15040         * mini-ppc.c, cpu-g4.md: fixed unisgned -> double conversion.
15041
15042 Thu Apr 29 13:50:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15043
15044         * exceptions-ppc.c, mini-ppc.h, mini-ppc.c: fixed localloc
15045         and prolog/epilog for methods that use it. Allow
15046         enough param area room for varargs methods. Fix miguel's
15047         breakage in exception handling.
15048
15049 Thu Apr 29 12:06:51 CEST 2004 Paolo Molaro <lupus@ximian.com>
15050
15051         * Makefile.am: run genmdesc only on current arch.
15052
15053 2004-04-29  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15054
15055         * exceptions-x86.c:
15056         * mini-x86.h: fix the build on windows.
15057
15058 2004-04-28  Zoltan Varga  <vargaz@freemail.hu>
15059
15060         * 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.
15061
15062         * exceptions-sparc.c exceptions-ppc.c exceptions-s390.c mini-ppc.h mini-s390.h mini-sparc.h: Fix up ports after changes.
15063
15064         * mini-exceptions.c: New file.
15065         
15066         * mini.c mini-exceptions.c mini-x86.h exceptions-x86.c Makefile.am:
15067         Move some parts of the x86 exception handling code to an 
15068         arch-independent file so it can be shared with other ports.
15069
15070 Tue Apr 27 12:15:59 CEST 2004 Paolo Molaro <lupus@ximian.com>
15071
15072         * trace.c, cpu-g4.md, inssel-ppc.brg, mini-ppc.c: some fixes for FP code.
15073
15074 2004-04-26  David Waite  <mass@akuma.org>
15075
15076         * driver.c: remove comma from end of enumeration declaration
15077
15078 2004-04-26  Jackson Harper  <jackson@ximian.com>
15079
15080         * driver.c: parse config file before loading first assembly. This
15081         allows the user gac to be enabled/disabled. 
15082         
15083 2004-04-23  Miguel de Icaza  <miguel@ximian.com>
15084
15085         * mini-ppc.c (ppc_patch): Replaced the branch code patching with a
15086         simpler mechanism: we do not care what is encoded initially
15087         (branch absolute or relative), we care about the code and its
15088         target.  I kept the old code for reference for now.
15089
15090         The new code tries first to determine if the jump is anywhere in
15091         the -/+32 absolute meg range, if it succeeds, it encodes using the
15092         absolute branch;  If not, it tried to find something in the
15093         relative range, if not, it uses the handle_thunk code. 
15094
15095 Fri Apr 23 14:20:40 EDT 2004 Paolo Molaro <lupus@ximian.com>
15096
15097         * exceptions-ppc.c: use the correct ip register on macosx.
15098
15099 Thu Apr 22 13:23:16 EDT 2004 Paolo Molaro <lupus@ximian.com>
15100
15101         * exceptions.c, mini.c, mini-ppc.h: adapt code to macosx.
15102
15103 Thu Apr 22 18:08:37 CEST 2004 Paolo Molaro <lupus@ximian.com>
15104
15105         * mini-ppc.c, cpu-g4.md: made the branch macros more flexible.
15106         Raise exception on integer divide by zero by hand since the hw
15107         doesn't support it. Handle NaNs in FP compares.
15108
15109 Thu Apr 22 16:10:31 CEST 2004 Paolo Molaro <lupus@ximian.com>
15110
15111         * exceptions-ppc.c, mini-ppc.h, mini.c: simplified some
15112         code reducing duplication between the platforms and enabled
15113         signal exception handling (on linux for now).
15114
15115 Wed Apr 21 12:27:48 EDT 2004 Paolo Molaro <lupus@ximian.com>
15116
15117         * exceptions-ppc.c: more macosx support.
15118
15119 Wed Apr 21 16:38:28 CEST 2004 Paolo Molaro <lupus@ximian.com>
15120
15121         * mini-ppc.h, mini-ppc.c, cpu-g4.md: enable bigmul optimization.
15122
15123 Wed Apr 21 16:20:32 CEST 2004 Paolo Molaro <lupus@ximian.com>
15124
15125         * mini.h, mini-ppc.c, cpu-g4.md: support for implicit exceptions.
15126
15127 2004-04-19 Ben Maurer  <bmaurer@users.sourceforge.net>
15128
15129         * iltests.il: more tests.
15130
15131 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
15132
15133         * mini-*.c (mono_arch_get_allocatable_int_vars): Skip written-only
15134         vars as well.
15135
15136 Mon Apr 19 19:39:47 CEST 2004 Paolo Molaro <lupus@ximian.com>
15137
15138         * mini-ppc.c: some fixes to bootstrap mcs/corlib/etc.
15139
15140 2004-04-19  Zoltan Varga  <vargaz@freemail.hu>
15141
15142         * liveness.c: Mark variables as volatile in all basic blocks reachable
15143         from exception clauses.
15144
15145 2004-04-18  Zoltan Varga  <vargaz@freemail.hu>
15146
15147         * exceptions.cs (test_0_rethow_stacktrace): Make this work with
15148         inlining.
15149
15150 2004-04-18 Ben Maurer  <bmaurer@users.sourceforge.net>
15151
15152         * iltests.il, basic.cs: more tests for regalloc.
15153
15154 2004-04-17 Ben Maurer  <bmaurer@users.sourceforge.net>
15155
15156         * iltests.il: Some tests for register allocation modifications
15157         I have locally.
15158
15159 2004-04-16  Zoltan Varga  <vargaz@freemail.hu>
15160
15161         * exceptions.cs: Add regression test for bug #56782.
15162
15163         * exceptions-*.c (mono_arch_handle_exception): Do not overwrite the
15164         original stack trace if an exception is rethrown. Fixes #56782. Oh,
15165         the beauty of fixing the same thing in 5 different files...
15166
15167 2004-04-15  Zoltan Varga  <vargaz@freemail.hu>
15168
15169         * mini.c (mono_method_to_ir): Do not compute coverage for inlined
15170         methods.
15171
15172 2004-04-14  Zoltan Varga  <vargaz@freemail.hu>
15173
15174         * mini.c: Add support for STRWLPARRAY marshalling convention.
15175
15176 Wed Apr 14 18:15:55 CEST 2004 Paolo Molaro <lupus@ximian.com>
15177
15178         * exceptions-ppc.c: missing fixes in mono_jit_walk_stack (need
15179         to init the context to setup the regs pointer).
15180
15181 Wed Apr 14 17:59:09 CEST 2004 Paolo Molaro <lupus@ximian.com>
15182
15183         * exceptions-ppc.c: more exceptions work.
15184
15185 Wed Apr 14 17:46:22 CEST 2004 Paolo Molaro <lupus@ximian.com>
15186
15187         * mini.c: avoid reusing the same MonoInst on multiple trees: this is
15188         not allowed.
15189
15190 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
15191
15192         * inssel-x86.brg (reg): Add new rules for add, sub and mul that
15193         can use the memory directly.
15194
15195         * cpu-pentium.md: Update documentation from a post from Zoltan. 
15196
15197         add x86_add_membase, x86_sub_membase, x86_mul_membase
15198
15199 2004-04-13  Miguel de Icaza  <miguel@ximian.com>
15200
15201         * mini-ppc.c: Remove unused definitions FLOAT_REGS and
15202         GENERAL_REGS they were also hardcoded for all PPC ports.
15203
15204         (add_general): Use PPC_NUM_REG_ARGS instead of GENERAL_REGS.
15205
15206         Remove hard-coded limit for floating point registers, use
15207         PPC_LAST_FPARG_REG instead in MONO_TYPE_R4 and MONO_TYPE_R8.
15208
15209         Notice that in MacOS X calling conventions you can fit a lot more
15210         floating point values in registers, so I should update the PInvoke
15211         test to excercise the passing of floating point values on the
15212         stack (currently broken).
15213         
15214 2004-04-06  Miguel de Icaza  <miguel@ximian.com>
15215
15216         * tramp-ppc.c (create_trampoline_code): Added
15217         JUMP_TRAMPOLINE_SIZE. 
15218         (ppc_magic_trampoline): Follow the pattern from
15219         x86_magic_trampoline: if code is set to zero, return. 
15220         (create_trampoline_code): Always pass MonoMethod to the jump
15221         trampoline, before it was passing a null.
15222         (mono_arch_create_jump_trampoline): Implement the jump stub, could
15223         share the code with mono_arch_create_jit_trampoline. 
15224
15225         * mini-ppc.c (mono_arch_output_basic_block): CEE_JMP opcode
15226         implemented.
15227         (mono_arch_patch_code): MONO_PATCH_INFO_METHOD_JUMP patch type
15228         implemented.  
15229
15230         * cpu-g4.md: Added length for jmp instruction, the worst case
15231         scenario is 92 bytes (4 mandatory bytes, potential 19 registers
15232         for save_lmf).
15233
15234 2004-04-08  Zoltan Varga  <vargaz@freemail.hu>
15235
15236         * aot.c (mono_compile_assembly): Add back unlink removed by mistake.
15237
15238 2004-04-07  Zoltan Varga  <vargaz@freemail.hu>
15239
15240         * mini.c: Only set bblock->real_offset when adding a new bblock, and
15241         before each IL instruction.
15242
15243         * mini.c (CEE_BOX): Fix warnings.
15244
15245 2004-04-07  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15246
15247         * mini.c: removed a few unused vars and extra whitespace.
15248
15249 2004-04-05 Ben Maurer  <bmaurer@users.sourceforge.net>
15250
15251         * inssel.brg (MONO_EMIT_BOUNDS_CHECK): a new macro to emit bounds
15252         checks.
15253         (MONO_EMIT_BOUNDS_CHECK_IMM): the above, but when you know the
15254         index.
15255         (OP_GETCHR): use the above
15256         (CEE_LDELEMA): use the above.
15257
15258         * inseel-x86.brg (MONO_EMIT_BOUNDS_CHECK): a faster and smaller
15259         version of the generic impl.
15260         (MONO_EMIT_BOUNDS_CHECK_IMM): the same
15261         (CEE_LDELEMA): use the above.
15262
15263 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
15264
15265         * inssel-long32.brg (CEE_CONV_OVF_I8): Sign extend the i4 value to i8.
15266         Fixes #56317.
15267
15268         * iltests.il: Added new regression test for #56317.
15269
15270 2004-04-05  Zoltan Varga  <vargaz@freemail.hu>
15271
15272         * mini-x86.c (mono_arch_setup_jit_tls_data): Use pthread_attr_get_np
15273         under NetBSD. Fixes #56450.
15274
15275         * liveness.c (update_gen_kill_set): Fix previous patch.
15276
15277 2004-04-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15278
15279         * mini-x86.h: SA_STACK defined as SA_ONSTACK. Fixed build under NetBSD.
15280
15281 2004-04-02  Zoltan Varga  <vargaz@freemail.hu>
15282
15283         * mini.c (mono_method_to_ir): Avoid handle_loaded_temps in
15284         ldsfld and ldsflda.
15285
15286         * inssel-sparc.brg: Add more optimizations.
15287
15288         * mini-sparc.c: Replace multiply/divide with shifts if possible.
15289
15290 2004-04-01  Martin Baulig  <martin@ximian.com>
15291
15292         * mini.c (handle_box): New static function; moved the
15293         implementation of CEE_BOX here.
15294         (mono_method_to_ir): Added `constrained_call' variable.
15295         (mono_method_to_ir:CEE_CONSTRAINED_): Set it.
15296         (mono_method_to_ir:CEE_CALL): If `constrained_call' is set, use
15297         mono_method_get_constrained() to get the method.
15298
15299 2004-04-01  Martin Baulig  <martin@ximian.com>
15300
15301         * mini.c (TYPE_PARAM_TO_TYPE, TYPE_PARAM_TO_CLASS): Removed.
15302         (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): Removed.
15303         (mono_method_to_ir): We don't need these macros anymore since
15304         mono_class_get_full() already takes care of it. 
15305
15306 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15307
15308         * aot.c: set aot_verbose to 0, fixed format string that caused sigsegv,
15309         use @function (as doesn't accept #function here) and check the return
15310         value of system and stop if fails.
15311
15312 2004-03-31  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15313
15314         * mini.c: set the timeout to 2s when calling mono_domain_finalize.
15315
15316 2004-03-31  Zoltan Varga  <vargaz@freemail.hu>
15317
15318         * mini-ppc.c (mono_arch_patch_code): Fix ppc build.
15319
15320         * inssel-sparc.brg mini-sparc.c aot.c: Implement AOT support.
15321
15322         * inssel-long32.brg (OP_LNEG): Use ADC instead of ADD here. Fixes
15323         #56223.
15324
15325         * basic-long.cs: Add test for negation of Int64.MinValue.
15326
15327 2004-03-30  Zoltan Varga  <vargaz@freemail.hu>
15328
15329         * mini-sparc.c: Update status.
15330
15331         * mini-sparc.c tramp-sparc.c: Save lmf in trampolines.
15332
15333         * exceptions-sparc.c: Fix return value in filters.
15334
15335         * inssel-sparc.brg: Fix register allocation in some rules.
15336
15337 2004-03-28  Martin Baulig  <martin@ximian.com>
15338
15339         * mini.c (mmono_method_to_ir): In CEE_STELEM, do a handle_stobj()
15340         if neccessary.  
15341
15342 2004-03-28  Zoltan Varga  <vargaz@freemail.hu>
15343
15344         * mini-x86.c (mono_arch_patch_code): Fix warnings.
15345         
15346         * mini-x86.c (mono_arch_output_basic_block): Fix CEE_MUL_OVF_UN if 
15347         dreg is not EAX. Thanks to Willibard Krenn for spotting this. Also
15348         remove unused conv_u4 opcode.
15349
15350         * mini-x86.c: Remove valgrind workaround since it slows down things
15351         even when mono is not run under valgrind.
15352
15353 2004-03-26  Zoltan Varga  <vargaz@freemail.hu>
15354
15355         * mini-sparc.c: Update status.
15356
15357         * inssel-sparc.brg: Add some optimizations.
15358
15359         * inssel-sparc.brg mini-sparc.c: Rework branch instructions to allow
15360         future delay slot filling. Add support for varargs, tail calls and JMP.
15361
15362         * inssel.brg mini-ops.h mini.c: Use OP_REFANYTYPE instead of 
15363         CEE_REFANYTYPE, since CEE_REFANYTYPE needs a prefix to be unique.
15364
15365         * inssel.brg: Fix register allocation in OP_ARGLIST.
15366
15367         * inssel.brg: Fix warnings.
15368
15369 2004-03-25  Martin Baulig  <martin@ximian.com>
15370
15371         * mini.c (inflate_generic_field): Removed.
15372         (mini_get_method): Removed, use mono_get_method_full(),
15373         (mini_get_class): Removed, use mono_class_get_full().
15374         (mono_method_to_ir): Pass our generic context to
15375         mono_field_from_token().        
15376
15377 2004-03-25  Martin Baulig  <martin@ximian.com>
15378
15379         * mini.c (mini_get_class): Take a `MonoGenericContext *' instead
15380         of a `MonoMethod *'.
15381         (mini_get_method): Take a `MonoGenericContext *' instead
15382         of a `MonoMethod *'.
15383         (TYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_TYPE): mono_method_to_ir() has
15384         a new local variable called `generic_context' which holds the
15385         current `MonoGenericContext *'; use it to lookup things.
15386
15387 2004-03-24  Martin Baulig  <martin@ximian.com>
15388
15389         * mini.c (mini_get_class): New static method; if we're inside a
15390         generic instance, inflate the class if neccessary.
15391         (mono_method_to_ir): Use mini_get_class() instead of mono_class_get().
15392
15393 2004-03-24  Zoltan Varga  <vargaz@freemail.hu>
15394
15395         * iltests.il: New regression test for #55976.
15396
15397         * mini.c (mono_method_to_ir): Empty the stack in endfinally. Fixes
15398         #55976.
15399
15400 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15401
15402         * exceptions-sparc.c (mono_sparc_handle_exception): Remove debugging
15403         output.
15404
15405 2004-03-23  Zoltan Varga  <vargaz@freemail.hu>
15406
15407         * liveness.c: Consider SSA stores as well as loads when making vars
15408         volatile.
15409
15410         * exceptions.cs: New regression tests for register allocation.
15411         
15412 2004-03-22  Lluis Sanchez Gual  <lluis@ximian.com>
15413
15414         * mini-ppc.c, tramp-ppc.c: Added lock for accessing the domain code manager.
15415         * mini.c: Removed domain lock from mono_jit_compile_method_with_opt. Use
15416           domain lock only to protect puntual access to data structures.
15417           Added access lock for sighash, jit_icall_hash_name, 
15418           jit_icall_hash_addr and domain->code_mp.
15419
15420 2004-03-20  Zoltan Varga  <vargaz@freemail.hu>
15421
15422         * driver.c: Print SIGSEGV handling method.
15423
15424         * mini-x86.c (mono_arch_free_jit_tls_data): Add missing ifdef.
15425
15426         * mini.c (setup_jit_tls_data): Handle case when this is called
15427         multiple times for a thread.
15428
15429         * mini-x86.c cpu-pentium.md: Fix floating point branch opcodes so fbxx 
15430         is different from fbxx_un. Fixes #54303. Also use constants instead of
15431         magic numbers in a lot of places.
15432
15433 2004-03-19  Zoltan Varga  <vargaz@freemail.hu>
15434
15435         * exceptions.cs: Fix cctor test when --regression is used.
15436
15437 Thu Mar 18 19:57:56 CET 2004 Paolo Molaro <lupus@ximian.com>
15438
15439         * mini-ppc.c, exceptions-ppc.c: basic exceptions support 
15440         for Linux/ppc.
15441
15442 Thu Mar 18 19:56:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15443
15444         * inssel-ppc.brg: fixed register assignments for some rules.
15445
15446 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15447
15448         * exceptions.cs: Add test for exceptions in static constructors.
15449
15450         * mini.c (mono_jit_compile_method_with_out): Move the calling of
15451         static constructors outside the domain lock. Fixes #55720.
15452
15453 2004-03-17  Martin Baulig  <martin@ximian.com>
15454
15455         * mini.c (get_generic_field_inst): Removed, this'll never happen.
15456         (inflate_generic_field): Take the `MonoMethod *' instead of the
15457         `MonoClass *' and added support for generic method.
15458         (mono_method_to_ir): In CEE_LDSFLD and CEE_STSFLD, assert we never
15459         have a `field->parent->gen_params', only inflate the field if it's
15460         an open constructed type.
15461
15462 2004-03-17  Zoltan Varga  <vargaz@freemail.hu>
15463
15464         * exceptions-x86.c (mono_arch_handle_exception): Allocate a new
15465         exception object instead of the preconstructed ones.
15466
15467 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15468
15469         * mini.c: reverted changed to sigsegv_signal_handler commited
15470         accidentally in the previous patch.
15471
15472 2004-03-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
15473
15474         * mini.c:
15475         (mono_method_to_ir): CEE_CALLVIRT, abort if no method. It hanged when
15476         running --aot with an old assembly.
15477
15478 2004-03-16  Zoltan Varga  <vargaz@freemail.hu>
15479
15480         * mini-sparc.c (mono_arch_instrument_epilog): Fix handling of floating
15481         point values.
15482
15483         * mini-sparc.c: Add support for v9 branches with prediction.
15484
15485 2004-03-15  Bernie Solomon  <bernard@ugsolutions.com>
15486
15487         * mini.c (mini_init): #warning is GNUC only
15488
15489         * mini-sparc.h: implement __builtin_frame_address
15490         and __builtin_return_address for Sun C compiler
15491
15492 2004-03-15  Zoltan Varga  <vargaz@freemail.hu>
15493
15494         * exceptions-sparc.c (mono_arch_has_unwind_info): Add missing function.
15495
15496 2004-03-14  Zoltan Varga  <vargaz@freemail.hu>
15497
15498         * basic-calls.cs: Add test for unaligned byref long argument passing.
15499
15500         * mini-ops.h: Add sparcv9 compare and branch instructions.
15501
15502         * inssel-sparc.brg mini-sparc.h mini-sparc.c cpu-sparc.md: Use some
15503         v9 instructions if we have a v9 cpu.
15504
15505         * mini-sparc.c (mono_arch_get_global_int_regs): Use unused input
15506         registers for global allocation.
15507
15508         * exceptions-sparc.c: Fixes.
15509         
15510 2004-03-11  Zoltan Varga  <vargaz@freemail.hu>
15511
15512         * liveness.c (mono_analyze_liveness): Optimized version.
15513
15514         * inssel-sparc.brg cpu-sparc.md: Ongoing sparc work.
15515
15516         * mini-sparc.h mini-sparc.c tramp-sparc.c exceptions-sparc.c: Ongoing
15517         sparc work.
15518
15519         * basic-float.cs basic-calls.cs: New regression tests.
15520
15521 2004-03-10  Zoltan Varga  <vargaz@freemail.hu>
15522
15523         * mini-x86.h: Define SIGSEGV_ON_ALTSTACK only if we have a working
15524         sigaltstack implementation.
15525
15526         * mini-x86.c (mono_arch_setup_jit_tls_data): Fix previous patch.
15527         
15528         * mini-x86.c (mono_arch_setup_jit_tls_data): Turn off the sigaltstack
15529         stuff if SIGSEGV_ON_ALTSTACK is not defined.
15530
15531 2004-03-09  Zoltan Varga  <vargaz@freemail.hu>
15532
15533         * mini.c: Fix warnings.
15534         
15535         * mini.c (mono_resolve_patch_target): New function which contains the
15536         arch independent part of the patching process.
15537
15538         * mini-x86.c (mono_arch_patch_code): Move arch independent parts of the
15539         patching code to a separate function.
15540
15541 2004-03-09  Bernie Solomon  <bernard@ugsolutions.com>
15542
15543         * mini.c (add_signal_handler): ifdef out on Windows
15544
15545 2004-03-08  Zoltan Varga  <vargaz@freemail.hu>
15546
15547         * mini-sparc.h mini-sparc.c inssel-sparc.brg exceptions-sparc.c 
15548         cpu-sparc.md: Add exception handling support + other fixes.
15549
15550         * driver.c: Print --help output to stdout. Fixes #55261. Also fix
15551         typed GC detection in --version.
15552
15553         * basic.cs exceptions.cs: New regression tests.
15554
15555         * mini.h mini-x86.h mini-ppc.h: Add MonoCompileArch structure where
15556         the arch specific code can store data during a compilation.
15557
15558         * mini-ops.h: Add OP_SETFRET.
15559
15560         * mini.c (mini_get_ldelema_ins): Instead of allways calling the same
15561         function, register a separate icall for each arity, so the icalls can
15562         get a wrapper.
15563         
15564         * mini.c (mono_print_tree): Print negative offsets in a more readable
15565         form.
15566         
15567         * mini.c: Make signal handling work on sparc.
15568         
15569         * mini.c (mini_init): Add emulation for lconv_to_r8_un.
15570
15571         * inssel-long32.brg: Fix OP_LSUB_OVF_UN rule.
15572
15573         * jit-icalls.c: Emulate truncl by aintl on solaris.
15574
15575         * jit-icalls.c (mono_lconv_to_r8_un): New icall emulation function.
15576
15577 2004-03-05  Zoltan Varga  <vargaz@freemail.hu>
15578
15579         * mini.c (mini_init): fconv_to_ovf can raise exceptions.
15580
15581 2004-03-04  Lluis Sanchez Gual  <lluis@ximian.com>
15582
15583         * mini.c: In CEE_ISINST and CEE_CASTCLASS, if the type is an interface or
15584         a MarshalByRef type, inline a method that performs the check, taking into
15585         account that the object can be a proxy. Also implemented tow new opcodes:
15586         CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15587         * inssel.brg: Implemented two new opcodes, mini-ops.h: OP_CISINST and 
15588         OP_CCASTCLASS, which implement CEE_MONO_CISINST and CEE_MONO_CCASTCLASS.
15589
15590 Tue Mar 2 17:23:48 CET 2004 Paolo Molaro <lupus@ximian.com>
15591
15592         * mini-ppc.c: if a relative branch displacement is too big
15593         but it points to and area reachable with an absolute branch, 
15594         avoid the thunks.
15595
15596 Tue Mar 2 16:59:40 CET 2004 Paolo Molaro <lupus@ximian.com>
15597
15598         * mini.c: optimize small copies in cpblk.
15599
15600 2004-03-01  Zoltan Varga  <vargaz@freemail.hu>
15601
15602         * basic-calls.cs basic-float.cs: New regression tests.
15603
15604         * mini-sparc.c inssel-sparc.brg mini-ops.h: Access local variables at 
15605         negative offsets from %fp. Implement localloc. Fix local register 
15606         allocation. Fix the case when the this argument needs to be saved to
15607         the stack. Implement some missing opcodes.
15608
15609 2004-02-26  Zoltan Varga  <vargaz@freemail.hu>
15610
15611         * mini.c (mini_method_compile): Reenable global regalloc in methods
15612         with exception handlers.
15613
15614         * linear-scan.c (mono_varlist_sort): Fix warning.
15615
15616         * linear-scan.c (mono_linear_scan): Fix computation of used_regs.
15617
15618         * mini-x86.c (mono_arch_regalloc_cost): Reenable precise computation of
15619         regalloc costs.
15620
15621         * liveness.c: Make all variables uses in exception clauses volatile, to
15622         prevent them from being allocated to registers. Fixes #42136.
15623
15624 2004-02-25  Zoltan Varga  <vargaz@freemail.hu>
15625
15626         * mini-x86.c (mono_arch_regalloc_cost): Revert this change since it
15627         causes regressions.
15628
15629         * mini.h linear-scan.c mini-x86.c mini-sparc.c mini-ppc.c: Add 'cfg'
15630         argument to mono_arch_regalloc_cost.
15631
15632         * mini-x86.c (mono_arch_regalloc_cost): Compute regalloc costs 
15633         precisely.
15634
15635 2004-02-24  Zoltan Varga  <vargaz@freemail.hu>
15636
15637         * mini.h mini-x86.c mini-ppc.c mini-sparc.c linear-scan.c: 
15638         Make the cost of allocating a variable to a register arch dependent.
15639
15640         * basic-calls.cs: Fix compilation of tests.
15641         
15642         * mini.h mini.c tramp-x86.c mini-x86.c: Add mono_running_on_valgrind ()
15643         helper function to cut back on the number of #ifdefs needed.
15644
15645         * mini-ppc.c: Fix compilation.
15646
15647         * basic-calls.cs: New regression tests.
15648
15649         * mini-sparc.c (mono_sparc_is_virtual_call): New helper function.
15650
15651         * tramp-sparc.c (create_specific_trampoline): Use g5 register instead
15652         of l0 since that is callee saved.
15653
15654         * tramp-sparc.c (sparc_magic_trampoline): Apply unbox trampoline only
15655         to virtual calls.
15656
15657         * mini-sparc.c: Ongoing work + flag virtual calls with a special kind 
15658         of delay instruction.
15659
15660         * inssel.brg (OP_CHECK_THIS): Set tree->sreg1 and dreg correctly.
15661
15662         * mini.h (MonoCallInst): Add 'virtual' flag.
15663
15664         * inssel.brg (mini_emit_virtual_call): Set 'virtual' flag.
15665
15666 2004-02-23  Zoltan Varga  <vargaz@freemail.hu>
15667
15668         * *.cs: New regression tests.
15669
15670         * mini-sparc.c inssel-sparc.brg: Update after latest changes. Ongoing sparc 
15671         work.
15672
15673         * mini.c (mono_runtime_install_handlers): Fix build.
15674
15675         * mini.h (MonoJitTlsData): Add 'stack_size', 'signal_stack' and
15676         'signal_stack_size' members.
15677
15678         * mini.h mini.c mini-x86.h mini-x86.c: Run sigsegv handlers on an 
15679         alternate signal stack.
15680
15681         * exceptions-x86.c: Add stack overflow handling.
15682
15683         * mini.h mini.c mini-x86.c mini-ppc.c trace.h trace.c: Move tracing 
15684         functions to arch independent code.
15685
15686         * mini.c (mono_print_tree): Print more detailed info for load_membase
15687         opcodes.
15688         
15689 2004-02-23  Martin Baulig  <martin@ximian.com>
15690
15691         * mini.c (mini_get_method): Set `gmethod->generic_inst'.
15692
15693 Sun Feb 22 22:25:19 CET 2004 Paolo Molaro <lupus@ximian.com>
15694
15695         * mini-x86.c: fixed reg allocation for div/rem.
15696
15697 2004-02-22  Miguel de Icaza  <miguel@ximian.com>
15698
15699         * driver.c (mono_main): Report some configuratio options on --version.
15700
15701 Fri Feb 20 11:01:44 PST 2004 Paolo Molaro <lupus@ximian.com>
15702
15703         * mini-ppc.c: fixed clt.un, cgt.un. Optimized calls to functions
15704         low in the address space. Correctly flush memory in thunks where we
15705         output native code.
15706
15707 2004-02-20  Martin Baulig  <martin@ximian.com>
15708
15709         * mini.c (mini_get_method): New static method; inflate all generic
15710         methods and methods in open generic instances.
15711         (mono_method_to_ir): Use mini_get_method() instead of mono_get_method().
15712         (ret_type_to_call_opcode): Added support for MONO_TYPE_GENERICINST.
15713
15714 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15715
15716         * mini-sparc.c (mono_arch_patch_code): Update after domain->code_mp changes.
15717
15718         * tramp-sparc.c (mono_arch_create_jump_trampoline): Set ji->method.
15719
15720 2004-02-19  Bernie Solomon  <bernard@ugsolutions.com>
15721
15722         * helpers.c (mono_disassemble_code): use Sun's dis if not using gcc
15723
15724         * mini-sparc.c (flushi mono_arch_output_basic_block): make
15725         it compile using Sun's compiler.
15726
15727 2004-02-19  Zoltan Varga  <vargaz@freemail.hu>
15728
15729         * 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.
15730
15731         * basic-calls.cs basic-float.cs basic-long.cs objects.cs: New regression tests.
15732
15733 Tue Feb 17 21:41:20 CET 2004 Paolo Molaro <lupus@ximian.com>
15734
15735         * aot.c, mini-x86.c, mini.c: use the code manager instead of a mempool to hold native
15736         code.
15737         * mini-ppc.c: handle calls outside of the allowed range with thunks
15738         allocated using the code manager.
15739         * tramp-ppc.c: use the code manager to hold generated native code.
15740         Fixed the magic trampoline to just patch vtable entries.
15741
15742 2004-02-17  Zoltan Varga  <vargaz@freemail.hu>
15743
15744         * inssel.brg inssel-x86.brg: Move call(immediate) rules to the platform
15745         independent file.
15746
15747 2004-02-16  Zoltan Varga  <vargaz@freemail.hu>
15748
15749         * tramp-ppc.c (mono_arch_create_jump_trampoline): Fix compilation on
15750         PPC.
15751
15752         * mini-x86.c: Call mono_arch_get_lmf_addr instead of mono_get_lmf_addr
15753         if we have a working __thread implementation.
15754
15755         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Remove 
15756         OP_CALL_IMM opcodes, since the CALL opcodes handles immediates as well.
15757
15758 2004-02-15  Zoltan Varga  <vargaz@freemail.hu>
15759
15760         * mini-x86.c: Fix compilation under gcc 2.
15761         
15762 2004-02-14  Zoltan Varga  <vargaz@freemail.hu>
15763
15764         * mini.c (mono_codegen): Avoid infinite loop when an icall wrapper
15765         contains a call to the wrapped function.
15766
15767         * mini-ops.h cpu-pentium.md mini-x86.c inssel-x86.brg: Add 
15768         OP_<CALL>_IMM opcodes, and use them under X86.
15769         
15770         * mini.c (mono_jit_find_compiled_method): Fix warning.
15771
15772         * cpu-pentium.md: Fix length of opcodes which use x86_alu_membase_imm.
15773
15774         * jit-icalls.c (mono_ldftn_nosync): New JIT icall.
15775
15776         * tramp-x86.c (mono_arch_create_jump_trampoline): Move arch independent
15777         functionality to mini.c.
15778
15779         * mini.c (mono_create_jump_trampoline): New function to create a jump
15780         trampoline. Return a compiled method instead of a trampoline if it
15781         exists. Add a cache for jump trampolines.
15782
15783         * mini.c (mono_jit_find_compiled_method): New function to return a
15784         compiled method if it exists.
15785
15786         * mini-x86.c: Call mono_create_jump_trampoline instead of 
15787         mono_arch_create_jit_trampoline.
15788
15789         * jit-icalls.c (mono_ldftn): Do not compile the method. Instead, return
15790         a jump trampoline. Fixes #52092.
15791         
15792 2004-02-11  Zoltan Varga  <vargaz@freemail.hu>
15793
15794         * debug-mini.c (mono_init_debugger): Remove call to mono_verify_corlib,
15795         which is not up-to-date. Add check_corlib_version () instead.
15796
15797         * mini.c (mini_init): Call mono_thread_attach () so embedders do not 
15798         have to call it.
15799         
15800         * mini.c (mono_runtime_install_handlers): Remove check for valgrind
15801         since newer valgrind versions do not need it.
15802
15803         * mini.c (mono_jit_compile_method_with_opt): New helper function to
15804         compile a method with a given set of optimizations.
15805
15806         * mini.c: Compile icall wrappers on-demand instead of at startup.
15807
15808         * mini-sparc.c mini-ppc.c: Call mono_icall_get_wrapper to obtain the
15809         wrapper for an icall.
15810
15811 2004-02-10  Zoltan Varga  <vargaz@freemail.hu>
15812
15813         * mini.c (mono_method_to_ir): Handle switch with non-empty stack. Fixes
15814         #54063.
15815
15816         * iltests.il: Add test for non-empty stack before switch instruction.
15817
15818 2004-02-02  Zoltan Varga  <vargaz@freemail.hu>
15819
15820         * mini.c: Add support for new stringbuilder marshalling conventions.
15821
15822         * mini.c (mono_method_to_ir): Fix stack management of generic CEE_BOX.
15823
15824 2004-02-01  Martin Baulig  <martin@ximian.com>
15825
15826         * mini.c (MTYPE_PARAM_TO_TYPE): Method type arguments are stored
15827         in `ginst->mtype_argv'.
15828
15829 2004-01-31  Miguel de Icaza  <miguel@ximian.com>
15830
15831         * mini.c: Add comments, replace CEE_XXX+128 with OP_XXX to
15832         facilitate grepping.
15833
15834 Wed Jan 28 14:04:58 CET 2004 Paolo Molaro <lupus@ximian.com>
15835
15836         * mini.c: fixed buglet in initobj generic implementation for references.
15837
15838 Fri Jan 23 16:10:44 EST 2004 Paolo Molaro <lupus@ximian.com>
15839
15840         * Makefile.am: make the version script conditional.
15841         * jit-icalls.c: handle missing truncl().
15842
15843 2004-01-23  Zoltan Varga  <vargaz@freemail.hu>
15844
15845         * exceptions.cs: Add more tests for double->int conversion.
15846
15847         * jit-icalls.c (mono_fconv_ovf_i8): Call truncl before comparison, so
15848         we don't throw exceptions when converting 1.1 to a long. Fixes #53250.
15849
15850 Fri Jan 23 17:12:08 CET 2004 Paolo Molaro <lupus@ximian.com>
15851
15852         * driver.c: make --verbose --version emit an error
15853         if the loaded corlib doesn't match the runtime version.
15854
15855 Mon Jan 19 17:44:50 CET 2004 Paolo Molaro <lupus@ximian.com>
15856
15857         * mini-ppc.h: export ppc_patch().
15858         * mini-ppc.c: call convention fixes. Added assert in ppc_patch().
15859         * tramp-ppc.c: call convention fixes: Linux/PPC support should be
15860         on par or better than on MacOSX.
15861
15862 2004-01-19  Zoltan Varga  <vargaz@freemail.hu>
15863
15864         * mini.c tramp-x86.c tramp-sparc.c: Updated after changes to
15865         mono_lookup_pinvoke_call.
15866
15867         * mini-x86.c: Under windows, the default pinvoke calling convention is
15868         stdcall. Fixes #52834.
15869
15870         * mini.c (optimize_branches): Add an upper bound to the number of
15871         iterations to prevent infinite loops on strange loops. Fixes #53003.
15872
15873 2004-01-16  Zoltan Varga  <vargaz@freemail.hu>
15874
15875         * inssel.brg: Add vectors<->one dimensional array checking to CASTCLASS
15876         and ISINST. Fixes #52093.
15877
15878         * objects.cs (test_0_vector_array_cast): New tests.
15879         
15880 2004-01-15  Zoltan Varga  <vargaz@freemail.hu>
15881
15882         * jit-icalls.c (helper_stelem_ref_check): New jit icall for array type
15883         checking in Array.Set ().
15884
15885         * mini.c (method_to_ir): Add array type checking in Array.Set (). Fixes
15886         #52590.
15887
15888         * object.cs (test_0_multi_array_cast): New regression test.
15889
15890 Thu Jan 15 16:30:24 CET 2004 Paolo Molaro <lupus@ximian.com>
15891
15892         * exceptions-ppc.c: fix build on Linux/PPC.
15893
15894 2004-01-14  Zoltan Varga  <vargaz@freemail.hu>
15895
15896         * tramp-x86.c (x86_magic_trampoline): Disable code patching when
15897         running under valgrind.
15898         (x86_magic_trampoline): Fix build bustage.
15899
15900         * debug-mini.c: Modify the debug info serialize/deserialize code so it handles
15901         negative values as well. This is needed for the encoding of the line number
15902         info, since sometimes the line numbers are not in increasing order.
15903
15904 2004-01-13  Zoltan Varga  <vargaz@freemail.hu>
15905
15906         * cpu-pentium.md (localloc): Increase the size of the localloc 
15907         instruction since it is a loop under Win32.
15908
15909         * debug-mini.c (record_line_number): Get rid of unneccesary memory
15910         allocation.
15911
15912 2004-01-09  Zoltan Varga  <vargaz@freemail.hu>
15913
15914         * exceptions-ppc.c exceptions-x86.c exceptions-sparc.c 
15915         tramp-x86.c tramp-ppc.c tramp-sparc.c: Applied patch from 
15916         Max Horn (max@quendi.de). Fix file names in comments.
15917
15918 2004-01-03  Zoltan Varga  <vargaz@freemail.hu>
15919
15920         * ssa.c (mono_ssa_rename_vars): Allocate new_stack on the heap to
15921         avoid stack overflow.
15922         (replace_usage): Avoid uninitialized variable warnings.
15923
15924         * mini.c (mono_method_to_ir): Avoid disabling SSA for array operations
15925         and taking the address of valuetype variables.
15926
15927 2004-01-03  Patrik Torstensson
15928
15929         * mini-x86.c: renamed fpflags to flags in RegTrack, going to be used
15930         for other purposes than FP later on.
15931
15932 2004-01-02  Zoltan Varga  <vargaz@freemail.hu>
15933
15934         * mini.c (mono_method_to_ir): Prevent register allocation for arguments
15935         of tail calls.
15936
15937 Fri Jan 2 13:37:25 CET 2004 Paolo Molaro <lupus@ximian.com>
15938
15939         * mini-ops.h, mini.c, inssel.brg: Object.GetType () speedup.
15940
15941 2003-12-30  Patrik Torstensson <p@rxc.se>
15942
15943         * mini-x86.h: Decreased number of availiable fp regs.
15944         Solves corner cases with FP spilling.
15945
15946 2003-12-23  Patrik Torstensson <p@rxc.se>
15947
15948         * mini-x86.c, mini-ops.h, cpu-pentium.md: Added support
15949         for floating point stack tracking / spilling on x86. 
15950         Fixes bug #49012.
15951         
15952         * basic-float.cs: added float mul overflow test.
15953
15954 2003-12-23  Zoltan Varga  <vargaz@freemail.hu>
15955
15956         * mini.c (mono_method_to_ir): Add workaround for bug #51126.
15957
15958 Sun Dec 21 19:53:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15959
15960         * mini.h, mini-ppc.c, mini-ppc.h: small cleanups and
15961         supports for cond branches that overflow the immediate
15962         overflow offset. mcs can compile simple programs.
15963
15964 Fri Dec 19 21:17:16 CET 2003 Paolo Molaro <lupus@ximian.com>
15965
15966         * exceptions-ppc.c: exception handling support wip:
15967         finally handlers get run on exception.
15968
15969 2003-12-19  Zoltan Varga  <vargaz@freemail.hu>
15970
15971         * aot.c (mono_aot_get_method_inner): Avoid loading AOT code while 
15972         profiling.
15973
15974 Fri Dec 19 17:58:28 CET 2003 Paolo Molaro <lupus@ximian.com>
15975
15976         * cpu-g4.md, mini-ppc.c, exceptions-ppc.c, mini-ppc.h:
15977         initial support for stack walking and unwinding.
15978
15979 2003-12-18  Zoltan Varga  <vargaz@freemail.hu>
15980
15981         * driver.c (mono_main): Make corlib-out-of-sync message more 
15982         descriptive. Also remove verify_corlib call.
15983
15984 Wed Dec 17 15:31:41 CET 2003 Paolo Molaro <lupus@ximian.com>
15985
15986         * mini.c: make CEE_NEWARR calls and other emulated opcodes 
15987         not overlap with other call's arguments, too.
15988
15989 Wed Dec 17 12:49:23 CET 2003 Paolo Molaro <lupus@ximian.com>
15990
15991         * mini.h, mini.c, mini-ppc.c, mini-sparc.c, mini-x86.c: 
15992         move to arch-specific code the choice of arch-specific
15993         intrinsics (from Laurent Morichetti (l_m@pacbell.net)).
15994         * mini.c: ensure emulation calls will not interleave
15995         with other calls.
15996
15997 Wed Dec 17 12:27:26 CET 2003 Paolo Molaro <lupus@ximian.com>
15998
15999         * tramp-ppc.c, basic-calls.cs: rework trampolines so that
16000         the magic trampoline stack frame is dropped before executing
16001         the new method.
16002
16003 Mon Dec 15 18:13:57 CET 2003 Paolo Molaro <lupus@ximian.com>
16004
16005         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed some opcode lengths
16006         and integer to fp conversions. Added support for overflowing
16007         arguments on the stack. Reserve a couple more registers as temps.
16008         Added support for aot compilation (as output still needs to be
16009         tweaked, though).
16010
16011 Sat Dec 13 17:49:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16012
16013         * mini-ppc.c, basic-long.cs: fix jumps to known labels.
16014         Don't overwrite return register in some corner cases.
16015
16016 2003-12-13  Zoltan Varga  <vargaz@freemail.hu>
16017
16018         * mini.h mini.c driver.c mini-x86.c mini-ppc.c aot.c: Do not run
16019         static constructors when AOT compiling.
16020
16021         * driver.c (mono_main): Call mono_check_corlib_version.
16022
16023 Sat Dec 13 10:31:12 CET 2003 Paolo Molaro <lupus@ximian.com>
16024
16025         * cpu-g4.md, basic.cs: fixed div target register.
16026
16027 Sat Dec 13 09:45:56 CET 2003 Paolo Molaro <lupus@ximian.com>
16028
16029         * mini-ppc.c, basic.cs: shl_imm fix with test.
16030
16031 Fri Dec 12 21:25:14 CET 2003 Paolo Molaro <lupus@ximian.com>
16032
16033         * inssel-ppc.brg, mini-ppc.h, mini-ppc.c: support for passing 
16034         structures by value. Misc fixes.
16035         * objects.cs: more tests.
16036
16037 Fri Dec 12 10:11:49 CET 2003 Paolo Molaro <lupus@ximian.com>
16038
16039         * mini-ppc.c: lconv.ovf.i implemented.
16040
16041 2003-12-10  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16042
16043         * mini.c:
16044         (mini_init): don't error out if someone already called g_thread_init.
16045
16046 Tue Dec 9 17:27:14 CET 2003 Paolo Molaro <lupus@ximian.com>
16047
16048         * exceptions-x86.c, exceptions-ppc.c: allow the exception object
16049         to be any type per the spec. Fix abnormal memory usage when
16050         the same object is repeatedly thrown.
16051
16052 Tue Dec 9 15:39:54 CET 2003 Paolo Molaro <lupus@ximian.com>
16053
16054         * mini.c: check for overruns in IL code.
16055
16056 2003-12-09  Zoltan Varga  <vargaz@freemail.hu>
16057
16058         * TODO: Add/remove some todo entries.
16059
16060 2003-12-08  Zoltan Varga  <vargaz@freemail.hu>
16061
16062         * driver.c (mono_main): Call mono_verify_corlib.
16063
16064 2003-12-07  Lluis Sanchez Gual  <lluis@ximian.com>
16065
16066         * inssel.brg: In CEE_ISINST and CEE_CASTCLASS, removed check for proxy. 
16067         This has been moved to mini.c
16068         * mini.c: in mono_method_to_ir, CEE_ISINST and CEE_CASTCLASS cases, if the
16069         type being casted is marshalbyref it could be a proxy, so instead of
16070         emitting the type check code, emit a call to a runtime method that will
16071         perform the check by calling CanCastTo if needed.
16072
16073 2003-12-06  Zoltan Varga  <vargaz@freemail.hu>
16074
16075         * mini-x86.c (mono_arch_emit_prolog): Fix stack space allocation for
16076         methods with large stack frames under Win32.
16077
16078 2003-12-04  Zoltan Varga  <vargaz@freemail.hu>
16079
16080         * Makefile.am: Distribute regression tests.
16081
16082         * mini-x86.c (mono_arch_get_allocatable_int_vars): Sort the var list
16083         at the end instead of inserting each variable into the sorted list.
16084
16085         * linear-scan.c (mono_varlist_sort): New helper function.
16086         
16087 Wed Dec 3 20:46:28 CET 2003 Paolo Molaro <lupus@ximian.com>
16088
16089         * mini.c: ensure arguments and locals are within bounds.
16090
16091 Wed Dec 3 17:59:10 CET 2003 Paolo Molaro <lupus@ximian.com>
16092
16093         * mini-ppc.c, cpu-g4.md, basic.cs, basic-long.cs: more tests and 
16094         related fixes.
16095
16096 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
16097
16098         * mini.c (mono_cprop_copy_values): Fix crash.
16099
16100         * aot.c: Set verbosity back to 0.
16101         
16102 Wed Dec 3 15:42:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16103
16104         * regalloc.c: complete memory leak fix by Laurent Morichetti
16105         (l_m@pacbell.net).
16106
16107 2003-12-03  Zoltan Varga  <vargaz@freemail.hu>
16108
16109         * driver.c (main_thread_handler): Revert the previous patch.
16110
16111         * tramp-x86.c (x86_class_init_trampoline): Avoid patching when running
16112         under valgrind.
16113
16114         * mini-x86.c (mono_arch_local_regalloc): Do not allocate transient
16115         memory from the memory pool.
16116
16117         * driver.c (main_thread_handler): Turn on all optimizations when
16118         --aot is used.
16119
16120         * mini.c (mono_find_jit_opcode_emulation): Turn emul_opcode_hash into
16121         an array for better performance.
16122
16123         * regalloc.c (mono_regstate_assign): Fix memory leak.
16124
16125         * debug-mini.c (mono_debug_serialize_debug_info): New function to
16126         serialize the debug info.
16127
16128         * debug-mini.c (mono_debug_add_aot_method): New function to load the
16129         debug info from the serialized representation.
16130
16131         * aot.c: Save debug info into the generated file and load it when 
16132         loading a method.
16133
16134         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16135
16136 Mon Dec 1 16:54:05 CET 2003 Paolo Molaro <lupus@ximian.com>
16137
16138         * mini-ppc.c, tramp-ppc.c: save FP arguments in the trampoline.
16139         More FP-related fixes.
16140
16141 Sun Nov 30 19:13:52 CET 2003 Paolo Molaro <lupus@ximian.com>
16142
16143         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: fixed finally handlers
16144         and register allocation buglet. Hello world now runs.
16145
16146 Fri Nov 28 23:03:05 CET 2003 Paolo Molaro <lupus@ximian.com>
16147
16148         * cpu-g4.md, inssel-ppc.brg, mini-ppc.c: better long return support.
16149         * tramp-ppc.c: fixed class init trampoline.
16150         * inssel-ppc.brg, mini.c, jit-icalls.c, mini-ppc.h: more emulation.
16151
16152 Fri Nov 28 16:36:29 CET 2003 Paolo Molaro <lupus@ximian.com>
16153
16154         * cpu-g4.md, inssel-ppc.brg, jit-icalls.c, mini-ppc.c, mini-ppc.h,
16155         mini.c: more ppc changes/fixes.
16156
16157 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
16158
16159         * mini.c (mono_method_to_ir): Fix tail calls with valuetype arguments.
16160         Also optimize the case when the arguments are the same in the caller 
16161         and in the callee.
16162
16163         * iltests.il: Add tests for tail calls with valuetype arguments.
16164
16165 Thu Nov 27 21:06:37 CET 2003 Paolo Molaro <lupus@ximian.com>
16166
16167         * mini-ppc.c: fixes for struct return type.
16168
16169 Thu Nov 27 19:02:07 CET 2003 Paolo Molaro <lupus@ximian.com>
16170
16171         * mini.h, mini.c, mini-x86.c, mini-ppc.c, mini-sparc.c: move 
16172         mono_spillvar_offset() to arch-specific code.
16173
16174 Thu Nov 27 18:30:42 CET 2003 Paolo Molaro <lupus@ximian.com>
16175
16176         * mini-ppc.h, mini-ppc.c: handle some different ABI call convention issues.
16177
16178 2003-11-27  Zoltan Varga  <vargaz@freemail.hu>
16179
16180         * exceptions-x86.c: Fix stack space leaks.
16181         
16182         * exceptions-x86.c (mono_arch_find_jit_info): Restore callee saved
16183         registers from the lmf if the method has save_lmf set.
16184
16185 2003-11-26  Zoltan Varga  <vargaz@freemail.hu>
16186
16187         * tramp-x86.c (x86_magic_trampoline): Avoid patching in the addresses
16188         of icall wrappers into InvokeInDomain, since these are now per-domain.
16189
16190 Wed Nov 26 20:15:04 CET 2003 Paolo Molaro <lupus@ximian.com>
16191
16192         * mini-ppc.h, mini-x86.h, mini.c, inssel-ppc.brg, jit-icalls.c:
16193         make some opcode emulation and intrinsic ops enabled/disabled 
16194         according to the architecture. More fixes.
16195
16196 Wed Nov 26 19:59:09 CET 2003 Paolo Molaro <lupus@ximian.com>
16197
16198         * mini-ppc.c, mini-sparc.c, cpu-g4.md: more bug fixes.
16199
16200 Wed Nov 26 19:18:29 CET 2003 Paolo Molaro <lupus@ximian.com>
16201
16202         * mini.h, inssel.brg, mini-x86.c, mini-ppc.c, mini-sparc.c: move
16203         arch-specific handling for 'this' and struct return type to
16204         arch-specific code.
16205
16206 2003-11-26  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16207
16208         * aot.c: prevent divide by zero error when reporting (it happened with
16209         Accessibility.dll).
16210
16211 2003-11-25  Zoltan Varga  <vargaz@freemail.hu>
16212
16213         * mini.h (inst_switch): Remove unused macro.
16214
16215 2003-11-25  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16216
16217         * aot.c:
16218         (load_aot_module): free 'info->methods' and 'info' properly. No more
16219         "free(): invalid pointer blah" messages when you have an old aot
16220         compiled assembly.
16221
16222 2003-11-21  Lluis Sanchez Gual <lluis@ximian.com>
16223
16224         * jit-icalls.c, mini.c: Added support for context static fields.
16225
16226 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
16227
16228         * mini.c (mono_method_blittable): Methods which set LastError are not 
16229         blittable either. Fixes #51108.
16230         
16231 Tue Nov 18 16:41:37 CET 2003 Paolo Molaro <lupus@ximian.com>
16232
16233         * mini.c: flush icache.
16234         * cpu-g4.md, mini-ppc.c, inssel.brg: more fixes. Trace support.
16235
16236 2003-11-18  Zoltan Varga  <vargaz@freemail.hu>
16237
16238         * mini.c (mono_type_blittable): OBJECT is not blittable. Fixes #47842.
16239
16240 2003-11-17  Zoltan Varga  <vargaz@freemail.hu>
16241
16242         * tramp-x86.c (x86_class_init_trampoline): Make code patching thread
16243         safe on IA32.
16244
16245         * mini-x86.c (mono_arch_call_opcode): Disable AOT for methods with 
16246         vararg calls.
16247
16248         * inssel.brg (CEE_MKREFANY): Fix AOT case.
16249
16250 2003-11-16  Zoltan Varga  <vargaz@freemail.hu>
16251
16252         * mini-x86.c (mono_arch_local_regalloc): Fix regalloc for div 
16253         instruction when the result is discarded.
16254
16255         * iltests.il (test_0_div_regalloc): New regression test.
16256
16257         * arrays.cs: Fix compilation error.
16258
16259 Fri Nov 14 21:34:06 CET 2003 Paolo Molaro <lupus@ximian.com>
16260
16261         * inssel-x86.brg, inssel-float.brg, mini-ops.h: move x86-specific
16262         float rules to inssel-x86.brg: sane architectures with FP registers
16263         don't need to implement these rules.
16264
16265 Fri Nov 14 20:52:12 CET 2003 Paolo Molaro <lupus@ximian.com>
16266
16267         * mini-ppc.c, cpu-g4.md, inssel-ppc.brg: updates and fixes to the ppc port.
16268
16269 Fri Nov 14 17:58:27 CET 2003 Paolo Molaro <lupus@ximian.com>
16270
16271         * mini.h, inssel-long32.brg: fixed endianess issues in int64
16272         implementation of 32 bit systems.
16273
16274 Thu Nov 13 16:14:41 CET 2003 Paolo Molaro <lupus@ximian.com>
16275
16276         * exceptions-ppc.c: fix build on Linux/ppc from Jeroen@xs4all.nl
16277         (Jeroen Zwartepoorte).
16278
16279 2003-11-12  Zoltan Varga  <vargaz@freemail.hu>
16280
16281         * mini.c (mono_method_to_ir): Use CEE_JMP only if the signature of
16282         the caller and the callee matches.
16283         
16284         * mini.c (mono_method_to_ir): Add comment.
16285
16286         * mini-x86.c (mono_arch_output_basic_block): Use mono_signbit, since
16287         signbit is missing on some platforms.
16288
16289 2003-11-06  Zoltan Varga  <vargaz@freemail.hu>
16290
16291         * mini.h (mono_arch_setup_jit_tls_data): New arch specific function.
16292
16293         * mini.c (setup_jit_tls_data): Call the new function.
16294         
16295         * mini-x86.c mini-ppc.c mini-sparc.c: Define the new function.
16296
16297         * mini-x86.c: Add experimental support for fast access to the lmf
16298         structure under NPTL/Linux 2.6.x.
16299
16300 2003-11-06  Martin Baulig  <martin@ximian.com>
16301
16302         * ldscript: Make `GC_push_all_stack', `GC_start_blocking',
16303         `GC_end_blocking' and 'gc_thread_vtable' public; they're used by
16304         the debugger.
16305
16306 2003-11-02  Martin Baulig  <martin@ximian.com>
16307
16308         * mini.c (inflate_generic_field): New static method.
16309         (mono_method_to_ir): In CEE_LDFLD and CEE_LDSFLD: if we're a
16310         generic instance and the field is declared in a generic type, call
16311         inflate_generic_field() to inflate it.  Fixes gen-28.cs.
16312
16313 2003-10-31  Zoltan Varga  <vargaz@freemail.hu>
16314
16315         * mini.h mini.c (mono_method_same_domain): New function to return
16316         whenever the caller and the callee are in the same domain.
16317
16318         * tramp-x86.c (x86_magic_trampoline): Use the new function.     
16319
16320 2003-10-30  Martin Baulig  <martin@ximian.com>
16321
16322         * mini.c (MTYPE_PARAM_TO_TYPE, MTYPE_PARAM_TO_CLASS): New macros;
16323         similar to TYPE_PARAM_TO_TYPE and TYPE_PARAM_TO_CLASS, but for
16324         method parameters.
16325         (mono_method_to_ir): Added support for MONO_TYPE_MVAR; similar to
16326         MONO_TYPE_VAR, we the actual types from MTYPE_PARAM_TO_CLASS(). 
16327
16328 2003-10-29  Zoltan Varga  <vargaz@freemail.hu>
16329
16330         * mini.c mini-ops.h inssel.brg: Implement undeniable exception 
16331         propagation.
16332
16333         * mini.c (sigusr1_signal_handler): Move creation of the thread abort
16334         object here, so it is in the correct appdomain etc.
16335
16336 2003-10-27  Zoltan Varga  <vargaz@freemail.hu>
16337
16338         * mini.c (mono_jit_compile_method_inner): Lookup icalls here if not
16339         already done.
16340         (mono_method_to_ir): Avoid freeing the type created returned from
16341         mono_type_create_from_typespec, since it is put into an internal cache
16342         by the function. Fixes pointer.exe.
16343
16344         * mini.c tramp-x86.c tramp-sparc.c tramp-ppc.c: Use the normal 
16345         trampolines for icalls and pinvokes as well. Fixes #33569.
16346
16347 2003-10-24  Zoltan Varga  <vargaz@freemail.hu>
16348
16349         * mini.c: Update after appdomain changes.
16350
16351         * mini.c (mono_jit_compile_method_inner): Allways compile native
16352         method wrappers in the root domain, since there can only be one
16353         instance of them, whose address is stored in method->info.
16354
16355 2003-10-16  Zoltan Varga  <vargaz@freemail.hu>
16356
16357         * mini.c (mono_runtime_install_handlers): Get rid of the MONO_VALGRIND
16358         environment variable. Instead detect automatically whenever running
16359         under valgrind using the magic macro RUNNING_ON_VALGRIND from
16360         valgrind.h.
16361
16362 2003-10-16  Miguel de Icaza  <miguel@ximian.com>
16363
16364         * trace.c, trace.h: New files that implement the new trace option
16365         parsing. 
16366
16367         * driver.c: Document new --trace options.
16368
16369         * exceptions-ppc.c, exceptions-x86.c, mini-ppc.c, mini-sparc.c,
16370         mini-x86.c: Apply:
16371
16372         -       if (mono_jit_trace_calls)
16373         +       if (mono_jit_trace_calls != NULL && mono_trace_eval (method))
16374
16375         * mini.h: prototypes.
16376         
16377 2003-10-15  Zoltan Varga  <vargaz@freemail.hu>
16378
16379         * mini.c (mono_method_to_ir): Fix initialization of typedbyref locals.
16380
16381         * mini.c inssel.brg: Implement typedefbyref opcodes.
16382
16383         * mini.c (mono_jit_compile_method): Remove unused local variable.
16384
16385         * mini.c (mono_jit_compile_method_inner): Ditto.
16386         
16387 2003-10-12  Zoltan Varga  <vargaz@freemail.hu>
16388
16389         * tramp-x86.c (x86_class_init_trampoline): Fix build.
16390         
16391         * tramp-x86.c (x86_class_init_trampoline): Thread safety fixes.
16392
16393 2003-10-10  Zoltan Varga  <vargaz@freemail.hu>
16394
16395         * mini.c (mono_no_aot): Remove unused global variable.
16396
16397         * mini.c: Thread safety fixes.
16398
16399 2003-10-09  Zoltan Varga  <vargaz@freemail.hu>
16400
16401         * mini.c (mono_create_class_init_trampoline): Add a lock around
16402         class_init_hash_addr.
16403
16404         * arrays.cs (test_0_newarr_emulation): Add new regression test for
16405         #30073.
16406
16407         * mini.c: Decompose the NEWARR instruction before decomposing its
16408         arguments. Fixes #30073.
16409
16410 2003-10-08  Zoltan Varga  <vargaz@freemail.hu>
16411
16412         * mini-x86.c (mono_arch_emit_epilog): Add support for stdcall calling
16413         convention.
16414
16415 2003-10-06  Zoltan Varga  <vargaz@freemail.hu>
16416
16417         * mini.c (mono_method_to_ir): Allow wrapper data for CEE_LDELEMA.
16418
16419         * inssel-x86.brg (OP_LOCALLOC): Fix register assignment for localloc.
16420
16421         * driver.c: Add support for compiling icall wrappers to --compile.
16422
16423 2003-10-05  Zoltan Varga  <vargaz@freemail.hu>
16424
16425         * inssel.brg: The empty value in class->interface_offsets is -1, not
16426         0. Fixes #49287.
16427
16428 2003-10-03  Zoltan Varga  <vargaz@freemail.hu>
16429
16430         * objects.cs: New test for 'is' operator on an array of interfaces.
16431
16432 Wed Oct 1 19:40:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
16433
16434         * tramp-ppc.c: update trampoline code to support jumps
16435         and class initialization.
16436
16437 2003-09-30  Zoltan Varga  <vargaz@freemail.hu>
16438
16439         * mini.c (mono_jit_compile_method): Fix reading of freed memory.
16440
16441         * inssel.brg (OP_UNBOXCAST): Fix #46027.
16442
16443         * inssel.brg (OP_UNBOX): Remove unused rule.
16444
16445         * mini.h mini.c inssel-x86.brg: Allocate one SP variable for each
16446         region instead of one for each method. Fixes #47813.
16447
16448 2003-09-29  Zoltan Varga  <vargaz@freemail.hu>
16449
16450         * exceptions.cs (test_0_nested_finally): New regression test for
16451         nested exception handlers.
16452
16453         * mini.c (mono_jit_runtime_invoke): Fix for the previous fix.
16454
16455         * mini.c (mono_method_to_ir): Avoid inlining tail calls.
16456
16457         * mini.c (mono_method_to_ir): Fix tail recursion in the presence of 
16458         inlining.
16459
16460         * mini.c (mono_method_check_inlining): Make the inlining limit 
16461         configurable by an environment variable.
16462         
16463         * mini.c (mono_jit_runtime_invoke): Add Gonzalo's fix for #36545.
16464
16465         * mini.h: Bump AOT file version.
16466
16467         * mini.h mini.c aot.c mini-x86.c: For relocations which refer to a 
16468         token, store the image along with the token, since the token might not 
16469         refer to the same image as the method containing the relocation, 
16470         because of inlining.
16471
16472 2003-09-27  Zoltan Varga  <vargaz@freemail.hu>
16473
16474         * mini.c (mono_precompile_assemblies): New function to compile
16475         all methods in all loaded assemblies.
16476
16477         * mini.h driver.c: Added new optimization flag MONO_OPT_PRECOMP.
16478
16479         * regalloc.h regalloc.c (MonoRegState): Change the type of 
16480         iassign and fassign to int*, since they can contain large negative
16481         values if the register is spilled. Also added some comments. Fixes
16482         #45817.
16483
16484         * exceptions-x86.c (seh_handler): Fix handling of system exceptions
16485         under Win32. Fixes #42964.
16486
16487 2003-09-26  Zoltan Varga  <vargaz@freemail.hu>
16488
16489         * mini.h (MONO_PATCH_INFO_WRAPPER): New patch type.
16490
16491         * aot.c: Added support for AOT compiling methods which contain calls
16492         to wrappers. Currently, only remoting-invoke-with-check wrappers are
16493         handled.
16494         
16495         * driver.c (compile_all_methods): Run the compilation in a thread
16496         managed by mono. Fixes #44023.
16497
16498         * mini.c (mono_codegen): Print full method name in verbose output.
16499
16500         * mini-x86.c (mono_arch_patch_code): Fix warning.
16501         
16502         * mini-x86.c (mono_arch_patch_code): Allways create a trampoline for
16503         jumps, since the method we are jumping to might be domain-specific.
16504
16505         * aot.c: Added support for MONO_PATCH_INFO_METHOD_JUMP.
16506
16507 Tue Sep 23 10:50:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
16508
16509         * inssel.brg: string chars are unsigned.
16510
16511 2003-09-15  Zoltan Varga  <vargaz@freemail.hu>
16512
16513         * TODO: New todo item.
16514
16515         * tramp-x86.c (x86_class_init_trampoline): New trampoline function
16516         which calls mono_runtime_class_init and patches the call site to
16517         avoid further calls.
16518         (mono_arch_create_class_init_trampoline): New arch specific function 
16519         to create a class init trampoline.
16520         (create_trampoline_code): Generalized so it can create
16521         class init trampolines as well.
16522
16523         * mini.c (helper_sig_class_init_trampoline): New helper variable.
16524         (mono_create_class_init_trampoline): New function to create and cache
16525         class init trampolines.
16526         (mono_find_class_init_trampoline_by_addr): New function to lookup the
16527         vtable given the address of a class init trampoline. Used by the
16528         patching process.
16529         (mono_codegen): Generate a call to a trampoline instead of
16530         mono_runtime_class_init in LDSFLD[A].
16531         (mono_codegen): Add relocations for the new trampoline.
16532         
16533         * mini.h mini-x86.c aot.c: Added a new relocation type: 
16534         MONO_PATCH_INFO_CLASS_INIT.
16535
16536         * mini.h: Bump AOT version number.
16537
16538         * aot.c: Create a copy of the loaded code instead of using the original
16539         so methods which call each other will be close in memory, improving
16540         cache behaviour.
16541         
16542         * exceptions-x86.c (mono_arch_has_unwind_info): Back out the previous
16543         patch since it breaks the regression tests.
16544         
16545         * exceptions-x86.c (mono_arch_has_unwind_info): Added explicit check
16546         for the register saving instruction sequence since the 
16547         frame_state_for function in glibc 2.3.2 don't seem to detect it.
16548
16549 2003-09-14  Zoltan Varga  <vargaz@freemail.hu>
16550
16551         * TODO: Fix todo item && remove another.
16552
16553 2003-09-12  Zoltan Varga  <vargaz@freemail.hu>
16554
16555         * mini-x86.c (mono_arch_patch_code): Fix tail calls broken by a
16556         previous checkin.
16557
16558         * aot.c: Moved the check for MONO_LASTAOT into the initialization
16559         function of the module.
16560
16561         * mini.h mini.c aot.c: Added a new optimization flag OPT_AOT for
16562         turning on/off the usage of AOT code. Got rid of mono_no_aot and the
16563         --no-aot command line option.
16564
16565 2003-09-11  Zoltan Varga  <vargaz@freemail.hu>
16566
16567         * helpers.c (mono_disassemble_code): Make this work under cygwin. Patch
16568         by Bernie Solomon (bernard@ugsolutions.com).
16569
16570         * inssel.brg: Refactor the interface offset table related code into
16571         its separate functions and add support for the AOT case.
16572
16573 2003-09-10  Zoltan Varga  <vargaz@freemail.hu>
16574
16575         * aot.c (mono_aot_get_method_inner): Fix memory leak.
16576         
16577         * aot.c: Added mono_aot_verbose variable and made all debugging
16578         output depend on the value of this variable.
16579
16580         * aot.c (mono_aot_get_method_inner): Avoid dynamic allocation of
16581         method_label and info_label.
16582
16583         * mini.h mini-x86.c aot.c: Added a new relocation type 
16584         MONO_PATCH_INFO_IID for klass->interface_id.
16585
16586         * mini.h mini.c driver.c aot.c: Changed mono_aot_get_method to return
16587         the MonoJitInfo structure.
16588
16589         * mini.c (mono_jit_compile_method): Avoid using non-shared AOT in
16590         a non-root appdomain in shared mode.
16591
16592 Tue Sep 9 16:33:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
16593
16594         * aot.c: make aot loader less verbose. Remove free of unused variable.
16595
16596 2003-09-08  Zoltan Varga  <vargaz@freemail.hu>
16597
16598         * aot.c (mono_aot_get_method_inner): Fix MONO_PATCH_INFO_IMAGE.
16599
16600         * .cvsignore: Added *.dll.
16601
16602         * mini.c (mono_print_tree_nl): New function callable while debugging.
16603
16604         * mini.c (mono_print_code): Export this.
16605
16606         * tramp-x86.c (x86_magic_trampoline): Tell valgrind to recompile the
16607         patched code.
16608
16609 2003-09-05  Zoltan Varga  <vargaz@freemail.hu>
16610
16611         * mini.h (MonoCompile): Added 'jit_info' field.
16612
16613         * mini.c (mini_method_compile): Save the generated MonoJitInfo into
16614         the cfg structure, since it is needed by the AOT compiler.
16615
16616         * mini.h (MONO_AOT_FILE_VERSION): Bump version number.
16617
16618         * aot.c: A major rewrite. Changes include:
16619         - save exception tables for methods which have them.
16620         - cache failed lookups in aot_get_method () to avoid the (slow) calls 
16621         to g_module_symbol.
16622         - reworked the file format so it is now much smaller and needs
16623         fewer relocation entries.
16624         
16625 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16626
16627         * aot.c (load_aot_module): Fix build bustage on platforms without
16628         Boehm GC.
16629
16630 2003-09-04  Martin Baulig  <martin@ximian.com>
16631
16632         * Makefile.am (INCLUDES): Added $(LIBGC_CFLAGS).
16633
16634 2003-09-04  Zoltan Varga  <vargaz@freemail.hu>
16635
16636         * TODO: Some new optimization ideas.
16637
16638         * aot.c: Move AOT module loading logic here from mono_assembly_open.
16639
16640         * aot.c: Save the optimization flags used to compile the code into
16641         the AOT module.
16642
16643         * mini.h mini-x86.c mini.c aot.c: Added new types of relocations to
16644         support emitting domain specific code.
16645         
16646         * mini.h mini.c aot.c: Modified the JIT so the generated AOT code is 
16647         no longer domain neutral. It can be made domain neutral by compiling 
16648         with --optimize=shared.
16649
16650         * aot.c (mono_aot_get_method_inner): Allow sharing of AOT methods
16651         between appdomains.
16652
16653         * driver.c mini.h mini.c: New --no-aot debugging option which disables
16654         loading of AOT code.
16655
16656         * inssel-x86.brg: Added missing AOTCONST -> OUTARG_VT rule.
16657         
16658         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling method
16659         if there is no domain neutrality information.
16660
16661 2003-09-01  Zoltan Varga  <vargaz@freemail.hu>
16662
16663         * aot.c (mono_compile_assembly): Emit a symbol containing the file 
16664         format version into the generated library.
16665
16666         * mini-x86.c (mono_arch_patch_code): Do not emit the address of the
16667         callee method into the caller since one of them could be shared.
16668
16669         * mini.h mini-x86.c aot.c: Added two new relocations so throwing
16670         system exceptions from AOT code now works.
16671
16672         * tramp-x86.c (x86_magic_trampoline): Avoid patching the calling 
16673         method if it is domain neutral and the callee is not.
16674
16675         * graph.c (cfg_emit_one_loop_level): Fix warning.
16676
16677 2003-08-30  Zoltan Varga  <vargaz@freemail.hu>
16678
16679         * aot.c (mono_compile_assembly): Oops. Remove debugging cruft from
16680         last checkin.
16681
16682 2003-08-29  Zoltan Varga  <vargaz@freemail.hu>
16683
16684         * mini.c (mini_init): Call mono_marshal_init () explicitly since it
16685         is needed  by code which is executed before mono_runtime_init ().
16686         Thanks to Bernie Solomon (bernard@ugsolutions.com) for noticing this.
16687         
16688         * mini.c (mono_thread_abort): Fix warning.
16689         (mono_jit_compile_method): Call static constructor in the AOT case too.
16690
16691         * aot.c (mono_compile_assembly): Fix warning.
16692
16693 2003-08-28  Gonzalo Paniagua Javier <gonzalo@ximian.com>
16694
16695         * mini.c: register a SIGINT handler if MONO_DEBUG is defined.
16696
16697 2003-08-28  Zoltan Varga  <vargaz@freemail.hu>
16698
16699         * inssel.brg (OP_UNBOXCAST): Add support for the AOT case.
16700
16701         * cpu-pentium.md: Fix the length of call opcodes so they include the
16702         ESP restoring instruction. Fixes #47968.
16703
16704 2003-08-28  Martin Baulig  <martin@ximian.com>
16705
16706         * mini-x86.c (mono_arch_call_opcode): Added support for
16707         MONO_TYPE_GENERICINST.
16708
16709         * mini.c (check_call_signature): Added support for MONO_TYPE_GENERICINST.       
16710
16711 2003-08-27  Zoltan Varga  <vargaz@freemail.hu>
16712
16713         * Makefile.am (BUILT_SOURCES): Fix compilation on platforms without
16714         a JIT. Patch by Bernie Solomon (bernard@ugsolutions.com).
16715
16716         * mini.c jit-icalls.c tramp-x86.c tramp-ppc.c tramp-sparc.c: Get rid of
16717         metadata_section.
16718
16719 2003-08-26  Martin Baulig  <martin@ximian.com>
16720
16721         * mini.c (get_basic_blocks): Added `unsigned char **pos' argument;
16722         when reporting an error, set this to the actual error location.
16723         (mono_method_to_ir): Report the correct error location if
16724         get_basic_blocks() returned an error.
16725
16726 2003-08-25  Zoltan Varga  <vargaz@freemail.hu>
16727
16728         * mini.c (mono_type_blittable): OBJECT is not blittable.
16729         (mono_method_blittable): Methods which have marshalling descriptors
16730         are not blittable either. Fixes #47842.
16731
16732 2003-08-22  Zoltan Varga  <vargaz@freemail.hu>
16733
16734         * driver.c mini.c: Use an environment variable instead of a global 
16735         variable. Also fix the build.
16736
16737         * mini.c (mini_init): Call g_thread_init () to make glib thread-safe. 
16738         Fixes #47682. Thanks to Laurent Morichetti (l_m@pacbell.net) for 
16739         reporting this. 
16740
16741         * driver.c mini.c: Added --with-valgrind option to turn off some
16742         code which prevents mono from running under valgrind.
16743
16744         * mini.c (mono_emit_call_args): Fixed warning.
16745
16746         * mini.c (mono_emulate_opcode): Fixed warning.
16747
16748 Thu Aug 21 19:10:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16749
16750         * inssel.brg: 64bit fixes from Laurent Morichetti <l_m@pacbell.net>.
16751         * linear-scan.c, mini-ppc.h, mini-sparc.h, mini-x86.h, mini.h,
16752         regalloc.c, regalloc.h: specify available registers in arch-specific
16753         code and support floats in the regallocator (patch by Laurent Morichetti 
16754         <l_m@pacbell.net>)
16755
16756 Wed Aug 20 19:02:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
16757
16758         * mini.c: mono_thread_current() can be called only after
16759         mono_runtime_init(): rearrange code to not call it early on.
16760
16761 Wed Aug 20 13:14:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16762
16763         * mini.c: allocate jump tables in the code mempools.
16764
16765 Wed Aug 20 13:04:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
16766
16767         * mini.c, mini.h: make sure per-thread data allocated by the jit is
16768         freed.
16769
16770 2003-08-10  Miguel de Icaza  <miguel@ximian.com>
16771
16772         * cpu-pentium.md (ldtoken): Change the length for mul.ovf.un from
16773         12 to 16.  This fixes bug #47453.
16774
16775
16776 Thu Aug 7 15:59:35 CEST 2003 Paolo Molaro <lupus@ximian.com>
16777
16778         * mini-ppc.c: fixed indexed load and unsigned compares.
16779
16780 2003-08-06  Lluis Sanchez Gual  <lluis@ximian.com>
16781
16782         * mini.c: reenabled installation of handler for
16783           thread abort signal.
16784
16785 Tue Aug 5 12:21:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16786
16787         * cprop.c, mini-x86.c, cpu-pentium.md: fix buglets spotted
16788         by Laurent Morichetti <l_m@pacbell.net>. Disabled local cprop
16789         until it's fixed and actually useful.
16790
16791 Mon Aug 4 12:12:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
16792
16793         * inssel-long32.brg: couple more opcodes implemented.
16794
16795 Thu Jul 31 22:43:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16796         
16797         * mini-sparc.c: Even more opcodes implemeted.
16798
16799 Thu Jul 31 19:36:03 EDT 2003 Mark Crichton <crichton@gimp.org>
16800
16801         * mini-sparc.c: More opcodes implemented.
16802
16803 Thu Jul 31 15:16:26 EDT 2003 Mark Crichton <crichton@gimp.org>
16804
16805         * mini-sparc.c: More opcodes implemented.
16806
16807 Wed Jul 30 22:31:02 EDT 2003 Mark Crichton <crichton@gimp.org>
16808
16809         * inssel-sparc.brg: Add some needed rules.  Direct
16810         copy from PPC.
16811         * Makefile.am: Use inssel-sparc.brg
16812         * exceptions-sparc.c: 0xdeadbeef/0xdecafbad to keep
16813         an assert happy for now.
16814
16815 Wed Jul 30 20:44:07 EDT 2003 Mark Crichton <crichton@gimp.org>
16816
16817         * mini-sparc.c: Fixed compile errors.
16818         * exceptions-sparc.c: Same.  We now produce a mono binary 
16819         on sparc-linux.  Yea.
16820
16821 Wed Jul 30 14:10:12 EDT 2003 Mark Crichton <crichton@gimp.org>
16822
16823         * mini-sparc.c: Renamed registers.  Also some macro cleanups.
16824         * exceptions-sparc.c, tramp-sparc.c: Various compile fixes.
16825         They compile, but do not work.
16826
16827 Wed Jul 30 17:52:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16828
16829         * Makefile.am, cpu-sparc.md, exceptions-sparc.c, mini-sparc.c,
16830         mini-sparc.h, tramp-sparc.c: Beginning of sparc support
16831         from Mark Crichton <crichton@gimp.org> and Christopher Taylor
16832         (ct@gentoo.org).
16833
16834 Tue Jul 29 12:43:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
16835
16836         * mini.c: more opcodes implemented and better support for generics.
16837
16838 Fri Jul 25 18:51:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
16839
16840         * cpu-g4.md, cpu-pentium.md: updates for new instructions.
16841         * mini.c, mini.h: first cut at generics support: some new instructions 
16842         added and changed the behaviour of some of the existing ones.
16843
16844 2003-07-21  Miguel de Icaza  <miguel@ximian.com>
16845
16846         * mini.c: Removed definition of metadata_shared mutex here.
16847
16848 Tue Jul 22 15:21:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
16849
16850         * mini-x86.c: make vararg calls work for instance methods.
16851
16852 Fri Jul 18 19:26:20 CEST 2003 Paolo Molaro <lupus@ximian.com>
16853
16854         * mini.c, mini.h, mini-x86.c, mini-ppc.c: mono_arch_call_opcode()
16855         returns the arguments in a separte list, now.
16856
16857 Fri Jul 18 13:16:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16858
16859         * aot.c, mini.c: updates for array type representation changes.
16860
16861 Fri Jul 18 11:28:28 CEST 2003 Paolo Molaro <lupus@ximian.com>
16862
16863         * mini.c: register function to perform jit shutdown.
16864
16865 Thu Jul 17 16:02:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
16866
16867         * mini.c: use a faster allocator if possible.
16868
16869 Thu Jul 17 16:00:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
16870
16871         * aot.c: some cleanups and portability changes.
16872
16873 Wed Jul 2 11:08:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16874
16875         * mini.c: use faster allocation for CEE_BOX if possible.
16876
16877 Mon Jun 30 19:16:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
16878
16879         * mini.c, mini-ops.h, inssel.brg, mini-x86.c: optimized access to fields.
16880         Moved inlined mempcy code to its own function so that is can be
16881         reused. Added an inline memset function as well (optimized initobj).
16882         * cpu-pentium.md, inssel-x86.brg: add and use lea_membase.
16883
16884 Fri Jun 27 11:19:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
16885
16886         * mini.c, mini-ops.h, inssel.brg: optimized a couple of Array methods.
16887
16888 Wed Jun 25 13:19:25 CEST 2003 Paolo Molaro <lupus@ximian.com>
16889
16890         * mini.c, mini.h, mini.x86.c, mini-ppc.c: added facility so that
16891         arch code can setup the cpu for CLR execution, if needed.
16892         We use it on x86 to set the precision of FP operations.
16893
16894 Tue Jun 17 19:02:55 CEST 2003 Paolo Molaro <lupus@ximian.com>
16895
16896         * mini.c: disable some optimizations if we can guess they'll cost too
16897         much for a given method.
16898
16899 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16900
16901         * mini.h mini.c: Rework last patch based on suggestions by Paolo.
16902         
16903 2003-06-17  Zoltan Varga  <vargaz@freemail.hu>
16904         * mini.h mini.c mini-x86.c: Added instruction level coverage 
16905         info collection support.
16906
16907 Mon Jun 16 18:13:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16908
16909         * driver.c, mini-ppc.c, mini-x86.c, mini.c, mini.h: the coverage stuff
16910         is now implemented in the profiling API. Get rid of a couple of
16911         unnecessary global variables.
16912
16913 2003-06-15  Nick Drochak <ndrochak@gol.com>
16914
16915         * basic-long.cs: tests for negative values for bigmul, and unsigned.
16916         * cpu-g4.md: add op_bigmul and op_bigmul_un
16917         * cpu_pentium.md: add op_bigmul_un
16918         * inssel-long32.brg: add rule for unsigned bigmul
16919         * mini-ops.h: define OP_BIGMUL_UN
16920         * mini-x86.c: THE BUG: handle (un)signed properly
16921         * mini.c: choose unsigned opcode if needed.
16922         This set of patches fixes bug #44291
16923
16924 2003-06-13  Dietmar Maurer  <dietmar@ximian.com>
16925
16926         * mini.c (optimize_branches): improved to handle all kinds of
16927         conditional branches.
16928
16929 Wed Jun 11 18:01:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
16930
16931         * mini.c, mini.h, jit-icalls.c: speedup emulation of opcodes that
16932         don't raise exceptions.
16933
16934 Tue Jun 10 19:00:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
16935
16936         * tramp-x86.c, tramp-ppc.c, debug-mini.c: move arch-specific code
16937         to arch-specific files.
16938
16939 2003-06-09  Martin Baulig  <martin@ximian.com>
16940
16941         * Makefile.am (libs): Added $(LIBGC_LIBS).
16942
16943 Mon Jun 9 20:21:47 CEST 2003 Paolo Molaro <lupus@ximian.com>
16944
16945         * cpu-pentium.md, mini-x86.c: fix (well, actually implement) OP_TAN
16946         and OP_ATAN (fixes bug#44293).
16947
16948 Mon Jun 9 19:00:56 CEST 2003 Paolo Molaro <lupus@ximian.com>
16949
16950         * Makefile.am, mini-x86.c: rename cpu description array to
16951         pentium_desc, since some compilers define the 'pentium' preprocessor
16952         symbol.
16953
16954 2003-05-28  Dietmar Maurer  <dietmar@ximian.com>
16955
16956         * mini.c (mini_select_instructions): add explicit branch if the
16957         following block is not the false target of a conditional branch -
16958         we need this with any optimization that reorder or remove bblocks
16959
16960         * mini.c (optimize_branches): bug fixes
16961
16962 2003-06-06  Dietmar Maurer  <dietmar@ximian.com>
16963
16964         * mini.c (mono_method_to_ir): inline static readonly fields
16965
16966         * ssa.c (fold_tree): start cfold support for long (very simple
16967         cases only)
16968
16969         * cfold.c (mono_constant_fold_inst): opt. CEE_CONV_I8 (OP_ICONST)
16970
16971 Fri Jun 6 11:41:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
16972
16973         * inssel.brg: fixed memcpy (bug #44219).
16974
16975 2003-06-05  Dick Porter  <dick@ximian.com>
16976
16977         * driver.c: Set the glib log levels to not abort if g_message
16978         recurses.
16979
16980         g_set_prgname() has to happen before mini_init() so that the
16981         process handle gets the info.
16982         
16983 Thu Jun 5 20:11:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
16984
16985         * driver.c: add intrins to the default optimizations to get wider
16986         exposure.
16987
16988 Wed Jun 4 19:47:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
16989
16990         * mini.h: some large basic blocks will overflow a 16-bit
16991         integers for symbolic registers.
16992
16993 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
16994
16995         * mini-x86.c (mono_arch_output_basic_block): revert previous fprem changes.
16996         (mono_arch_output_basic_block): fix bug 43499 
16997
16998 Wed Jun 4 13:13:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
16999
17000         * mini.c: kill duplicated definition of mono_debug_format.
17001
17002 Wed Jun 4 13:09:51 CEST 2003 Paolo Molaro <lupus@ximian.com>
17003
17004         * mini-x86.c, arrays.cs: fixed register allocation bug.
17005
17006 2003-06-04  Dietmar Maurer  <dietmar@ximian.com>
17007
17008         * mini-x86.c (mono_arch_output_basic_block): use IEEE compatible fprem1
17009
17010         * mini.c (mini_get_opcode_for_method): inline IEEERemainder
17011
17012 2003-06-04  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17013
17014         * mini.c:
17015         (print_method_from_ip): also print source location information if
17016         available.
17017
17018 2003-06-02  Dietmar Maurer  <dietmar@ximian.com>
17019
17020         * mini.c (mono_find_block_region): bug fix in region code
17021         (mini_method_compile): enable removing unreachable code again, but
17022         only in methods without exception clauses.
17023
17024 Fri May 30 18:40:24 CEST 2003 Paolo Molaro <lupus@ximian.com>
17025
17026         * mini.c, mini-ops.h, cpu-pentium.md, inssel.brg, mini-x86.c, mini.h:
17027         Implemented arglist opcode and handling of TypedReference type.
17028         Fixed x86 call convention when a structure is returned.
17029         Minimal support for calling static vararg methods.
17030
17031 2003-05-30  Dietmar Maurer  <dietmar@ximian.com>
17032
17033         * mini.c (mini_method_compile):  always remove unreachable code,
17034         because the code in them may be inconsistent  (access to dead
17035         variables for example).
17036
17037 Thu May 29 11:44:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17038
17039         * driver.c, debug-mini.c: warning fixes.
17040
17041 Wed May 28 11:19:15 CEST 2003 Paolo Molaro <lupus@ximian.com>
17042
17043         * Makefile.am, jit.h, mini.h: install header for embedding mono.
17044
17045 Tue May 27 17:56:12 CEST 2003 Paolo Molaro <lupus@ximian.com>
17046
17047         * mini.c: thread-static fields are registered in mono_class_vtable(),
17048         so ensure the function is called before checking for them.
17049
17050 2003-05-27  Dietmar Maurer  <dietmar@ximian.com>
17051
17052         * mini.c (optimize_branches): fix for bug 43586
17053
17054         * jit-icalls.c (mono_llmult_ovf): added an additional check for
17055         overflow (fixes Bug #43639)
17056
17057 Tue May 27 11:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17058
17059         * mini.c, objects.cs: allow the use of stobj for primitive types.
17060
17061 Tue May 27 10:33:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17062
17063         * mini.c: be less strict about argument checking until we support
17064         running the verifier.
17065
17066 2003-05-27  Nick Drochak <ndrochak@gol.com>
17067
17068         * basic-long.cs: tests for (ulong)int * (ulong)int also
17069         * mini.c: use the same trick for (ulong)int * (ulong)int
17070
17071 2003-05-27  Nick Drochak <ndrochak@gol.com>
17072
17073         * basic-long.cs: add regression test for (long)int * (long)int
17074         * cpu-pentium.md: add op_bigmul specification
17075         * inssel-long32.brg: add OP_BIGMUL rule
17076         * mini-ops.h: add OP_BIGMUL
17077         * mini-x86.c: register allocator: handle case where src1 needs to be
17078         in EAX.
17079         * mini.c: substitute special BIGMUL opcode in the tree for 
17080         (long)int * (long)int
17081
17082 Mon May 26 20:20:13 CEST 2003 Paolo Molaro <lupus@ximian.com>
17083
17084         * jit-icalls.c: call the type ctor on field access if needed.
17085
17086 Mon May 26 15:21:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17087
17088         * mini-ops.h, mini.c, inssel.brg, exceptions.cs: validate arguments passed
17089         to a method (including results of ldelema, bug#43207).
17090
17091 2003-05-26  Dietmar Maurer  <dietmar@ximian.com>
17092
17093         * graph.c (cfg_emit_one_loop_level): loop over all blocks. use
17094         colors to show exception handler blocks.
17095
17096         * inssel-x86.brg (OP_OUTARG_VT): dont push zero sized structures
17097         (fix for pinvoke7.cs).
17098
17099 Mon May 26 12:11:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17100
17101         * mini.h, mini.c: ensure correct initialization order for types that
17102         require it. Prepare for lazy compilation of jit icall wrappers.
17103         Provide a name for opcode emulation to reduce unneeded mallocing.
17104
17105 Fri May 23 16:08:54 CEST 2003 Paolo Molaro <lupus@ximian.com>
17106
17107         * mini-x86.c: better register restoring code and profiling
17108         support for tail calls.
17109
17110 Fri May 23 15:30:53 CEST 2003 Paolo Molaro <lupus@ximian.com>
17111
17112         * mini.h, driver.c: prepare for leaf methods optimization.
17113
17114 Fri May 23 15:28:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17115
17116         * mini.c: get targets of branches before converting a method.
17117
17118 2003-05-23  Dietmar Maurer  <dietmar@ximian.com>
17119
17120         * mini.c (optimize_branches): added some experimental code (disbaled) 
17121
17122 2003-05-22  Dietmar Maurer  <dietmar@ximian.com>
17123
17124         * mini.c (optimize_branches): fix branch to branch optimization 
17125
17126         * exceptions-x86.c (mono_arch_handle_exception): bug fix.
17127
17128         * mini-x86.c (mono_arch_output_basic_block): cleanup up exception code
17129
17130         * inssel-x86.brg: added OP_START_HANDLER, CEE_ENDFINALLY, OP_ENDFILTER
17131
17132         * mini-x86.c (mono_arch_allocate_vars): only reserve space for lmf
17133         if needed.
17134
17135 2003-05-21  Dietmar Maurer  <dietmar@ximian.com>
17136
17137         * mini.c (mono_method_to_ir): call handle_loaded_temps before inlining.
17138         enable use of interface variables again.
17139
17140         * mini-x86.c (mono_arch_get_allocatable_int_vars): dont allocate
17141         I1 to registers because there is no simply way to sign extend 8bit
17142         quantities in caller saved registers on x86.
17143
17144         * inssel-float.brg: set costs of some rules to 2 so
17145         that monobure always select the arch. specific ones if supplied,
17146         regardless of the order we pass the files to monoburg.
17147
17148 Tue May 20 17:19:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17149
17150         * mini.c, mini-x86.c: since the magic trampoline for jumps
17151         can't patch the code directly, we do it as soon as the
17152         method gets compiled.
17153
17154 Tue May 20 16:02:52 CEST 2003 Paolo Molaro <lupus@ximian.com>
17155
17156         * mini-x86.c, mini.h: introduce a new patching method
17157         to support CEE_JMP and tail calls.
17158         * mini.c: obey tail.call. Don't precompile methods target
17159         of CEE_JMP.
17160         * tramp-x86.c: new trampoline code to handle methods
17161         reached through a jump.
17162
17163 2003-05-20  Dietmar Maurer  <dietmar@ximian.com>
17164
17165         * mini-x86.c (mono_arch_get_allocatable_int_vars): allocate 8/16
17166         bit values to registers
17167
17168 2003-05-19  Dietmar Maurer  <dietmar@ximian.com>
17169
17170         * mini.c (mono_compile_get_interface_var): share interface
17171         variables if possible.
17172
17173 2003-05-16  Martin Baulig  <martin@ximian.com>
17174
17175         * debug-mini.c (mono_init_debugger): New function to initialize
17176         the debugger.  This is not in the debugger since it needs to
17177         access some of mini's internals.
17178
17179 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
17180
17181         * mini.c (mono_method_to_ir): inlining fixes/cleanups
17182
17183 Fri May 16 13:27:23 CEST 2003 Paolo Molaro <lupus@ximian.com>
17184
17185         * mini.c, mini-opts.h, inssel.brg: inline small memcpy
17186         for value type handling.
17187
17188 2003-05-16  Dietmar Maurer  <dietmar@ximian.com>
17189
17190         * mini.c (mono_method_to_ir): inline LDFLD/STFLD wrappers
17191         (mono_method_check_inlining): enable inlining of all kinds of wrappers
17192
17193 2003-05-15  Lluis Sanchez Gual  <lluis@ideary.com>
17194
17195         * mini.c: fixed little bug in CEE_NEWOBJ case when calling
17196           the constructor through a proxy.
17197
17198 Thu May 15 17:17:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17199
17200         * jit-icalls.c, inssel.brg: fixes to array element address
17201         calculations.
17202
17203 2003-05-15  Dietmar Maurer  <dietmar@ximian.com>
17204
17205         * mini-x86.c (is_regsize_var): allocate pointer to registers
17206
17207 Thu May 15 13:04:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17208
17209         * driver.c: fixed typo, added intrins to the set of optimizations
17210         tested with regressions.
17211
17212 Thu May 15 11:57:42 CEST 2003 Paolo Molaro <lupus@ximian.com>
17213
17214         * mini-ops.h, mini.c, inssel.brg: optimize access to 2D arrays.
17215         * jit-icalls.c, exceptions.cs: fixed index out of range checks, added
17216         test case.
17217
17218 2003-05-14  Dietmar Maurer  <dietmar@ximian.com>
17219
17220         * inssel.brg: remove some common pop instructions without side effects
17221
17222 Wed May 14 12:40:31 CEST 2003 Paolo Molaro <lupus@ximian.com>
17223
17224         * inssel-x86.brg: fixed thinko in int to double conversions.
17225
17226 Wed May 14 12:01:58 CEST 2003 Paolo Molaro <lupus@ximian.com>
17227
17228         * mini.c, jit-icalls.c: added runtime thread-static variable support.
17229
17230 Tue May 13 22:02:06 CEST 2003 Paolo Molaro <lupus@ximian.com>
17231
17232         * inssel-long32.brg: two more missing instructions.
17233
17234 2003-05-13  Dietmar Maurer  <dietmar@ximian.com>
17235
17236         * mini.c (mono_emit_call_args): set the cil_code for all arguments
17237         if not already set.
17238
17239 2003-05-12  Zoltan Varga  <vargaz@freemail.hu>
17240
17241         * mini-x86.c (mono_arch_output_basic_block): Handle negative zero
17242         correctly.
17243
17244         * basic-float.cs: Added tests for negative zero.
17245
17246 Sun May 11 14:56:27 CEST 2003 Paolo Molaro <lupus@ximian.com>
17247
17248         * inssel-long32.brg, basic-long.cs, exceptions.cs: handle
17249         a couple of missing operations for long casts, with test cases.
17250
17251 2003-05-11  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17252
17253         * exceptions-x86.c: fixed small leaks in mono_arch_handle_exception.
17254
17255 2003-05-09  Dietmar Maurer  <dietmar@ximian.com>
17256
17257         * mini-x86.c (mono_arch_emit_prolog): avoid reallocs with better
17258         code size estimation.
17259
17260 2003-05-08  Dietmar Maurer  <dietmar@ximian.com>
17261
17262         * mini.c (mono_jit_create_remoting_trampoline): make it work with
17263         abstract methods (fix bug 42542)
17264
17265         * aot.c: add ability to handle array types
17266         
17267 2003-05-08  Zoltan Varga  <vargaz@freemail.hu>
17268
17269         * mini.c: Call the _specific versions of the object allocation
17270         functions if possible.
17271
17272 Tue May 6 17:18:33 CEST 2003 Paolo Molaro <lupus@ximian.com>
17273
17274         * driver.c: call setlocale ().
17275
17276 Tue May 6 14:38:22 CEST 2003 Paolo Molaro <lupus@ximian.com>
17277
17278         * mini.h, mini.c, aot.c, debug-mini.c, exceptions.c: build fixes for
17279         windows build.
17280
17281 2003-05-05  Dietmar Maurer  <dietmar@ximian.com>
17282
17283         * mini.c (optimize_branches): dont touch code inside exception clauses (fix bug 38136)
17284
17285         * exceptions-x86.c (ves_icall_get_frame_info): also skip remoting
17286         wrappers (fix bug 42122)
17287
17288 2003-05-04  Martin Baulig  <martin@ximian.com>
17289
17290         * mini.h (mono_jit_init, mono_jit_cleanup): Added prototypes.
17291
17292         * driver.c: s/MONO_OPT_SAHRED/MONO_OPT_SHARED/g.
17293         s/mini_set_defaults/mono_set_defaults/g.
17294
17295 2003-05-04  Martin Baulig  <martin@ximian.com>
17296
17297         * driver.c: s/mini_parse_default_optimizations/mono_parse_default_optimizations/g.
17298
17299 Sun May 4 11:48:08 CEST 2003 Paolo Molaro <lupus@ximian.com>
17300
17301         * inssel-long32.brg: add missing lreg: OP_LCONV_TO_U8 (lreg) rule
17302         (reported by Don Roberts).
17303
17304 Fri May 2 18:36:45 CEST 2003 Paolo Molaro <lupus@ximian.com>
17305
17306         * mini.c: temporarily work around two bugs for this release.
17307
17308 Fri May 2 17:37:29 CEST 2003 Paolo Molaro <lupus@ximian.com>
17309
17310         * Makefile.am: avoid linking libmono with GMODULE_LIBS, because
17311         that contains -export-dynamic and it makes using the ld script
17312         useless.
17313         * mini.h, main.c, driver.c: s/mini_main/mono_main/g.
17314
17315 Fri May 2 12:52:32 CEST 2003 Paolo Molaro <lupus@ximian.com>
17316
17317         * mini.h, mini-x86.c, driver.c: disable optimizations not available on a
17318         specific cpu.
17319
17320 Thu May 1 15:28:21 CEST 2003 Paolo Molaro <lupus@ximian.com>
17321
17322         * mini.c: make sure leave calls all the needed finally blocks,
17323         even when the target jumps out of multiple exception clauses.
17324
17325 Thu May 1 15:18:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17326
17327         * ldscript, Makefile.am: add linker script to reduce the number of
17328         exported symbols (should also fix the issues with libwine defining
17329         some of the same symbols in io-layer).
17330
17331 2003-05-01  Zoltan Varga  <vargaz@freemail.hu>
17332
17333         * driver.c (mini_main): Avoid assertion when no file name is given on 
17334         the command line.
17335
17336 Wed Apr 30 15:33:11 CEST 2003 Paolo Molaro <lupus@ximian.com>
17337
17338         * driver.c: added --version/-V command line option.
17339         Added the inline optimization in the regression tests.
17340
17341 Wed Apr 30 15:16:02 CEST 2003 Paolo Molaro <lupus@ximian.com>
17342
17343         * mini.c, basic-calls.cs: when inlining, save arguments to locals according 
17344         to the type in the method signature (fixes bug#42134).
17345
17346 Wed Apr 30 12:38:44 CEST 2003 Paolo Molaro <lupus@ximian.com>
17347
17348         * mini.c: when inlining, check this is not null only when needed (bug #42135).
17349
17350 Wed Apr 30 11:44:36 CEST 2003 Paolo Molaro <lupus@ximian.com>
17351
17352         * mini-ppc.h, tramp-pcc.c: type fixes from Max Horn <max@quendi.de>.
17353
17354 2003-04-30  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17355
17356         * driver.c: fixed bug #42100.
17357
17358 2003-04-29  Dietmar Maurer  <dietmar@ximian.com>
17359
17360         * mini.c (mono_method_to_ir): UNBOX need to CAST objects first
17361
17362 Mon Apr 28 17:03:14 CEST 2003 Paolo Molaro <lupus@ximian.com>
17363
17364         * mini.c: moved most of the code required to do inlining to its own
17365         function so it can be reused. Inline also ctors if appropriate.
17366
17367 2003-04-28  Zoltan Varga  <vargaz@freemail.hu>
17368
17369         * Makefile.am: Link with -export-dynamic so shared libs loaded by
17370         the runtime can call mono API functions.
17371
17372 2003-04-27  Martin Baulig  <martin@ximian.com>
17373
17374         * debug-mini.c (mono_debug_init_method): Added
17375         `guint32 breakpoint_id' argument; if the method has a breakpoint,
17376         send a notification to the debugger.
17377
17378         * mini.c (mono_method_to_ir): Don't insert a breakpoint if we're
17379         running in the Mono Debugger, just pass the breakpoint number to
17380         mono_debug_init_method().
17381
17382         * tramp-x86.c, tramp-ppc.c: Removed the breakpoint trampolines.
17383
17384 Sun Apr 27 13:18:04 CEST 2003 Paolo Molaro <lupus@ximian.com>
17385
17386         * mini.c: allow some more unsafe compares.
17387
17388 Sat Apr 26 11:55:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17389
17390         * mini-x86.c, Makefile.am: make distcheck works (partially from
17391         a patch by Richard Lee <r.h.lee@attbi.com>).
17392         * regset.c, regset.h: removed, they are unused.
17393
17394 2003-04-25  Dick Porter  <dick@ximian.com>
17395
17396         * driver.c: Usage reports the name as 'mono' not 'mini'
17397         * exceptions-x86.c: Build and run on freebsd
17398
17399 Thu Apr 24 17:09:03 CEST 2003 Paolo Molaro <lupus@ximian.com>
17400
17401         * Makefile.am: install the program with the 'mono' name and
17402         the library as libmono instead of mini and libmini.
17403
17404 Thu Apr 24 17:08:07 CEST 2003 Paolo Molaro <lupus@ximian.com>
17405
17406         * driver.c: provide the APIs for the embedding interface of the old jit.
17407
17408 2003-04-23  Dietmar Maurer  <dietmar@ximian.com>
17409
17410         * jit-icalls.c (helper_stelem_ref): impl. (fix bug 41775)
17411
17412 2003-04-23  Martin Baulig  <martin@ximian.com>
17413
17414         * tramp-x86.c, tramp-ppc.c: Reenable the debugger breakpoint interface.
17415
17416         * driver.c: Added `--debug' command line argument to enable
17417         debugging support.
17418
17419 2003-04-23  Martin Baulig  <martin@ximian.com>
17420
17421         * debug.[ch]: Removed.  The code is now in
17422         ../metadata/mono-debug.[ch] and mono-debug-debugger.[ch].
17423
17424         * debug-stabs.c, debug-dwarf2.c: Removed; nobody used this for the
17425         last six months.
17426
17427 2003-04-22  Dietmar Maurer  <dietmar@ximian.com>
17428
17429         * mini.c (mono_method_to_ir): set the cil_code address (fix bug 41525)
17430
17431 2003-04-17  Gonzalo Paniagua Javier <gonzalo@ximian.com>
17432
17433         * mini.c:
17434         (mini_cleanup): moved mono_runtime_cleanup call after the call to
17435         mono_domain_finalize.
17436         (mini_method_compile): use mono_method_profile* if the the option is
17437         enabled.
17438
17439 2003-04-17  Zoltan Varga  <vargaz@freemail.hu>
17440
17441         * tramp-x86.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17442         methods with their wrapper.
17443
17444         * tramp-ppc.c (mono_arch_create_jit_trampoline): Subsitute synchronized
17445         methods with their wrapper.
17446
17447         * jit-icalls.c (mono_ldvirtfn): Subsitute synchronized methods with
17448         their wrapper.
17449
17450         * mini.c (mono_method_to_ir): Subsitute synchronized methods with their
17451         wrapper.
17452
17453         * mini.c (mono_method_check_inlining): Avoid inlining synchronized
17454         methods.
17455
17456 2003-04-17  Dietmar Maurer  <dietmar@ximian.com>
17457
17458         * exceptions-x86.c (mono_arch_handle_exception): fix for bug 36252
17459
17460 2003-04-16  Dietmar Maurer  <dietmar@ximian.com>
17461
17462         * mini.c (mono_compile_create_var): use g_malloc/g_realloc instead
17463         of the mempool. This is slightly faster and uses less memory
17464
17465 Wed Apr 16 12:53:10 CEST 2003 Paolo Molaro <lupus@ximian.com>
17466
17467         * mini.c: avoid O(n) allocation for variables.
17468
17469 Tue Apr 15 19:13:41 CEST 2003 Paolo Molaro <lupus@ximian.com>
17470
17471         * mini.c: handle items on the stack after inlining methods.
17472
17473 Tue Apr 15 14:17:57 CEST 2003 Paolo Molaro <lupus@ximian.com>
17474
17475         * mini.c: make the method->opcode optimization dependent
17476         on MONO_OPT_INSTRINS and do it lazily.
17477
17478 Tue Apr 15 14:15:39 CEST 2003 Paolo Molaro <lupus@ximian.com>
17479
17480         * driver.c: print overall results at the end of regression run.
17481
17482 Tue Apr 15 11:18:46 CEST 2003 Paolo Molaro <lupus@ximian.com>
17483
17484         * inssel.brg: don't overwrite symbolic registers.
17485
17486 Mon Apr 14 17:41:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17487
17488         * inssel-x86.brg: fix conversion from long to float.
17489
17490 2003-04-11  Dietmar Maurer  <dietmar@ximian.com>
17491
17492         * mini.c (mini_init): use an opcode for get_Chars (OP_GETCHR)
17493
17494 2003-04-10  Zoltan Varga  <vargaz@freemail.hu>
17495
17496         * mini.c (mono_type_blittable): MONO_TYPE_OBJECT is blittable.
17497
17498         * driver.c: Added --print-vtable option as in the old JIT.
17499
17500 Thu Apr 10 17:43:49 CEST 2003 Paolo Molaro <lupus@ximian.com>
17501
17502         * inssel-long32.brg, exceptions.cs: fix conversions from long, too.
17503
17504 Thu Apr 10 16:27:43 CEST 2003 Paolo Molaro <lupus@ximian.com>
17505
17506         * inssel.brg, basic.cs: fixed checked conversions to byte and short.
17507
17508 2003-04-09  Zoltan Varga  <vargaz@freemail.hu>
17509
17510         * mini.c regalloc.c regalloc.h: Fix memory leak.
17511
17512 2003-04-09  Dietmar Maurer  <dietmar@ximian.com>
17513
17514         * aot.c (mono_aot_get_method): register all used strings
17515
17516 Wed Apr 9 15:22:18 CEST 2003 Paolo Molaro <lupus@ximian.com>
17517
17518         * mini.c: always intern strings references with ldstr at compile time.
17519
17520 Tue Apr 8 11:41:26 CEST 2003 Paolo Molaro <lupus@ximian.com>
17521
17522         * Makefile.am: add BUILT_SOURCES.
17523
17524 Mon Apr 7 16:31:34 CEST 2003 Paolo Molaro <lupus@ximian.com>
17525
17526         * driver.c: give a better error message when the assembly to execute
17527         doesn't have an entry point.
17528
17529 2003-04-07  Dietmar Maurer  <dietmar@ximian.com>
17530
17531         * Makefile.am: added hack for automake
17532
17533         * mono/mini/mini.c (mono_save_args): always copy arguments to keep
17534         correct sematics.
17535
17536         * mono/mini/ssa.c (mono_ssa_avoid_copies): don't optimize calls
17537
17538 22003-04-07  Martin Baulig  <martin@ximian.com>
17539
17540         * Makefile.am: Added Makefile.am.
17541
17542         * debugger-main.c: Removed, this is now in the debugger where it
17543         belongs.
17544
17545         * mini.pc.in: Call this package `mini' for the moment.
17546
17547
17548
17549
17550
17551
17552
17553
17554
17555
17556
17557
17558
17559